Add a comment for the ARM_F{0..7}_REGNUM registers
[binutils-gdb.git] / gdb / configure
blob4f2d7f8f232781d8ca7abe64336dc73726e2dd7e
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 LTLIBBABELTRACE
635 LIBBABELTRACE
636 HAVE_LIBBABELTRACE
637 HAVE_NATIVE_GCORE_HOST
638 NAT_GENERATED_FILES
639 XM_CLIBS
640 MH_CFLAGS
641 LOADLIBES
642 NAT_CDEPS
643 NATDEPFILES
644 NAT_FILE
645 target_subdir
646 CONFIG_UNINSTALL
647 CONFIG_INSTALL
648 CONFIG_CLEAN
649 CONFIG_ALL
650 CONFIG_SRCS
651 CONFIG_DEPS
652 CONFIG_OBS
653 PROFILE_CFLAGS
654 ENABLE_CFLAGS
655 SIM_OBS
657 XMKMF
658 GDBTK_SRC_DIR
659 GDBTK_CFLAGS
660 GDBTKLIBS
661 X_LIBS
662 X_LDFLAGS
663 X_CFLAGS
664 TK_XINCLUDES
665 TK_DEPS
666 TK_LIBRARY
667 TK_INCLUDE
668 TK_STUB_LIB_SPEC
669 TK_STUB_LIB_FLAG
670 TK_STUB_LIB_FILE
671 TK_LIB_SPEC
672 TK_LIB_FLAG
673 TK_LIB_FILE
674 TK_SRC_DIR
675 TK_BIN_DIR
676 TK_VERSION
677 TCL_DEPS
678 TCL_LIBRARY
679 TCL_INCLUDE
680 TCL_STUB_LIB_SPEC
681 TCL_STUB_LIB_FLAG
682 TCL_STUB_LIB_FILE
683 TCL_LIB_SPEC
684 TCL_LIB_FLAG
685 TCL_LIB_FILE
686 TCL_SRC_DIR
687 TCL_BIN_DIR
688 TCL_PATCH_LEVEL
689 TCL_VERSION
690 WIN32LDAPP
691 WIN32LIBS
692 GUI_CFLAGS_X
693 LIBGUI
694 LTLIBLZMA
695 LIBLZMA
696 HAVE_LIBLZMA
697 SER_HARDWIRE
698 WERROR_CFLAGS
699 WARN_CFLAGS
700 SYSTEM_GDBINIT_DIR
701 SYSTEM_GDBINIT
702 TARGET_SYSTEM_ROOT
703 CONFIG_LDFLAGS
704 RDYNAMIC
705 LTLIBIPT
706 LIBIPT
707 HAVE_LIBIPT
708 PTHREAD_CFLAGS
709 PTHREAD_LIBS
710 PTHREAD_CC
711 ax_pthread_config
713 ALLOCA
714 SRCHIGH_CFLAGS
715 SRCHIGH_LIBS
716 HAVE_GUILE_FALSE
717 HAVE_GUILE_TRUE
718 GUILE_LIBS
719 GUILE_CPPFLAGS
720 GUILD_TARGET_FLAG
721 GUILD
722 pkg_config_prog_path
723 HAVE_PYTHON_FALSE
724 HAVE_PYTHON_TRUE
725 PYTHON_LIBS
726 PYTHON_CPPFLAGS
727 PYTHON_CFLAGS
728 python_prog_path
729 LTLIBMPFR
730 LIBMPFR
731 HAVE_LIBMPFR
732 LTLIBEXPAT
733 LIBEXPAT
734 HAVE_LIBEXPAT
735 JIT_READER_DIR
736 TARGET_PTR
737 READLINE_TEXI_INCFLAG
738 READLINE_CFLAGS
739 READLINE_DEPS
740 READLINE
741 LTLIBICONV
742 LIBICONV
743 zlibinc
744 zlibdir
746 WINDRES
747 DLLTOOL
749 YFLAGS
750 YACC
751 RANLIB
752 LN_S
753 INSTALL_DATA
754 INSTALL_SCRIPT
755 INSTALL_PROGRAM
757 REPORT_BUGS_TEXI
758 REPORT_BUGS_TO
759 PKGVERSION
760 CODESIGN_CERT
761 HAVE_NATIVE_GCORE_TARGET
762 TARGET_OBS
763 subdirs
764 GDB_DATADIR
765 DEBUGDIR
766 MAKEINFO_EXTRA_FLAGS
767 MAKEINFOFLAGS
768 MAKEINFO
769 PACKAGE
770 CATOBJEXT
771 GENCAT
772 INSTOBJEXT
773 DATADIRNAME
774 CATALOGS
775 POSUB
776 GMSGFMT
777 XGETTEXT
778 INCINTL
779 LIBINTL_DEP
780 LIBINTL
781 USE_NLS
782 CCDEPMODE
783 DEPDIR
784 am__leading_dot
785 CXX_DIALECT
786 HAVE_CXX11
787 INSTALL_STRIP_PROGRAM
788 STRIP
789 install_sh
790 target_os
791 target_vendor
792 target_cpu
793 target
794 host_os
795 host_vendor
796 host_cpu
797 host
798 build_os
799 build_vendor
800 build_cpu
801 build
802 EGREP
803 GREP
805 ac_ct_CXX
806 CXXFLAGS
808 OBJEXT
809 EXEEXT
810 ac_ct_CC
811 CPPFLAGS
812 LDFLAGS
813 CFLAGS
815 MAINT
816 MAINTAINER_MODE_FALSE
817 MAINTAINER_MODE_TRUE
818 target_alias
819 host_alias
820 build_alias
821 LIBS
822 ECHO_T
823 ECHO_N
824 ECHO_C
825 DEFS
826 mandir
827 localedir
828 libdir
829 psdir
830 pdfdir
831 dvidir
832 htmldir
833 infodir
834 docdir
835 oldincludedir
836 includedir
837 localstatedir
838 sharedstatedir
839 sysconfdir
840 datadir
841 datarootdir
842 libexecdir
843 sbindir
844 bindir
845 program_transform_name
846 prefix
847 exec_prefix
848 PACKAGE_URL
849 PACKAGE_BUGREPORT
850 PACKAGE_STRING
851 PACKAGE_VERSION
852 PACKAGE_TARNAME
853 PACKAGE_NAME
854 PATH_SEPARATOR
855 SHELL'
856 ac_subst_files='nat_makefile_frag'
857 ac_user_opts='
858 enable_option_checking
859 enable_maintainer_mode
860 enable_plugins
861 enable_largefile
862 with_separate_debug_dir
863 with_gdb_datadir
864 with_relocated_sources
865 with_auto_load_dir
866 with_auto_load_safe_path
867 enable_targets
868 enable_64_bit_bfd
869 enable_gdbmi
870 enable_tui
871 enable_gdbtk
872 with_libunwind_ia64
873 with_curses
874 enable_profiling
875 enable_codesign
876 with_pkgversion
877 with_bugurl
878 with_system_zlib
879 with_gnu_ld
880 enable_rpath
881 with_libiconv_prefix
882 with_iconv_bin
883 with_system_readline
884 with_jit_reader_dir
885 with_expat
886 with_libexpat_prefix
887 with_mpfr
888 with_libmpfr_prefix
889 with_python
890 with_guile
891 enable_source_highlight
892 with_intel_pt
893 with_libipt_prefix
894 with_included_regex
895 with_sysroot
896 with_system_gdbinit
897 with_system_gdbinit_dir
898 enable_werror
899 enable_build_warnings
900 enable_gdb_build_warnings
901 enable_ubsan
902 with_lzma
903 with_liblzma_prefix
904 with_tcl
905 with_tk
906 with_x
907 enable_sim
908 with_babeltrace
909 with_libbabeltrace_prefix
910 with_xxhash
911 with_libxxhash_prefix
912 enable_unit_tests
914 ac_precious_vars='build_alias
915 host_alias
916 target_alias
918 CFLAGS
919 LDFLAGS
920 LIBS
921 CPPFLAGS
923 CXXFLAGS
926 MAKEINFO
927 MAKEINFOFLAGS
928 YACC
929 YFLAGS
930 XMKMF'
931 ac_subdirs_all='testsuite
932 gdbtk'
934 # Initialize some variables set by options.
935 ac_init_help=
936 ac_init_version=false
937 ac_unrecognized_opts=
938 ac_unrecognized_sep=
939 # The variables have the same names as the options, with
940 # dashes changed to underlines.
941 cache_file=/dev/null
942 exec_prefix=NONE
943 no_create=
944 no_recursion=
945 prefix=NONE
946 program_prefix=NONE
947 program_suffix=NONE
948 program_transform_name=s,x,x,
949 silent=
950 site=
951 srcdir=
952 verbose=
953 x_includes=NONE
954 x_libraries=NONE
956 # Installation directory options.
957 # These are left unexpanded so users can "make install exec_prefix=/foo"
958 # and all the variables that are supposed to be based on exec_prefix
959 # by default will actually change.
960 # Use braces instead of parens because sh, perl, etc. also accept them.
961 # (The list follows the same order as the GNU Coding Standards.)
962 bindir='${exec_prefix}/bin'
963 sbindir='${exec_prefix}/sbin'
964 libexecdir='${exec_prefix}/libexec'
965 datarootdir='${prefix}/share'
966 datadir='${datarootdir}'
967 sysconfdir='${prefix}/etc'
968 sharedstatedir='${prefix}/com'
969 localstatedir='${prefix}/var'
970 includedir='${prefix}/include'
971 oldincludedir='/usr/include'
972 docdir='${datarootdir}/doc/${PACKAGE}'
973 infodir='${datarootdir}/info'
974 htmldir='${docdir}'
975 dvidir='${docdir}'
976 pdfdir='${docdir}'
977 psdir='${docdir}'
978 libdir='${exec_prefix}/lib'
979 localedir='${datarootdir}/locale'
980 mandir='${datarootdir}/man'
982 ac_prev=
983 ac_dashdash=
984 for ac_option
986 # If the previous option needs an argument, assign it.
987 if test -n "$ac_prev"; then
988 eval $ac_prev=\$ac_option
989 ac_prev=
990 continue
993 case $ac_option in
994 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
995 *=) ac_optarg= ;;
996 *) ac_optarg=yes ;;
997 esac
999 # Accept the important Cygnus configure options, so we can diagnose typos.
1001 case $ac_dashdash$ac_option in
1003 ac_dashdash=yes ;;
1005 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1006 ac_prev=bindir ;;
1007 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1008 bindir=$ac_optarg ;;
1010 -build | --build | --buil | --bui | --bu)
1011 ac_prev=build_alias ;;
1012 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1013 build_alias=$ac_optarg ;;
1015 -cache-file | --cache-file | --cache-fil | --cache-fi \
1016 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1017 ac_prev=cache_file ;;
1018 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1019 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1020 cache_file=$ac_optarg ;;
1022 --config-cache | -C)
1023 cache_file=config.cache ;;
1025 -datadir | --datadir | --datadi | --datad)
1026 ac_prev=datadir ;;
1027 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1028 datadir=$ac_optarg ;;
1030 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1031 | --dataroo | --dataro | --datar)
1032 ac_prev=datarootdir ;;
1033 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1034 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1035 datarootdir=$ac_optarg ;;
1037 -disable-* | --disable-*)
1038 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1039 # Reject names that are not valid shell variable names.
1040 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1041 as_fn_error $? "invalid feature name: $ac_useropt"
1042 ac_useropt_orig=$ac_useropt
1043 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1044 case $ac_user_opts in
1046 "enable_$ac_useropt"
1047 "*) ;;
1048 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1049 ac_unrecognized_sep=', ';;
1050 esac
1051 eval enable_$ac_useropt=no ;;
1053 -docdir | --docdir | --docdi | --doc | --do)
1054 ac_prev=docdir ;;
1055 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1056 docdir=$ac_optarg ;;
1058 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1059 ac_prev=dvidir ;;
1060 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1061 dvidir=$ac_optarg ;;
1063 -enable-* | --enable-*)
1064 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1065 # Reject names that are not valid shell variable names.
1066 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1067 as_fn_error $? "invalid feature name: $ac_useropt"
1068 ac_useropt_orig=$ac_useropt
1069 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1070 case $ac_user_opts in
1072 "enable_$ac_useropt"
1073 "*) ;;
1074 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1075 ac_unrecognized_sep=', ';;
1076 esac
1077 eval enable_$ac_useropt=\$ac_optarg ;;
1079 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1080 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1081 | --exec | --exe | --ex)
1082 ac_prev=exec_prefix ;;
1083 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1084 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1085 | --exec=* | --exe=* | --ex=*)
1086 exec_prefix=$ac_optarg ;;
1088 -gas | --gas | --ga | --g)
1089 # Obsolete; use --with-gas.
1090 with_gas=yes ;;
1092 -help | --help | --hel | --he | -h)
1093 ac_init_help=long ;;
1094 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1095 ac_init_help=recursive ;;
1096 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1097 ac_init_help=short ;;
1099 -host | --host | --hos | --ho)
1100 ac_prev=host_alias ;;
1101 -host=* | --host=* | --hos=* | --ho=*)
1102 host_alias=$ac_optarg ;;
1104 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1105 ac_prev=htmldir ;;
1106 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1107 | --ht=*)
1108 htmldir=$ac_optarg ;;
1110 -includedir | --includedir | --includedi | --included | --include \
1111 | --includ | --inclu | --incl | --inc)
1112 ac_prev=includedir ;;
1113 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1114 | --includ=* | --inclu=* | --incl=* | --inc=*)
1115 includedir=$ac_optarg ;;
1117 -infodir | --infodir | --infodi | --infod | --info | --inf)
1118 ac_prev=infodir ;;
1119 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1120 infodir=$ac_optarg ;;
1122 -libdir | --libdir | --libdi | --libd)
1123 ac_prev=libdir ;;
1124 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1125 libdir=$ac_optarg ;;
1127 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1128 | --libexe | --libex | --libe)
1129 ac_prev=libexecdir ;;
1130 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1131 | --libexe=* | --libex=* | --libe=*)
1132 libexecdir=$ac_optarg ;;
1134 -localedir | --localedir | --localedi | --localed | --locale)
1135 ac_prev=localedir ;;
1136 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1137 localedir=$ac_optarg ;;
1139 -localstatedir | --localstatedir | --localstatedi | --localstated \
1140 | --localstate | --localstat | --localsta | --localst | --locals)
1141 ac_prev=localstatedir ;;
1142 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1143 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1144 localstatedir=$ac_optarg ;;
1146 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1147 ac_prev=mandir ;;
1148 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1149 mandir=$ac_optarg ;;
1151 -nfp | --nfp | --nf)
1152 # Obsolete; use --without-fp.
1153 with_fp=no ;;
1155 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1156 | --no-cr | --no-c | -n)
1157 no_create=yes ;;
1159 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1160 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1161 no_recursion=yes ;;
1163 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1164 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1165 | --oldin | --oldi | --old | --ol | --o)
1166 ac_prev=oldincludedir ;;
1167 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1168 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1169 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1170 oldincludedir=$ac_optarg ;;
1172 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1173 ac_prev=prefix ;;
1174 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1175 prefix=$ac_optarg ;;
1177 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1178 | --program-pre | --program-pr | --program-p)
1179 ac_prev=program_prefix ;;
1180 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1181 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1182 program_prefix=$ac_optarg ;;
1184 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1185 | --program-suf | --program-su | --program-s)
1186 ac_prev=program_suffix ;;
1187 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1188 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1189 program_suffix=$ac_optarg ;;
1191 -program-transform-name | --program-transform-name \
1192 | --program-transform-nam | --program-transform-na \
1193 | --program-transform-n | --program-transform- \
1194 | --program-transform | --program-transfor \
1195 | --program-transfo | --program-transf \
1196 | --program-trans | --program-tran \
1197 | --progr-tra | --program-tr | --program-t)
1198 ac_prev=program_transform_name ;;
1199 -program-transform-name=* | --program-transform-name=* \
1200 | --program-transform-nam=* | --program-transform-na=* \
1201 | --program-transform-n=* | --program-transform-=* \
1202 | --program-transform=* | --program-transfor=* \
1203 | --program-transfo=* | --program-transf=* \
1204 | --program-trans=* | --program-tran=* \
1205 | --progr-tra=* | --program-tr=* | --program-t=*)
1206 program_transform_name=$ac_optarg ;;
1208 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1209 ac_prev=pdfdir ;;
1210 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1211 pdfdir=$ac_optarg ;;
1213 -psdir | --psdir | --psdi | --psd | --ps)
1214 ac_prev=psdir ;;
1215 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1216 psdir=$ac_optarg ;;
1218 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1219 | -silent | --silent | --silen | --sile | --sil)
1220 silent=yes ;;
1222 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1223 ac_prev=sbindir ;;
1224 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1225 | --sbi=* | --sb=*)
1226 sbindir=$ac_optarg ;;
1228 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1229 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1230 | --sharedst | --shareds | --shared | --share | --shar \
1231 | --sha | --sh)
1232 ac_prev=sharedstatedir ;;
1233 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1234 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1235 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1236 | --sha=* | --sh=*)
1237 sharedstatedir=$ac_optarg ;;
1239 -site | --site | --sit)
1240 ac_prev=site ;;
1241 -site=* | --site=* | --sit=*)
1242 site=$ac_optarg ;;
1244 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1245 ac_prev=srcdir ;;
1246 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1247 srcdir=$ac_optarg ;;
1249 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1250 | --syscon | --sysco | --sysc | --sys | --sy)
1251 ac_prev=sysconfdir ;;
1252 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1253 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1254 sysconfdir=$ac_optarg ;;
1256 -target | --target | --targe | --targ | --tar | --ta | --t)
1257 ac_prev=target_alias ;;
1258 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1259 target_alias=$ac_optarg ;;
1261 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1262 verbose=yes ;;
1264 -version | --version | --versio | --versi | --vers | -V)
1265 ac_init_version=: ;;
1267 -with-* | --with-*)
1268 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1269 # Reject names that are not valid shell variable names.
1270 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1271 as_fn_error $? "invalid package name: $ac_useropt"
1272 ac_useropt_orig=$ac_useropt
1273 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1274 case $ac_user_opts in
1276 "with_$ac_useropt"
1277 "*) ;;
1278 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1279 ac_unrecognized_sep=', ';;
1280 esac
1281 eval with_$ac_useropt=\$ac_optarg ;;
1283 -without-* | --without-*)
1284 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1285 # Reject names that are not valid shell variable names.
1286 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1287 as_fn_error $? "invalid package name: $ac_useropt"
1288 ac_useropt_orig=$ac_useropt
1289 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1290 case $ac_user_opts in
1292 "with_$ac_useropt"
1293 "*) ;;
1294 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1295 ac_unrecognized_sep=', ';;
1296 esac
1297 eval with_$ac_useropt=no ;;
1299 --x)
1300 # Obsolete; use --with-x.
1301 with_x=yes ;;
1303 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1304 | --x-incl | --x-inc | --x-in | --x-i)
1305 ac_prev=x_includes ;;
1306 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1307 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1308 x_includes=$ac_optarg ;;
1310 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1311 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1312 ac_prev=x_libraries ;;
1313 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1314 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1315 x_libraries=$ac_optarg ;;
1317 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1318 Try \`$0 --help' for more information"
1321 *=*)
1322 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1323 # Reject names that are not valid shell variable names.
1324 case $ac_envvar in #(
1325 '' | [0-9]* | *[!_$as_cr_alnum]* )
1326 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1327 esac
1328 eval $ac_envvar=\$ac_optarg
1329 export $ac_envvar ;;
1332 # FIXME: should be removed in autoconf 3.0.
1333 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1334 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1335 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1336 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1339 esac
1340 done
1342 if test -n "$ac_prev"; then
1343 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1344 as_fn_error $? "missing argument to $ac_option"
1347 if test -n "$ac_unrecognized_opts"; then
1348 case $enable_option_checking in
1349 no) ;;
1350 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1351 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1352 esac
1355 # Check all directory arguments for consistency.
1356 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1357 datadir sysconfdir sharedstatedir localstatedir includedir \
1358 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1359 libdir localedir mandir
1361 eval ac_val=\$$ac_var
1362 # Remove trailing slashes.
1363 case $ac_val in
1364 */ )
1365 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1366 eval $ac_var=\$ac_val;;
1367 esac
1368 # Be sure to have absolute directory names.
1369 case $ac_val in
1370 [\\/$]* | ?:[\\/]* ) continue;;
1371 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1372 esac
1373 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1374 done
1376 # There might be people who depend on the old broken behavior: `$host'
1377 # used to hold the argument of --host etc.
1378 # FIXME: To remove some day.
1379 build=$build_alias
1380 host=$host_alias
1381 target=$target_alias
1383 # FIXME: To remove some day.
1384 if test "x$host_alias" != x; then
1385 if test "x$build_alias" = x; then
1386 cross_compiling=maybe
1387 elif test "x$build_alias" != "x$host_alias"; then
1388 cross_compiling=yes
1392 ac_tool_prefix=
1393 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1395 test "$silent" = yes && exec 6>/dev/null
1398 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1399 ac_ls_di=`ls -di .` &&
1400 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1401 as_fn_error $? "working directory cannot be determined"
1402 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1403 as_fn_error $? "pwd does not report name of working directory"
1406 # Find the source files, if location was not specified.
1407 if test -z "$srcdir"; then
1408 ac_srcdir_defaulted=yes
1409 # Try the directory containing this script, then the parent directory.
1410 ac_confdir=`$as_dirname -- "$as_myself" ||
1411 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1412 X"$as_myself" : 'X\(//\)[^/]' \| \
1413 X"$as_myself" : 'X\(//\)$' \| \
1414 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1415 $as_echo X"$as_myself" |
1416 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1417 s//\1/
1420 /^X\(\/\/\)[^/].*/{
1421 s//\1/
1424 /^X\(\/\/\)$/{
1425 s//\1/
1428 /^X\(\/\).*/{
1429 s//\1/
1432 s/.*/./; q'`
1433 srcdir=$ac_confdir
1434 if test ! -r "$srcdir/$ac_unique_file"; then
1435 srcdir=..
1437 else
1438 ac_srcdir_defaulted=no
1440 if test ! -r "$srcdir/$ac_unique_file"; then
1441 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1442 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1444 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1445 ac_abs_confdir=`(
1446 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1447 pwd)`
1448 # When building in place, set srcdir=.
1449 if test "$ac_abs_confdir" = "$ac_pwd"; then
1450 srcdir=.
1452 # Remove unnecessary trailing slashes from srcdir.
1453 # Double slashes in file names in object file debugging info
1454 # mess up M-x gdb in Emacs.
1455 case $srcdir in
1456 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1457 esac
1458 for ac_var in $ac_precious_vars; do
1459 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1460 eval ac_env_${ac_var}_value=\$${ac_var}
1461 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1462 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1463 done
1466 # Report the --help message.
1468 if test "$ac_init_help" = "long"; then
1469 # Omit some internal or obsolete options to make the list less imposing.
1470 # This message is too long to be a string in the A/UX 3.1 sh.
1471 cat <<_ACEOF
1472 \`configure' configures this package to adapt to many kinds of systems.
1474 Usage: $0 [OPTION]... [VAR=VALUE]...
1476 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1477 VAR=VALUE. See below for descriptions of some of the useful variables.
1479 Defaults for the options are specified in brackets.
1481 Configuration:
1482 -h, --help display this help and exit
1483 --help=short display options specific to this package
1484 --help=recursive display the short help of all the included packages
1485 -V, --version display version information and exit
1486 -q, --quiet, --silent do not print \`checking ...' messages
1487 --cache-file=FILE cache test results in FILE [disabled]
1488 -C, --config-cache alias for \`--cache-file=config.cache'
1489 -n, --no-create do not create output files
1490 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1492 Installation directories:
1493 --prefix=PREFIX install architecture-independent files in PREFIX
1494 [$ac_default_prefix]
1495 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1496 [PREFIX]
1498 By default, \`make install' will install all the files in
1499 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1500 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1501 for instance \`--prefix=\$HOME'.
1503 For better control, use the options below.
1505 Fine tuning of the installation directories:
1506 --bindir=DIR user executables [EPREFIX/bin]
1507 --sbindir=DIR system admin executables [EPREFIX/sbin]
1508 --libexecdir=DIR program executables [EPREFIX/libexec]
1509 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1510 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1511 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1512 --libdir=DIR object code libraries [EPREFIX/lib]
1513 --includedir=DIR C header files [PREFIX/include]
1514 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1515 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1516 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1517 --infodir=DIR info documentation [DATAROOTDIR/info]
1518 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1519 --mandir=DIR man documentation [DATAROOTDIR/man]
1520 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1521 --htmldir=DIR html documentation [DOCDIR]
1522 --dvidir=DIR dvi documentation [DOCDIR]
1523 --pdfdir=DIR pdf documentation [DOCDIR]
1524 --psdir=DIR ps documentation [DOCDIR]
1525 _ACEOF
1527 cat <<\_ACEOF
1529 Program names:
1530 --program-prefix=PREFIX prepend PREFIX to installed program names
1531 --program-suffix=SUFFIX append SUFFIX to installed program names
1532 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1534 X features:
1535 --x-includes=DIR X include files are in DIR
1536 --x-libraries=DIR X library files are in DIR
1538 System types:
1539 --build=BUILD configure for building on BUILD [guessed]
1540 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1541 --target=TARGET configure for building compilers for TARGET [HOST]
1542 _ACEOF
1545 if test -n "$ac_init_help"; then
1547 cat <<\_ACEOF
1549 Optional Features:
1550 --disable-option-checking ignore unrecognized --enable/--with options
1551 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1552 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1553 --enable-maintainer-mode
1554 enable make rules and dependencies not useful (and
1555 sometimes confusing) to the casual installer
1556 --enable-plugins Enable support for plugins
1557 --disable-largefile omit support for large files
1558 --enable-targets=TARGETS
1559 alternative target configurations
1560 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
1561 --disable-gdbmi disable machine-interface (MI)
1562 --enable-tui enable full-screen terminal user interface (TUI)
1563 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1564 --enable-profiling enable profiling of GDB
1565 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
1566 --disable-rpath do not hardcode runtime library paths
1567 --enable-source-highlight
1568 enable source-highlight for source listings
1569 --enable-werror treat compile warnings as errors
1570 --enable-build-warnings enable build-time compiler warnings if gcc is used
1571 --enable-gdb-build-warnings
1572 enable GDB specific build-time compiler warnings if
1573 gcc is used
1574 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
1575 --enable-sim link gdb with simulator
1576 --enable-unit-tests Enable the inclusion of unit tests when compiling
1579 Optional Packages:
1580 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1581 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1582 --with-separate-debug-dir=PATH
1583 look for global separate debug info in this path
1584 [LIBDIR/debug]
1585 --with-gdb-datadir=PATH look for global separate data files in this path
1586 [DATADIR/gdb]
1587 --with-relocated-sources=PATH
1588 automatically relocate this path for source files
1589 --with-auto-load-dir=PATH
1590 directories from which to load auto-loaded scripts
1591 [$debugdir:$datadir/auto-load]
1592 --with-auto-load-safe-path=PATH
1593 directories safe to hold auto-loaded files
1594 [--with-auto-load-dir]
1595 --without-auto-load-safe-path
1596 do not restrict auto-loaded files locations
1597 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
1598 --with-curses use the curses library instead of the termcap
1599 library
1600 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1601 --with-bugurl=URL Direct users to URL to report a bug
1602 --with-system-zlib use installed libz
1603 --with-gnu-ld assume the C compiler uses GNU ld default=no
1604 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1605 --without-libiconv-prefix don't search for libiconv in includedir and libdir
1606 --with-iconv-bin=PATH specify where to find the iconv program
1607 --with-system-readline use installed readline library
1608 --with-jit-reader-dir=PATH
1609 directory to load the JIT readers from
1610 --with-expat include expat support (auto/yes/no)
1611 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1612 --without-libexpat-prefix don't search for libexpat in includedir and libdir
1613 --with-mpfr include MPFR support (auto/yes/no)
1614 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1615 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
1616 --with-python[=PYTHON] include python support
1617 (auto/yes/no/<python-program>)
1618 --with-guile[=GUILE] include guile support
1619 (auto/yes/no/<guile-version>/<pkg-config-program>)
1620 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
1621 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1622 --without-libipt-prefix don't search for libipt in includedir and libdir
1623 --without-included-regex
1624 don't use included regex; this is the default on
1625 systems with version 2 of the GNU C library (use
1626 with caution on other system)
1627 --with-sysroot[=DIR] search for usr/lib et al within DIR
1628 --with-system-gdbinit=PATH
1629 automatically load a system-wide gdbinit file
1630 --with-system-gdbinit-dir=PATH
1631 automatically load system-wide gdbinit files from
1632 this directory
1633 --with-lzma support lzma compression (auto/yes/no)
1634 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1635 --without-liblzma-prefix don't search for liblzma in includedir and libdir
1636 --with-tcl directory containing tcl configuration (tclConfig.sh)
1637 --with-tk directory containing tk configuration (tkConfig.sh)
1638 --with-x use the X Window System
1639 --with-babeltrace include babeltrace support (auto/yes/no)
1640 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1641 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
1642 --with-xxhash use libxxhash for hashing (faster) (auto/yes/no)
1643 --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib
1644 --without-libxxhash-prefix don't search for libxxhash in includedir and libdir
1646 Some influential environment variables:
1647 CC C compiler command
1648 CFLAGS C compiler flags
1649 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1650 nonstandard directory <lib dir>
1651 LIBS libraries to pass to the linker, e.g. -l<library>
1652 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1653 you have headers in a nonstandard directory <include dir>
1654 CXX C++ compiler command
1655 CXXFLAGS C++ compiler flags
1656 CPP C preprocessor
1657 MAKEINFO Parent configure detects if it is of sufficient version.
1658 MAKEINFOFLAGS
1659 Parameters for MAKEINFO.
1660 YACC The `Yet Another Compiler Compiler' implementation to use.
1661 Defaults to the first program found out of: `bison -y', `byacc',
1662 `yacc'.
1663 YFLAGS The list of arguments that will be passed by default to $YACC.
1664 This script will default YFLAGS to the empty string to avoid a
1665 default value of `-d' given by some make applications.
1666 XMKMF Path to xmkmf, Makefile generator for X Window System
1668 Use these variables to override the choices made by `configure' or to help
1669 it to find libraries and programs with nonstandard names/locations.
1671 Report bugs to the package provider.
1672 _ACEOF
1673 ac_status=$?
1676 if test "$ac_init_help" = "recursive"; then
1677 # If there are subdirs, report their specific --help.
1678 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1679 test -d "$ac_dir" ||
1680 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1681 continue
1682 ac_builddir=.
1684 case "$ac_dir" in
1685 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1687 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1688 # A ".." for each directory in $ac_dir_suffix.
1689 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1690 case $ac_top_builddir_sub in
1691 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1692 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1693 esac ;;
1694 esac
1695 ac_abs_top_builddir=$ac_pwd
1696 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1697 # for backward compatibility:
1698 ac_top_builddir=$ac_top_build_prefix
1700 case $srcdir in
1701 .) # We are building in place.
1702 ac_srcdir=.
1703 ac_top_srcdir=$ac_top_builddir_sub
1704 ac_abs_top_srcdir=$ac_pwd ;;
1705 [\\/]* | ?:[\\/]* ) # Absolute name.
1706 ac_srcdir=$srcdir$ac_dir_suffix;
1707 ac_top_srcdir=$srcdir
1708 ac_abs_top_srcdir=$srcdir ;;
1709 *) # Relative name.
1710 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1711 ac_top_srcdir=$ac_top_build_prefix$srcdir
1712 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1713 esac
1714 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1716 cd "$ac_dir" || { ac_status=$?; continue; }
1717 # Check for guested configure.
1718 if test -f "$ac_srcdir/configure.gnu"; then
1719 echo &&
1720 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1721 elif test -f "$ac_srcdir/configure"; then
1722 echo &&
1723 $SHELL "$ac_srcdir/configure" --help=recursive
1724 else
1725 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1726 fi || ac_status=$?
1727 cd "$ac_pwd" || { ac_status=$?; break; }
1728 done
1731 test -n "$ac_init_help" && exit $ac_status
1732 if $ac_init_version; then
1733 cat <<\_ACEOF
1734 configure
1735 generated by GNU Autoconf 2.69
1737 Copyright (C) 2012 Free Software Foundation, Inc.
1738 This configure script is free software; the Free Software Foundation
1739 gives unlimited permission to copy, distribute and modify it.
1740 _ACEOF
1741 exit
1744 ## ------------------------ ##
1745 ## Autoconf initialization. ##
1746 ## ------------------------ ##
1748 # ac_fn_c_try_compile LINENO
1749 # --------------------------
1750 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1751 ac_fn_c_try_compile ()
1753 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1754 rm -f conftest.$ac_objext
1755 if { { ac_try="$ac_compile"
1756 case "(($ac_try" in
1757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1758 *) ac_try_echo=$ac_try;;
1759 esac
1760 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1761 $as_echo "$ac_try_echo"; } >&5
1762 (eval "$ac_compile") 2>conftest.err
1763 ac_status=$?
1764 if test -s conftest.err; then
1765 grep -v '^ *+' conftest.err >conftest.er1
1766 cat conftest.er1 >&5
1767 mv -f conftest.er1 conftest.err
1769 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1770 test $ac_status = 0; } && {
1771 test -z "$ac_c_werror_flag" ||
1772 test ! -s conftest.err
1773 } && test -s conftest.$ac_objext; then :
1774 ac_retval=0
1775 else
1776 $as_echo "$as_me: failed program was:" >&5
1777 sed 's/^/| /' conftest.$ac_ext >&5
1779 ac_retval=1
1781 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1782 as_fn_set_status $ac_retval
1784 } # ac_fn_c_try_compile
1786 # ac_fn_cxx_try_compile LINENO
1787 # ----------------------------
1788 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1789 ac_fn_cxx_try_compile ()
1791 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1792 rm -f conftest.$ac_objext
1793 if { { ac_try="$ac_compile"
1794 case "(($ac_try" in
1795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1796 *) ac_try_echo=$ac_try;;
1797 esac
1798 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1799 $as_echo "$ac_try_echo"; } >&5
1800 (eval "$ac_compile") 2>conftest.err
1801 ac_status=$?
1802 if test -s conftest.err; then
1803 grep -v '^ *+' conftest.err >conftest.er1
1804 cat conftest.er1 >&5
1805 mv -f conftest.er1 conftest.err
1807 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1808 test $ac_status = 0; } && {
1809 test -z "$ac_cxx_werror_flag" ||
1810 test ! -s conftest.err
1811 } && test -s conftest.$ac_objext; then :
1812 ac_retval=0
1813 else
1814 $as_echo "$as_me: failed program was:" >&5
1815 sed 's/^/| /' conftest.$ac_ext >&5
1817 ac_retval=1
1819 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1820 as_fn_set_status $ac_retval
1822 } # ac_fn_cxx_try_compile
1824 # ac_fn_c_try_cpp LINENO
1825 # ----------------------
1826 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1827 ac_fn_c_try_cpp ()
1829 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1830 if { { ac_try="$ac_cpp conftest.$ac_ext"
1831 case "(($ac_try" in
1832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1833 *) ac_try_echo=$ac_try;;
1834 esac
1835 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1836 $as_echo "$ac_try_echo"; } >&5
1837 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1838 ac_status=$?
1839 if test -s conftest.err; then
1840 grep -v '^ *+' conftest.err >conftest.er1
1841 cat conftest.er1 >&5
1842 mv -f conftest.er1 conftest.err
1844 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1845 test $ac_status = 0; } > conftest.i && {
1846 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1847 test ! -s conftest.err
1848 }; then :
1849 ac_retval=0
1850 else
1851 $as_echo "$as_me: failed program was:" >&5
1852 sed 's/^/| /' conftest.$ac_ext >&5
1854 ac_retval=1
1856 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1857 as_fn_set_status $ac_retval
1859 } # ac_fn_c_try_cpp
1861 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1862 # -------------------------------------------------------
1863 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1864 # the include files in INCLUDES and setting the cache variable VAR
1865 # accordingly.
1866 ac_fn_c_check_header_mongrel ()
1868 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1869 if eval \${$3+:} false; then :
1870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1871 $as_echo_n "checking for $2... " >&6; }
1872 if eval \${$3+:} false; then :
1873 $as_echo_n "(cached) " >&6
1875 eval ac_res=\$$3
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1877 $as_echo "$ac_res" >&6; }
1878 else
1879 # Is the header compilable?
1880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1881 $as_echo_n "checking $2 usability... " >&6; }
1882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1883 /* end confdefs.h. */
1885 #include <$2>
1886 _ACEOF
1887 if ac_fn_c_try_compile "$LINENO"; then :
1888 ac_header_compiler=yes
1889 else
1890 ac_header_compiler=no
1892 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1894 $as_echo "$ac_header_compiler" >&6; }
1896 # Is the header present?
1897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1898 $as_echo_n "checking $2 presence... " >&6; }
1899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1900 /* end confdefs.h. */
1901 #include <$2>
1902 _ACEOF
1903 if ac_fn_c_try_cpp "$LINENO"; then :
1904 ac_header_preproc=yes
1905 else
1906 ac_header_preproc=no
1908 rm -f conftest.err conftest.i conftest.$ac_ext
1909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1910 $as_echo "$ac_header_preproc" >&6; }
1912 # So? What about this header?
1913 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1914 yes:no: )
1915 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1916 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1918 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1920 no:yes:* )
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1922 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1924 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1925 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1926 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1928 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1930 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1932 esac
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1934 $as_echo_n "checking for $2... " >&6; }
1935 if eval \${$3+:} false; then :
1936 $as_echo_n "(cached) " >&6
1937 else
1938 eval "$3=\$ac_header_compiler"
1940 eval ac_res=\$$3
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1942 $as_echo "$ac_res" >&6; }
1944 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1946 } # ac_fn_c_check_header_mongrel
1948 # ac_fn_c_try_run LINENO
1949 # ----------------------
1950 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1951 # that executables *can* be run.
1952 ac_fn_c_try_run ()
1954 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1955 if { { ac_try="$ac_link"
1956 case "(($ac_try" in
1957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1958 *) ac_try_echo=$ac_try;;
1959 esac
1960 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1961 $as_echo "$ac_try_echo"; } >&5
1962 (eval "$ac_link") 2>&5
1963 ac_status=$?
1964 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1965 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1966 { { case "(($ac_try" in
1967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1968 *) ac_try_echo=$ac_try;;
1969 esac
1970 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1971 $as_echo "$ac_try_echo"; } >&5
1972 (eval "$ac_try") 2>&5
1973 ac_status=$?
1974 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1975 test $ac_status = 0; }; }; then :
1976 ac_retval=0
1977 else
1978 $as_echo "$as_me: program exited with status $ac_status" >&5
1979 $as_echo "$as_me: failed program was:" >&5
1980 sed 's/^/| /' conftest.$ac_ext >&5
1982 ac_retval=$ac_status
1984 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1985 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1986 as_fn_set_status $ac_retval
1988 } # ac_fn_c_try_run
1990 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1991 # -------------------------------------------------------
1992 # Tests whether HEADER exists and can be compiled using the include files in
1993 # INCLUDES, setting the cache variable VAR accordingly.
1994 ac_fn_c_check_header_compile ()
1996 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1998 $as_echo_n "checking for $2... " >&6; }
1999 if eval \${$3+:} false; then :
2000 $as_echo_n "(cached) " >&6
2001 else
2002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2003 /* end confdefs.h. */
2005 #include <$2>
2006 _ACEOF
2007 if ac_fn_c_try_compile "$LINENO"; then :
2008 eval "$3=yes"
2009 else
2010 eval "$3=no"
2012 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2014 eval ac_res=\$$3
2015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2016 $as_echo "$ac_res" >&6; }
2017 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2019 } # ac_fn_c_check_header_compile
2021 # ac_fn_c_try_link LINENO
2022 # -----------------------
2023 # Try to link conftest.$ac_ext, and return whether this succeeded.
2024 ac_fn_c_try_link ()
2026 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2027 rm -f conftest.$ac_objext conftest$ac_exeext
2028 if { { ac_try="$ac_link"
2029 case "(($ac_try" in
2030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2031 *) ac_try_echo=$ac_try;;
2032 esac
2033 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2034 $as_echo "$ac_try_echo"; } >&5
2035 (eval "$ac_link") 2>conftest.err
2036 ac_status=$?
2037 if test -s conftest.err; then
2038 grep -v '^ *+' conftest.err >conftest.er1
2039 cat conftest.er1 >&5
2040 mv -f conftest.er1 conftest.err
2042 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2043 test $ac_status = 0; } && {
2044 test -z "$ac_c_werror_flag" ||
2045 test ! -s conftest.err
2046 } && test -s conftest$ac_exeext && {
2047 test "$cross_compiling" = yes ||
2048 test -x conftest$ac_exeext
2049 }; then :
2050 ac_retval=0
2051 else
2052 $as_echo "$as_me: failed program was:" >&5
2053 sed 's/^/| /' conftest.$ac_ext >&5
2055 ac_retval=1
2057 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2058 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2059 # interfere with the next link command; also delete a directory that is
2060 # left behind by Apple's compiler. We do this before executing the actions.
2061 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2062 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2063 as_fn_set_status $ac_retval
2065 } # ac_fn_c_try_link
2067 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2068 # --------------------------------------------
2069 # Tries to find the compile-time value of EXPR in a program that includes
2070 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2071 # computed
2072 ac_fn_c_compute_int ()
2074 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2075 if test "$cross_compiling" = yes; then
2076 # Depending upon the size, compute the lo and hi bounds.
2077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2078 /* end confdefs.h. */
2081 main ()
2083 static int test_array [1 - 2 * !(($2) >= 0)];
2084 test_array [0] = 0;
2085 return test_array [0];
2088 return 0;
2090 _ACEOF
2091 if ac_fn_c_try_compile "$LINENO"; then :
2092 ac_lo=0 ac_mid=0
2093 while :; do
2094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2095 /* end confdefs.h. */
2098 main ()
2100 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2101 test_array [0] = 0;
2102 return test_array [0];
2105 return 0;
2107 _ACEOF
2108 if ac_fn_c_try_compile "$LINENO"; then :
2109 ac_hi=$ac_mid; break
2110 else
2111 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2112 if test $ac_lo -le $ac_mid; then
2113 ac_lo= ac_hi=
2114 break
2116 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2118 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2119 done
2120 else
2121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122 /* end confdefs.h. */
2125 main ()
2127 static int test_array [1 - 2 * !(($2) < 0)];
2128 test_array [0] = 0;
2129 return test_array [0];
2132 return 0;
2134 _ACEOF
2135 if ac_fn_c_try_compile "$LINENO"; then :
2136 ac_hi=-1 ac_mid=-1
2137 while :; do
2138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2139 /* end confdefs.h. */
2142 main ()
2144 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2145 test_array [0] = 0;
2146 return test_array [0];
2149 return 0;
2151 _ACEOF
2152 if ac_fn_c_try_compile "$LINENO"; then :
2153 ac_lo=$ac_mid; break
2154 else
2155 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2156 if test $ac_mid -le $ac_hi; then
2157 ac_lo= ac_hi=
2158 break
2160 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2162 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2163 done
2164 else
2165 ac_lo= ac_hi=
2167 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2169 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2170 # Binary search between lo and hi bounds.
2171 while test "x$ac_lo" != "x$ac_hi"; do
2172 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2174 /* end confdefs.h. */
2177 main ()
2179 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2180 test_array [0] = 0;
2181 return test_array [0];
2184 return 0;
2186 _ACEOF
2187 if ac_fn_c_try_compile "$LINENO"; then :
2188 ac_hi=$ac_mid
2189 else
2190 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2192 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2193 done
2194 case $ac_lo in #((
2195 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2196 '') ac_retval=1 ;;
2197 esac
2198 else
2199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2200 /* end confdefs.h. */
2202 static long int longval () { return $2; }
2203 static unsigned long int ulongval () { return $2; }
2204 #include <stdio.h>
2205 #include <stdlib.h>
2207 main ()
2210 FILE *f = fopen ("conftest.val", "w");
2211 if (! f)
2212 return 1;
2213 if (($2) < 0)
2215 long int i = longval ();
2216 if (i != ($2))
2217 return 1;
2218 fprintf (f, "%ld", i);
2220 else
2222 unsigned long int i = ulongval ();
2223 if (i != ($2))
2224 return 1;
2225 fprintf (f, "%lu", i);
2227 /* Do not output a trailing newline, as this causes \r\n confusion
2228 on some platforms. */
2229 return ferror (f) || fclose (f) != 0;
2232 return 0;
2234 _ACEOF
2235 if ac_fn_c_try_run "$LINENO"; then :
2236 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2237 else
2238 ac_retval=1
2240 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2241 conftest.$ac_objext conftest.beam conftest.$ac_ext
2242 rm -f conftest.val
2245 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2246 as_fn_set_status $ac_retval
2248 } # ac_fn_c_compute_int
2250 # ac_fn_c_check_func LINENO FUNC VAR
2251 # ----------------------------------
2252 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2253 ac_fn_c_check_func ()
2255 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2257 $as_echo_n "checking for $2... " >&6; }
2258 if eval \${$3+:} false; then :
2259 $as_echo_n "(cached) " >&6
2260 else
2261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2262 /* end confdefs.h. */
2263 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2264 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2265 #define $2 innocuous_$2
2267 /* System header to define __stub macros and hopefully few prototypes,
2268 which can conflict with char $2 (); below.
2269 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2270 <limits.h> exists even on freestanding compilers. */
2272 #ifdef __STDC__
2273 # include <limits.h>
2274 #else
2275 # include <assert.h>
2276 #endif
2278 #undef $2
2280 /* Override any GCC internal prototype to avoid an error.
2281 Use char because int might match the return type of a GCC
2282 builtin and then its argument prototype would still apply. */
2283 #ifdef __cplusplus
2284 extern "C"
2285 #endif
2286 char $2 ();
2287 /* The GNU C library defines this for functions which it implements
2288 to always fail with ENOSYS. Some functions are actually named
2289 something starting with __ and the normal name is an alias. */
2290 #if defined __stub_$2 || defined __stub___$2
2291 choke me
2292 #endif
2295 main ()
2297 return $2 ();
2299 return 0;
2301 _ACEOF
2302 if ac_fn_c_try_link "$LINENO"; then :
2303 eval "$3=yes"
2304 else
2305 eval "$3=no"
2307 rm -f core conftest.err conftest.$ac_objext \
2308 conftest$ac_exeext conftest.$ac_ext
2310 eval ac_res=\$$3
2311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2312 $as_echo "$ac_res" >&6; }
2313 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2315 } # ac_fn_c_check_func
2317 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2318 # -------------------------------------------
2319 # Tests whether TYPE exists after having included INCLUDES, setting cache
2320 # variable VAR accordingly.
2321 ac_fn_c_check_type ()
2323 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2325 $as_echo_n "checking for $2... " >&6; }
2326 if eval \${$3+:} false; then :
2327 $as_echo_n "(cached) " >&6
2328 else
2329 eval "$3=no"
2330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2331 /* end confdefs.h. */
2334 main ()
2336 if (sizeof ($2))
2337 return 0;
2339 return 0;
2341 _ACEOF
2342 if ac_fn_c_try_compile "$LINENO"; then :
2343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2344 /* end confdefs.h. */
2347 main ()
2349 if (sizeof (($2)))
2350 return 0;
2352 return 0;
2354 _ACEOF
2355 if ac_fn_c_try_compile "$LINENO"; then :
2357 else
2358 eval "$3=yes"
2360 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2362 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2364 eval ac_res=\$$3
2365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2366 $as_echo "$ac_res" >&6; }
2367 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2369 } # ac_fn_c_check_type
2371 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2372 # ---------------------------------------------
2373 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2374 # accordingly.
2375 ac_fn_c_check_decl ()
2377 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2378 as_decl_name=`echo $2|sed 's/ *(.*//'`
2379 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2381 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2382 if eval \${$3+:} false; then :
2383 $as_echo_n "(cached) " >&6
2384 else
2385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2386 /* end confdefs.h. */
2389 main ()
2391 #ifndef $as_decl_name
2392 #ifdef __cplusplus
2393 (void) $as_decl_use;
2394 #else
2395 (void) $as_decl_name;
2396 #endif
2397 #endif
2400 return 0;
2402 _ACEOF
2403 if ac_fn_c_try_compile "$LINENO"; then :
2404 eval "$3=yes"
2405 else
2406 eval "$3=no"
2408 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2410 eval ac_res=\$$3
2411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2412 $as_echo "$ac_res" >&6; }
2413 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2415 } # ac_fn_c_check_decl
2417 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2418 # ----------------------------------------------------
2419 # Tries to find if the field MEMBER exists in type AGGR, after including
2420 # INCLUDES, setting cache variable VAR accordingly.
2421 ac_fn_c_check_member ()
2423 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2425 $as_echo_n "checking for $2.$3... " >&6; }
2426 if eval \${$4+:} false; then :
2427 $as_echo_n "(cached) " >&6
2428 else
2429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2430 /* end confdefs.h. */
2433 main ()
2435 static $2 ac_aggr;
2436 if (ac_aggr.$3)
2437 return 0;
2439 return 0;
2441 _ACEOF
2442 if ac_fn_c_try_compile "$LINENO"; then :
2443 eval "$4=yes"
2444 else
2445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2446 /* end confdefs.h. */
2449 main ()
2451 static $2 ac_aggr;
2452 if (sizeof ac_aggr.$3)
2453 return 0;
2455 return 0;
2457 _ACEOF
2458 if ac_fn_c_try_compile "$LINENO"; then :
2459 eval "$4=yes"
2460 else
2461 eval "$4=no"
2463 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2465 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2467 eval ac_res=\$$4
2468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2469 $as_echo "$ac_res" >&6; }
2470 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2472 } # ac_fn_c_check_member
2474 # ac_fn_cxx_try_link LINENO
2475 # -------------------------
2476 # Try to link conftest.$ac_ext, and return whether this succeeded.
2477 ac_fn_cxx_try_link ()
2479 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2480 rm -f conftest.$ac_objext conftest$ac_exeext
2481 if { { ac_try="$ac_link"
2482 case "(($ac_try" in
2483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2484 *) ac_try_echo=$ac_try;;
2485 esac
2486 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2487 $as_echo "$ac_try_echo"; } >&5
2488 (eval "$ac_link") 2>conftest.err
2489 ac_status=$?
2490 if test -s conftest.err; then
2491 grep -v '^ *+' conftest.err >conftest.er1
2492 cat conftest.er1 >&5
2493 mv -f conftest.er1 conftest.err
2495 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2496 test $ac_status = 0; } && {
2497 test -z "$ac_cxx_werror_flag" ||
2498 test ! -s conftest.err
2499 } && test -s conftest$ac_exeext && {
2500 test "$cross_compiling" = yes ||
2501 test -x conftest$ac_exeext
2502 }; then :
2503 ac_retval=0
2504 else
2505 $as_echo "$as_me: failed program was:" >&5
2506 sed 's/^/| /' conftest.$ac_ext >&5
2508 ac_retval=1
2510 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2511 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2512 # interfere with the next link command; also delete a directory that is
2513 # left behind by Apple's compiler. We do this before executing the actions.
2514 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2515 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2516 as_fn_set_status $ac_retval
2518 } # ac_fn_cxx_try_link
2520 # ac_fn_cxx_check_func LINENO FUNC VAR
2521 # ------------------------------------
2522 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2523 ac_fn_cxx_check_func ()
2525 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2527 $as_echo_n "checking for $2... " >&6; }
2528 if eval \${$3+:} false; then :
2529 $as_echo_n "(cached) " >&6
2530 else
2531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2532 /* end confdefs.h. */
2533 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2534 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2535 #define $2 innocuous_$2
2537 /* System header to define __stub macros and hopefully few prototypes,
2538 which can conflict with char $2 (); below.
2539 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2540 <limits.h> exists even on freestanding compilers. */
2542 #ifdef __STDC__
2543 # include <limits.h>
2544 #else
2545 # include <assert.h>
2546 #endif
2548 #undef $2
2550 /* Override any GCC internal prototype to avoid an error.
2551 Use char because int might match the return type of a GCC
2552 builtin and then its argument prototype would still apply. */
2553 #ifdef __cplusplus
2554 extern "C"
2555 #endif
2556 char $2 ();
2557 /* The GNU C library defines this for functions which it implements
2558 to always fail with ENOSYS. Some functions are actually named
2559 something starting with __ and the normal name is an alias. */
2560 #if defined __stub_$2 || defined __stub___$2
2561 choke me
2562 #endif
2565 main ()
2567 return $2 ();
2569 return 0;
2571 _ACEOF
2572 if ac_fn_cxx_try_link "$LINENO"; then :
2573 eval "$3=yes"
2574 else
2575 eval "$3=no"
2577 rm -f core conftest.err conftest.$ac_objext \
2578 conftest$ac_exeext conftest.$ac_ext
2580 eval ac_res=\$$3
2581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2582 $as_echo "$ac_res" >&6; }
2583 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2585 } # ac_fn_cxx_check_func
2586 cat >config.log <<_ACEOF
2587 This file contains any messages produced by compilers while
2588 running configure, to aid debugging if configure makes a mistake.
2590 It was created by $as_me, which was
2591 generated by GNU Autoconf 2.69. Invocation command line was
2593 $ $0 $@
2595 _ACEOF
2596 exec 5>>config.log
2598 cat <<_ASUNAME
2599 ## --------- ##
2600 ## Platform. ##
2601 ## --------- ##
2603 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2604 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2605 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2606 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2607 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2609 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2610 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2612 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2613 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2614 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2615 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2616 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2617 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2618 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2620 _ASUNAME
2622 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2623 for as_dir in $PATH
2625 IFS=$as_save_IFS
2626 test -z "$as_dir" && as_dir=.
2627 $as_echo "PATH: $as_dir"
2628 done
2629 IFS=$as_save_IFS
2631 } >&5
2633 cat >&5 <<_ACEOF
2636 ## ----------- ##
2637 ## Core tests. ##
2638 ## ----------- ##
2640 _ACEOF
2643 # Keep a trace of the command line.
2644 # Strip out --no-create and --no-recursion so they do not pile up.
2645 # Strip out --silent because we don't want to record it for future runs.
2646 # Also quote any args containing shell meta-characters.
2647 # Make two passes to allow for proper duplicate-argument suppression.
2648 ac_configure_args=
2649 ac_configure_args0=
2650 ac_configure_args1=
2651 ac_must_keep_next=false
2652 for ac_pass in 1 2
2654 for ac_arg
2656 case $ac_arg in
2657 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2658 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2659 | -silent | --silent | --silen | --sile | --sil)
2660 continue ;;
2661 *\'*)
2662 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2663 esac
2664 case $ac_pass in
2665 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2667 as_fn_append ac_configure_args1 " '$ac_arg'"
2668 if test $ac_must_keep_next = true; then
2669 ac_must_keep_next=false # Got value, back to normal.
2670 else
2671 case $ac_arg in
2672 *=* | --config-cache | -C | -disable-* | --disable-* \
2673 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2674 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2675 | -with-* | --with-* | -without-* | --without-* | --x)
2676 case "$ac_configure_args0 " in
2677 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2678 esac
2680 -* ) ac_must_keep_next=true ;;
2681 esac
2683 as_fn_append ac_configure_args " '$ac_arg'"
2685 esac
2686 done
2687 done
2688 { ac_configure_args0=; unset ac_configure_args0;}
2689 { ac_configure_args1=; unset ac_configure_args1;}
2691 # When interrupted or exit'd, cleanup temporary files, and complete
2692 # config.log. We remove comments because anyway the quotes in there
2693 # would cause problems or look ugly.
2694 # WARNING: Use '\'' to represent an apostrophe within the trap.
2695 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2696 trap 'exit_status=$?
2697 # Save into config.log some information that might help in debugging.
2699 echo
2701 $as_echo "## ---------------- ##
2702 ## Cache variables. ##
2703 ## ---------------- ##"
2704 echo
2705 # The following way of writing the cache mishandles newlines in values,
2707 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2708 eval ac_val=\$$ac_var
2709 case $ac_val in #(
2710 *${as_nl}*)
2711 case $ac_var in #(
2712 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2713 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2714 esac
2715 case $ac_var in #(
2716 _ | IFS | as_nl) ;; #(
2717 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2718 *) { eval $ac_var=; unset $ac_var;} ;;
2719 esac ;;
2720 esac
2721 done
2722 (set) 2>&1 |
2723 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2724 *${as_nl}ac_space=\ *)
2725 sed -n \
2726 "s/'\''/'\''\\\\'\'''\''/g;
2727 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2728 ;; #(
2730 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2732 esac |
2733 sort
2735 echo
2737 $as_echo "## ----------------- ##
2738 ## Output variables. ##
2739 ## ----------------- ##"
2740 echo
2741 for ac_var in $ac_subst_vars
2743 eval ac_val=\$$ac_var
2744 case $ac_val in
2745 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2746 esac
2747 $as_echo "$ac_var='\''$ac_val'\''"
2748 done | sort
2749 echo
2751 if test -n "$ac_subst_files"; then
2752 $as_echo "## ------------------- ##
2753 ## File substitutions. ##
2754 ## ------------------- ##"
2755 echo
2756 for ac_var in $ac_subst_files
2758 eval ac_val=\$$ac_var
2759 case $ac_val in
2760 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2761 esac
2762 $as_echo "$ac_var='\''$ac_val'\''"
2763 done | sort
2764 echo
2767 if test -s confdefs.h; then
2768 $as_echo "## ----------- ##
2769 ## confdefs.h. ##
2770 ## ----------- ##"
2771 echo
2772 cat confdefs.h
2773 echo
2775 test "$ac_signal" != 0 &&
2776 $as_echo "$as_me: caught signal $ac_signal"
2777 $as_echo "$as_me: exit $exit_status"
2778 } >&5
2779 rm -f core *.core core.conftest.* &&
2780 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2781 exit $exit_status
2783 for ac_signal in 1 2 13 15; do
2784 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2785 done
2786 ac_signal=0
2788 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2789 rm -f -r conftest* confdefs.h
2791 $as_echo "/* confdefs.h */" > confdefs.h
2793 # Predefined preprocessor variables.
2795 cat >>confdefs.h <<_ACEOF
2796 #define PACKAGE_NAME "$PACKAGE_NAME"
2797 _ACEOF
2799 cat >>confdefs.h <<_ACEOF
2800 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2801 _ACEOF
2803 cat >>confdefs.h <<_ACEOF
2804 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2805 _ACEOF
2807 cat >>confdefs.h <<_ACEOF
2808 #define PACKAGE_STRING "$PACKAGE_STRING"
2809 _ACEOF
2811 cat >>confdefs.h <<_ACEOF
2812 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2813 _ACEOF
2815 cat >>confdefs.h <<_ACEOF
2816 #define PACKAGE_URL "$PACKAGE_URL"
2817 _ACEOF
2820 # Let the site file select an alternate cache file if it wants to.
2821 # Prefer an explicitly selected file to automatically selected ones.
2822 ac_site_file1=NONE
2823 ac_site_file2=NONE
2824 if test -n "$CONFIG_SITE"; then
2825 # We do not want a PATH search for config.site.
2826 case $CONFIG_SITE in #((
2827 -*) ac_site_file1=./$CONFIG_SITE;;
2828 */*) ac_site_file1=$CONFIG_SITE;;
2829 *) ac_site_file1=./$CONFIG_SITE;;
2830 esac
2831 elif test "x$prefix" != xNONE; then
2832 ac_site_file1=$prefix/share/config.site
2833 ac_site_file2=$prefix/etc/config.site
2834 else
2835 ac_site_file1=$ac_default_prefix/share/config.site
2836 ac_site_file2=$ac_default_prefix/etc/config.site
2838 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2840 test "x$ac_site_file" = xNONE && continue
2841 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2842 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2843 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2844 sed 's/^/| /' "$ac_site_file" >&5
2845 . "$ac_site_file" \
2846 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2847 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2848 as_fn_error $? "failed to load site script $ac_site_file
2849 See \`config.log' for more details" "$LINENO" 5; }
2851 done
2853 if test -r "$cache_file"; then
2854 # Some versions of bash will fail to source /dev/null (special files
2855 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2856 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2857 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2858 $as_echo "$as_me: loading cache $cache_file" >&6;}
2859 case $cache_file in
2860 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2861 *) . "./$cache_file";;
2862 esac
2864 else
2865 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2866 $as_echo "$as_me: creating cache $cache_file" >&6;}
2867 >$cache_file
2870 as_fn_append ac_header_list " stdlib.h"
2871 as_fn_append ac_header_list " unistd.h"
2872 as_fn_append ac_header_list " sys/param.h"
2873 # Check that the precious variables saved in the cache have kept the same
2874 # value.
2875 ac_cache_corrupted=false
2876 for ac_var in $ac_precious_vars; do
2877 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2878 eval ac_new_set=\$ac_env_${ac_var}_set
2879 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2880 eval ac_new_val=\$ac_env_${ac_var}_value
2881 case $ac_old_set,$ac_new_set in
2882 set,)
2883 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2884 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2885 ac_cache_corrupted=: ;;
2886 ,set)
2887 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2888 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2889 ac_cache_corrupted=: ;;
2890 ,);;
2892 if test "x$ac_old_val" != "x$ac_new_val"; then
2893 # differences in whitespace do not lead to failure.
2894 ac_old_val_w=`echo x $ac_old_val`
2895 ac_new_val_w=`echo x $ac_new_val`
2896 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2897 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2898 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2899 ac_cache_corrupted=:
2900 else
2901 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2902 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2903 eval $ac_var=\$ac_old_val
2905 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2906 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2907 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2908 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2909 fi;;
2910 esac
2911 # Pass precious variables to config.status.
2912 if test "$ac_new_set" = set; then
2913 case $ac_new_val in
2914 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2915 *) ac_arg=$ac_var=$ac_new_val ;;
2916 esac
2917 case " $ac_configure_args " in
2918 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2919 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2920 esac
2922 done
2923 if $ac_cache_corrupted; then
2924 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2925 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2926 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2927 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2928 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2930 ## -------------------- ##
2931 ## Main body of script. ##
2932 ## -------------------- ##
2934 ac_ext=c
2935 ac_cpp='$CPP $CPPFLAGS'
2936 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2937 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2938 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2944 ac_config_headers="$ac_config_headers config.h:config.in"
2947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2948 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2949 # Check whether --enable-maintainer-mode was given.
2950 if test "${enable_maintainer_mode+set}" = set; then :
2951 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2952 else
2953 USE_MAINTAINER_MODE=no
2956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2957 $as_echo "$USE_MAINTAINER_MODE" >&6; }
2958 if test $USE_MAINTAINER_MODE = yes; then
2959 MAINTAINER_MODE_TRUE=
2960 MAINTAINER_MODE_FALSE='#'
2961 else
2962 MAINTAINER_MODE_TRUE='#'
2963 MAINTAINER_MODE_FALSE=
2966 MAINT=$MAINTAINER_MODE_TRUE
2970 # Set the 'development' global.
2971 . $srcdir/../bfd/development.sh
2973 ac_ext=c
2974 ac_cpp='$CPP $CPPFLAGS'
2975 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2976 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2977 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2978 if test -n "$ac_tool_prefix"; then
2979 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2980 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2982 $as_echo_n "checking for $ac_word... " >&6; }
2983 if ${ac_cv_prog_CC+:} false; then :
2984 $as_echo_n "(cached) " >&6
2985 else
2986 if test -n "$CC"; then
2987 ac_cv_prog_CC="$CC" # Let the user override the test.
2988 else
2989 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2990 for as_dir in $PATH
2992 IFS=$as_save_IFS
2993 test -z "$as_dir" && as_dir=.
2994 for ac_exec_ext in '' $ac_executable_extensions; do
2995 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2996 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2997 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2998 break 2
3000 done
3001 done
3002 IFS=$as_save_IFS
3006 CC=$ac_cv_prog_CC
3007 if test -n "$CC"; then
3008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3009 $as_echo "$CC" >&6; }
3010 else
3011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3012 $as_echo "no" >&6; }
3017 if test -z "$ac_cv_prog_CC"; then
3018 ac_ct_CC=$CC
3019 # Extract the first word of "gcc", so it can be a program name with args.
3020 set dummy gcc; ac_word=$2
3021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3022 $as_echo_n "checking for $ac_word... " >&6; }
3023 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3024 $as_echo_n "(cached) " >&6
3025 else
3026 if test -n "$ac_ct_CC"; then
3027 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3028 else
3029 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3030 for as_dir in $PATH
3032 IFS=$as_save_IFS
3033 test -z "$as_dir" && as_dir=.
3034 for ac_exec_ext in '' $ac_executable_extensions; do
3035 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3036 ac_cv_prog_ac_ct_CC="gcc"
3037 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3038 break 2
3040 done
3041 done
3042 IFS=$as_save_IFS
3046 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3047 if test -n "$ac_ct_CC"; then
3048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3049 $as_echo "$ac_ct_CC" >&6; }
3050 else
3051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3052 $as_echo "no" >&6; }
3055 if test "x$ac_ct_CC" = x; then
3056 CC=""
3057 else
3058 case $cross_compiling:$ac_tool_warned in
3059 yes:)
3060 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3061 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3062 ac_tool_warned=yes ;;
3063 esac
3064 CC=$ac_ct_CC
3066 else
3067 CC="$ac_cv_prog_CC"
3070 if test -z "$CC"; then
3071 if test -n "$ac_tool_prefix"; then
3072 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3073 set dummy ${ac_tool_prefix}cc; ac_word=$2
3074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3075 $as_echo_n "checking for $ac_word... " >&6; }
3076 if ${ac_cv_prog_CC+:} false; then :
3077 $as_echo_n "(cached) " >&6
3078 else
3079 if test -n "$CC"; then
3080 ac_cv_prog_CC="$CC" # Let the user override the test.
3081 else
3082 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3083 for as_dir in $PATH
3085 IFS=$as_save_IFS
3086 test -z "$as_dir" && as_dir=.
3087 for ac_exec_ext in '' $ac_executable_extensions; do
3088 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3089 ac_cv_prog_CC="${ac_tool_prefix}cc"
3090 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3091 break 2
3093 done
3094 done
3095 IFS=$as_save_IFS
3099 CC=$ac_cv_prog_CC
3100 if test -n "$CC"; then
3101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3102 $as_echo "$CC" >&6; }
3103 else
3104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3105 $as_echo "no" >&6; }
3111 if test -z "$CC"; then
3112 # Extract the first word of "cc", so it can be a program name with args.
3113 set dummy cc; ac_word=$2
3114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3115 $as_echo_n "checking for $ac_word... " >&6; }
3116 if ${ac_cv_prog_CC+:} false; then :
3117 $as_echo_n "(cached) " >&6
3118 else
3119 if test -n "$CC"; then
3120 ac_cv_prog_CC="$CC" # Let the user override the test.
3121 else
3122 ac_prog_rejected=no
3123 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3124 for as_dir in $PATH
3126 IFS=$as_save_IFS
3127 test -z "$as_dir" && as_dir=.
3128 for ac_exec_ext in '' $ac_executable_extensions; do
3129 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3130 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3131 ac_prog_rejected=yes
3132 continue
3134 ac_cv_prog_CC="cc"
3135 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3136 break 2
3138 done
3139 done
3140 IFS=$as_save_IFS
3142 if test $ac_prog_rejected = yes; then
3143 # We found a bogon in the path, so make sure we never use it.
3144 set dummy $ac_cv_prog_CC
3145 shift
3146 if test $# != 0; then
3147 # We chose a different compiler from the bogus one.
3148 # However, it has the same basename, so the bogon will be chosen
3149 # first if we set CC to just the basename; use the full file name.
3150 shift
3151 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
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; }
3167 if test -z "$CC"; then
3168 if test -n "$ac_tool_prefix"; then
3169 for ac_prog in cl.exe
3171 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3172 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3174 $as_echo_n "checking for $ac_word... " >&6; }
3175 if ${ac_cv_prog_CC+:} false; then :
3176 $as_echo_n "(cached) " >&6
3177 else
3178 if test -n "$CC"; then
3179 ac_cv_prog_CC="$CC" # Let the user override the test.
3180 else
3181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3182 for as_dir in $PATH
3184 IFS=$as_save_IFS
3185 test -z "$as_dir" && as_dir=.
3186 for ac_exec_ext in '' $ac_executable_extensions; do
3187 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3188 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3189 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3190 break 2
3192 done
3193 done
3194 IFS=$as_save_IFS
3198 CC=$ac_cv_prog_CC
3199 if test -n "$CC"; then
3200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3201 $as_echo "$CC" >&6; }
3202 else
3203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3204 $as_echo "no" >&6; }
3208 test -n "$CC" && break
3209 done
3211 if test -z "$CC"; then
3212 ac_ct_CC=$CC
3213 for ac_prog in cl.exe
3215 # Extract the first word of "$ac_prog", so it can be a program name with args.
3216 set dummy $ac_prog; ac_word=$2
3217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3218 $as_echo_n "checking for $ac_word... " >&6; }
3219 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3220 $as_echo_n "(cached) " >&6
3221 else
3222 if test -n "$ac_ct_CC"; then
3223 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3224 else
3225 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3226 for as_dir in $PATH
3228 IFS=$as_save_IFS
3229 test -z "$as_dir" && as_dir=.
3230 for ac_exec_ext in '' $ac_executable_extensions; do
3231 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3232 ac_cv_prog_ac_ct_CC="$ac_prog"
3233 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3234 break 2
3236 done
3237 done
3238 IFS=$as_save_IFS
3242 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3243 if test -n "$ac_ct_CC"; then
3244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3245 $as_echo "$ac_ct_CC" >&6; }
3246 else
3247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3248 $as_echo "no" >&6; }
3252 test -n "$ac_ct_CC" && break
3253 done
3255 if test "x$ac_ct_CC" = x; then
3256 CC=""
3257 else
3258 case $cross_compiling:$ac_tool_warned in
3259 yes:)
3260 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3261 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3262 ac_tool_warned=yes ;;
3263 esac
3264 CC=$ac_ct_CC
3271 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3272 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3273 as_fn_error $? "no acceptable C compiler found in \$PATH
3274 See \`config.log' for more details" "$LINENO" 5; }
3276 # Provide some information about the compiler.
3277 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3278 set X $ac_compile
3279 ac_compiler=$2
3280 for ac_option in --version -v -V -qversion; do
3281 { { ac_try="$ac_compiler $ac_option >&5"
3282 case "(($ac_try" in
3283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3284 *) ac_try_echo=$ac_try;;
3285 esac
3286 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3287 $as_echo "$ac_try_echo"; } >&5
3288 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3289 ac_status=$?
3290 if test -s conftest.err; then
3291 sed '10a\
3292 ... rest of stderr output deleted ...
3293 10q' conftest.err >conftest.er1
3294 cat conftest.er1 >&5
3296 rm -f conftest.er1 conftest.err
3297 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3298 test $ac_status = 0; }
3299 done
3301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3302 /* end confdefs.h. */
3305 main ()
3309 return 0;
3311 _ACEOF
3312 ac_clean_files_save=$ac_clean_files
3313 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3314 # Try to create an executable without -o first, disregard a.out.
3315 # It will help us diagnose broken compilers, and finding out an intuition
3316 # of exeext.
3317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3318 $as_echo_n "checking whether the C compiler works... " >&6; }
3319 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3321 # The possible output files:
3322 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3324 ac_rmfiles=
3325 for ac_file in $ac_files
3327 case $ac_file in
3328 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3329 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3330 esac
3331 done
3332 rm -f $ac_rmfiles
3334 if { { ac_try="$ac_link_default"
3335 case "(($ac_try" in
3336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3337 *) ac_try_echo=$ac_try;;
3338 esac
3339 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3340 $as_echo "$ac_try_echo"; } >&5
3341 (eval "$ac_link_default") 2>&5
3342 ac_status=$?
3343 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3344 test $ac_status = 0; }; then :
3345 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3346 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3347 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3348 # so that the user can short-circuit this test for compilers unknown to
3349 # Autoconf.
3350 for ac_file in $ac_files ''
3352 test -f "$ac_file" || continue
3353 case $ac_file in
3354 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3356 [ab].out )
3357 # We found the default executable, but exeext='' is most
3358 # certainly right.
3359 break;;
3360 *.* )
3361 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3362 then :; else
3363 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3365 # We set ac_cv_exeext here because the later test for it is not
3366 # safe: cross compilers may not add the suffix if given an `-o'
3367 # argument, so we may need to know it at that point already.
3368 # Even if this section looks crufty: it has the advantage of
3369 # actually working.
3370 break;;
3372 break;;
3373 esac
3374 done
3375 test "$ac_cv_exeext" = no && ac_cv_exeext=
3377 else
3378 ac_file=''
3380 if test -z "$ac_file"; then :
3381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3382 $as_echo "no" >&6; }
3383 $as_echo "$as_me: failed program was:" >&5
3384 sed 's/^/| /' conftest.$ac_ext >&5
3386 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3387 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3388 as_fn_error 77 "C compiler cannot create executables
3389 See \`config.log' for more details" "$LINENO" 5; }
3390 else
3391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3392 $as_echo "yes" >&6; }
3394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3395 $as_echo_n "checking for C compiler default output file name... " >&6; }
3396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3397 $as_echo "$ac_file" >&6; }
3398 ac_exeext=$ac_cv_exeext
3400 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3401 ac_clean_files=$ac_clean_files_save
3402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3403 $as_echo_n "checking for suffix of executables... " >&6; }
3404 if { { ac_try="$ac_link"
3405 case "(($ac_try" in
3406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3407 *) ac_try_echo=$ac_try;;
3408 esac
3409 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3410 $as_echo "$ac_try_echo"; } >&5
3411 (eval "$ac_link") 2>&5
3412 ac_status=$?
3413 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3414 test $ac_status = 0; }; then :
3415 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3416 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3417 # work properly (i.e., refer to `conftest.exe'), while it won't with
3418 # `rm'.
3419 for ac_file in conftest.exe conftest conftest.*; do
3420 test -f "$ac_file" || continue
3421 case $ac_file in
3422 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3423 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3424 break;;
3425 * ) break;;
3426 esac
3427 done
3428 else
3429 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3430 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3431 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3432 See \`config.log' for more details" "$LINENO" 5; }
3434 rm -f conftest conftest$ac_cv_exeext
3435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3436 $as_echo "$ac_cv_exeext" >&6; }
3438 rm -f conftest.$ac_ext
3439 EXEEXT=$ac_cv_exeext
3440 ac_exeext=$EXEEXT
3441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3442 /* end confdefs.h. */
3443 #include <stdio.h>
3445 main ()
3447 FILE *f = fopen ("conftest.out", "w");
3448 return ferror (f) || fclose (f) != 0;
3451 return 0;
3453 _ACEOF
3454 ac_clean_files="$ac_clean_files conftest.out"
3455 # Check that the compiler produces executables we can run. If not, either
3456 # the compiler is broken, or we cross compile.
3457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3458 $as_echo_n "checking whether we are cross compiling... " >&6; }
3459 if test "$cross_compiling" != yes; then
3460 { { ac_try="$ac_link"
3461 case "(($ac_try" in
3462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3463 *) ac_try_echo=$ac_try;;
3464 esac
3465 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3466 $as_echo "$ac_try_echo"; } >&5
3467 (eval "$ac_link") 2>&5
3468 ac_status=$?
3469 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3470 test $ac_status = 0; }
3471 if { ac_try='./conftest$ac_cv_exeext'
3472 { { case "(($ac_try" in
3473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3474 *) ac_try_echo=$ac_try;;
3475 esac
3476 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3477 $as_echo "$ac_try_echo"; } >&5
3478 (eval "$ac_try") 2>&5
3479 ac_status=$?
3480 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3481 test $ac_status = 0; }; }; then
3482 cross_compiling=no
3483 else
3484 if test "$cross_compiling" = maybe; then
3485 cross_compiling=yes
3486 else
3487 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3488 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3489 as_fn_error $? "cannot run C compiled programs.
3490 If you meant to cross compile, use \`--host'.
3491 See \`config.log' for more details" "$LINENO" 5; }
3495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3496 $as_echo "$cross_compiling" >&6; }
3498 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3499 ac_clean_files=$ac_clean_files_save
3500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3501 $as_echo_n "checking for suffix of object files... " >&6; }
3502 if ${ac_cv_objext+:} false; then :
3503 $as_echo_n "(cached) " >&6
3504 else
3505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3506 /* end confdefs.h. */
3509 main ()
3513 return 0;
3515 _ACEOF
3516 rm -f conftest.o conftest.obj
3517 if { { ac_try="$ac_compile"
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_compile") 2>&5
3525 ac_status=$?
3526 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3527 test $ac_status = 0; }; then :
3528 for ac_file in conftest.o conftest.obj conftest.*; do
3529 test -f "$ac_file" || continue;
3530 case $ac_file in
3531 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3532 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3533 break;;
3534 esac
3535 done
3536 else
3537 $as_echo "$as_me: failed program was:" >&5
3538 sed 's/^/| /' conftest.$ac_ext >&5
3540 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3541 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3542 as_fn_error $? "cannot compute suffix of object files: cannot compile
3543 See \`config.log' for more details" "$LINENO" 5; }
3545 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3548 $as_echo "$ac_cv_objext" >&6; }
3549 OBJEXT=$ac_cv_objext
3550 ac_objext=$OBJEXT
3551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3552 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3553 if ${ac_cv_c_compiler_gnu+:} false; then :
3554 $as_echo_n "(cached) " >&6
3555 else
3556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3557 /* end confdefs.h. */
3560 main ()
3562 #ifndef __GNUC__
3563 choke me
3564 #endif
3567 return 0;
3569 _ACEOF
3570 if ac_fn_c_try_compile "$LINENO"; then :
3571 ac_compiler_gnu=yes
3572 else
3573 ac_compiler_gnu=no
3575 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3576 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3580 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3581 if test $ac_compiler_gnu = yes; then
3582 GCC=yes
3583 else
3584 GCC=
3586 ac_test_CFLAGS=${CFLAGS+set}
3587 ac_save_CFLAGS=$CFLAGS
3588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3589 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3590 if ${ac_cv_prog_cc_g+:} false; then :
3591 $as_echo_n "(cached) " >&6
3592 else
3593 ac_save_c_werror_flag=$ac_c_werror_flag
3594 ac_c_werror_flag=yes
3595 ac_cv_prog_cc_g=no
3596 CFLAGS="-g"
3597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3598 /* end confdefs.h. */
3601 main ()
3605 return 0;
3607 _ACEOF
3608 if ac_fn_c_try_compile "$LINENO"; then :
3609 ac_cv_prog_cc_g=yes
3610 else
3611 CFLAGS=""
3612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3613 /* end confdefs.h. */
3616 main ()
3620 return 0;
3622 _ACEOF
3623 if ac_fn_c_try_compile "$LINENO"; then :
3625 else
3626 ac_c_werror_flag=$ac_save_c_werror_flag
3627 CFLAGS="-g"
3628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3629 /* end confdefs.h. */
3632 main ()
3636 return 0;
3638 _ACEOF
3639 if ac_fn_c_try_compile "$LINENO"; then :
3640 ac_cv_prog_cc_g=yes
3642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3644 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3646 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3647 ac_c_werror_flag=$ac_save_c_werror_flag
3649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3650 $as_echo "$ac_cv_prog_cc_g" >&6; }
3651 if test "$ac_test_CFLAGS" = set; then
3652 CFLAGS=$ac_save_CFLAGS
3653 elif test $ac_cv_prog_cc_g = yes; then
3654 if test "$GCC" = yes; then
3655 CFLAGS="-g -O2"
3656 else
3657 CFLAGS="-g"
3659 else
3660 if test "$GCC" = yes; then
3661 CFLAGS="-O2"
3662 else
3663 CFLAGS=
3666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3667 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3668 if ${ac_cv_prog_cc_c89+:} false; then :
3669 $as_echo_n "(cached) " >&6
3670 else
3671 ac_cv_prog_cc_c89=no
3672 ac_save_CC=$CC
3673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3674 /* end confdefs.h. */
3675 #include <stdarg.h>
3676 #include <stdio.h>
3677 struct stat;
3678 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3679 struct buf { int x; };
3680 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3681 static char *e (p, i)
3682 char **p;
3683 int i;
3685 return p[i];
3687 static char *f (char * (*g) (char **, int), char **p, ...)
3689 char *s;
3690 va_list v;
3691 va_start (v,p);
3692 s = g (p, va_arg (v,int));
3693 va_end (v);
3694 return s;
3697 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3698 function prototypes and stuff, but not '\xHH' hex character constants.
3699 These don't provoke an error unfortunately, instead are silently treated
3700 as 'x'. The following induces an error, until -std is added to get
3701 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3702 array size at least. It's necessary to write '\x00'==0 to get something
3703 that's true only with -std. */
3704 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3706 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3707 inside strings and character constants. */
3708 #define FOO(x) 'x'
3709 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3711 int test (int i, double x);
3712 struct s1 {int (*f) (int a);};
3713 struct s2 {int (*f) (double a);};
3714 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3715 int argc;
3716 char **argv;
3718 main ()
3720 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3722 return 0;
3724 _ACEOF
3725 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3726 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3728 CC="$ac_save_CC $ac_arg"
3729 if ac_fn_c_try_compile "$LINENO"; then :
3730 ac_cv_prog_cc_c89=$ac_arg
3732 rm -f core conftest.err conftest.$ac_objext
3733 test "x$ac_cv_prog_cc_c89" != "xno" && break
3734 done
3735 rm -f conftest.$ac_ext
3736 CC=$ac_save_CC
3739 # AC_CACHE_VAL
3740 case "x$ac_cv_prog_cc_c89" in
3742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3743 $as_echo "none needed" >&6; } ;;
3744 xno)
3745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3746 $as_echo "unsupported" >&6; } ;;
3748 CC="$CC $ac_cv_prog_cc_c89"
3749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3750 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3751 esac
3752 if test "x$ac_cv_prog_cc_c89" != xno; then :
3756 ac_ext=c
3757 ac_cpp='$CPP $CPPFLAGS'
3758 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3759 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3760 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3762 ac_ext=cpp
3763 ac_cpp='$CXXCPP $CPPFLAGS'
3764 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3765 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3766 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3767 if test -z "$CXX"; then
3768 if test -n "$CCC"; then
3769 CXX=$CCC
3770 else
3771 if test -n "$ac_tool_prefix"; then
3772 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3774 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3775 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3777 $as_echo_n "checking for $ac_word... " >&6; }
3778 if ${ac_cv_prog_CXX+:} false; then :
3779 $as_echo_n "(cached) " >&6
3780 else
3781 if test -n "$CXX"; then
3782 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3783 else
3784 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3785 for as_dir in $PATH
3787 IFS=$as_save_IFS
3788 test -z "$as_dir" && as_dir=.
3789 for ac_exec_ext in '' $ac_executable_extensions; do
3790 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3791 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3792 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3793 break 2
3795 done
3796 done
3797 IFS=$as_save_IFS
3801 CXX=$ac_cv_prog_CXX
3802 if test -n "$CXX"; then
3803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3804 $as_echo "$CXX" >&6; }
3805 else
3806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3807 $as_echo "no" >&6; }
3811 test -n "$CXX" && break
3812 done
3814 if test -z "$CXX"; then
3815 ac_ct_CXX=$CXX
3816 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3818 # Extract the first word of "$ac_prog", so it can be a program name with args.
3819 set dummy $ac_prog; ac_word=$2
3820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3821 $as_echo_n "checking for $ac_word... " >&6; }
3822 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3823 $as_echo_n "(cached) " >&6
3824 else
3825 if test -n "$ac_ct_CXX"; then
3826 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3827 else
3828 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3829 for as_dir in $PATH
3831 IFS=$as_save_IFS
3832 test -z "$as_dir" && as_dir=.
3833 for ac_exec_ext in '' $ac_executable_extensions; do
3834 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3835 ac_cv_prog_ac_ct_CXX="$ac_prog"
3836 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3837 break 2
3839 done
3840 done
3841 IFS=$as_save_IFS
3845 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3846 if test -n "$ac_ct_CXX"; then
3847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3848 $as_echo "$ac_ct_CXX" >&6; }
3849 else
3850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3851 $as_echo "no" >&6; }
3855 test -n "$ac_ct_CXX" && break
3856 done
3858 if test "x$ac_ct_CXX" = x; then
3859 CXX="g++"
3860 else
3861 case $cross_compiling:$ac_tool_warned in
3862 yes:)
3863 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3864 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3865 ac_tool_warned=yes ;;
3866 esac
3867 CXX=$ac_ct_CXX
3873 # Provide some information about the compiler.
3874 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3875 set X $ac_compile
3876 ac_compiler=$2
3877 for ac_option in --version -v -V -qversion; do
3878 { { ac_try="$ac_compiler $ac_option >&5"
3879 case "(($ac_try" in
3880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3881 *) ac_try_echo=$ac_try;;
3882 esac
3883 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3884 $as_echo "$ac_try_echo"; } >&5
3885 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3886 ac_status=$?
3887 if test -s conftest.err; then
3888 sed '10a\
3889 ... rest of stderr output deleted ...
3890 10q' conftest.err >conftest.er1
3891 cat conftest.er1 >&5
3893 rm -f conftest.er1 conftest.err
3894 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3895 test $ac_status = 0; }
3896 done
3898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3899 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3900 if ${ac_cv_cxx_compiler_gnu+:} false; then :
3901 $as_echo_n "(cached) " >&6
3902 else
3903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3904 /* end confdefs.h. */
3907 main ()
3909 #ifndef __GNUC__
3910 choke me
3911 #endif
3914 return 0;
3916 _ACEOF
3917 if ac_fn_cxx_try_compile "$LINENO"; then :
3918 ac_compiler_gnu=yes
3919 else
3920 ac_compiler_gnu=no
3922 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3923 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3927 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3928 if test $ac_compiler_gnu = yes; then
3929 GXX=yes
3930 else
3931 GXX=
3933 ac_test_CXXFLAGS=${CXXFLAGS+set}
3934 ac_save_CXXFLAGS=$CXXFLAGS
3935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3936 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
3937 if ${ac_cv_prog_cxx_g+:} false; then :
3938 $as_echo_n "(cached) " >&6
3939 else
3940 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3941 ac_cxx_werror_flag=yes
3942 ac_cv_prog_cxx_g=no
3943 CXXFLAGS="-g"
3944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3945 /* end confdefs.h. */
3948 main ()
3952 return 0;
3954 _ACEOF
3955 if ac_fn_cxx_try_compile "$LINENO"; then :
3956 ac_cv_prog_cxx_g=yes
3957 else
3958 CXXFLAGS=""
3959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3960 /* end confdefs.h. */
3963 main ()
3967 return 0;
3969 _ACEOF
3970 if ac_fn_cxx_try_compile "$LINENO"; then :
3972 else
3973 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3974 CXXFLAGS="-g"
3975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3976 /* end confdefs.h. */
3979 main ()
3983 return 0;
3985 _ACEOF
3986 if ac_fn_cxx_try_compile "$LINENO"; then :
3987 ac_cv_prog_cxx_g=yes
3989 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3993 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3994 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3997 $as_echo "$ac_cv_prog_cxx_g" >&6; }
3998 if test "$ac_test_CXXFLAGS" = set; then
3999 CXXFLAGS=$ac_save_CXXFLAGS
4000 elif test $ac_cv_prog_cxx_g = yes; then
4001 if test "$GXX" = yes; then
4002 CXXFLAGS="-g -O2"
4003 else
4004 CXXFLAGS="-g"
4006 else
4007 if test "$GXX" = yes; then
4008 CXXFLAGS="-O2"
4009 else
4010 CXXFLAGS=
4013 ac_ext=c
4014 ac_cpp='$CPP $CPPFLAGS'
4015 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4016 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4017 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4021 ac_ext=c
4022 ac_cpp='$CPP $CPPFLAGS'
4023 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4024 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4025 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4027 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4028 # On Suns, sometimes $CPP names a directory.
4029 if test -n "$CPP" && test -d "$CPP"; then
4030 CPP=
4032 if test -z "$CPP"; then
4033 if ${ac_cv_prog_CPP+:} false; then :
4034 $as_echo_n "(cached) " >&6
4035 else
4036 # Double quotes because CPP needs to be expanded
4037 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4039 ac_preproc_ok=false
4040 for ac_c_preproc_warn_flag in '' yes
4042 # Use a header file that comes with gcc, so configuring glibc
4043 # with a fresh cross-compiler works.
4044 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4045 # <limits.h> exists even on freestanding compilers.
4046 # On the NeXT, cc -E runs the code through the compiler's parser,
4047 # not just through cpp. "Syntax error" is here to catch this case.
4048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4049 /* end confdefs.h. */
4050 #ifdef __STDC__
4051 # include <limits.h>
4052 #else
4053 # include <assert.h>
4054 #endif
4055 Syntax error
4056 _ACEOF
4057 if ac_fn_c_try_cpp "$LINENO"; then :
4059 else
4060 # Broken: fails on valid input.
4061 continue
4063 rm -f conftest.err conftest.i conftest.$ac_ext
4065 # OK, works on sane cases. Now check whether nonexistent headers
4066 # can be detected and how.
4067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4068 /* end confdefs.h. */
4069 #include <ac_nonexistent.h>
4070 _ACEOF
4071 if ac_fn_c_try_cpp "$LINENO"; then :
4072 # Broken: success on invalid input.
4073 continue
4074 else
4075 # Passes both tests.
4076 ac_preproc_ok=:
4077 break
4079 rm -f conftest.err conftest.i conftest.$ac_ext
4081 done
4082 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4083 rm -f conftest.i conftest.err conftest.$ac_ext
4084 if $ac_preproc_ok; then :
4085 break
4088 done
4089 ac_cv_prog_CPP=$CPP
4092 CPP=$ac_cv_prog_CPP
4093 else
4094 ac_cv_prog_CPP=$CPP
4096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4097 $as_echo "$CPP" >&6; }
4098 ac_preproc_ok=false
4099 for ac_c_preproc_warn_flag in '' yes
4101 # Use a header file that comes with gcc, so configuring glibc
4102 # with a fresh cross-compiler works.
4103 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4104 # <limits.h> exists even on freestanding compilers.
4105 # On the NeXT, cc -E runs the code through the compiler's parser,
4106 # not just through cpp. "Syntax error" is here to catch this case.
4107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4108 /* end confdefs.h. */
4109 #ifdef __STDC__
4110 # include <limits.h>
4111 #else
4112 # include <assert.h>
4113 #endif
4114 Syntax error
4115 _ACEOF
4116 if ac_fn_c_try_cpp "$LINENO"; then :
4118 else
4119 # Broken: fails on valid input.
4120 continue
4122 rm -f conftest.err conftest.i conftest.$ac_ext
4124 # OK, works on sane cases. Now check whether nonexistent headers
4125 # can be detected and how.
4126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4127 /* end confdefs.h. */
4128 #include <ac_nonexistent.h>
4129 _ACEOF
4130 if ac_fn_c_try_cpp "$LINENO"; then :
4131 # Broken: success on invalid input.
4132 continue
4133 else
4134 # Passes both tests.
4135 ac_preproc_ok=:
4136 break
4138 rm -f conftest.err conftest.i conftest.$ac_ext
4140 done
4141 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4142 rm -f conftest.i conftest.err conftest.$ac_ext
4143 if $ac_preproc_ok; then :
4145 else
4146 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4147 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4148 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4149 See \`config.log' for more details" "$LINENO" 5; }
4152 ac_ext=c
4153 ac_cpp='$CPP $CPPFLAGS'
4154 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4155 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4156 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4160 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4161 if ${ac_cv_path_GREP+:} false; then :
4162 $as_echo_n "(cached) " >&6
4163 else
4164 if test -z "$GREP"; then
4165 ac_path_GREP_found=false
4166 # Loop through the user's path and test for each of PROGNAME-LIST
4167 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4168 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4170 IFS=$as_save_IFS
4171 test -z "$as_dir" && as_dir=.
4172 for ac_prog in grep ggrep; do
4173 for ac_exec_ext in '' $ac_executable_extensions; do
4174 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4175 as_fn_executable_p "$ac_path_GREP" || continue
4176 # Check for GNU ac_path_GREP and select it if it is found.
4177 # Check for GNU $ac_path_GREP
4178 case `"$ac_path_GREP" --version 2>&1` in
4179 *GNU*)
4180 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4182 ac_count=0
4183 $as_echo_n 0123456789 >"conftest.in"
4184 while :
4186 cat "conftest.in" "conftest.in" >"conftest.tmp"
4187 mv "conftest.tmp" "conftest.in"
4188 cp "conftest.in" "conftest.nl"
4189 $as_echo 'GREP' >> "conftest.nl"
4190 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4191 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4192 as_fn_arith $ac_count + 1 && ac_count=$as_val
4193 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4194 # Best one so far, save it but keep looking for a better one
4195 ac_cv_path_GREP="$ac_path_GREP"
4196 ac_path_GREP_max=$ac_count
4198 # 10*(2^10) chars as input seems more than enough
4199 test $ac_count -gt 10 && break
4200 done
4201 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4202 esac
4204 $ac_path_GREP_found && break 3
4205 done
4206 done
4207 done
4208 IFS=$as_save_IFS
4209 if test -z "$ac_cv_path_GREP"; then
4210 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4212 else
4213 ac_cv_path_GREP=$GREP
4217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4218 $as_echo "$ac_cv_path_GREP" >&6; }
4219 GREP="$ac_cv_path_GREP"
4222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4223 $as_echo_n "checking for egrep... " >&6; }
4224 if ${ac_cv_path_EGREP+:} false; then :
4225 $as_echo_n "(cached) " >&6
4226 else
4227 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4228 then ac_cv_path_EGREP="$GREP -E"
4229 else
4230 if test -z "$EGREP"; then
4231 ac_path_EGREP_found=false
4232 # Loop through the user's path and test for each of PROGNAME-LIST
4233 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4234 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4236 IFS=$as_save_IFS
4237 test -z "$as_dir" && as_dir=.
4238 for ac_prog in egrep; do
4239 for ac_exec_ext in '' $ac_executable_extensions; do
4240 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4241 as_fn_executable_p "$ac_path_EGREP" || continue
4242 # Check for GNU ac_path_EGREP and select it if it is found.
4243 # Check for GNU $ac_path_EGREP
4244 case `"$ac_path_EGREP" --version 2>&1` in
4245 *GNU*)
4246 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4248 ac_count=0
4249 $as_echo_n 0123456789 >"conftest.in"
4250 while :
4252 cat "conftest.in" "conftest.in" >"conftest.tmp"
4253 mv "conftest.tmp" "conftest.in"
4254 cp "conftest.in" "conftest.nl"
4255 $as_echo 'EGREP' >> "conftest.nl"
4256 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4257 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4258 as_fn_arith $ac_count + 1 && ac_count=$as_val
4259 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4260 # Best one so far, save it but keep looking for a better one
4261 ac_cv_path_EGREP="$ac_path_EGREP"
4262 ac_path_EGREP_max=$ac_count
4264 # 10*(2^10) chars as input seems more than enough
4265 test $ac_count -gt 10 && break
4266 done
4267 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4268 esac
4270 $ac_path_EGREP_found && break 3
4271 done
4272 done
4273 done
4274 IFS=$as_save_IFS
4275 if test -z "$ac_cv_path_EGREP"; then
4276 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4278 else
4279 ac_cv_path_EGREP=$EGREP
4284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4285 $as_echo "$ac_cv_path_EGREP" >&6; }
4286 EGREP="$ac_cv_path_EGREP"
4289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4290 $as_echo_n "checking for ANSI C header files... " >&6; }
4291 if ${ac_cv_header_stdc+:} false; then :
4292 $as_echo_n "(cached) " >&6
4293 else
4294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4295 /* end confdefs.h. */
4296 #include <stdlib.h>
4297 #include <stdarg.h>
4298 #include <string.h>
4299 #include <float.h>
4302 main ()
4306 return 0;
4308 _ACEOF
4309 if ac_fn_c_try_compile "$LINENO"; then :
4310 ac_cv_header_stdc=yes
4311 else
4312 ac_cv_header_stdc=no
4314 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4316 if test $ac_cv_header_stdc = yes; then
4317 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4319 /* end confdefs.h. */
4320 #include <string.h>
4322 _ACEOF
4323 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4324 $EGREP "memchr" >/dev/null 2>&1; then :
4326 else
4327 ac_cv_header_stdc=no
4329 rm -f conftest*
4333 if test $ac_cv_header_stdc = yes; then
4334 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4336 /* end confdefs.h. */
4337 #include <stdlib.h>
4339 _ACEOF
4340 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4341 $EGREP "free" >/dev/null 2>&1; then :
4343 else
4344 ac_cv_header_stdc=no
4346 rm -f conftest*
4350 if test $ac_cv_header_stdc = yes; then
4351 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4352 if test "$cross_compiling" = yes; then :
4354 else
4355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4356 /* end confdefs.h. */
4357 #include <ctype.h>
4358 #include <stdlib.h>
4359 #if ((' ' & 0x0FF) == 0x020)
4360 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4361 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4362 #else
4363 # define ISLOWER(c) \
4364 (('a' <= (c) && (c) <= 'i') \
4365 || ('j' <= (c) && (c) <= 'r') \
4366 || ('s' <= (c) && (c) <= 'z'))
4367 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4368 #endif
4370 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4372 main ()
4374 int i;
4375 for (i = 0; i < 256; i++)
4376 if (XOR (islower (i), ISLOWER (i))
4377 || toupper (i) != TOUPPER (i))
4378 return 2;
4379 return 0;
4381 _ACEOF
4382 if ac_fn_c_try_run "$LINENO"; then :
4384 else
4385 ac_cv_header_stdc=no
4387 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4388 conftest.$ac_objext conftest.beam conftest.$ac_ext
4393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4394 $as_echo "$ac_cv_header_stdc" >&6; }
4395 if test $ac_cv_header_stdc = yes; then
4397 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4401 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4402 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4403 inttypes.h stdint.h unistd.h
4404 do :
4405 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4406 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4408 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4409 cat >>confdefs.h <<_ACEOF
4410 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4411 _ACEOF
4415 done
4419 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4420 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4421 MINIX=yes
4422 else
4423 MINIX=
4427 if test "$MINIX" = yes; then
4429 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4432 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4435 $as_echo "#define _MINIX 1" >>confdefs.h
4440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4441 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4442 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4443 $as_echo_n "(cached) " >&6
4444 else
4445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4446 /* end confdefs.h. */
4448 # define __EXTENSIONS__ 1
4449 $ac_includes_default
4451 main ()
4455 return 0;
4457 _ACEOF
4458 if ac_fn_c_try_compile "$LINENO"; then :
4459 ac_cv_safe_to_define___extensions__=yes
4460 else
4461 ac_cv_safe_to_define___extensions__=no
4463 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4466 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4467 test $ac_cv_safe_to_define___extensions__ = yes &&
4468 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4470 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4472 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4474 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4476 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4479 ac_aux_dir=
4480 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4481 if test -f "$ac_dir/install-sh"; then
4482 ac_aux_dir=$ac_dir
4483 ac_install_sh="$ac_aux_dir/install-sh -c"
4484 break
4485 elif test -f "$ac_dir/install.sh"; then
4486 ac_aux_dir=$ac_dir
4487 ac_install_sh="$ac_aux_dir/install.sh -c"
4488 break
4489 elif test -f "$ac_dir/shtool"; then
4490 ac_aux_dir=$ac_dir
4491 ac_install_sh="$ac_aux_dir/shtool install -c"
4492 break
4494 done
4495 if test -z "$ac_aux_dir"; then
4496 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4499 # These three variables are undocumented and unsupported,
4500 # and are intended to be withdrawn in a future Autoconf release.
4501 # They can cause serious problems if a builder's source tree is in a directory
4502 # whose full name contains unusual characters.
4503 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4504 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4505 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4508 # Make sure we can run config.sub.
4509 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4510 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4513 $as_echo_n "checking build system type... " >&6; }
4514 if ${ac_cv_build+:} false; then :
4515 $as_echo_n "(cached) " >&6
4516 else
4517 ac_build_alias=$build_alias
4518 test "x$ac_build_alias" = x &&
4519 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4520 test "x$ac_build_alias" = x &&
4521 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4522 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4523 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4527 $as_echo "$ac_cv_build" >&6; }
4528 case $ac_cv_build in
4529 *-*-*) ;;
4530 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4531 esac
4532 build=$ac_cv_build
4533 ac_save_IFS=$IFS; IFS='-'
4534 set x $ac_cv_build
4535 shift
4536 build_cpu=$1
4537 build_vendor=$2
4538 shift; shift
4539 # Remember, the first character of IFS is used to create $*,
4540 # except with old shells:
4541 build_os=$*
4542 IFS=$ac_save_IFS
4543 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4547 $as_echo_n "checking host system type... " >&6; }
4548 if ${ac_cv_host+:} false; then :
4549 $as_echo_n "(cached) " >&6
4550 else
4551 if test "x$host_alias" = x; then
4552 ac_cv_host=$ac_cv_build
4553 else
4554 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4555 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4560 $as_echo "$ac_cv_host" >&6; }
4561 case $ac_cv_host in
4562 *-*-*) ;;
4563 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4564 esac
4565 host=$ac_cv_host
4566 ac_save_IFS=$IFS; IFS='-'
4567 set x $ac_cv_host
4568 shift
4569 host_cpu=$1
4570 host_vendor=$2
4571 shift; shift
4572 # Remember, the first character of IFS is used to create $*,
4573 # except with old shells:
4574 host_os=$*
4575 IFS=$ac_save_IFS
4576 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4580 $as_echo_n "checking target system type... " >&6; }
4581 if ${ac_cv_target+:} false; then :
4582 $as_echo_n "(cached) " >&6
4583 else
4584 if test "x$target_alias" = x; then
4585 ac_cv_target=$ac_cv_host
4586 else
4587 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4588 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4593 $as_echo "$ac_cv_target" >&6; }
4594 case $ac_cv_target in
4595 *-*-*) ;;
4596 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
4597 esac
4598 target=$ac_cv_target
4599 ac_save_IFS=$IFS; IFS='-'
4600 set x $ac_cv_target
4601 shift
4602 target_cpu=$1
4603 target_vendor=$2
4604 shift; shift
4605 # Remember, the first character of IFS is used to create $*,
4606 # except with old shells:
4607 target_os=$*
4608 IFS=$ac_save_IFS
4609 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4612 # The aliases save the names the user supplied, while $host etc.
4613 # will get canonicalized.
4614 test -n "$target_alias" &&
4615 test "$program_prefix$program_suffix$program_transform_name" = \
4616 NONENONEs,x,x, &&
4617 program_prefix=${target_alias}-
4619 # The tests for host and target for $enable_largefile require
4620 # canonical names.
4624 # As the $enable_largefile decision depends on --enable-plugins we must set it
4625 # even in directories otherwise not depending on the $plugins option.
4628 maybe_plugins=no
4629 for ac_header in dlfcn.h
4630 do :
4631 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4633 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
4634 cat >>confdefs.h <<_ACEOF
4635 #define HAVE_DLFCN_H 1
4636 _ACEOF
4637 maybe_plugins=yes
4640 done
4642 for ac_header in windows.h
4643 do :
4644 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4646 if test "x$ac_cv_header_windows_h" = xyes; then :
4647 cat >>confdefs.h <<_ACEOF
4648 #define HAVE_WINDOWS_H 1
4649 _ACEOF
4650 maybe_plugins=yes
4653 done
4656 # Check whether --enable-plugins was given.
4657 if test "${enable_plugins+set}" = set; then :
4658 enableval=$enable_plugins; case "${enableval}" in
4659 no) plugins=no ;;
4660 *) plugins=yes
4661 if test "$maybe_plugins" != "yes" ; then
4662 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4663 fi ;;
4664 esac
4665 else
4666 plugins=$maybe_plugins
4670 if test "$plugins" = "yes"; then
4671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4672 $as_echo_n "checking for library containing dlsym... " >&6; }
4673 if ${ac_cv_search_dlsym+:} false; then :
4674 $as_echo_n "(cached) " >&6
4675 else
4676 ac_func_search_save_LIBS=$LIBS
4677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4678 /* end confdefs.h. */
4680 /* Override any GCC internal prototype to avoid an error.
4681 Use char because int might match the return type of a GCC
4682 builtin and then its argument prototype would still apply. */
4683 #ifdef __cplusplus
4684 extern "C"
4685 #endif
4686 char dlsym ();
4688 main ()
4690 return dlsym ();
4692 return 0;
4694 _ACEOF
4695 for ac_lib in '' dl; do
4696 if test -z "$ac_lib"; then
4697 ac_res="none required"
4698 else
4699 ac_res=-l$ac_lib
4700 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4702 if ac_fn_c_try_link "$LINENO"; then :
4703 ac_cv_search_dlsym=$ac_res
4705 rm -f core conftest.err conftest.$ac_objext \
4706 conftest$ac_exeext
4707 if ${ac_cv_search_dlsym+:} false; then :
4708 break
4710 done
4711 if ${ac_cv_search_dlsym+:} false; then :
4713 else
4714 ac_cv_search_dlsym=no
4716 rm conftest.$ac_ext
4717 LIBS=$ac_func_search_save_LIBS
4719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4720 $as_echo "$ac_cv_search_dlsym" >&6; }
4721 ac_res=$ac_cv_search_dlsym
4722 if test "$ac_res" != no; then :
4723 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4730 case "${host}" in
4731 sparc-*-solaris*|i[3-7]86-*-solaris*)
4732 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4733 # are mutually exclusive; and without procfs support, the bfd/ elf module
4734 # cannot provide certain routines such as elfcore_write_prpsinfo
4735 # or elfcore_write_prstatus. So unless the user explicitly requested
4736 # large-file support through the --enable-largefile switch, disable
4737 # large-file support in favor of procfs support.
4738 test "${target}" = "${host}" -a "x$plugins" = xno \
4739 && : ${enable_largefile="no"}
4741 esac
4743 # Check whether --enable-largefile was given.
4744 if test "${enable_largefile+set}" = set; then :
4745 enableval=$enable_largefile;
4748 if test "$enable_largefile" != no; then
4750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4751 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4752 if ${ac_cv_sys_largefile_CC+:} false; then :
4753 $as_echo_n "(cached) " >&6
4754 else
4755 ac_cv_sys_largefile_CC=no
4756 if test "$GCC" != yes; then
4757 ac_save_CC=$CC
4758 while :; do
4759 # IRIX 6.2 and later do not support large files by default,
4760 # so use the C compiler's -n32 option if that helps.
4761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4762 /* end confdefs.h. */
4763 #include <sys/types.h>
4764 /* Check that off_t can represent 2**63 - 1 correctly.
4765 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4766 since some C++ compilers masquerading as C compilers
4767 incorrectly reject 9223372036854775807. */
4768 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4769 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4770 && LARGE_OFF_T % 2147483647 == 1)
4771 ? 1 : -1];
4773 main ()
4777 return 0;
4779 _ACEOF
4780 if ac_fn_c_try_compile "$LINENO"; then :
4781 break
4783 rm -f core conftest.err conftest.$ac_objext
4784 CC="$CC -n32"
4785 if ac_fn_c_try_compile "$LINENO"; then :
4786 ac_cv_sys_largefile_CC=' -n32'; break
4788 rm -f core conftest.err conftest.$ac_objext
4789 break
4790 done
4791 CC=$ac_save_CC
4792 rm -f conftest.$ac_ext
4795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4796 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4797 if test "$ac_cv_sys_largefile_CC" != no; then
4798 CC=$CC$ac_cv_sys_largefile_CC
4801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4802 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4803 if ${ac_cv_sys_file_offset_bits+:} false; then :
4804 $as_echo_n "(cached) " >&6
4805 else
4806 while :; do
4807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4808 /* end confdefs.h. */
4809 #include <sys/types.h>
4810 /* Check that off_t can represent 2**63 - 1 correctly.
4811 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4812 since some C++ compilers masquerading as C compilers
4813 incorrectly reject 9223372036854775807. */
4814 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4815 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4816 && LARGE_OFF_T % 2147483647 == 1)
4817 ? 1 : -1];
4819 main ()
4823 return 0;
4825 _ACEOF
4826 if ac_fn_c_try_compile "$LINENO"; then :
4827 ac_cv_sys_file_offset_bits=no; break
4829 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4831 /* end confdefs.h. */
4832 #define _FILE_OFFSET_BITS 64
4833 #include <sys/types.h>
4834 /* Check that off_t can represent 2**63 - 1 correctly.
4835 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4836 since some C++ compilers masquerading as C compilers
4837 incorrectly reject 9223372036854775807. */
4838 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4839 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4840 && LARGE_OFF_T % 2147483647 == 1)
4841 ? 1 : -1];
4843 main ()
4847 return 0;
4849 _ACEOF
4850 if ac_fn_c_try_compile "$LINENO"; then :
4851 ac_cv_sys_file_offset_bits=64; break
4853 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4854 ac_cv_sys_file_offset_bits=unknown
4855 break
4856 done
4858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4859 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4860 case $ac_cv_sys_file_offset_bits in #(
4861 no | unknown) ;;
4863 cat >>confdefs.h <<_ACEOF
4864 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4865 _ACEOF
4867 esac
4868 rm -rf conftest*
4869 if test $ac_cv_sys_file_offset_bits = unknown; then
4870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4871 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4872 if ${ac_cv_sys_large_files+:} false; then :
4873 $as_echo_n "(cached) " >&6
4874 else
4875 while :; do
4876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4877 /* end confdefs.h. */
4878 #include <sys/types.h>
4879 /* Check that off_t can represent 2**63 - 1 correctly.
4880 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4881 since some C++ compilers masquerading as C compilers
4882 incorrectly reject 9223372036854775807. */
4883 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4884 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4885 && LARGE_OFF_T % 2147483647 == 1)
4886 ? 1 : -1];
4888 main ()
4892 return 0;
4894 _ACEOF
4895 if ac_fn_c_try_compile "$LINENO"; then :
4896 ac_cv_sys_large_files=no; break
4898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4900 /* end confdefs.h. */
4901 #define _LARGE_FILES 1
4902 #include <sys/types.h>
4903 /* Check that off_t can represent 2**63 - 1 correctly.
4904 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4905 since some C++ compilers masquerading as C compilers
4906 incorrectly reject 9223372036854775807. */
4907 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4908 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4909 && LARGE_OFF_T % 2147483647 == 1)
4910 ? 1 : -1];
4912 main ()
4916 return 0;
4918 _ACEOF
4919 if ac_fn_c_try_compile "$LINENO"; then :
4920 ac_cv_sys_large_files=1; break
4922 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4923 ac_cv_sys_large_files=unknown
4924 break
4925 done
4927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4928 $as_echo "$ac_cv_sys_large_files" >&6; }
4929 case $ac_cv_sys_large_files in #(
4930 no | unknown) ;;
4932 cat >>confdefs.h <<_ACEOF
4933 #define _LARGE_FILES $ac_cv_sys_large_files
4934 _ACEOF
4936 esac
4937 rm -rf conftest*
4947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4948 $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4949 if ${am_cv_prog_cc_stdc+:} false; then :
4950 $as_echo_n "(cached) " >&6
4951 else
4952 am_cv_prog_cc_stdc=no
4953 ac_save_CC="$CC"
4954 # Don't try gcc -ansi; that turns off useful extensions and
4955 # breaks some systems' header files.
4956 # AIX -qlanglvl=ansi
4957 # Ultrix and OSF/1 -std1
4958 # HP-UX 10.20 and later -Ae
4959 # HP-UX older versions -Aa -D_HPUX_SOURCE
4960 # SVR4 -Xc -D__EXTENSIONS__
4961 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4963 CC="$ac_save_CC $ac_arg"
4964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4965 /* end confdefs.h. */
4966 #include <stdarg.h>
4967 #include <stdio.h>
4968 #include <sys/types.h>
4969 #include <sys/stat.h>
4970 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4971 struct buf { int x; };
4972 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4973 static char *e (p, i)
4974 char **p;
4975 int i;
4977 return p[i];
4979 static char *f (char * (*g) (char **, int), char **p, ...)
4981 char *s;
4982 va_list v;
4983 va_start (v,p);
4984 s = g (p, va_arg (v,int));
4985 va_end (v);
4986 return s;
4988 int test (int i, double x);
4989 struct s1 {int (*f) (int a);};
4990 struct s2 {int (*f) (double a);};
4991 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4992 int argc;
4993 char **argv;
4996 main ()
4999 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5002 return 0;
5004 _ACEOF
5005 if ac_fn_c_try_compile "$LINENO"; then :
5006 am_cv_prog_cc_stdc="$ac_arg"; break
5008 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5009 done
5010 CC="$ac_save_CC"
5014 if test -z "$am_cv_prog_cc_stdc"; then
5015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5016 $as_echo "none needed" >&6; }
5017 else
5018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
5019 $as_echo "$am_cv_prog_cc_stdc" >&6; }
5021 case "x$am_cv_prog_cc_stdc" in
5022 x|xno) ;;
5023 *) CC="$CC $am_cv_prog_cc_stdc" ;;
5024 esac
5026 # Expand $ac_aux_dir to an absolute path.
5027 am_aux_dir=`cd "$ac_aux_dir" && pwd`
5029 if test x"${install_sh+set}" != xset; then
5030 case $am_aux_dir in
5031 *\ * | *\ *)
5032 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5034 install_sh="\${SHELL} $am_aux_dir/install-sh"
5035 esac
5038 # Installed binaries are usually stripped using 'strip' when the user
5039 # run "make install-strip". However 'strip' might not be the right
5040 # tool to use in cross-compilation environments, therefore Automake
5041 # will honor the 'STRIP' environment variable to overrule this program.
5042 if test "$cross_compiling" != no; then
5043 if test -n "$ac_tool_prefix"; then
5044 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5045 set dummy ${ac_tool_prefix}strip; ac_word=$2
5046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5047 $as_echo_n "checking for $ac_word... " >&6; }
5048 if ${ac_cv_prog_STRIP+:} false; then :
5049 $as_echo_n "(cached) " >&6
5050 else
5051 if test -n "$STRIP"; then
5052 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5053 else
5054 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5055 for as_dir in $PATH
5057 IFS=$as_save_IFS
5058 test -z "$as_dir" && as_dir=.
5059 for ac_exec_ext in '' $ac_executable_extensions; do
5060 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5061 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5062 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5063 break 2
5065 done
5066 done
5067 IFS=$as_save_IFS
5071 STRIP=$ac_cv_prog_STRIP
5072 if test -n "$STRIP"; then
5073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5074 $as_echo "$STRIP" >&6; }
5075 else
5076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5077 $as_echo "no" >&6; }
5082 if test -z "$ac_cv_prog_STRIP"; then
5083 ac_ct_STRIP=$STRIP
5084 # Extract the first word of "strip", so it can be a program name with args.
5085 set dummy strip; ac_word=$2
5086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5087 $as_echo_n "checking for $ac_word... " >&6; }
5088 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
5089 $as_echo_n "(cached) " >&6
5090 else
5091 if test -n "$ac_ct_STRIP"; then
5092 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5093 else
5094 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5095 for as_dir in $PATH
5097 IFS=$as_save_IFS
5098 test -z "$as_dir" && as_dir=.
5099 for ac_exec_ext in '' $ac_executable_extensions; do
5100 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5101 ac_cv_prog_ac_ct_STRIP="strip"
5102 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5103 break 2
5105 done
5106 done
5107 IFS=$as_save_IFS
5111 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5112 if test -n "$ac_ct_STRIP"; then
5113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5114 $as_echo "$ac_ct_STRIP" >&6; }
5115 else
5116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5117 $as_echo "no" >&6; }
5120 if test "x$ac_ct_STRIP" = x; then
5121 STRIP=":"
5122 else
5123 case $cross_compiling:$ac_tool_warned in
5124 yes:)
5125 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5126 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5127 ac_tool_warned=yes ;;
5128 esac
5129 STRIP=$ac_ct_STRIP
5131 else
5132 STRIP="$ac_cv_prog_STRIP"
5136 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5139 ac_aux_dir=
5140 for ac_dir in .. "$srcdir"/..; do
5141 if test -f "$ac_dir/install-sh"; then
5142 ac_aux_dir=$ac_dir
5143 ac_install_sh="$ac_aux_dir/install-sh -c"
5144 break
5145 elif test -f "$ac_dir/install.sh"; then
5146 ac_aux_dir=$ac_dir
5147 ac_install_sh="$ac_aux_dir/install.sh -c"
5148 break
5149 elif test -f "$ac_dir/shtool"; then
5150 ac_aux_dir=$ac_dir
5151 ac_install_sh="$ac_aux_dir/shtool install -c"
5152 break
5154 done
5155 if test -z "$ac_aux_dir"; then
5156 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
5159 # These three variables are undocumented and unsupported,
5160 # and are intended to be withdrawn in a future Autoconf release.
5161 # They can cause serious problems if a builder's source tree is in a directory
5162 # whose full name contains unusual characters.
5163 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5164 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5165 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5169 test "$program_prefix" != NONE &&
5170 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5171 # Use a double $ so make ignores it.
5172 test "$program_suffix" != NONE &&
5173 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5174 # Double any \ or $.
5175 # By default was `s,x,x', remove it if useless.
5176 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5177 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5180 # We require a C++11 compiler. Check if one is available, and if
5181 # necessary, set CXX_DIALECT to some -std=xxx switch.
5183 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
5184 ac_ext=cpp
5185 ac_cpp='$CXXCPP $CPPFLAGS'
5186 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5187 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5188 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5189 CXX_DIALECT=""
5190 ac_success=no
5191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5192 $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
5193 if ${ax_cv_cxx_compile_cxx11+:} false; then :
5194 $as_echo_n "(cached) " >&6
5195 else
5196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5197 /* end confdefs.h. */
5200 // If the compiler admits that it is not ready for C++11, why torture it?
5201 // Hopefully, this will speed up the test.
5203 #ifndef __cplusplus
5205 #error "This is not a C++ compiler"
5207 #elif __cplusplus < 201103L
5209 #error "This is not a C++11 compiler"
5211 #else
5213 namespace cxx11
5216 namespace test_static_assert
5219 template <typename T>
5220 struct check
5222 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5227 namespace test_final_override
5230 struct Base
5232 virtual void f() {}
5235 struct Derived : public Base
5237 virtual void f() override {}
5242 namespace test_double_right_angle_brackets
5245 template < typename T >
5246 struct check {};
5248 typedef check<void> single_type;
5249 typedef check<check<void>> double_type;
5250 typedef check<check<check<void>>> triple_type;
5251 typedef check<check<check<check<void>>>> quadruple_type;
5255 namespace test_decltype
5261 int a = 1;
5262 decltype(a) b = 2;
5263 return a + b;
5268 namespace test_type_deduction
5271 template < typename T1, typename T2 >
5272 struct is_same
5274 static const bool value = false;
5277 template < typename T >
5278 struct is_same<T, T>
5280 static const bool value = true;
5283 template < typename T1, typename T2 >
5284 auto
5285 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5287 return a1 + a2;
5291 test(const int c, volatile int v)
5293 static_assert(is_same<int, decltype(0)>::value == true, "");
5294 static_assert(is_same<int, decltype(c)>::value == false, "");
5295 static_assert(is_same<int, decltype(v)>::value == false, "");
5296 auto ac = c;
5297 auto av = v;
5298 auto sumi = ac + av + 'x';
5299 auto sumf = ac + av + 1.0;
5300 static_assert(is_same<int, decltype(ac)>::value == true, "");
5301 static_assert(is_same<int, decltype(av)>::value == true, "");
5302 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5303 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5304 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5305 return (sumf > 0.0) ? sumi : add(c, v);
5310 namespace test_noexcept
5313 int f() { return 0; }
5314 int g() noexcept { return 0; }
5316 static_assert(noexcept(f()) == false, "");
5317 static_assert(noexcept(g()) == true, "");
5321 namespace test_constexpr
5324 template < typename CharT >
5325 unsigned long constexpr
5326 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5328 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5331 template < typename CharT >
5332 unsigned long constexpr
5333 strlen_c(const CharT *const s) noexcept
5335 return strlen_c_r(s, 0UL);
5338 static_assert(strlen_c("") == 0UL, "");
5339 static_assert(strlen_c("1") == 1UL, "");
5340 static_assert(strlen_c("example") == 7UL, "");
5341 static_assert(strlen_c("another\0example") == 7UL, "");
5345 namespace test_rvalue_references
5348 template < int N >
5349 struct answer
5351 static constexpr int value = N;
5354 answer<1> f(int&) { return answer<1>(); }
5355 answer<2> f(const int&) { return answer<2>(); }
5356 answer<3> f(int&&) { return answer<3>(); }
5358 void
5359 test()
5361 int i = 0;
5362 const int c = 0;
5363 static_assert(decltype(f(i))::value == 1, "");
5364 static_assert(decltype(f(c))::value == 2, "");
5365 static_assert(decltype(f(0))::value == 3, "");
5370 namespace test_uniform_initialization
5373 struct test
5375 static const int zero {};
5376 static const int one {1};
5379 static_assert(test::zero == 0, "");
5380 static_assert(test::one == 1, "");
5384 namespace test_lambdas
5387 void
5388 test1()
5390 auto lambda1 = [](){};
5391 auto lambda2 = lambda1;
5392 lambda1();
5393 lambda2();
5397 test2()
5399 auto a = [](int i, int j){ return i + j; }(1, 2);
5400 auto b = []() -> int { return '0'; }();
5401 auto c = [=](){ return a + b; }();
5402 auto d = [&](){ return c; }();
5403 auto e = [a, &b](int x) mutable {
5404 const auto identity = [](int y){ return y; };
5405 for (auto i = 0; i < a; ++i)
5406 a += b--;
5407 return x + identity(a + b);
5408 }(0);
5409 return a + b + c + d + e;
5413 test3()
5415 const auto nullary = [](){ return 0; };
5416 const auto unary = [](int x){ return x; };
5417 using nullary_t = decltype(nullary);
5418 using unary_t = decltype(unary);
5419 const auto higher1st = [](nullary_t f){ return f(); };
5420 const auto higher2nd = [unary](nullary_t f1){
5421 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5423 return higher1st(nullary) + higher2nd(nullary)(unary);
5428 namespace test_variadic_templates
5431 template <int...>
5432 struct sum;
5434 template <int N0, int... N1toN>
5435 struct sum<N0, N1toN...>
5437 static constexpr auto value = N0 + sum<N1toN...>::value;
5440 template <>
5441 struct sum<>
5443 static constexpr auto value = 0;
5446 static_assert(sum<>::value == 0, "");
5447 static_assert(sum<1>::value == 1, "");
5448 static_assert(sum<23>::value == 23, "");
5449 static_assert(sum<1, 2>::value == 3, "");
5450 static_assert(sum<5, 5, 11>::value == 21, "");
5451 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5455 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5456 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5457 // because of this.
5458 namespace test_template_alias_sfinae
5461 struct foo {};
5463 template<typename T>
5464 using member = typename T::member_type;
5466 template<typename T>
5467 void func(...) {}
5469 template<typename T>
5470 void func(member<T>*) {}
5472 void test();
5474 void test() { func<foo>(0); }
5478 } // namespace cxx11
5480 #endif // __cplusplus >= 201103L
5484 _ACEOF
5485 if ac_fn_cxx_try_compile "$LINENO"; then :
5486 ax_cv_cxx_compile_cxx11=yes
5487 else
5488 ax_cv_cxx_compile_cxx11=no
5490 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5493 $as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5494 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5495 ac_success=yes
5498 if test x$ac_success = xno; then
5499 for alternative in ${ax_cxx_compile_alternatives}; do
5500 switch="-std=gnu++${alternative}"
5501 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5503 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5504 if eval \${$cachevar+:} false; then :
5505 $as_echo_n "(cached) " >&6
5506 else
5507 ac_save_CXX="$CXX"
5508 CXX="$CXX $switch"
5509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5510 /* end confdefs.h. */
5513 // If the compiler admits that it is not ready for C++11, why torture it?
5514 // Hopefully, this will speed up the test.
5516 #ifndef __cplusplus
5518 #error "This is not a C++ compiler"
5520 #elif __cplusplus < 201103L
5522 #error "This is not a C++11 compiler"
5524 #else
5526 namespace cxx11
5529 namespace test_static_assert
5532 template <typename T>
5533 struct check
5535 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5540 namespace test_final_override
5543 struct Base
5545 virtual void f() {}
5548 struct Derived : public Base
5550 virtual void f() override {}
5555 namespace test_double_right_angle_brackets
5558 template < typename T >
5559 struct check {};
5561 typedef check<void> single_type;
5562 typedef check<check<void>> double_type;
5563 typedef check<check<check<void>>> triple_type;
5564 typedef check<check<check<check<void>>>> quadruple_type;
5568 namespace test_decltype
5574 int a = 1;
5575 decltype(a) b = 2;
5576 return a + b;
5581 namespace test_type_deduction
5584 template < typename T1, typename T2 >
5585 struct is_same
5587 static const bool value = false;
5590 template < typename T >
5591 struct is_same<T, T>
5593 static const bool value = true;
5596 template < typename T1, typename T2 >
5597 auto
5598 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5600 return a1 + a2;
5604 test(const int c, volatile int v)
5606 static_assert(is_same<int, decltype(0)>::value == true, "");
5607 static_assert(is_same<int, decltype(c)>::value == false, "");
5608 static_assert(is_same<int, decltype(v)>::value == false, "");
5609 auto ac = c;
5610 auto av = v;
5611 auto sumi = ac + av + 'x';
5612 auto sumf = ac + av + 1.0;
5613 static_assert(is_same<int, decltype(ac)>::value == true, "");
5614 static_assert(is_same<int, decltype(av)>::value == true, "");
5615 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5616 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5617 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5618 return (sumf > 0.0) ? sumi : add(c, v);
5623 namespace test_noexcept
5626 int f() { return 0; }
5627 int g() noexcept { return 0; }
5629 static_assert(noexcept(f()) == false, "");
5630 static_assert(noexcept(g()) == true, "");
5634 namespace test_constexpr
5637 template < typename CharT >
5638 unsigned long constexpr
5639 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5641 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5644 template < typename CharT >
5645 unsigned long constexpr
5646 strlen_c(const CharT *const s) noexcept
5648 return strlen_c_r(s, 0UL);
5651 static_assert(strlen_c("") == 0UL, "");
5652 static_assert(strlen_c("1") == 1UL, "");
5653 static_assert(strlen_c("example") == 7UL, "");
5654 static_assert(strlen_c("another\0example") == 7UL, "");
5658 namespace test_rvalue_references
5661 template < int N >
5662 struct answer
5664 static constexpr int value = N;
5667 answer<1> f(int&) { return answer<1>(); }
5668 answer<2> f(const int&) { return answer<2>(); }
5669 answer<3> f(int&&) { return answer<3>(); }
5671 void
5672 test()
5674 int i = 0;
5675 const int c = 0;
5676 static_assert(decltype(f(i))::value == 1, "");
5677 static_assert(decltype(f(c))::value == 2, "");
5678 static_assert(decltype(f(0))::value == 3, "");
5683 namespace test_uniform_initialization
5686 struct test
5688 static const int zero {};
5689 static const int one {1};
5692 static_assert(test::zero == 0, "");
5693 static_assert(test::one == 1, "");
5697 namespace test_lambdas
5700 void
5701 test1()
5703 auto lambda1 = [](){};
5704 auto lambda2 = lambda1;
5705 lambda1();
5706 lambda2();
5710 test2()
5712 auto a = [](int i, int j){ return i + j; }(1, 2);
5713 auto b = []() -> int { return '0'; }();
5714 auto c = [=](){ return a + b; }();
5715 auto d = [&](){ return c; }();
5716 auto e = [a, &b](int x) mutable {
5717 const auto identity = [](int y){ return y; };
5718 for (auto i = 0; i < a; ++i)
5719 a += b--;
5720 return x + identity(a + b);
5721 }(0);
5722 return a + b + c + d + e;
5726 test3()
5728 const auto nullary = [](){ return 0; };
5729 const auto unary = [](int x){ return x; };
5730 using nullary_t = decltype(nullary);
5731 using unary_t = decltype(unary);
5732 const auto higher1st = [](nullary_t f){ return f(); };
5733 const auto higher2nd = [unary](nullary_t f1){
5734 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5736 return higher1st(nullary) + higher2nd(nullary)(unary);
5741 namespace test_variadic_templates
5744 template <int...>
5745 struct sum;
5747 template <int N0, int... N1toN>
5748 struct sum<N0, N1toN...>
5750 static constexpr auto value = N0 + sum<N1toN...>::value;
5753 template <>
5754 struct sum<>
5756 static constexpr auto value = 0;
5759 static_assert(sum<>::value == 0, "");
5760 static_assert(sum<1>::value == 1, "");
5761 static_assert(sum<23>::value == 23, "");
5762 static_assert(sum<1, 2>::value == 3, "");
5763 static_assert(sum<5, 5, 11>::value == 21, "");
5764 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5768 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5769 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5770 // because of this.
5771 namespace test_template_alias_sfinae
5774 struct foo {};
5776 template<typename T>
5777 using member = typename T::member_type;
5779 template<typename T>
5780 void func(...) {}
5782 template<typename T>
5783 void func(member<T>*) {}
5785 void test();
5787 void test() { func<foo>(0); }
5791 } // namespace cxx11
5793 #endif // __cplusplus >= 201103L
5797 _ACEOF
5798 if ac_fn_cxx_try_compile "$LINENO"; then :
5799 eval $cachevar=yes
5800 else
5801 eval $cachevar=no
5803 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5804 CXX="$ac_save_CXX"
5806 eval ac_res=\$$cachevar
5807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5808 $as_echo "$ac_res" >&6; }
5809 if eval test x\$$cachevar = xyes; then
5810 CXX_DIALECT="$switch"
5811 ac_success=yes
5812 break
5814 done
5817 if test x$ac_success = xno; then
5818 for alternative in ${ax_cxx_compile_alternatives}; do
5819 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5820 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5822 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5823 if eval \${$cachevar+:} false; then :
5824 $as_echo_n "(cached) " >&6
5825 else
5826 ac_save_CXX="$CXX"
5827 CXX="$CXX $switch"
5828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5829 /* end confdefs.h. */
5832 // If the compiler admits that it is not ready for C++11, why torture it?
5833 // Hopefully, this will speed up the test.
5835 #ifndef __cplusplus
5837 #error "This is not a C++ compiler"
5839 #elif __cplusplus < 201103L
5841 #error "This is not a C++11 compiler"
5843 #else
5845 namespace cxx11
5848 namespace test_static_assert
5851 template <typename T>
5852 struct check
5854 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5859 namespace test_final_override
5862 struct Base
5864 virtual void f() {}
5867 struct Derived : public Base
5869 virtual void f() override {}
5874 namespace test_double_right_angle_brackets
5877 template < typename T >
5878 struct check {};
5880 typedef check<void> single_type;
5881 typedef check<check<void>> double_type;
5882 typedef check<check<check<void>>> triple_type;
5883 typedef check<check<check<check<void>>>> quadruple_type;
5887 namespace test_decltype
5893 int a = 1;
5894 decltype(a) b = 2;
5895 return a + b;
5900 namespace test_type_deduction
5903 template < typename T1, typename T2 >
5904 struct is_same
5906 static const bool value = false;
5909 template < typename T >
5910 struct is_same<T, T>
5912 static const bool value = true;
5915 template < typename T1, typename T2 >
5916 auto
5917 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5919 return a1 + a2;
5923 test(const int c, volatile int v)
5925 static_assert(is_same<int, decltype(0)>::value == true, "");
5926 static_assert(is_same<int, decltype(c)>::value == false, "");
5927 static_assert(is_same<int, decltype(v)>::value == false, "");
5928 auto ac = c;
5929 auto av = v;
5930 auto sumi = ac + av + 'x';
5931 auto sumf = ac + av + 1.0;
5932 static_assert(is_same<int, decltype(ac)>::value == true, "");
5933 static_assert(is_same<int, decltype(av)>::value == true, "");
5934 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5935 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5936 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5937 return (sumf > 0.0) ? sumi : add(c, v);
5942 namespace test_noexcept
5945 int f() { return 0; }
5946 int g() noexcept { return 0; }
5948 static_assert(noexcept(f()) == false, "");
5949 static_assert(noexcept(g()) == true, "");
5953 namespace test_constexpr
5956 template < typename CharT >
5957 unsigned long constexpr
5958 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5960 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5963 template < typename CharT >
5964 unsigned long constexpr
5965 strlen_c(const CharT *const s) noexcept
5967 return strlen_c_r(s, 0UL);
5970 static_assert(strlen_c("") == 0UL, "");
5971 static_assert(strlen_c("1") == 1UL, "");
5972 static_assert(strlen_c("example") == 7UL, "");
5973 static_assert(strlen_c("another\0example") == 7UL, "");
5977 namespace test_rvalue_references
5980 template < int N >
5981 struct answer
5983 static constexpr int value = N;
5986 answer<1> f(int&) { return answer<1>(); }
5987 answer<2> f(const int&) { return answer<2>(); }
5988 answer<3> f(int&&) { return answer<3>(); }
5990 void
5991 test()
5993 int i = 0;
5994 const int c = 0;
5995 static_assert(decltype(f(i))::value == 1, "");
5996 static_assert(decltype(f(c))::value == 2, "");
5997 static_assert(decltype(f(0))::value == 3, "");
6002 namespace test_uniform_initialization
6005 struct test
6007 static const int zero {};
6008 static const int one {1};
6011 static_assert(test::zero == 0, "");
6012 static_assert(test::one == 1, "");
6016 namespace test_lambdas
6019 void
6020 test1()
6022 auto lambda1 = [](){};
6023 auto lambda2 = lambda1;
6024 lambda1();
6025 lambda2();
6029 test2()
6031 auto a = [](int i, int j){ return i + j; }(1, 2);
6032 auto b = []() -> int { return '0'; }();
6033 auto c = [=](){ return a + b; }();
6034 auto d = [&](){ return c; }();
6035 auto e = [a, &b](int x) mutable {
6036 const auto identity = [](int y){ return y; };
6037 for (auto i = 0; i < a; ++i)
6038 a += b--;
6039 return x + identity(a + b);
6040 }(0);
6041 return a + b + c + d + e;
6045 test3()
6047 const auto nullary = [](){ return 0; };
6048 const auto unary = [](int x){ return x; };
6049 using nullary_t = decltype(nullary);
6050 using unary_t = decltype(unary);
6051 const auto higher1st = [](nullary_t f){ return f(); };
6052 const auto higher2nd = [unary](nullary_t f1){
6053 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6055 return higher1st(nullary) + higher2nd(nullary)(unary);
6060 namespace test_variadic_templates
6063 template <int...>
6064 struct sum;
6066 template <int N0, int... N1toN>
6067 struct sum<N0, N1toN...>
6069 static constexpr auto value = N0 + sum<N1toN...>::value;
6072 template <>
6073 struct sum<>
6075 static constexpr auto value = 0;
6078 static_assert(sum<>::value == 0, "");
6079 static_assert(sum<1>::value == 1, "");
6080 static_assert(sum<23>::value == 23, "");
6081 static_assert(sum<1, 2>::value == 3, "");
6082 static_assert(sum<5, 5, 11>::value == 21, "");
6083 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6087 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6088 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6089 // because of this.
6090 namespace test_template_alias_sfinae
6093 struct foo {};
6095 template<typename T>
6096 using member = typename T::member_type;
6098 template<typename T>
6099 void func(...) {}
6101 template<typename T>
6102 void func(member<T>*) {}
6104 void test();
6106 void test() { func<foo>(0); }
6110 } // namespace cxx11
6112 #endif // __cplusplus >= 201103L
6116 _ACEOF
6117 if ac_fn_cxx_try_compile "$LINENO"; then :
6118 eval $cachevar=yes
6119 else
6120 eval $cachevar=no
6122 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6123 CXX="$ac_save_CXX"
6125 eval ac_res=\$$cachevar
6126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6127 $as_echo "$ac_res" >&6; }
6128 if eval test x\$$cachevar = xyes; then
6129 CXX_DIALECT="$switch"
6130 ac_success=yes
6131 break
6133 done
6134 if test x$ac_success = xyes; then
6135 break
6137 done
6139 ac_ext=c
6140 ac_cpp='$CPP $CPPFLAGS'
6141 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6142 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6143 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6145 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6146 if test x$ac_success = xno; then
6147 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
6150 if test x$ac_success = xno; then
6151 HAVE_CXX11=0
6152 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6153 $as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6154 else
6155 HAVE_CXX11=1
6157 $as_echo "#define HAVE_CXX11 1" >>confdefs.h
6164 # Dependency checking.
6165 rm -rf .tst 2>/dev/null
6166 mkdir .tst 2>/dev/null
6167 if test -d .tst; then
6168 am__leading_dot=.
6169 else
6170 am__leading_dot=_
6172 rmdir .tst 2>/dev/null
6174 DEPDIR="${am__leading_dot}deps"
6176 ac_config_commands="$ac_config_commands depdir"
6179 depcc="$CC" am_compiler_list=
6181 am_depcomp=$ac_aux_dir/depcomp
6182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6183 $as_echo_n "checking dependency style of $depcc... " >&6; }
6184 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
6185 $as_echo_n "(cached) " >&6
6186 else
6187 if test -f "$am_depcomp"; then
6188 # We make a subdir and do the tests there. Otherwise we can end up
6189 # making bogus files that we don't know about and never remove. For
6190 # instance it was reported that on HP-UX the gcc test will end up
6191 # making a dummy file named `D' -- because `-MD' means `put the output
6192 # in D'.
6193 mkdir conftest.dir
6194 # Copy depcomp to subdir because otherwise we won't find it if we're
6195 # using a relative directory.
6196 cp "$am_depcomp" conftest.dir
6197 cd conftest.dir
6198 # We will build objects and dependencies in a subdirectory because
6199 # it helps to detect inapplicable dependency modes. For instance
6200 # both Tru64's cc and ICC support -MD to output dependencies as a
6201 # side effect of compilation, but ICC will put the dependencies in
6202 # the current directory while Tru64 will put them in the object
6203 # directory.
6204 mkdir sub
6206 am_cv_CC_dependencies_compiler_type=none
6207 if test "$am_compiler_list" = ""; then
6208 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6210 for depmode in $am_compiler_list; do
6211 if test $depmode = none; then break; fi
6213 $as_echo "$as_me:$LINENO: trying $depmode" >&5
6214 # Setup a source with many dependencies, because some compilers
6215 # like to wrap large dependency lists on column 80 (with \), and
6216 # we should not choose a depcomp mode which is confused by this.
6218 # We need to recreate these files for each test, as the compiler may
6219 # overwrite some of them when testing with obscure command lines.
6220 # This happens at least with the AIX C compiler.
6221 : > sub/conftest.c
6222 for i in 1 2 3 4 5 6; do
6223 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6224 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6225 # Solaris 8's {/usr,}/bin/sh.
6226 touch sub/conftst$i.h
6227 done
6228 echo "include sub/conftest.Po" > confmf
6230 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6231 # mode. It turns out that the SunPro C++ compiler does not properly
6232 # handle `-M -o', and we need to detect this.
6233 depcmd="depmode=$depmode \
6234 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6235 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6236 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6237 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6238 if env $depcmd > conftest.err 2>&1 &&
6239 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6240 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6241 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6242 # icc doesn't choke on unknown options, it will just issue warnings
6243 # or remarks (even with -Werror). So we grep stderr for any message
6244 # that says an option was ignored or not supported.
6245 # When given -MP, icc 7.0 and 7.1 complain thusly:
6246 # icc: Command line warning: ignoring option '-M'; no argument required
6247 # The diagnosis changed in icc 8.0:
6248 # icc: Command line remark: option '-MP' not supported
6249 if (grep 'ignoring option' conftest.err ||
6250 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6251 am_cv_CC_dependencies_compiler_type=$depmode
6252 $as_echo "$as_me:$LINENO: success" >&5
6253 break
6256 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
6257 sed -e 's/^/| /' < conftest.err >&5
6258 done
6260 cd ..
6261 rm -rf conftest.dir
6262 else
6263 am_cv_CC_dependencies_compiler_type=none
6267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6268 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6269 if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
6270 then as_fn_error $? "no usable dependency style found" "$LINENO" 5
6271 else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6277 CONFIG_OBS=
6278 CONFIG_DEPS=
6279 CONFIG_SRCS=
6280 ENABLE_CFLAGS=
6282 CONFIG_ALL=
6283 CONFIG_CLEAN=
6284 CONFIG_INSTALL=
6285 CONFIG_UNINSTALL=
6287 # If we haven't got the data from the intl directory,
6288 # assume NLS is disabled.
6289 USE_NLS=no
6290 LIBINTL=
6291 LIBINTL_DEP=
6292 INCINTL=
6293 XGETTEXT=
6294 GMSGFMT=
6295 POSUB=
6297 if test -f ../intl/config.intl; then
6298 . ../intl/config.intl
6300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6301 $as_echo_n "checking whether NLS is requested... " >&6; }
6302 if test x"$USE_NLS" != xyes; then
6303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6304 $as_echo "no" >&6; }
6305 else
6306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6307 $as_echo "yes" >&6; }
6309 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
6312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6313 $as_echo_n "checking for catalogs to be installed... " >&6; }
6314 # Look for .po and .gmo files in the source directory.
6315 CATALOGS=
6316 XLINGUAS=
6317 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6318 # If there aren't any .gmo files the shell will give us the
6319 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6320 # weeded out.
6321 case "$cat" in *\**)
6322 continue;;
6323 esac
6324 # The quadruple backslash is collapsed to a double backslash
6325 # by the backticks, then collapsed again by the double quotes,
6326 # leaving us with one backslash in the sed expression (right
6327 # before the dot that mustn't act as a wildcard).
6328 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6329 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6330 # The user is allowed to set LINGUAS to a list of languages to
6331 # install catalogs for. If it's empty that means "all of them."
6332 if test "x$LINGUAS" = x; then
6333 CATALOGS="$CATALOGS $cat"
6334 XLINGUAS="$XLINGUAS $lang"
6335 else
6336 case "$LINGUAS" in *$lang*)
6337 CATALOGS="$CATALOGS $cat"
6338 XLINGUAS="$XLINGUAS $lang"
6340 esac
6342 done
6343 LINGUAS="$XLINGUAS"
6344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6345 $as_echo "$LINGUAS" >&6; }
6348 DATADIRNAME=share
6350 INSTOBJEXT=.mo
6352 GENCAT=gencat
6354 CATOBJEXT=.gmo
6358 localedir='${datadir}/locale'
6361 if test x"$USE_NLS" = xyes; then
6362 CONFIG_ALL="$CONFIG_ALL all-po"
6363 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6364 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6365 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
6368 PACKAGE=gdb
6370 cat >>confdefs.h <<_ACEOF
6371 #define PACKAGE "$PACKAGE"
6372 _ACEOF
6376 # We never need to detect it in this sub-configure.
6377 # But preserve it for config.status --recheck.
6381 MAKEINFO_EXTRA_FLAGS=""
6382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6383 $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
6384 if ${gdb_cv_have_makeinfo_click+:} false; then :
6385 $as_echo_n "(cached) " >&6
6386 else
6387 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6388 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6389 gdb_cv_have_makeinfo_click=yes
6390 else
6391 gdb_cv_have_makeinfo_click=no
6394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6395 $as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6396 if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6397 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6403 # Check whether --with-separate-debug-dir was given.
6404 if test "${with_separate_debug_dir+set}" = set; then :
6405 withval=$with_separate_debug_dir;
6406 DEBUGDIR=$withval
6407 else
6408 DEBUGDIR=${libdir}/debug
6412 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6413 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6414 ac_define_dir=`eval echo $DEBUGDIR`
6415 ac_define_dir=`eval echo $ac_define_dir`
6417 cat >>confdefs.h <<_ACEOF
6418 #define DEBUGDIR "$ac_define_dir"
6419 _ACEOF
6424 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6425 if test "x$prefix" = xNONE; then
6426 test_prefix=/usr/local
6427 else
6428 test_prefix=$prefix
6430 else
6431 test_prefix=$exec_prefix
6433 value=0
6434 case ${ac_define_dir} in
6435 "${test_prefix}"|"${test_prefix}/"*|\
6436 '${exec_prefix}'|'${exec_prefix}/'*)
6437 value=1
6439 esac
6441 cat >>confdefs.h <<_ACEOF
6442 #define DEBUGDIR_RELOCATABLE $value
6443 _ACEOF
6448 # We can't pass paths as command line arguments.
6449 # Mingw32 tries to be clever and will convert the paths for us.
6450 # For example -DBINDIR="/usr/local/bin" passed on the command line may get
6451 # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6452 # This breaks GDB's relocatable path conversions since paths passed in
6453 # config.h would not get so translated, the path prefixes no longer match.
6455 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6456 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6457 ac_define_dir=`eval echo $bindir`
6458 ac_define_dir=`eval echo $ac_define_dir`
6460 cat >>confdefs.h <<_ACEOF
6461 #define BINDIR "$ac_define_dir"
6462 _ACEOF
6466 # GDB's datadir relocation
6470 # Check whether --with-gdb-datadir was given.
6471 if test "${with_gdb_datadir+set}" = set; then :
6472 withval=$with_gdb_datadir;
6473 GDB_DATADIR=$withval
6474 else
6475 GDB_DATADIR=${datadir}/gdb
6479 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6480 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6481 ac_define_dir=`eval echo $GDB_DATADIR`
6482 ac_define_dir=`eval echo $ac_define_dir`
6484 cat >>confdefs.h <<_ACEOF
6485 #define GDB_DATADIR "$ac_define_dir"
6486 _ACEOF
6491 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6492 if test "x$prefix" = xNONE; then
6493 test_prefix=/usr/local
6494 else
6495 test_prefix=$prefix
6497 else
6498 test_prefix=$exec_prefix
6500 value=0
6501 case ${ac_define_dir} in
6502 "${test_prefix}"|"${test_prefix}/"*|\
6503 '${exec_prefix}'|'${exec_prefix}/'*)
6504 value=1
6506 esac
6508 cat >>confdefs.h <<_ACEOF
6509 #define GDB_DATADIR_RELOCATABLE $value
6510 _ACEOF
6516 # Check whether --with-relocated-sources was given.
6517 if test "${with_relocated_sources+set}" = set; then :
6518 withval=$with_relocated_sources; reloc_srcdir="${withval}"
6520 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6521 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6522 ac_define_dir=`eval echo $reloc_srcdir`
6523 ac_define_dir=`eval echo $ac_define_dir`
6525 cat >>confdefs.h <<_ACEOF
6526 #define RELOC_SRCDIR "$ac_define_dir"
6527 _ACEOF
6534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6535 $as_echo_n "checking for default auto-load directory... " >&6; }
6537 # Check whether --with-auto-load-dir was given.
6538 if test "${with_auto_load_dir+set}" = set; then :
6539 withval=$with_auto_load_dir;
6540 else
6541 with_auto_load_dir='$debugdir:$datadir/auto-load'
6544 escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
6546 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6547 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6548 ac_define_dir=`eval echo $escape_dir`
6549 ac_define_dir=`eval echo $ac_define_dir`
6551 cat >>confdefs.h <<_ACEOF
6552 #define AUTO_LOAD_DIR "$ac_define_dir"
6553 _ACEOF
6556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6557 $as_echo "$with_auto_load_dir" >&6; }
6559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6560 $as_echo_n "checking for default auto-load safe-path... " >&6; }
6562 # Check whether --with-auto-load-safe-path was given.
6563 if test "${with_auto_load_safe_path+set}" = set; then :
6564 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6565 with_auto_load_safe_path="/"
6567 else
6568 with_auto_load_safe_path="$with_auto_load_dir"
6571 escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
6573 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6574 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6575 ac_define_dir=`eval echo $escape_dir`
6576 ac_define_dir=`eval echo $ac_define_dir`
6578 cat >>confdefs.h <<_ACEOF
6579 #define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
6580 _ACEOF
6583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6584 $as_echo "$with_auto_load_safe_path" >&6; }
6588 subdirs="$subdirs testsuite"
6591 # Check whether to support alternative target configurations
6592 # Check whether --enable-targets was given.
6593 if test "${enable_targets+set}" = set; then :
6594 enableval=$enable_targets; case "${enableval}" in
6595 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
6597 no) enable_targets= ;;
6598 *) enable_targets=$enableval ;;
6599 esac
6603 # Check whether to enable 64-bit support on 32-bit hosts
6604 # Check whether --enable-64-bit-bfd was given.
6605 if test "${enable_64_bit_bfd+set}" = set; then :
6606 enableval=$enable_64_bit_bfd; case "${enableval}" in
6607 yes) want64=true ;;
6608 no) want64=false ;;
6609 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
6610 esac
6611 else
6612 want64=false
6615 # Provide defaults for some variables set by the per-host and per-target
6616 # configuration.
6617 gdb_host_obs=posix-hdep.o
6619 if test "${target}" = "${host}"; then
6620 gdb_native=yes
6621 else
6622 gdb_native=no
6625 . $srcdir/configure.host
6627 # Accumulate some settings from configure.tgt over all enabled targets
6629 TARGET_OBS=
6630 all_targets=
6631 HAVE_NATIVE_GCORE_TARGET=
6633 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
6635 if test "$targ_alias" = "all"; then
6636 all_targets=true
6637 else
6638 # Canonicalize the secondary target names.
6639 result=`$ac_config_sub $targ_alias 2>/dev/null`
6640 if test -n "$result"; then
6641 targ=$result
6642 else
6643 targ=$targ_alias
6646 . ${srcdir}/configure.tgt
6648 if test -z "${gdb_target_obs}"; then :
6649 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
6652 # Target-specific object files
6653 for i in ${gdb_target_obs}; do
6654 case " $TARGET_OBS " in
6655 *" ${i} "*) ;;
6657 TARGET_OBS="$TARGET_OBS ${i}"
6659 esac
6660 done
6662 # Check whether this target needs 64-bit CORE_ADDR
6663 if test x${want64} = xfalse; then
6664 . ${srcdir}/../bfd/config.bfd
6667 # Check whether this target is native and supports gcore.
6668 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6669 && $gdb_have_gcore; then
6670 HAVE_NATIVE_GCORE_TARGET=1
6673 done
6675 if test x${all_targets} = xtrue; then
6677 # We want all 64-bit targets if we either:
6678 # - run on a 64-bit host or
6679 # - already require 64-bit support for some other target or
6680 # - the --enable-64-bit-bfd option was supplied
6681 # Otherwise we only support all 32-bit targets.
6683 # NOTE: This test must be in sync with the corresponding
6684 # tests in BFD!
6686 if test x${want64} = xfalse; then
6687 # The cast to long int works around a bug in the HP C Compiler
6688 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6689 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6690 # This bug is HP SR number 8606223364.
6691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6692 $as_echo_n "checking size of long... " >&6; }
6693 if ${ac_cv_sizeof_long+:} false; then :
6694 $as_echo_n "(cached) " >&6
6695 else
6696 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
6698 else
6699 if test "$ac_cv_type_long" = yes; then
6700 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6701 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6702 as_fn_error 77 "cannot compute sizeof (long)
6703 See \`config.log' for more details" "$LINENO" 5; }
6704 else
6705 ac_cv_sizeof_long=0
6710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6711 $as_echo "$ac_cv_sizeof_long" >&6; }
6715 cat >>confdefs.h <<_ACEOF
6716 #define SIZEOF_LONG $ac_cv_sizeof_long
6717 _ACEOF
6720 if test "x${ac_cv_sizeof_long}" = "x8"; then
6721 want64=true
6724 if test x${want64} = xtrue; then
6725 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6726 else
6727 TARGET_OBS='$(ALL_TARGET_OBS)'
6734 # For other settings, only the main target counts.
6735 gdb_sim=
6736 gdb_osabi=
6737 targ=$target; . ${srcdir}/configure.tgt
6739 # Fetch the default architecture and default target vector from BFD.
6740 targ=$target; . $srcdir/../bfd/config.bfd
6742 # We only want the first architecture, so strip off the others if
6743 # there is more than one.
6744 targ_archs=`echo $targ_archs | sed 's/ .*//'`
6746 if test "x$targ_archs" != x; then
6748 cat >>confdefs.h <<_ACEOF
6749 #define DEFAULT_BFD_ARCH $targ_archs
6750 _ACEOF
6753 if test "x$targ_defvec" != x; then
6755 cat >>confdefs.h <<_ACEOF
6756 #define DEFAULT_BFD_VEC $targ_defvec
6757 _ACEOF
6761 # Enable MI.
6762 # Check whether --enable-gdbmi was given.
6763 if test "${enable_gdbmi+set}" = set; then :
6764 enableval=$enable_gdbmi; case $enableval in
6765 yes | no)
6768 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
6769 esac
6770 else
6771 enable_gdbmi=yes
6774 if test x"$enable_gdbmi" = xyes; then
6775 if test -d "$srcdir/mi"; then
6776 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6777 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6778 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6779 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6783 # Enable TUI.
6784 # Check whether --enable-tui was given.
6785 if test "${enable_tui+set}" = set; then :
6786 enableval=$enable_tui; case $enableval in
6787 yes | no | auto)
6790 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
6791 esac
6792 else
6793 enable_tui=auto
6797 # Enable gdbtk.
6798 # Check whether --enable-gdbtk was given.
6799 if test "${enable_gdbtk+set}" = set; then :
6800 enableval=$enable_gdbtk; case $enableval in
6801 yes | no)
6804 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
6805 esac
6806 else
6807 if test -d "$srcdir/gdbtk"; then
6808 enable_gdbtk=yes
6809 else
6810 enable_gdbtk=no
6814 # We unconditionally disable gdbtk tests on selected platforms.
6815 case $host_os in
6816 go32* | windows*)
6817 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6818 $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
6819 enable_gdbtk=no ;;
6820 esac
6822 # Libunwind support for ia64.
6825 # Check whether --with-libunwind-ia64 was given.
6826 if test "${with_libunwind_ia64+set}" = set; then :
6827 withval=$with_libunwind_ia64;
6828 else
6829 with_libunwind_ia64=auto
6833 # Backward compatibility option.
6834 if test "${with_libunwind+set}" = set; then
6835 if test x"$with_libunwind_ia64" != xauto; then
6836 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
6838 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6839 $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6840 with_libunwind_ia64="$with_libunwind"
6843 case "$with_libunwind_ia64" in
6844 yes | no)
6846 auto)
6847 for ac_header in libunwind-ia64.h
6848 do :
6849 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6850 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
6851 cat >>confdefs.h <<_ACEOF
6852 #define HAVE_LIBUNWIND_IA64_H 1
6853 _ACEOF
6857 done
6859 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6862 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
6864 esac
6866 if test x"$with_libunwind_ia64" = xyes; then
6867 for ac_header in libunwind-ia64.h
6868 do :
6869 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6870 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
6871 cat >>confdefs.h <<_ACEOF
6872 #define HAVE_LIBUNWIND_IA64_H 1
6873 _ACEOF
6877 done
6879 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
6880 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
6882 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6883 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6884 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
6887 opt_curses=no
6889 # Check whether --with-curses was given.
6890 if test "${with_curses+set}" = set; then :
6891 withval=$with_curses; opt_curses=$withval
6895 prefer_curses=no
6896 if test "$opt_curses" = "yes"; then
6897 prefer_curses=yes
6900 # Profiling support.
6901 # Check whether --enable-profiling was given.
6902 if test "${enable_profiling+set}" = set; then :
6903 enableval=$enable_profiling; case $enableval in
6904 yes | no)
6907 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
6908 esac
6909 else
6910 enable_profiling=no
6914 for ac_func in monstartup _mcleanup
6915 do :
6916 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6917 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6918 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6919 cat >>confdefs.h <<_ACEOF
6920 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6921 _ACEOF
6924 done
6926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6927 $as_echo_n "checking for _etext... " >&6; }
6928 if ${ac_cv_var__etext+:} false; then :
6929 $as_echo_n "(cached) " >&6
6930 else
6931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6932 /* end confdefs.h. */
6933 #include <stdlib.h>
6934 extern char _etext;
6937 main ()
6939 free (&_etext);
6941 return 0;
6943 _ACEOF
6944 if ac_fn_c_try_link "$LINENO"; then :
6945 ac_cv_var__etext=yes
6946 else
6947 ac_cv_var__etext=no
6949 rm -f core conftest.err conftest.$ac_objext \
6950 conftest$ac_exeext conftest.$ac_ext
6952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6953 $as_echo "$ac_cv_var__etext" >&6; }
6954 if test "$ac_cv_var__etext" = yes; then
6956 $as_echo "#define HAVE__ETEXT 1" >>confdefs.h
6959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6960 $as_echo_n "checking for etext... " >&6; }
6961 if ${ac_cv_var_etext+:} false; then :
6962 $as_echo_n "(cached) " >&6
6963 else
6964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6965 /* end confdefs.h. */
6966 #include <stdlib.h>
6967 extern char etext;
6970 main ()
6972 free (&etext);
6974 return 0;
6976 _ACEOF
6977 if ac_fn_c_try_link "$LINENO"; then :
6978 ac_cv_var_etext=yes
6979 else
6980 ac_cv_var_etext=no
6982 rm -f core conftest.err conftest.$ac_objext \
6983 conftest$ac_exeext conftest.$ac_ext
6985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
6986 $as_echo "$ac_cv_var_etext" >&6; }
6987 if test "$ac_cv_var_etext" = yes; then
6989 $as_echo "#define HAVE_ETEXT 1" >>confdefs.h
6992 if test "$enable_profiling" = yes ; then
6993 if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then
6994 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
6996 PROFILE_CFLAGS=-pg
6997 OLD_CFLAGS="$CFLAGS"
6998 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
7000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7001 $as_echo_n "checking whether $CC supports -pg... " >&6; }
7002 if ${ac_cv_cc_supports_pg+:} false; then :
7003 $as_echo_n "(cached) " >&6
7004 else
7005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7006 /* end confdefs.h. */
7009 main ()
7011 int x;
7013 return 0;
7015 _ACEOF
7016 if ac_fn_c_try_compile "$LINENO"; then :
7017 ac_cv_cc_supports_pg=yes
7018 else
7019 ac_cv_cc_supports_pg=no
7021 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7024 $as_echo "$ac_cv_cc_supports_pg" >&6; }
7026 if test "$ac_cv_cc_supports_pg" = no; then
7027 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
7030 CFLAGS="$OLD_CFLAGS"
7033 CODESIGN_CERT=
7034 # Check whether --enable-codesign was given.
7035 if test "${enable_codesign+set}" = set; then :
7036 enableval=$enable_codesign; CODESIGN_CERT=$enableval
7043 # Check whether --with-pkgversion was given.
7044 if test "${with_pkgversion+set}" = set; then :
7045 withval=$with_pkgversion; case "$withval" in
7046 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
7047 no) PKGVERSION= ;;
7048 *) PKGVERSION="($withval) " ;;
7049 esac
7050 else
7051 PKGVERSION="(GDB) "
7059 # Check whether --with-bugurl was given.
7060 if test "${with_bugurl+set}" = set; then :
7061 withval=$with_bugurl; case "$withval" in
7062 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
7063 no) BUGURL=
7065 *) BUGURL="$withval"
7067 esac
7068 else
7069 BUGURL="http://www.gnu.org/software/gdb/bugs/"
7073 case ${BUGURL} in
7075 REPORT_BUGS_TO=
7076 REPORT_BUGS_TEXI=
7079 REPORT_BUGS_TO="<$BUGURL>"
7080 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7082 esac;
7087 cat >>confdefs.h <<_ACEOF
7088 #define PKGVERSION "$PKGVERSION"
7089 _ACEOF
7092 cat >>confdefs.h <<_ACEOF
7093 #define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7094 _ACEOF
7097 # --------------------- #
7098 # Checks for programs. #
7099 # --------------------- #
7101 for ac_prog in gawk mawk nawk awk
7103 # Extract the first word of "$ac_prog", so it can be a program name with args.
7104 set dummy $ac_prog; ac_word=$2
7105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7106 $as_echo_n "checking for $ac_word... " >&6; }
7107 if ${ac_cv_prog_AWK+:} false; then :
7108 $as_echo_n "(cached) " >&6
7109 else
7110 if test -n "$AWK"; then
7111 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7112 else
7113 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7114 for as_dir in $PATH
7116 IFS=$as_save_IFS
7117 test -z "$as_dir" && as_dir=.
7118 for ac_exec_ext in '' $ac_executable_extensions; do
7119 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7120 ac_cv_prog_AWK="$ac_prog"
7121 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7122 break 2
7124 done
7125 done
7126 IFS=$as_save_IFS
7130 AWK=$ac_cv_prog_AWK
7131 if test -n "$AWK"; then
7132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7133 $as_echo "$AWK" >&6; }
7134 else
7135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7136 $as_echo "no" >&6; }
7140 test -n "$AWK" && break
7141 done
7143 # Find a good install program. We prefer a C program (faster),
7144 # so one script is as good as another. But avoid the broken or
7145 # incompatible versions:
7146 # SysV /etc/install, /usr/sbin/install
7147 # SunOS /usr/etc/install
7148 # IRIX /sbin/install
7149 # AIX /bin/install
7150 # AmigaOS /C/install, which installs bootblocks on floppy discs
7151 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7152 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
7153 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7154 # OS/2's system install, which has a completely different semantic
7155 # ./install, which can be erroneously created by make from ./install.sh.
7156 # Reject install programs that cannot install multiple files.
7157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7158 $as_echo_n "checking for a BSD-compatible install... " >&6; }
7159 if test -z "$INSTALL"; then
7160 if ${ac_cv_path_install+:} false; then :
7161 $as_echo_n "(cached) " >&6
7162 else
7163 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7164 for as_dir in $PATH
7166 IFS=$as_save_IFS
7167 test -z "$as_dir" && as_dir=.
7168 # Account for people who put trailing slashes in PATH elements.
7169 case $as_dir/ in #((
7170 ./ | .// | /[cC]/* | \
7171 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7172 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7173 /usr/ucb/* ) ;;
7175 # OSF1 and SCO ODT 3.0 have their own names for install.
7176 # Don't use installbsd from OSF since it installs stuff as root
7177 # by default.
7178 for ac_prog in ginstall scoinst install; do
7179 for ac_exec_ext in '' $ac_executable_extensions; do
7180 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
7181 if test $ac_prog = install &&
7182 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7183 # AIX install. It has an incompatible calling convention.
7185 elif test $ac_prog = install &&
7186 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7187 # program-specific install script used by HP pwplus--don't use.
7189 else
7190 rm -rf conftest.one conftest.two conftest.dir
7191 echo one > conftest.one
7192 echo two > conftest.two
7193 mkdir conftest.dir
7194 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7195 test -s conftest.one && test -s conftest.two &&
7196 test -s conftest.dir/conftest.one &&
7197 test -s conftest.dir/conftest.two
7198 then
7199 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7200 break 3
7204 done
7205 done
7207 esac
7209 done
7210 IFS=$as_save_IFS
7212 rm -rf conftest.one conftest.two conftest.dir
7215 if test "${ac_cv_path_install+set}" = set; then
7216 INSTALL=$ac_cv_path_install
7217 else
7218 # As a last resort, use the slow shell script. Don't cache a
7219 # value for INSTALL within a source directory, because that will
7220 # break other packages using the cache if that directory is
7221 # removed, or if the value is a relative name.
7222 INSTALL=$ac_install_sh
7225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7226 $as_echo "$INSTALL" >&6; }
7228 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7229 # It thinks the first close brace ends the variable substitution.
7230 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7232 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7234 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7237 $as_echo_n "checking whether ln -s works... " >&6; }
7238 LN_S=$as_ln_s
7239 if test "$LN_S" = "ln -s"; then
7240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7241 $as_echo "yes" >&6; }
7242 else
7243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7244 $as_echo "no, using $LN_S" >&6; }
7247 if test -n "$ac_tool_prefix"; then
7248 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7249 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7251 $as_echo_n "checking for $ac_word... " >&6; }
7252 if ${ac_cv_prog_RANLIB+:} false; then :
7253 $as_echo_n "(cached) " >&6
7254 else
7255 if test -n "$RANLIB"; then
7256 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7257 else
7258 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7259 for as_dir in $PATH
7261 IFS=$as_save_IFS
7262 test -z "$as_dir" && as_dir=.
7263 for ac_exec_ext in '' $ac_executable_extensions; do
7264 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7265 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7266 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7267 break 2
7269 done
7270 done
7271 IFS=$as_save_IFS
7275 RANLIB=$ac_cv_prog_RANLIB
7276 if test -n "$RANLIB"; then
7277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7278 $as_echo "$RANLIB" >&6; }
7279 else
7280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7281 $as_echo "no" >&6; }
7286 if test -z "$ac_cv_prog_RANLIB"; then
7287 ac_ct_RANLIB=$RANLIB
7288 # Extract the first word of "ranlib", so it can be a program name with args.
7289 set dummy ranlib; ac_word=$2
7290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7291 $as_echo_n "checking for $ac_word... " >&6; }
7292 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
7293 $as_echo_n "(cached) " >&6
7294 else
7295 if test -n "$ac_ct_RANLIB"; then
7296 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7297 else
7298 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7299 for as_dir in $PATH
7301 IFS=$as_save_IFS
7302 test -z "$as_dir" && as_dir=.
7303 for ac_exec_ext in '' $ac_executable_extensions; do
7304 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7305 ac_cv_prog_ac_ct_RANLIB="ranlib"
7306 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7307 break 2
7309 done
7310 done
7311 IFS=$as_save_IFS
7315 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7316 if test -n "$ac_ct_RANLIB"; then
7317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7318 $as_echo "$ac_ct_RANLIB" >&6; }
7319 else
7320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7321 $as_echo "no" >&6; }
7324 if test "x$ac_ct_RANLIB" = x; then
7325 RANLIB=":"
7326 else
7327 case $cross_compiling:$ac_tool_warned in
7328 yes:)
7329 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7330 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7331 ac_tool_warned=yes ;;
7332 esac
7333 RANLIB=$ac_ct_RANLIB
7335 else
7336 RANLIB="$ac_cv_prog_RANLIB"
7339 for ac_prog in 'bison -y' byacc
7341 # Extract the first word of "$ac_prog", so it can be a program name with args.
7342 set dummy $ac_prog; ac_word=$2
7343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7344 $as_echo_n "checking for $ac_word... " >&6; }
7345 if ${ac_cv_prog_YACC+:} false; then :
7346 $as_echo_n "(cached) " >&6
7347 else
7348 if test -n "$YACC"; then
7349 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7350 else
7351 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7352 for as_dir in $PATH
7354 IFS=$as_save_IFS
7355 test -z "$as_dir" && as_dir=.
7356 for ac_exec_ext in '' $ac_executable_extensions; do
7357 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7358 ac_cv_prog_YACC="$ac_prog"
7359 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7360 break 2
7362 done
7363 done
7364 IFS=$as_save_IFS
7368 YACC=$ac_cv_prog_YACC
7369 if test -n "$YACC"; then
7370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7371 $as_echo "$YACC" >&6; }
7372 else
7373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7374 $as_echo "no" >&6; }
7378 test -n "$YACC" && break
7379 done
7380 test -n "$YACC" || YACC="yacc"
7383 if test -n "$ac_tool_prefix"; then
7384 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7385 set dummy ${ac_tool_prefix}ar; ac_word=$2
7386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7387 $as_echo_n "checking for $ac_word... " >&6; }
7388 if ${ac_cv_prog_AR+:} false; then :
7389 $as_echo_n "(cached) " >&6
7390 else
7391 if test -n "$AR"; then
7392 ac_cv_prog_AR="$AR" # Let the user override the test.
7393 else
7394 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7395 for as_dir in $PATH
7397 IFS=$as_save_IFS
7398 test -z "$as_dir" && as_dir=.
7399 for ac_exec_ext in '' $ac_executable_extensions; do
7400 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7401 ac_cv_prog_AR="${ac_tool_prefix}ar"
7402 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7403 break 2
7405 done
7406 done
7407 IFS=$as_save_IFS
7411 AR=$ac_cv_prog_AR
7412 if test -n "$AR"; then
7413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7414 $as_echo "$AR" >&6; }
7415 else
7416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7417 $as_echo "no" >&6; }
7422 if test -z "$ac_cv_prog_AR"; then
7423 ac_ct_AR=$AR
7424 # Extract the first word of "ar", so it can be a program name with args.
7425 set dummy ar; ac_word=$2
7426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7427 $as_echo_n "checking for $ac_word... " >&6; }
7428 if ${ac_cv_prog_ac_ct_AR+:} false; then :
7429 $as_echo_n "(cached) " >&6
7430 else
7431 if test -n "$ac_ct_AR"; then
7432 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7433 else
7434 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7435 for as_dir in $PATH
7437 IFS=$as_save_IFS
7438 test -z "$as_dir" && as_dir=.
7439 for ac_exec_ext in '' $ac_executable_extensions; do
7440 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7441 ac_cv_prog_ac_ct_AR="ar"
7442 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7443 break 2
7445 done
7446 done
7447 IFS=$as_save_IFS
7451 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7452 if test -n "$ac_ct_AR"; then
7453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7454 $as_echo "$ac_ct_AR" >&6; }
7455 else
7456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7457 $as_echo "no" >&6; }
7460 if test "x$ac_ct_AR" = x; then
7461 AR=""
7462 else
7463 case $cross_compiling:$ac_tool_warned in
7464 yes:)
7465 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7466 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7467 ac_tool_warned=yes ;;
7468 esac
7469 AR=$ac_ct_AR
7471 else
7472 AR="$ac_cv_prog_AR"
7475 if test -n "$ac_tool_prefix"; then
7476 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7477 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7479 $as_echo_n "checking for $ac_word... " >&6; }
7480 if ${ac_cv_prog_DLLTOOL+:} false; then :
7481 $as_echo_n "(cached) " >&6
7482 else
7483 if test -n "$DLLTOOL"; then
7484 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
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 for ac_exec_ext in '' $ac_executable_extensions; do
7492 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7493 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7494 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7495 break 2
7497 done
7498 done
7499 IFS=$as_save_IFS
7503 DLLTOOL=$ac_cv_prog_DLLTOOL
7504 if test -n "$DLLTOOL"; then
7505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7506 $as_echo "$DLLTOOL" >&6; }
7507 else
7508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7509 $as_echo "no" >&6; }
7514 if test -z "$ac_cv_prog_DLLTOOL"; then
7515 ac_ct_DLLTOOL=$DLLTOOL
7516 # Extract the first word of "dlltool", so it can be a program name with args.
7517 set dummy dlltool; ac_word=$2
7518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7519 $as_echo_n "checking for $ac_word... " >&6; }
7520 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
7521 $as_echo_n "(cached) " >&6
7522 else
7523 if test -n "$ac_ct_DLLTOOL"; then
7524 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7525 else
7526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7527 for as_dir in $PATH
7529 IFS=$as_save_IFS
7530 test -z "$as_dir" && as_dir=.
7531 for ac_exec_ext in '' $ac_executable_extensions; do
7532 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7533 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7534 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7535 break 2
7537 done
7538 done
7539 IFS=$as_save_IFS
7543 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7544 if test -n "$ac_ct_DLLTOOL"; then
7545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7546 $as_echo "$ac_ct_DLLTOOL" >&6; }
7547 else
7548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7549 $as_echo "no" >&6; }
7552 if test "x$ac_ct_DLLTOOL" = x; then
7553 DLLTOOL=""
7554 else
7555 case $cross_compiling:$ac_tool_warned in
7556 yes:)
7557 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7558 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7559 ac_tool_warned=yes ;;
7560 esac
7561 DLLTOOL=$ac_ct_DLLTOOL
7563 else
7564 DLLTOOL="$ac_cv_prog_DLLTOOL"
7567 if test -n "$ac_tool_prefix"; then
7568 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7569 set dummy ${ac_tool_prefix}windres; ac_word=$2
7570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7571 $as_echo_n "checking for $ac_word... " >&6; }
7572 if ${ac_cv_prog_WINDRES+:} false; then :
7573 $as_echo_n "(cached) " >&6
7574 else
7575 if test -n "$WINDRES"; then
7576 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7577 else
7578 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7579 for as_dir in $PATH
7581 IFS=$as_save_IFS
7582 test -z "$as_dir" && as_dir=.
7583 for ac_exec_ext in '' $ac_executable_extensions; do
7584 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7585 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
7586 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7587 break 2
7589 done
7590 done
7591 IFS=$as_save_IFS
7595 WINDRES=$ac_cv_prog_WINDRES
7596 if test -n "$WINDRES"; then
7597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7598 $as_echo "$WINDRES" >&6; }
7599 else
7600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7601 $as_echo "no" >&6; }
7606 if test -z "$ac_cv_prog_WINDRES"; then
7607 ac_ct_WINDRES=$WINDRES
7608 # Extract the first word of "windres", so it can be a program name with args.
7609 set dummy windres; ac_word=$2
7610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7611 $as_echo_n "checking for $ac_word... " >&6; }
7612 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
7613 $as_echo_n "(cached) " >&6
7614 else
7615 if test -n "$ac_ct_WINDRES"; then
7616 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7617 else
7618 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7619 for as_dir in $PATH
7621 IFS=$as_save_IFS
7622 test -z "$as_dir" && as_dir=.
7623 for ac_exec_ext in '' $ac_executable_extensions; do
7624 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7625 ac_cv_prog_ac_ct_WINDRES="windres"
7626 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7627 break 2
7629 done
7630 done
7631 IFS=$as_save_IFS
7635 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7636 if test -n "$ac_ct_WINDRES"; then
7637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7638 $as_echo "$ac_ct_WINDRES" >&6; }
7639 else
7640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7641 $as_echo "no" >&6; }
7644 if test "x$ac_ct_WINDRES" = x; then
7645 WINDRES=""
7646 else
7647 case $cross_compiling:$ac_tool_warned in
7648 yes:)
7649 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7650 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7651 ac_tool_warned=yes ;;
7652 esac
7653 WINDRES=$ac_ct_WINDRES
7655 else
7656 WINDRES="$ac_cv_prog_WINDRES"
7660 case $host_os in
7661 gnu*)
7662 # Needed for GNU Hurd hosts.
7663 if test -n "$ac_tool_prefix"; then
7664 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7665 set dummy ${ac_tool_prefix}mig; 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_MIG+:} false; then :
7669 $as_echo_n "(cached) " >&6
7670 else
7671 if test -n "$MIG"; then
7672 ac_cv_prog_MIG="$MIG" # 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_MIG="${ac_tool_prefix}mig"
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 MIG=$ac_cv_prog_MIG
7692 if test -n "$MIG"; then
7693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7694 $as_echo "$MIG" >&6; }
7695 else
7696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7697 $as_echo "no" >&6; }
7702 if test -z "$ac_cv_prog_MIG"; then
7703 ac_ct_MIG=$MIG
7704 # Extract the first word of "mig", so it can be a program name with args.
7705 set dummy mig; ac_word=$2
7706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7707 $as_echo_n "checking for $ac_word... " >&6; }
7708 if ${ac_cv_prog_ac_ct_MIG+:} false; then :
7709 $as_echo_n "(cached) " >&6
7710 else
7711 if test -n "$ac_ct_MIG"; then
7712 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7713 else
7714 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7715 for as_dir in $PATH
7717 IFS=$as_save_IFS
7718 test -z "$as_dir" && as_dir=.
7719 for ac_exec_ext in '' $ac_executable_extensions; do
7720 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7721 ac_cv_prog_ac_ct_MIG="mig"
7722 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7723 break 2
7725 done
7726 done
7727 IFS=$as_save_IFS
7731 ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7732 if test -n "$ac_ct_MIG"; then
7733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7734 $as_echo "$ac_ct_MIG" >&6; }
7735 else
7736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7737 $as_echo "no" >&6; }
7740 if test "x$ac_ct_MIG" = x; then
7741 MIG=""
7742 else
7743 case $cross_compiling:$ac_tool_warned in
7744 yes:)
7745 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7746 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7747 ac_tool_warned=yes ;;
7748 esac
7749 MIG=$ac_ct_MIG
7751 else
7752 MIG="$ac_cv_prog_MIG"
7755 if test x"$MIG" = x; then
7756 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
7759 esac
7761 # ---------------------- #
7762 # Checks for libraries. #
7763 # ---------------------- #
7765 # We might need to link with -lm; most simulators need it.
7766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7767 $as_echo_n "checking for main in -lm... " >&6; }
7768 if ${ac_cv_lib_m_main+:} false; then :
7769 $as_echo_n "(cached) " >&6
7770 else
7771 ac_check_lib_save_LIBS=$LIBS
7772 LIBS="-lm $LIBS"
7773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7774 /* end confdefs.h. */
7778 main ()
7780 return main ();
7782 return 0;
7784 _ACEOF
7785 if ac_fn_c_try_link "$LINENO"; then :
7786 ac_cv_lib_m_main=yes
7787 else
7788 ac_cv_lib_m_main=no
7790 rm -f core conftest.err conftest.$ac_objext \
7791 conftest$ac_exeext conftest.$ac_ext
7792 LIBS=$ac_check_lib_save_LIBS
7794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7795 $as_echo "$ac_cv_lib_m_main" >&6; }
7796 if test "x$ac_cv_lib_m_main" = xyes; then :
7797 cat >>confdefs.h <<_ACEOF
7798 #define HAVE_LIBM 1
7799 _ACEOF
7801 LIBS="-lm $LIBS"
7806 # Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
7807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7808 $as_echo_n "checking for library containing gethostbyname... " >&6; }
7809 if ${ac_cv_search_gethostbyname+:} false; then :
7810 $as_echo_n "(cached) " >&6
7811 else
7812 ac_func_search_save_LIBS=$LIBS
7813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7814 /* end confdefs.h. */
7816 /* Override any GCC internal prototype to avoid an error.
7817 Use char because int might match the return type of a GCC
7818 builtin and then its argument prototype would still apply. */
7819 #ifdef __cplusplus
7820 extern "C"
7821 #endif
7822 char gethostbyname ();
7824 main ()
7826 return gethostbyname ();
7828 return 0;
7830 _ACEOF
7831 for ac_lib in '' nsl; do
7832 if test -z "$ac_lib"; then
7833 ac_res="none required"
7834 else
7835 ac_res=-l$ac_lib
7836 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7838 if ac_fn_c_try_link "$LINENO"; then :
7839 ac_cv_search_gethostbyname=$ac_res
7841 rm -f core conftest.err conftest.$ac_objext \
7842 conftest$ac_exeext
7843 if ${ac_cv_search_gethostbyname+:} false; then :
7844 break
7846 done
7847 if ${ac_cv_search_gethostbyname+:} false; then :
7849 else
7850 ac_cv_search_gethostbyname=no
7852 rm conftest.$ac_ext
7853 LIBS=$ac_func_search_save_LIBS
7855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7856 $as_echo "$ac_cv_search_gethostbyname" >&6; }
7857 ac_res=$ac_cv_search_gethostbyname
7858 if test "$ac_res" != no; then :
7859 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7864 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
7865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7866 $as_echo_n "checking for library containing socketpair... " >&6; }
7867 if ${ac_cv_search_socketpair+:} false; then :
7868 $as_echo_n "(cached) " >&6
7869 else
7870 ac_func_search_save_LIBS=$LIBS
7871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7872 /* end confdefs.h. */
7874 /* Override any GCC internal prototype to avoid an error.
7875 Use char because int might match the return type of a GCC
7876 builtin and then its argument prototype would still apply. */
7877 #ifdef __cplusplus
7878 extern "C"
7879 #endif
7880 char socketpair ();
7882 main ()
7884 return socketpair ();
7886 return 0;
7888 _ACEOF
7889 for ac_lib in '' socket; do
7890 if test -z "$ac_lib"; then
7891 ac_res="none required"
7892 else
7893 ac_res=-l$ac_lib
7894 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7896 if ac_fn_c_try_link "$LINENO"; then :
7897 ac_cv_search_socketpair=$ac_res
7899 rm -f core conftest.err conftest.$ac_objext \
7900 conftest$ac_exeext
7901 if ${ac_cv_search_socketpair+:} false; then :
7902 break
7904 done
7905 if ${ac_cv_search_socketpair+:} false; then :
7907 else
7908 ac_cv_search_socketpair=no
7910 rm conftest.$ac_ext
7911 LIBS=$ac_func_search_save_LIBS
7913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7914 $as_echo "$ac_cv_search_socketpair" >&6; }
7915 ac_res=$ac_cv_search_socketpair
7916 if test "$ac_res" != no; then :
7917 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7922 # Link in zlib if we can. This allows us to read compressed debug sections.
7924 # Use the system's zlib library.
7925 zlibdir="-L\$(top_builddir)/../zlib"
7926 zlibinc="-I\$(top_srcdir)/../zlib"
7928 # Check whether --with-system-zlib was given.
7929 if test "${with_system_zlib+set}" = set; then :
7930 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7931 zlibdir=
7932 zlibinc=
7941 # On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
7942 # On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
7943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7944 $as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
7945 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
7946 $as_echo_n "(cached) " >&6
7947 else
7948 ac_func_search_save_LIBS=$LIBS
7949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7950 /* end confdefs.h. */
7952 /* Override any GCC internal prototype to avoid an error.
7953 Use char because int might match the return type of a GCC
7954 builtin and then its argument prototype would still apply. */
7955 #ifdef __cplusplus
7956 extern "C"
7957 #endif
7958 char kinfo_getvmmap ();
7960 main ()
7962 return kinfo_getvmmap ();
7964 return 0;
7966 _ACEOF
7967 for ac_lib in '' util util-freebsd; do
7968 if test -z "$ac_lib"; then
7969 ac_res="none required"
7970 else
7971 ac_res=-l$ac_lib
7972 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7974 if ac_fn_c_try_link "$LINENO"; then :
7975 ac_cv_search_kinfo_getvmmap=$ac_res
7977 rm -f core conftest.err conftest.$ac_objext \
7978 conftest$ac_exeext
7979 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
7980 break
7982 done
7983 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
7985 else
7986 ac_cv_search_kinfo_getvmmap=no
7988 rm conftest.$ac_ext
7989 LIBS=$ac_func_search_save_LIBS
7991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
7992 $as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
7993 ac_res=$ac_cv_search_kinfo_getvmmap
7994 if test "$ac_res" != no; then :
7995 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7997 $as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
8003 if test "X$prefix" = "XNONE"; then
8004 acl_final_prefix="$ac_default_prefix"
8005 else
8006 acl_final_prefix="$prefix"
8008 if test "X$exec_prefix" = "XNONE"; then
8009 acl_final_exec_prefix='${prefix}'
8010 else
8011 acl_final_exec_prefix="$exec_prefix"
8013 acl_save_prefix="$prefix"
8014 prefix="$acl_final_prefix"
8015 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8016 prefix="$acl_save_prefix"
8019 # Check whether --with-gnu-ld was given.
8020 if test "${with_gnu_ld+set}" = set; then :
8021 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8022 else
8023 with_gnu_ld=no
8026 # Prepare PATH_SEPARATOR.
8027 # The user is always right.
8028 if test "${PATH_SEPARATOR+set}" != set; then
8029 echo "#! /bin/sh" >conf$$.sh
8030 echo "exit 0" >>conf$$.sh
8031 chmod +x conf$$.sh
8032 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8033 PATH_SEPARATOR=';'
8034 else
8035 PATH_SEPARATOR=:
8037 rm -f conf$$.sh
8039 ac_prog=ld
8040 if test "$GCC" = yes; then
8041 # Check if gcc -print-prog-name=ld gives a path.
8042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8043 $as_echo_n "checking for ld used by GCC... " >&6; }
8044 case $host in
8045 *-*-mingw*)
8046 # gcc leaves a trailing carriage return which upsets mingw
8047 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8049 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8050 esac
8051 case $ac_prog in
8052 # Accept absolute paths.
8053 [\\/]* | [A-Za-z]:[\\/]*)
8054 re_direlt='/[^/][^/]*/\.\./'
8055 # Canonicalize the path of ld
8056 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8057 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8058 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8059 done
8060 test -z "$LD" && LD="$ac_prog"
8063 # If it fails, then pretend we aren't using GCC.
8064 ac_prog=ld
8067 # If it is relative, then search for the first ld in PATH.
8068 with_gnu_ld=unknown
8070 esac
8071 elif test "$with_gnu_ld" = yes; then
8072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8073 $as_echo_n "checking for GNU ld... " >&6; }
8074 else
8075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8076 $as_echo_n "checking for non-GNU ld... " >&6; }
8078 if ${acl_cv_path_LD+:} false; then :
8079 $as_echo_n "(cached) " >&6
8080 else
8081 if test -z "$LD"; then
8082 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8083 for ac_dir in $PATH; do
8084 test -z "$ac_dir" && ac_dir=.
8085 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8086 acl_cv_path_LD="$ac_dir/$ac_prog"
8087 # Check to see if the program is GNU ld. I'd rather use --version,
8088 # but apparently some GNU ld's only accept -v.
8089 # Break only if it was the GNU/non-GNU ld that we prefer.
8090 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8091 test "$with_gnu_ld" != no && break
8092 else
8093 test "$with_gnu_ld" != yes && break
8096 done
8097 IFS="$ac_save_ifs"
8098 else
8099 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8103 LD="$acl_cv_path_LD"
8104 if test -n "$LD"; then
8105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8106 $as_echo "$LD" >&6; }
8107 else
8108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8109 $as_echo "no" >&6; }
8111 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8113 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8114 if ${acl_cv_prog_gnu_ld+:} false; then :
8115 $as_echo_n "(cached) " >&6
8116 else
8117 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8118 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8119 acl_cv_prog_gnu_ld=yes
8120 else
8121 acl_cv_prog_gnu_ld=no
8124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8125 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
8126 with_gnu_ld=$acl_cv_prog_gnu_ld
8130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8131 $as_echo_n "checking for shared library run path origin... " >&6; }
8132 if ${acl_cv_rpath+:} false; then :
8133 $as_echo_n "(cached) " >&6
8134 else
8136 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8137 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8138 . ./conftest.sh
8139 rm -f ./conftest.sh
8140 acl_cv_rpath=done
8143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8144 $as_echo "$acl_cv_rpath" >&6; }
8145 wl="$acl_cv_wl"
8146 libext="$acl_cv_libext"
8147 shlibext="$acl_cv_shlibext"
8148 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8149 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8150 hardcode_direct="$acl_cv_hardcode_direct"
8151 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8152 # Check whether --enable-rpath was given.
8153 if test "${enable_rpath+set}" = set; then :
8154 enableval=$enable_rpath; :
8155 else
8156 enable_rpath=yes
8166 use_additional=yes
8168 acl_save_prefix="$prefix"
8169 prefix="$acl_final_prefix"
8170 acl_save_exec_prefix="$exec_prefix"
8171 exec_prefix="$acl_final_exec_prefix"
8173 eval additional_includedir=\"$includedir\"
8174 eval additional_libdir=\"$libdir\"
8176 exec_prefix="$acl_save_exec_prefix"
8177 prefix="$acl_save_prefix"
8180 # Check whether --with-libiconv-prefix was given.
8181 if test "${with_libiconv_prefix+set}" = set; then :
8182 withval=$with_libiconv_prefix;
8183 if test "X$withval" = "Xno"; then
8184 use_additional=no
8185 else
8186 if test "X$withval" = "X"; then
8188 acl_save_prefix="$prefix"
8189 prefix="$acl_final_prefix"
8190 acl_save_exec_prefix="$exec_prefix"
8191 exec_prefix="$acl_final_exec_prefix"
8193 eval additional_includedir=\"$includedir\"
8194 eval additional_libdir=\"$libdir\"
8196 exec_prefix="$acl_save_exec_prefix"
8197 prefix="$acl_save_prefix"
8199 else
8200 additional_includedir="$withval/include"
8201 additional_libdir="$withval/lib"
8207 LIBICONV=
8208 LTLIBICONV=
8209 INCICONV=
8210 rpathdirs=
8211 ltrpathdirs=
8212 names_already_handled=
8213 names_next_round='iconv '
8214 while test -n "$names_next_round"; do
8215 names_this_round="$names_next_round"
8216 names_next_round=
8217 for name in $names_this_round; do
8218 already_handled=
8219 for n in $names_already_handled; do
8220 if test "$n" = "$name"; then
8221 already_handled=yes
8222 break
8224 done
8225 if test -z "$already_handled"; then
8226 names_already_handled="$names_already_handled $name"
8227 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8228 eval value=\"\$HAVE_LIB$uppername\"
8229 if test -n "$value"; then
8230 if test "$value" = yes; then
8231 eval value=\"\$LIB$uppername\"
8232 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8233 eval value=\"\$LTLIB$uppername\"
8234 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8235 else
8238 else
8239 found_dir=
8240 found_la=
8241 found_so=
8242 found_a=
8243 if test $use_additional = yes; then
8244 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8245 found_dir="$additional_libdir"
8246 found_so="$additional_libdir/lib$name.$shlibext"
8247 if test -f "$additional_libdir/lib$name.la"; then
8248 found_la="$additional_libdir/lib$name.la"
8250 else
8251 if test -f "$additional_libdir/lib$name.$libext"; then
8252 found_dir="$additional_libdir"
8253 found_a="$additional_libdir/lib$name.$libext"
8254 if test -f "$additional_libdir/lib$name.la"; then
8255 found_la="$additional_libdir/lib$name.la"
8260 if test "X$found_dir" = "X"; then
8261 for x in $LDFLAGS $LTLIBICONV; do
8263 acl_save_prefix="$prefix"
8264 prefix="$acl_final_prefix"
8265 acl_save_exec_prefix="$exec_prefix"
8266 exec_prefix="$acl_final_exec_prefix"
8267 eval x=\"$x\"
8268 exec_prefix="$acl_save_exec_prefix"
8269 prefix="$acl_save_prefix"
8271 case "$x" in
8272 -L*)
8273 dir=`echo "X$x" | sed -e 's/^X-L//'`
8274 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8275 found_dir="$dir"
8276 found_so="$dir/lib$name.$shlibext"
8277 if test -f "$dir/lib$name.la"; then
8278 found_la="$dir/lib$name.la"
8280 else
8281 if test -f "$dir/lib$name.$libext"; then
8282 found_dir="$dir"
8283 found_a="$dir/lib$name.$libext"
8284 if test -f "$dir/lib$name.la"; then
8285 found_la="$dir/lib$name.la"
8290 esac
8291 if test "X$found_dir" != "X"; then
8292 break
8294 done
8296 if test "X$found_dir" != "X"; then
8297 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8298 if test "X$found_so" != "X"; then
8299 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8300 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8301 else
8302 haveit=
8303 for x in $ltrpathdirs; do
8304 if test "X$x" = "X$found_dir"; then
8305 haveit=yes
8306 break
8308 done
8309 if test -z "$haveit"; then
8310 ltrpathdirs="$ltrpathdirs $found_dir"
8312 if test "$hardcode_direct" = yes; then
8313 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8314 else
8315 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8316 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8317 haveit=
8318 for x in $rpathdirs; do
8319 if test "X$x" = "X$found_dir"; then
8320 haveit=yes
8321 break
8323 done
8324 if test -z "$haveit"; then
8325 rpathdirs="$rpathdirs $found_dir"
8327 else
8328 haveit=
8329 for x in $LDFLAGS $LIBICONV; do
8331 acl_save_prefix="$prefix"
8332 prefix="$acl_final_prefix"
8333 acl_save_exec_prefix="$exec_prefix"
8334 exec_prefix="$acl_final_exec_prefix"
8335 eval x=\"$x\"
8336 exec_prefix="$acl_save_exec_prefix"
8337 prefix="$acl_save_prefix"
8339 if test "X$x" = "X-L$found_dir"; then
8340 haveit=yes
8341 break
8343 done
8344 if test -z "$haveit"; then
8345 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8347 if test "$hardcode_minus_L" != no; then
8348 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8349 else
8350 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8355 else
8356 if test "X$found_a" != "X"; then
8357 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8358 else
8359 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8362 additional_includedir=
8363 case "$found_dir" in
8364 */lib | */lib/)
8365 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8366 additional_includedir="$basedir/include"
8368 esac
8369 if test "X$additional_includedir" != "X"; then
8370 if test "X$additional_includedir" != "X/usr/include"; then
8371 haveit=
8372 if test "X$additional_includedir" = "X/usr/local/include"; then
8373 if test -n "$GCC"; then
8374 case $host_os in
8375 linux*) haveit=yes;;
8376 esac
8379 if test -z "$haveit"; then
8380 for x in $CPPFLAGS $INCICONV; do
8382 acl_save_prefix="$prefix"
8383 prefix="$acl_final_prefix"
8384 acl_save_exec_prefix="$exec_prefix"
8385 exec_prefix="$acl_final_exec_prefix"
8386 eval x=\"$x\"
8387 exec_prefix="$acl_save_exec_prefix"
8388 prefix="$acl_save_prefix"
8390 if test "X$x" = "X-I$additional_includedir"; then
8391 haveit=yes
8392 break
8394 done
8395 if test -z "$haveit"; then
8396 if test -d "$additional_includedir"; then
8397 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8403 if test -n "$found_la"; then
8404 save_libdir="$libdir"
8405 case "$found_la" in
8406 */* | *\\*) . "$found_la" ;;
8407 *) . "./$found_la" ;;
8408 esac
8409 libdir="$save_libdir"
8410 for dep in $dependency_libs; do
8411 case "$dep" in
8412 -L*)
8413 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8414 if test "X$additional_libdir" != "X/usr/lib"; then
8415 haveit=
8416 if test "X$additional_libdir" = "X/usr/local/lib"; then
8417 if test -n "$GCC"; then
8418 case $host_os in
8419 linux*) haveit=yes;;
8420 esac
8423 if test -z "$haveit"; then
8424 haveit=
8425 for x in $LDFLAGS $LIBICONV; do
8427 acl_save_prefix="$prefix"
8428 prefix="$acl_final_prefix"
8429 acl_save_exec_prefix="$exec_prefix"
8430 exec_prefix="$acl_final_exec_prefix"
8431 eval x=\"$x\"
8432 exec_prefix="$acl_save_exec_prefix"
8433 prefix="$acl_save_prefix"
8435 if test "X$x" = "X-L$additional_libdir"; then
8436 haveit=yes
8437 break
8439 done
8440 if test -z "$haveit"; then
8441 if test -d "$additional_libdir"; then
8442 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8445 haveit=
8446 for x in $LDFLAGS $LTLIBICONV; do
8448 acl_save_prefix="$prefix"
8449 prefix="$acl_final_prefix"
8450 acl_save_exec_prefix="$exec_prefix"
8451 exec_prefix="$acl_final_exec_prefix"
8452 eval x=\"$x\"
8453 exec_prefix="$acl_save_exec_prefix"
8454 prefix="$acl_save_prefix"
8456 if test "X$x" = "X-L$additional_libdir"; then
8457 haveit=yes
8458 break
8460 done
8461 if test -z "$haveit"; then
8462 if test -d "$additional_libdir"; then
8463 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8469 -R*)
8470 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8471 if test "$enable_rpath" != no; then
8472 haveit=
8473 for x in $rpathdirs; do
8474 if test "X$x" = "X$dir"; then
8475 haveit=yes
8476 break
8478 done
8479 if test -z "$haveit"; then
8480 rpathdirs="$rpathdirs $dir"
8482 haveit=
8483 for x in $ltrpathdirs; do
8484 if test "X$x" = "X$dir"; then
8485 haveit=yes
8486 break
8488 done
8489 if test -z "$haveit"; then
8490 ltrpathdirs="$ltrpathdirs $dir"
8494 -l*)
8495 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8497 *.la)
8498 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8501 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8502 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8504 esac
8505 done
8507 else
8508 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8509 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8513 done
8514 done
8515 if test "X$rpathdirs" != "X"; then
8516 if test -n "$hardcode_libdir_separator"; then
8517 alldirs=
8518 for found_dir in $rpathdirs; do
8519 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8520 done
8521 acl_save_libdir="$libdir"
8522 libdir="$alldirs"
8523 eval flag=\"$hardcode_libdir_flag_spec\"
8524 libdir="$acl_save_libdir"
8525 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8526 else
8527 for found_dir in $rpathdirs; do
8528 acl_save_libdir="$libdir"
8529 libdir="$found_dir"
8530 eval flag=\"$hardcode_libdir_flag_spec\"
8531 libdir="$acl_save_libdir"
8532 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8533 done
8536 if test "X$ltrpathdirs" != "X"; then
8537 for found_dir in $ltrpathdirs; do
8538 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8539 done
8548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8549 $as_echo_n "checking for iconv... " >&6; }
8550 if ${am_cv_func_iconv+:} false; then :
8551 $as_echo_n "(cached) " >&6
8552 else
8554 am_cv_func_iconv="no, consider installing GNU libiconv"
8555 am_cv_lib_iconv=no
8556 am_save_CPPFLAGS="$CPPFLAGS"
8557 CPPFLAGS="$CPPFLAGS $INCICONV"
8558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8559 /* end confdefs.h. */
8560 #include <stdlib.h>
8561 #include <iconv.h>
8563 main ()
8565 iconv_t cd = iconv_open("","");
8566 iconv(cd,NULL,NULL,NULL,NULL);
8567 iconv_close(cd);
8569 return 0;
8571 _ACEOF
8572 if ac_fn_c_try_link "$LINENO"; then :
8573 am_cv_func_iconv=yes
8575 rm -f core conftest.err conftest.$ac_objext \
8576 conftest$ac_exeext conftest.$ac_ext
8577 CPPFLAGS="$am_save_CPPFLAGS"
8579 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8580 for _libs in .libs _libs; do
8581 am_save_CPPFLAGS="$CPPFLAGS"
8582 am_save_LIBS="$LIBS"
8583 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8584 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8586 /* end confdefs.h. */
8587 #include <stdlib.h>
8588 #include <iconv.h>
8590 main ()
8592 iconv_t cd = iconv_open("","");
8593 iconv(cd,NULL,NULL,NULL,NULL);
8594 iconv_close(cd);
8596 return 0;
8598 _ACEOF
8599 if ac_fn_c_try_link "$LINENO"; then :
8600 INCICONV="-I../libiconv/include"
8601 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8602 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8603 am_cv_lib_iconv=yes
8604 am_cv_func_iconv=yes
8606 rm -f core conftest.err conftest.$ac_objext \
8607 conftest$ac_exeext conftest.$ac_ext
8608 CPPFLAGS="$am_save_CPPFLAGS"
8609 LIBS="$am_save_LIBS"
8610 if test "$am_cv_func_iconv" = "yes"; then
8611 break
8613 done
8616 if test "$am_cv_func_iconv" != yes; then
8617 am_save_CPPFLAGS="$CPPFLAGS"
8618 am_save_LIBS="$LIBS"
8619 CPPFLAGS="$CPPFLAGS $INCICONV"
8620 LIBS="$LIBS $LIBICONV"
8621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8622 /* end confdefs.h. */
8623 #include <stdlib.h>
8624 #include <iconv.h>
8626 main ()
8628 iconv_t cd = iconv_open("","");
8629 iconv(cd,NULL,NULL,NULL,NULL);
8630 iconv_close(cd);
8632 return 0;
8634 _ACEOF
8635 if ac_fn_c_try_link "$LINENO"; then :
8636 am_cv_lib_iconv=yes
8637 am_cv_func_iconv=yes
8639 rm -f core conftest.err conftest.$ac_objext \
8640 conftest$ac_exeext conftest.$ac_ext
8641 CPPFLAGS="$am_save_CPPFLAGS"
8642 LIBS="$am_save_LIBS"
8646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8647 $as_echo "$am_cv_func_iconv" >&6; }
8648 if test "$am_cv_func_iconv" = yes; then
8650 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
8653 if test "$am_cv_lib_iconv" = yes; then
8655 for element in $INCICONV; do
8656 haveit=
8657 for x in $CPPFLAGS; do
8659 acl_save_prefix="$prefix"
8660 prefix="$acl_final_prefix"
8661 acl_save_exec_prefix="$exec_prefix"
8662 exec_prefix="$acl_final_exec_prefix"
8663 eval x=\"$x\"
8664 exec_prefix="$acl_save_exec_prefix"
8665 prefix="$acl_save_prefix"
8667 if test "X$x" = "X$element"; then
8668 haveit=yes
8669 break
8671 done
8672 if test -z "$haveit"; then
8673 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8675 done
8677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8678 $as_echo_n "checking how to link with libiconv... " >&6; }
8679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8680 $as_echo "$LIBICONV" >&6; }
8681 else
8682 LIBICONV=
8683 LTLIBICONV=
8688 if test "$am_cv_func_iconv" = yes; then
8689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8690 $as_echo_n "checking for iconv declaration... " >&6; }
8691 if ${am_cv_proto_iconv+:} false; then :
8692 $as_echo_n "(cached) " >&6
8693 else
8695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8696 /* end confdefs.h. */
8698 #include <stdlib.h>
8699 #include <iconv.h>
8700 extern
8701 #ifdef __cplusplus
8703 #endif
8704 #if defined(__STDC__) || defined(__cplusplus)
8705 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8706 #else
8707 size_t iconv();
8708 #endif
8711 main ()
8715 return 0;
8717 _ACEOF
8718 if ac_fn_c_try_compile "$LINENO"; then :
8719 am_cv_proto_iconv_arg1=""
8720 else
8721 am_cv_proto_iconv_arg1="const"
8723 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8724 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);"
8727 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
8728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
8729 }$am_cv_proto_iconv" >&5
8730 $as_echo "${ac_t:-
8731 }$am_cv_proto_iconv" >&6; }
8733 cat >>confdefs.h <<_ACEOF
8734 #define ICONV_CONST $am_cv_proto_iconv_arg1
8735 _ACEOF
8740 # GDB may fork/exec the iconv program to get the list of supported character
8741 # sets. Allow the user to specify where to find it.
8742 # There are several factors affecting the choice of option name:
8743 # - There is already --with-libiconv-prefix but we can't use it, it specifies
8744 # the build-time location of libiconv files.
8745 # - The program we need to find is iconv, which comes with glibc. The user
8746 # doesn't necessarily have libiconv installed. Therefore naming this
8747 # --with-libiconv-foo feels wrong.
8748 # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8749 # defined to work on directories not files (though it really doesn't know
8750 # the difference).
8751 # - Calling this --with-iconv-prefix is perceived to cause too much confusion
8752 # with --with-libiconv-prefix.
8753 # Putting these together is why the option name is --with-iconv-bin.
8756 # Check whether --with-iconv-bin was given.
8757 if test "${with_iconv_bin+set}" = set; then :
8758 withval=$with_iconv_bin; iconv_bin="${withval}"
8760 cat >>confdefs.h <<_ACEOF
8761 #define ICONV_BIN "${iconv_bin}"
8762 _ACEOF
8765 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8766 if test "x$prefix" = xNONE; then
8767 test_prefix=/usr/local
8768 else
8769 test_prefix=$prefix
8771 else
8772 test_prefix=$exec_prefix
8774 value=0
8775 case ${iconv_bin} in
8776 "${test_prefix}"|"${test_prefix}/"*|\
8777 '${exec_prefix}'|'${exec_prefix}/'*)
8778 value=1
8780 esac
8782 cat >>confdefs.h <<_ACEOF
8783 #define ICONV_BIN_RELOCATABLE $value
8784 _ACEOF
8791 # For the TUI, we need enhanced curses functionality.
8792 if test x"$enable_tui" != xno; then
8793 prefer_curses=yes
8796 curses_found=no
8797 if test x"$prefer_curses" = xyes; then
8798 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8799 # curses library because the latter might not provide all the
8800 # functionality we need. However, this leads to problems on systems
8801 # where the linker searches /usr/local/lib, but the compiler doesn't
8802 # search /usr/local/include, if ncurses is installed in /usr/local. A
8803 # default installation of ncurses on alpha*-dec-osf* will lead to such
8804 # a situation.
8805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8806 $as_echo_n "checking for library containing waddstr... " >&6; }
8807 if ${ac_cv_search_waddstr+:} false; then :
8808 $as_echo_n "(cached) " >&6
8809 else
8810 ac_func_search_save_LIBS=$LIBS
8811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8812 /* end confdefs.h. */
8814 /* Override any GCC internal prototype to avoid an error.
8815 Use char because int might match the return type of a GCC
8816 builtin and then its argument prototype would still apply. */
8817 #ifdef __cplusplus
8818 extern "C"
8819 #endif
8820 char waddstr ();
8822 main ()
8824 return waddstr ();
8826 return 0;
8828 _ACEOF
8829 for ac_lib in '' ncursesw ncurses cursesX curses; do
8830 if test -z "$ac_lib"; then
8831 ac_res="none required"
8832 else
8833 ac_res=-l$ac_lib
8834 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8836 if ac_fn_c_try_link "$LINENO"; then :
8837 ac_cv_search_waddstr=$ac_res
8839 rm -f core conftest.err conftest.$ac_objext \
8840 conftest$ac_exeext
8841 if ${ac_cv_search_waddstr+:} false; then :
8842 break
8844 done
8845 if ${ac_cv_search_waddstr+:} false; then :
8847 else
8848 ac_cv_search_waddstr=no
8850 rm conftest.$ac_ext
8851 LIBS=$ac_func_search_save_LIBS
8853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8854 $as_echo "$ac_cv_search_waddstr" >&6; }
8855 ac_res=$ac_cv_search_waddstr
8856 if test "$ac_res" != no; then :
8857 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8862 if test "$ac_cv_search_waddstr" != no; then
8863 curses_found=yes
8867 # Check whether we should enable the TUI, but only do so if we really
8868 # can.
8869 if test x"$enable_tui" != xno; then
8870 if test -d "$srcdir/tui"; then
8871 if test "$curses_found" != no; then
8872 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8873 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8874 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8875 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
8876 else
8877 if test x"$enable_tui" = xyes; then
8878 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
8879 else
8880 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8881 $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
8887 # Since GDB uses Readline, we need termcap functionality. In many
8888 # cases this will be provided by the curses library, but some systems
8889 # have a separate termcap library, or no curses library at all.
8891 case $host_os in
8892 cygwin*)
8893 if test -d "$srcdir/libtermcap"; then
8894 LIBS="../libtermcap/libtermcap.a $LIBS"
8895 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8896 fi ;;
8897 go32* | *djgpp*)
8898 ac_cv_search_tgetent="none required"
8900 esac
8902 # These are the libraries checked by Readline.
8903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8904 $as_echo_n "checking for library containing tgetent... " >&6; }
8905 if ${ac_cv_search_tgetent+:} false; then :
8906 $as_echo_n "(cached) " >&6
8907 else
8908 ac_func_search_save_LIBS=$LIBS
8909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8910 /* end confdefs.h. */
8912 /* Override any GCC internal prototype to avoid an error.
8913 Use char because int might match the return type of a GCC
8914 builtin and then its argument prototype would still apply. */
8915 #ifdef __cplusplus
8916 extern "C"
8917 #endif
8918 char tgetent ();
8920 main ()
8922 return tgetent ();
8924 return 0;
8926 _ACEOF
8927 for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
8928 if test -z "$ac_lib"; then
8929 ac_res="none required"
8930 else
8931 ac_res=-l$ac_lib
8932 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8934 if ac_fn_c_try_link "$LINENO"; then :
8935 ac_cv_search_tgetent=$ac_res
8937 rm -f core conftest.err conftest.$ac_objext \
8938 conftest$ac_exeext
8939 if ${ac_cv_search_tgetent+:} false; then :
8940 break
8942 done
8943 if ${ac_cv_search_tgetent+:} false; then :
8945 else
8946 ac_cv_search_tgetent=no
8948 rm conftest.$ac_ext
8949 LIBS=$ac_func_search_save_LIBS
8951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8952 $as_echo "$ac_cv_search_tgetent" >&6; }
8953 ac_res=$ac_cv_search_tgetent
8954 if test "$ac_res" != no; then :
8955 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8960 if test "$ac_cv_search_tgetent" = no; then
8961 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8965 # Check whether --with-system-readline was given.
8966 if test "${with_system_readline+set}" = set; then :
8967 withval=$with_system_readline;
8971 if test "$with_system_readline" = yes; then
8972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
8973 $as_echo_n "checking whether system readline is new enough... " >&6; }
8974 if ${gdb_cv_readline_ok+:} false; then :
8975 $as_echo_n "(cached) " >&6
8976 else
8977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8978 /* end confdefs.h. */
8979 #include <stdio.h>
8980 #include <readline/readline.h>
8982 main ()
8984 #if RL_VERSION_MAJOR < 7
8985 # error "readline version 7 required"
8986 #endif
8988 return 0;
8990 _ACEOF
8991 if ac_fn_c_try_compile "$LINENO"; then :
8992 gdb_cv_readline_ok=yes
8993 else
8994 gdb_cv_readline_ok=no
8996 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
8999 $as_echo "$gdb_cv_readline_ok" >&6; }
9000 if test "$gdb_cv_readline_ok" != yes; then
9001 as_fn_error $? "system readline is not new enough" "$LINENO" 5
9004 READLINE=-lreadline
9005 READLINE_DEPS=
9006 READLINE_CFLAGS=
9007 READLINE_TEXI_INCFLAG=
9008 else
9009 READLINE='$(READLINE_DIR)/libreadline.a'
9010 READLINE_DEPS='$(READLINE)'
9011 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
9012 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
9019 # Generate jit-reader.h
9021 # This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9022 TARGET_PTR=
9024 # The cast to long int works around a bug in the HP C Compiler
9025 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9026 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9027 # This bug is HP SR number 8606223364.
9028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9029 $as_echo_n "checking size of unsigned long long... " >&6; }
9030 if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
9031 $as_echo_n "(cached) " >&6
9032 else
9033 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9035 else
9036 if test "$ac_cv_type_unsigned_long_long" = yes; then
9037 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9038 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9039 as_fn_error 77 "cannot compute sizeof (unsigned long long)
9040 See \`config.log' for more details" "$LINENO" 5; }
9041 else
9042 ac_cv_sizeof_unsigned_long_long=0
9047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9048 $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9052 cat >>confdefs.h <<_ACEOF
9053 #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9054 _ACEOF
9057 # The cast to long int works around a bug in the HP C Compiler
9058 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9059 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9060 # This bug is HP SR number 8606223364.
9061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9062 $as_echo_n "checking size of unsigned long... " >&6; }
9063 if ${ac_cv_sizeof_unsigned_long+:} false; then :
9064 $as_echo_n "(cached) " >&6
9065 else
9066 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9068 else
9069 if test "$ac_cv_type_unsigned_long" = yes; then
9070 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9071 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9072 as_fn_error 77 "cannot compute sizeof (unsigned long)
9073 See \`config.log' for more details" "$LINENO" 5; }
9074 else
9075 ac_cv_sizeof_unsigned_long=0
9080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9081 $as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9085 cat >>confdefs.h <<_ACEOF
9086 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9087 _ACEOF
9090 # The cast to long int works around a bug in the HP C Compiler
9091 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9092 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9093 # This bug is HP SR number 8606223364.
9094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9095 $as_echo_n "checking size of unsigned __int128... " >&6; }
9096 if ${ac_cv_sizeof_unsigned___int128+:} false; then :
9097 $as_echo_n "(cached) " >&6
9098 else
9099 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9101 else
9102 if test "$ac_cv_type_unsigned___int128" = yes; then
9103 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9104 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9105 as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9106 See \`config.log' for more details" "$LINENO" 5; }
9107 else
9108 ac_cv_sizeof_unsigned___int128=0
9113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9114 $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9118 cat >>confdefs.h <<_ACEOF
9119 #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9120 _ACEOF
9124 if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9125 TARGET_PTR="unsigned long"
9126 elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9127 TARGET_PTR="unsigned long long"
9128 elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9129 TARGET_PTR="unsigned __int128"
9130 else
9131 TARGET_PTR="unsigned long"
9135 ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9139 $as_echo_n "checking for library containing dlopen... " >&6; }
9140 if ${ac_cv_search_dlopen+:} false; then :
9141 $as_echo_n "(cached) " >&6
9142 else
9143 ac_func_search_save_LIBS=$LIBS
9144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9145 /* end confdefs.h. */
9147 /* Override any GCC internal prototype to avoid an error.
9148 Use char because int might match the return type of a GCC
9149 builtin and then its argument prototype would still apply. */
9150 #ifdef __cplusplus
9151 extern "C"
9152 #endif
9153 char dlopen ();
9155 main ()
9157 return dlopen ();
9159 return 0;
9161 _ACEOF
9162 for ac_lib in '' dl; do
9163 if test -z "$ac_lib"; then
9164 ac_res="none required"
9165 else
9166 ac_res=-l$ac_lib
9167 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9169 if ac_fn_c_try_link "$LINENO"; then :
9170 ac_cv_search_dlopen=$ac_res
9172 rm -f core conftest.err conftest.$ac_objext \
9173 conftest$ac_exeext
9174 if ${ac_cv_search_dlopen+:} false; then :
9175 break
9177 done
9178 if ${ac_cv_search_dlopen+:} false; then :
9180 else
9181 ac_cv_search_dlopen=no
9183 rm conftest.$ac_ext
9184 LIBS=$ac_func_search_save_LIBS
9186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9187 $as_echo "$ac_cv_search_dlopen" >&6; }
9188 ac_res=$ac_cv_search_dlopen
9189 if test "$ac_res" != no; then :
9190 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9197 # Check whether --with-jit-reader-dir was given.
9198 if test "${with_jit_reader_dir+set}" = set; then :
9199 withval=$with_jit_reader_dir;
9200 JIT_READER_DIR=$withval
9201 else
9202 JIT_READER_DIR=${libdir}/gdb
9206 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9207 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9208 ac_define_dir=`eval echo $JIT_READER_DIR`
9209 ac_define_dir=`eval echo $ac_define_dir`
9211 cat >>confdefs.h <<_ACEOF
9212 #define JIT_READER_DIR "$ac_define_dir"
9213 _ACEOF
9218 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9219 if test "x$prefix" = xNONE; then
9220 test_prefix=/usr/local
9221 else
9222 test_prefix=$prefix
9224 else
9225 test_prefix=$exec_prefix
9227 value=0
9228 case ${ac_define_dir} in
9229 "${test_prefix}"|"${test_prefix}/"*|\
9230 '${exec_prefix}'|'${exec_prefix}/'*)
9231 value=1
9233 esac
9235 cat >>confdefs.h <<_ACEOF
9236 #define JIT_READER_DIR_RELOCATABLE $value
9237 _ACEOF
9243 # Check whether --with-expat was given.
9244 if test "${with_expat+set}" = set; then :
9245 withval=$with_expat;
9246 else
9247 with_expat=auto
9250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9251 $as_echo_n "checking whether to use expat... " >&6; }
9252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9253 $as_echo "$with_expat" >&6; }
9255 if test "${with_expat}" = no; then
9256 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9257 $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
9258 HAVE_LIBEXPAT=no
9259 else
9268 use_additional=yes
9270 acl_save_prefix="$prefix"
9271 prefix="$acl_final_prefix"
9272 acl_save_exec_prefix="$exec_prefix"
9273 exec_prefix="$acl_final_exec_prefix"
9275 eval additional_includedir=\"$includedir\"
9276 eval additional_libdir=\"$libdir\"
9278 exec_prefix="$acl_save_exec_prefix"
9279 prefix="$acl_save_prefix"
9282 # Check whether --with-libexpat-prefix was given.
9283 if test "${with_libexpat_prefix+set}" = set; then :
9284 withval=$with_libexpat_prefix;
9285 if test "X$withval" = "Xno"; then
9286 use_additional=no
9287 else
9288 if test "X$withval" = "X"; then
9290 acl_save_prefix="$prefix"
9291 prefix="$acl_final_prefix"
9292 acl_save_exec_prefix="$exec_prefix"
9293 exec_prefix="$acl_final_exec_prefix"
9295 eval additional_includedir=\"$includedir\"
9296 eval additional_libdir=\"$libdir\"
9298 exec_prefix="$acl_save_exec_prefix"
9299 prefix="$acl_save_prefix"
9301 else
9302 additional_includedir="$withval/include"
9303 additional_libdir="$withval/lib"
9309 LIBEXPAT=
9310 LTLIBEXPAT=
9311 INCEXPAT=
9312 rpathdirs=
9313 ltrpathdirs=
9314 names_already_handled=
9315 names_next_round='expat '
9316 while test -n "$names_next_round"; do
9317 names_this_round="$names_next_round"
9318 names_next_round=
9319 for name in $names_this_round; do
9320 already_handled=
9321 for n in $names_already_handled; do
9322 if test "$n" = "$name"; then
9323 already_handled=yes
9324 break
9326 done
9327 if test -z "$already_handled"; then
9328 names_already_handled="$names_already_handled $name"
9329 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9330 eval value=\"\$HAVE_LIB$uppername\"
9331 if test -n "$value"; then
9332 if test "$value" = yes; then
9333 eval value=\"\$LIB$uppername\"
9334 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9335 eval value=\"\$LTLIB$uppername\"
9336 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9337 else
9340 else
9341 found_dir=
9342 found_la=
9343 found_so=
9344 found_a=
9345 if test $use_additional = yes; then
9346 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9347 found_dir="$additional_libdir"
9348 found_so="$additional_libdir/lib$name.$shlibext"
9349 if test -f "$additional_libdir/lib$name.la"; then
9350 found_la="$additional_libdir/lib$name.la"
9352 else
9353 if test -f "$additional_libdir/lib$name.$libext"; then
9354 found_dir="$additional_libdir"
9355 found_a="$additional_libdir/lib$name.$libext"
9356 if test -f "$additional_libdir/lib$name.la"; then
9357 found_la="$additional_libdir/lib$name.la"
9362 if test "X$found_dir" = "X"; then
9363 for x in $LDFLAGS $LTLIBEXPAT; do
9365 acl_save_prefix="$prefix"
9366 prefix="$acl_final_prefix"
9367 acl_save_exec_prefix="$exec_prefix"
9368 exec_prefix="$acl_final_exec_prefix"
9369 eval x=\"$x\"
9370 exec_prefix="$acl_save_exec_prefix"
9371 prefix="$acl_save_prefix"
9373 case "$x" in
9374 -L*)
9375 dir=`echo "X$x" | sed -e 's/^X-L//'`
9376 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9377 found_dir="$dir"
9378 found_so="$dir/lib$name.$shlibext"
9379 if test -f "$dir/lib$name.la"; then
9380 found_la="$dir/lib$name.la"
9382 else
9383 if test -f "$dir/lib$name.$libext"; then
9384 found_dir="$dir"
9385 found_a="$dir/lib$name.$libext"
9386 if test -f "$dir/lib$name.la"; then
9387 found_la="$dir/lib$name.la"
9392 esac
9393 if test "X$found_dir" != "X"; then
9394 break
9396 done
9398 if test "X$found_dir" != "X"; then
9399 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9400 if test "X$found_so" != "X"; then
9401 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9402 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9403 else
9404 haveit=
9405 for x in $ltrpathdirs; do
9406 if test "X$x" = "X$found_dir"; then
9407 haveit=yes
9408 break
9410 done
9411 if test -z "$haveit"; then
9412 ltrpathdirs="$ltrpathdirs $found_dir"
9414 if test "$hardcode_direct" = yes; then
9415 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9416 else
9417 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9418 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9419 haveit=
9420 for x in $rpathdirs; do
9421 if test "X$x" = "X$found_dir"; then
9422 haveit=yes
9423 break
9425 done
9426 if test -z "$haveit"; then
9427 rpathdirs="$rpathdirs $found_dir"
9429 else
9430 haveit=
9431 for x in $LDFLAGS $LIBEXPAT; do
9433 acl_save_prefix="$prefix"
9434 prefix="$acl_final_prefix"
9435 acl_save_exec_prefix="$exec_prefix"
9436 exec_prefix="$acl_final_exec_prefix"
9437 eval x=\"$x\"
9438 exec_prefix="$acl_save_exec_prefix"
9439 prefix="$acl_save_prefix"
9441 if test "X$x" = "X-L$found_dir"; then
9442 haveit=yes
9443 break
9445 done
9446 if test -z "$haveit"; then
9447 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9449 if test "$hardcode_minus_L" != no; then
9450 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9451 else
9452 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9457 else
9458 if test "X$found_a" != "X"; then
9459 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9460 else
9461 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9464 additional_includedir=
9465 case "$found_dir" in
9466 */lib | */lib/)
9467 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9468 additional_includedir="$basedir/include"
9470 esac
9471 if test "X$additional_includedir" != "X"; then
9472 if test "X$additional_includedir" != "X/usr/include"; then
9473 haveit=
9474 if test "X$additional_includedir" = "X/usr/local/include"; then
9475 if test -n "$GCC"; then
9476 case $host_os in
9477 linux*) haveit=yes;;
9478 esac
9481 if test -z "$haveit"; then
9482 for x in $CPPFLAGS $INCEXPAT; do
9484 acl_save_prefix="$prefix"
9485 prefix="$acl_final_prefix"
9486 acl_save_exec_prefix="$exec_prefix"
9487 exec_prefix="$acl_final_exec_prefix"
9488 eval x=\"$x\"
9489 exec_prefix="$acl_save_exec_prefix"
9490 prefix="$acl_save_prefix"
9492 if test "X$x" = "X-I$additional_includedir"; then
9493 haveit=yes
9494 break
9496 done
9497 if test -z "$haveit"; then
9498 if test -d "$additional_includedir"; then
9499 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9505 if test -n "$found_la"; then
9506 save_libdir="$libdir"
9507 case "$found_la" in
9508 */* | *\\*) . "$found_la" ;;
9509 *) . "./$found_la" ;;
9510 esac
9511 libdir="$save_libdir"
9512 for dep in $dependency_libs; do
9513 case "$dep" in
9514 -L*)
9515 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9516 if test "X$additional_libdir" != "X/usr/lib"; then
9517 haveit=
9518 if test "X$additional_libdir" = "X/usr/local/lib"; then
9519 if test -n "$GCC"; then
9520 case $host_os in
9521 linux*) haveit=yes;;
9522 esac
9525 if test -z "$haveit"; then
9526 haveit=
9527 for x in $LDFLAGS $LIBEXPAT; do
9529 acl_save_prefix="$prefix"
9530 prefix="$acl_final_prefix"
9531 acl_save_exec_prefix="$exec_prefix"
9532 exec_prefix="$acl_final_exec_prefix"
9533 eval x=\"$x\"
9534 exec_prefix="$acl_save_exec_prefix"
9535 prefix="$acl_save_prefix"
9537 if test "X$x" = "X-L$additional_libdir"; then
9538 haveit=yes
9539 break
9541 done
9542 if test -z "$haveit"; then
9543 if test -d "$additional_libdir"; then
9544 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9547 haveit=
9548 for x in $LDFLAGS $LTLIBEXPAT; do
9550 acl_save_prefix="$prefix"
9551 prefix="$acl_final_prefix"
9552 acl_save_exec_prefix="$exec_prefix"
9553 exec_prefix="$acl_final_exec_prefix"
9554 eval x=\"$x\"
9555 exec_prefix="$acl_save_exec_prefix"
9556 prefix="$acl_save_prefix"
9558 if test "X$x" = "X-L$additional_libdir"; then
9559 haveit=yes
9560 break
9562 done
9563 if test -z "$haveit"; then
9564 if test -d "$additional_libdir"; then
9565 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9571 -R*)
9572 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9573 if test "$enable_rpath" != no; then
9574 haveit=
9575 for x in $rpathdirs; do
9576 if test "X$x" = "X$dir"; then
9577 haveit=yes
9578 break
9580 done
9581 if test -z "$haveit"; then
9582 rpathdirs="$rpathdirs $dir"
9584 haveit=
9585 for x in $ltrpathdirs; do
9586 if test "X$x" = "X$dir"; then
9587 haveit=yes
9588 break
9590 done
9591 if test -z "$haveit"; then
9592 ltrpathdirs="$ltrpathdirs $dir"
9596 -l*)
9597 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9599 *.la)
9600 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9603 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9604 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9606 esac
9607 done
9609 else
9610 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9611 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9615 done
9616 done
9617 if test "X$rpathdirs" != "X"; then
9618 if test -n "$hardcode_libdir_separator"; then
9619 alldirs=
9620 for found_dir in $rpathdirs; do
9621 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9622 done
9623 acl_save_libdir="$libdir"
9624 libdir="$alldirs"
9625 eval flag=\"$hardcode_libdir_flag_spec\"
9626 libdir="$acl_save_libdir"
9627 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9628 else
9629 for found_dir in $rpathdirs; do
9630 acl_save_libdir="$libdir"
9631 libdir="$found_dir"
9632 eval flag=\"$hardcode_libdir_flag_spec\"
9633 libdir="$acl_save_libdir"
9634 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9635 done
9638 if test "X$ltrpathdirs" != "X"; then
9639 for found_dir in $ltrpathdirs; do
9640 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9641 done
9645 ac_save_CPPFLAGS="$CPPFLAGS"
9647 for element in $INCEXPAT; do
9648 haveit=
9649 for x in $CPPFLAGS; do
9651 acl_save_prefix="$prefix"
9652 prefix="$acl_final_prefix"
9653 acl_save_exec_prefix="$exec_prefix"
9654 exec_prefix="$acl_final_exec_prefix"
9655 eval x=\"$x\"
9656 exec_prefix="$acl_save_exec_prefix"
9657 prefix="$acl_save_prefix"
9659 if test "X$x" = "X$element"; then
9660 haveit=yes
9661 break
9663 done
9664 if test -z "$haveit"; then
9665 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9667 done
9670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9671 $as_echo_n "checking for libexpat... " >&6; }
9672 if ${ac_cv_libexpat+:} false; then :
9673 $as_echo_n "(cached) " >&6
9674 else
9676 ac_save_LIBS="$LIBS"
9677 LIBS="$LIBS $LIBEXPAT"
9678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9679 /* end confdefs.h. */
9680 #include "expat.h"
9682 main ()
9684 XML_Parser p = XML_ParserCreate (0);
9686 return 0;
9688 _ACEOF
9689 if ac_fn_c_try_link "$LINENO"; then :
9690 ac_cv_libexpat=yes
9691 else
9692 ac_cv_libexpat=no
9694 rm -f core conftest.err conftest.$ac_objext \
9695 conftest$ac_exeext conftest.$ac_ext
9696 LIBS="$ac_save_LIBS"
9699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9700 $as_echo "$ac_cv_libexpat" >&6; }
9701 if test "$ac_cv_libexpat" = yes; then
9702 HAVE_LIBEXPAT=yes
9704 $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
9706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9707 $as_echo_n "checking how to link with libexpat... " >&6; }
9708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9709 $as_echo "$LIBEXPAT" >&6; }
9710 else
9711 HAVE_LIBEXPAT=no
9712 CPPFLAGS="$ac_save_CPPFLAGS"
9713 LIBEXPAT=
9714 LTLIBEXPAT=
9722 if test "$HAVE_LIBEXPAT" != yes; then
9723 if test "$with_expat" = yes; then
9724 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
9725 else
9726 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9727 $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9729 else
9730 save_LIBS=$LIBS
9731 LIBS="$LIBS $LIBEXPAT"
9732 for ac_func in XML_StopParser
9733 do :
9734 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
9735 if test "x$ac_cv_func_XML_StopParser" = xyes; then :
9736 cat >>confdefs.h <<_ACEOF
9737 #define HAVE_XML_STOPPARSER 1
9738 _ACEOF
9741 done
9743 LIBS=$save_LIBS
9748 # Check whether --with-mpfr was given.
9749 if test "${with_mpfr+set}" = set; then :
9750 withval=$with_mpfr;
9751 else
9752 with_mpfr=auto
9755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
9756 $as_echo_n "checking whether to use MPFR... " >&6; }
9757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
9758 $as_echo "$with_mpfr" >&6; }
9760 if test "${with_mpfr}" = no; then
9761 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
9762 $as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
9763 HAVE_LIBMPFR=no
9764 else
9773 use_additional=yes
9775 acl_save_prefix="$prefix"
9776 prefix="$acl_final_prefix"
9777 acl_save_exec_prefix="$exec_prefix"
9778 exec_prefix="$acl_final_exec_prefix"
9780 eval additional_includedir=\"$includedir\"
9781 eval additional_libdir=\"$libdir\"
9783 exec_prefix="$acl_save_exec_prefix"
9784 prefix="$acl_save_prefix"
9787 # Check whether --with-libmpfr-prefix was given.
9788 if test "${with_libmpfr_prefix+set}" = set; then :
9789 withval=$with_libmpfr_prefix;
9790 if test "X$withval" = "Xno"; then
9791 use_additional=no
9792 else
9793 if test "X$withval" = "X"; then
9795 acl_save_prefix="$prefix"
9796 prefix="$acl_final_prefix"
9797 acl_save_exec_prefix="$exec_prefix"
9798 exec_prefix="$acl_final_exec_prefix"
9800 eval additional_includedir=\"$includedir\"
9801 eval additional_libdir=\"$libdir\"
9803 exec_prefix="$acl_save_exec_prefix"
9804 prefix="$acl_save_prefix"
9806 else
9807 additional_includedir="$withval/include"
9808 additional_libdir="$withval/lib"
9814 LIBMPFR=
9815 LTLIBMPFR=
9816 INCMPFR=
9817 rpathdirs=
9818 ltrpathdirs=
9819 names_already_handled=
9820 names_next_round='mpfr gmp'
9821 while test -n "$names_next_round"; do
9822 names_this_round="$names_next_round"
9823 names_next_round=
9824 for name in $names_this_round; do
9825 already_handled=
9826 for n in $names_already_handled; do
9827 if test "$n" = "$name"; then
9828 already_handled=yes
9829 break
9831 done
9832 if test -z "$already_handled"; then
9833 names_already_handled="$names_already_handled $name"
9834 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9835 eval value=\"\$HAVE_LIB$uppername\"
9836 if test -n "$value"; then
9837 if test "$value" = yes; then
9838 eval value=\"\$LIB$uppername\"
9839 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
9840 eval value=\"\$LTLIB$uppername\"
9841 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
9842 else
9845 else
9846 found_dir=
9847 found_la=
9848 found_so=
9849 found_a=
9850 if test $use_additional = yes; then
9851 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9852 found_dir="$additional_libdir"
9853 found_so="$additional_libdir/lib$name.$shlibext"
9854 if test -f "$additional_libdir/lib$name.la"; then
9855 found_la="$additional_libdir/lib$name.la"
9857 else
9858 if test -f "$additional_libdir/lib$name.$libext"; then
9859 found_dir="$additional_libdir"
9860 found_a="$additional_libdir/lib$name.$libext"
9861 if test -f "$additional_libdir/lib$name.la"; then
9862 found_la="$additional_libdir/lib$name.la"
9867 if test "X$found_dir" = "X"; then
9868 for x in $LDFLAGS $LTLIBMPFR; do
9870 acl_save_prefix="$prefix"
9871 prefix="$acl_final_prefix"
9872 acl_save_exec_prefix="$exec_prefix"
9873 exec_prefix="$acl_final_exec_prefix"
9874 eval x=\"$x\"
9875 exec_prefix="$acl_save_exec_prefix"
9876 prefix="$acl_save_prefix"
9878 case "$x" in
9879 -L*)
9880 dir=`echo "X$x" | sed -e 's/^X-L//'`
9881 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9882 found_dir="$dir"
9883 found_so="$dir/lib$name.$shlibext"
9884 if test -f "$dir/lib$name.la"; then
9885 found_la="$dir/lib$name.la"
9887 else
9888 if test -f "$dir/lib$name.$libext"; then
9889 found_dir="$dir"
9890 found_a="$dir/lib$name.$libext"
9891 if test -f "$dir/lib$name.la"; then
9892 found_la="$dir/lib$name.la"
9897 esac
9898 if test "X$found_dir" != "X"; then
9899 break
9901 done
9903 if test "X$found_dir" != "X"; then
9904 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
9905 if test "X$found_so" != "X"; then
9906 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9907 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9908 else
9909 haveit=
9910 for x in $ltrpathdirs; do
9911 if test "X$x" = "X$found_dir"; then
9912 haveit=yes
9913 break
9915 done
9916 if test -z "$haveit"; then
9917 ltrpathdirs="$ltrpathdirs $found_dir"
9919 if test "$hardcode_direct" = yes; then
9920 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9921 else
9922 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9923 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9924 haveit=
9925 for x in $rpathdirs; do
9926 if test "X$x" = "X$found_dir"; then
9927 haveit=yes
9928 break
9930 done
9931 if test -z "$haveit"; then
9932 rpathdirs="$rpathdirs $found_dir"
9934 else
9935 haveit=
9936 for x in $LDFLAGS $LIBMPFR; do
9938 acl_save_prefix="$prefix"
9939 prefix="$acl_final_prefix"
9940 acl_save_exec_prefix="$exec_prefix"
9941 exec_prefix="$acl_final_exec_prefix"
9942 eval x=\"$x\"
9943 exec_prefix="$acl_save_exec_prefix"
9944 prefix="$acl_save_prefix"
9946 if test "X$x" = "X-L$found_dir"; then
9947 haveit=yes
9948 break
9950 done
9951 if test -z "$haveit"; then
9952 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
9954 if test "$hardcode_minus_L" != no; then
9955 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9956 else
9957 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
9962 else
9963 if test "X$found_a" != "X"; then
9964 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
9965 else
9966 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
9969 additional_includedir=
9970 case "$found_dir" in
9971 */lib | */lib/)
9972 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9973 additional_includedir="$basedir/include"
9975 esac
9976 if test "X$additional_includedir" != "X"; then
9977 if test "X$additional_includedir" != "X/usr/include"; then
9978 haveit=
9979 if test "X$additional_includedir" = "X/usr/local/include"; then
9980 if test -n "$GCC"; then
9981 case $host_os in
9982 linux*) haveit=yes;;
9983 esac
9986 if test -z "$haveit"; then
9987 for x in $CPPFLAGS $INCMPFR; do
9989 acl_save_prefix="$prefix"
9990 prefix="$acl_final_prefix"
9991 acl_save_exec_prefix="$exec_prefix"
9992 exec_prefix="$acl_final_exec_prefix"
9993 eval x=\"$x\"
9994 exec_prefix="$acl_save_exec_prefix"
9995 prefix="$acl_save_prefix"
9997 if test "X$x" = "X-I$additional_includedir"; then
9998 haveit=yes
9999 break
10001 done
10002 if test -z "$haveit"; then
10003 if test -d "$additional_includedir"; then
10004 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10010 if test -n "$found_la"; then
10011 save_libdir="$libdir"
10012 case "$found_la" in
10013 */* | *\\*) . "$found_la" ;;
10014 *) . "./$found_la" ;;
10015 esac
10016 libdir="$save_libdir"
10017 for dep in $dependency_libs; do
10018 case "$dep" in
10019 -L*)
10020 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10021 if test "X$additional_libdir" != "X/usr/lib"; then
10022 haveit=
10023 if test "X$additional_libdir" = "X/usr/local/lib"; then
10024 if test -n "$GCC"; then
10025 case $host_os in
10026 linux*) haveit=yes;;
10027 esac
10030 if test -z "$haveit"; then
10031 haveit=
10032 for x in $LDFLAGS $LIBMPFR; do
10034 acl_save_prefix="$prefix"
10035 prefix="$acl_final_prefix"
10036 acl_save_exec_prefix="$exec_prefix"
10037 exec_prefix="$acl_final_exec_prefix"
10038 eval x=\"$x\"
10039 exec_prefix="$acl_save_exec_prefix"
10040 prefix="$acl_save_prefix"
10042 if test "X$x" = "X-L$additional_libdir"; then
10043 haveit=yes
10044 break
10046 done
10047 if test -z "$haveit"; then
10048 if test -d "$additional_libdir"; then
10049 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10052 haveit=
10053 for x in $LDFLAGS $LTLIBMPFR; do
10055 acl_save_prefix="$prefix"
10056 prefix="$acl_final_prefix"
10057 acl_save_exec_prefix="$exec_prefix"
10058 exec_prefix="$acl_final_exec_prefix"
10059 eval x=\"$x\"
10060 exec_prefix="$acl_save_exec_prefix"
10061 prefix="$acl_save_prefix"
10063 if test "X$x" = "X-L$additional_libdir"; then
10064 haveit=yes
10065 break
10067 done
10068 if test -z "$haveit"; then
10069 if test -d "$additional_libdir"; then
10070 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10076 -R*)
10077 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10078 if test "$enable_rpath" != no; then
10079 haveit=
10080 for x in $rpathdirs; do
10081 if test "X$x" = "X$dir"; then
10082 haveit=yes
10083 break
10085 done
10086 if test -z "$haveit"; then
10087 rpathdirs="$rpathdirs $dir"
10089 haveit=
10090 for x in $ltrpathdirs; do
10091 if test "X$x" = "X$dir"; then
10092 haveit=yes
10093 break
10095 done
10096 if test -z "$haveit"; then
10097 ltrpathdirs="$ltrpathdirs $dir"
10101 -l*)
10102 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10104 *.la)
10105 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10108 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10109 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10111 esac
10112 done
10114 else
10115 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10116 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10120 done
10121 done
10122 if test "X$rpathdirs" != "X"; then
10123 if test -n "$hardcode_libdir_separator"; then
10124 alldirs=
10125 for found_dir in $rpathdirs; do
10126 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10127 done
10128 acl_save_libdir="$libdir"
10129 libdir="$alldirs"
10130 eval flag=\"$hardcode_libdir_flag_spec\"
10131 libdir="$acl_save_libdir"
10132 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10133 else
10134 for found_dir in $rpathdirs; do
10135 acl_save_libdir="$libdir"
10136 libdir="$found_dir"
10137 eval flag=\"$hardcode_libdir_flag_spec\"
10138 libdir="$acl_save_libdir"
10139 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10140 done
10143 if test "X$ltrpathdirs" != "X"; then
10144 for found_dir in $ltrpathdirs; do
10145 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10146 done
10150 ac_save_CPPFLAGS="$CPPFLAGS"
10152 for element in $INCMPFR; do
10153 haveit=
10154 for x in $CPPFLAGS; do
10156 acl_save_prefix="$prefix"
10157 prefix="$acl_final_prefix"
10158 acl_save_exec_prefix="$exec_prefix"
10159 exec_prefix="$acl_final_exec_prefix"
10160 eval x=\"$x\"
10161 exec_prefix="$acl_save_exec_prefix"
10162 prefix="$acl_save_prefix"
10164 if test "X$x" = "X$element"; then
10165 haveit=yes
10166 break
10168 done
10169 if test -z "$haveit"; then
10170 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10172 done
10175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10176 $as_echo_n "checking for libmpfr... " >&6; }
10177 if ${ac_cv_libmpfr+:} false; then :
10178 $as_echo_n "(cached) " >&6
10179 else
10181 ac_save_LIBS="$LIBS"
10182 LIBS="$LIBS $LIBMPFR"
10183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10184 /* end confdefs.h. */
10185 #include <mpfr.h>
10187 main ()
10189 mpfr_exp_t exp; mpfr_t x;
10190 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10192 return 0;
10194 _ACEOF
10195 if ac_fn_c_try_link "$LINENO"; then :
10196 ac_cv_libmpfr=yes
10197 else
10198 ac_cv_libmpfr=no
10200 rm -f core conftest.err conftest.$ac_objext \
10201 conftest$ac_exeext conftest.$ac_ext
10202 LIBS="$ac_save_LIBS"
10205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10206 $as_echo "$ac_cv_libmpfr" >&6; }
10207 if test "$ac_cv_libmpfr" = yes; then
10208 HAVE_LIBMPFR=yes
10210 $as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10213 $as_echo_n "checking how to link with libmpfr... " >&6; }
10214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10215 $as_echo "$LIBMPFR" >&6; }
10216 else
10217 HAVE_LIBMPFR=no
10218 CPPFLAGS="$ac_save_CPPFLAGS"
10219 LIBMPFR=
10220 LTLIBMPFR=
10228 if test "$HAVE_LIBMPFR" != yes; then
10229 if test "$with_mpfr" = yes; then
10230 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
10231 else
10232 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10233 $as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10238 # --------------------- #
10239 # Check for libpython. #
10240 # --------------------- #
10247 # Check whether --with-python was given.
10248 if test "${with_python+set}" = set; then :
10249 withval=$with_python;
10250 else
10251 with_python=auto
10254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10255 $as_echo_n "checking whether to use python... " >&6; }
10256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10257 $as_echo "$with_python" >&6; }
10259 if test "${with_python}" = no; then
10260 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10261 $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10262 have_libpython=no
10263 else
10264 case "${with_python}" in
10265 [\\/]* | ?:[\\/]*)
10266 if test -d "${with_python}"; then
10267 # Assume the python binary is ${with_python}/bin/python.
10268 python_prog="${with_python}/bin/python"
10269 python_prefix=
10270 # If python does not exit ${with_python}/bin, then try in
10271 # ${with_python}. On Windows/MinGW, this is where the Python
10272 # executable is.
10273 if test ! -x "${python_prog}"; then
10274 python_prog="${with_python}/python"
10275 python_prefix=
10277 if test ! -x "${python_prog}"; then
10278 # Fall back to gdb 7.0/7.1 behaviour.
10279 python_prog=missing
10280 python_prefix=${with_python}
10282 elif test -x "${with_python}"; then
10283 # While we can't run python compiled for $host (unless host == build),
10284 # the user could write a script that provides the needed information,
10285 # so we support that.
10286 python_prog=${with_python}
10287 python_prefix=
10288 else
10289 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
10292 */*)
10293 # Disallow --with-python=foo/bar.
10294 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
10297 # The user has either specified auto, yes, or the name of the python
10298 # program assumed to be in $PATH.
10299 python_prefix=
10300 case "${with_python}" in
10301 yes | auto)
10302 if test "${build}" = "${host}"; then
10303 # Extract the first word of "python", so it can be a program name with args.
10304 set dummy python; ac_word=$2
10305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10306 $as_echo_n "checking for $ac_word... " >&6; }
10307 if ${ac_cv_path_python_prog_path+:} false; then :
10308 $as_echo_n "(cached) " >&6
10309 else
10310 case $python_prog_path in
10311 [\\/]* | ?:[\\/]*)
10312 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10315 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10316 for as_dir in $PATH
10318 IFS=$as_save_IFS
10319 test -z "$as_dir" && as_dir=.
10320 for ac_exec_ext in '' $ac_executable_extensions; do
10321 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10322 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10323 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10324 break 2
10326 done
10327 done
10328 IFS=$as_save_IFS
10330 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10332 esac
10334 python_prog_path=$ac_cv_path_python_prog_path
10335 if test -n "$python_prog_path"; then
10336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10337 $as_echo "$python_prog_path" >&6; }
10338 else
10339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10340 $as_echo "no" >&6; }
10344 if test "${python_prog_path}" = missing; then
10345 python_prog=missing
10346 else
10347 python_prog=${python_prog_path}
10349 else
10350 # Not much we can do except assume the cross-compiler will find the
10351 # right files.
10352 python_prog=missing
10356 # While we can't run python compiled for $host (unless host == build),
10357 # the user could write a script that provides the needed information,
10358 # so we support that.
10359 python_prog="${with_python}"
10360 # Extract the first word of "${python_prog}", so it can be a program name with args.
10361 set dummy ${python_prog}; ac_word=$2
10362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10363 $as_echo_n "checking for $ac_word... " >&6; }
10364 if ${ac_cv_path_python_prog_path+:} false; then :
10365 $as_echo_n "(cached) " >&6
10366 else
10367 case $python_prog_path in
10368 [\\/]* | ?:[\\/]*)
10369 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10372 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10373 for as_dir in $PATH
10375 IFS=$as_save_IFS
10376 test -z "$as_dir" && as_dir=.
10377 for ac_exec_ext in '' $ac_executable_extensions; do
10378 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10379 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10380 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10381 break 2
10383 done
10384 done
10385 IFS=$as_save_IFS
10387 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10389 esac
10391 python_prog_path=$ac_cv_path_python_prog_path
10392 if test -n "$python_prog_path"; then
10393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10394 $as_echo "$python_prog_path" >&6; }
10395 else
10396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10397 $as_echo "no" >&6; }
10401 if test "${python_prog_path}" = missing; then
10402 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
10405 esac
10406 esac
10408 if test "${python_prog}" != missing; then
10409 # We have a python program to use, but it may be too old.
10410 # Don't flag an error for --with-python=auto (the default).
10411 have_python_config=yes
10412 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10413 if test $? != 0; then
10414 have_python_config=failed
10415 if test "${with_python}" != auto; then
10416 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
10419 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10420 if test $? != 0; then
10421 have_python_config=failed
10422 if test "${with_python}" != auto; then
10423 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
10426 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10427 if test $? != 0; then
10428 have_python_config=failed
10429 if test "${with_python}" != auto; then
10430 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
10433 else
10434 # We do not have a python executable we can use to determine where
10435 # to find the Python headers and libs. We cannot guess the include
10436 # path from the python_prefix either, because that include path
10437 # depends on the Python version. So, there is nothing much we can
10438 # do except assume that the compiler will be able to find those files.
10439 python_includes=
10440 python_libs=
10441 have_python_config=no
10444 # If we have python-config, only try the configuration it provides.
10445 # Otherwise fallback on the old way of trying different versions of
10446 # python in turn.
10448 have_libpython=no
10449 if test "${have_python_config}" = yes; then
10452 new_CPPFLAGS=${python_includes}
10453 new_LIBS=${python_libs}
10454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10455 $as_echo_n "checking for python... " >&6; }
10456 save_CPPFLAGS=$CPPFLAGS
10457 save_LIBS=$LIBS
10458 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10459 LIBS="$new_LIBS $LIBS"
10460 found_usable_python=no
10461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10462 /* end confdefs.h. */
10463 #include "Python.h"
10465 main ()
10467 Py_Initialize ();
10469 return 0;
10471 _ACEOF
10472 if ac_fn_c_try_link "$LINENO"; then :
10473 have_libpython=yes
10474 found_usable_python=yes
10475 PYTHON_CPPFLAGS=$new_CPPFLAGS
10476 PYTHON_LIBS=$new_LIBS
10478 rm -f core conftest.err conftest.$ac_objext \
10479 conftest$ac_exeext conftest.$ac_ext
10480 CPPFLAGS=$save_CPPFLAGS
10481 LIBS=$save_LIBS
10482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10483 $as_echo "${found_usable_python}" >&6; }
10485 elif test "${have_python_config}" != failed; then
10486 if test "${have_libpython}" = no; then
10489 new_CPPFLAGS=${python_includes}
10490 new_LIBS="-lpython2.7 ${python_libs}"
10491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10492 $as_echo_n "checking for python... " >&6; }
10493 save_CPPFLAGS=$CPPFLAGS
10494 save_LIBS=$LIBS
10495 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10496 LIBS="$new_LIBS $LIBS"
10497 found_usable_python=no
10498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10499 /* end confdefs.h. */
10500 #include "Python.h"
10502 main ()
10504 Py_Initialize ();
10506 return 0;
10508 _ACEOF
10509 if ac_fn_c_try_link "$LINENO"; then :
10510 have_libpython=yes
10511 found_usable_python=yes
10512 PYTHON_CPPFLAGS=$new_CPPFLAGS
10513 PYTHON_LIBS=$new_LIBS
10515 rm -f core conftest.err conftest.$ac_objext \
10516 conftest$ac_exeext conftest.$ac_ext
10517 CPPFLAGS=$save_CPPFLAGS
10518 LIBS=$save_LIBS
10519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10520 $as_echo "${found_usable_python}" >&6; }
10523 if test "${have_libpython}" = no; then
10526 new_CPPFLAGS=${python_includes}
10527 new_LIBS="-lpython2.6 ${python_libs}"
10528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10529 $as_echo_n "checking for python... " >&6; }
10530 save_CPPFLAGS=$CPPFLAGS
10531 save_LIBS=$LIBS
10532 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10533 LIBS="$new_LIBS $LIBS"
10534 found_usable_python=no
10535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10536 /* end confdefs.h. */
10537 #include "Python.h"
10539 main ()
10541 Py_Initialize ();
10543 return 0;
10545 _ACEOF
10546 if ac_fn_c_try_link "$LINENO"; then :
10547 have_libpython=yes
10548 found_usable_python=yes
10549 PYTHON_CPPFLAGS=$new_CPPFLAGS
10550 PYTHON_LIBS=$new_LIBS
10552 rm -f core conftest.err conftest.$ac_objext \
10553 conftest$ac_exeext conftest.$ac_ext
10554 CPPFLAGS=$save_CPPFLAGS
10555 LIBS=$save_LIBS
10556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10557 $as_echo "${found_usable_python}" >&6; }
10562 if test "${have_libpython}" = no; then
10563 case "${with_python}" in
10564 yes)
10565 as_fn_error $? "python is missing or unusable" "$LINENO" 5
10567 auto)
10568 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10569 $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10572 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
10574 esac
10575 else
10576 if test -n "${python_prefix}"; then
10578 cat >>confdefs.h <<_ACEOF
10579 #define WITH_PYTHON_PATH "${python_prefix}"
10580 _ACEOF
10583 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10584 if test "x$prefix" = xNONE; then
10585 test_prefix=/usr/local
10586 else
10587 test_prefix=$prefix
10589 else
10590 test_prefix=$exec_prefix
10592 value=0
10593 case ${python_prefix} in
10594 "${test_prefix}"|"${test_prefix}/"*|\
10595 '${exec_prefix}'|'${exec_prefix}/'*)
10596 value=1
10598 esac
10600 cat >>confdefs.h <<_ACEOF
10601 #define PYTHON_PATH_RELOCATABLE $value
10602 _ACEOF
10609 if test "${have_libpython}" != no; then
10611 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
10613 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10614 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10615 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
10616 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
10617 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
10619 # Flags needed to compile Python code (taken from python-config --cflags).
10620 # We cannot call python-config directly because it will output whatever was
10621 # used when compiling the Python interpreter itself, including flags which
10622 # would make the python-related objects be compiled differently from the
10623 # rest of GDB (e.g., -O2 and -fPIC).
10624 if test "${GCC}" = yes; then
10625 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
10626 # Python headers recommend -DNDEBUG, but it's unclear if that just
10627 # refers to building Python itself. In release mode, though, it
10628 # doesn't hurt for the Python code in gdb to follow.
10629 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
10632 if test "x${tentative_python_cflags}" != x; then
10633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10634 $as_echo_n "checking compiler flags for python code... " >&6; }
10635 for flag in ${tentative_python_cflags}; do
10636 # Check that the compiler accepts it
10637 saved_CFLAGS="$CFLAGS"
10638 CFLAGS="$CFLAGS $flag"
10639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10640 /* end confdefs.h. */
10643 main ()
10647 return 0;
10649 _ACEOF
10650 if ac_fn_c_try_compile "$LINENO"; then :
10651 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
10653 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10654 CFLAGS="$saved_CFLAGS"
10655 done
10656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10657 $as_echo "${PYTHON_CFLAGS}" >&6; }
10660 # On x64 Windows, Python's include headers, and pyconfig.h in
10661 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10662 # version of Windows. Unfortunately, MS_WIN64 is only defined if
10663 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
10664 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10665 # The issue was reported to the Python community, but still isn't
10666 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10668 case "$gdb_host" in
10669 mingw64)
10670 if test "${GCC}" = yes; then
10671 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10674 esac
10675 else
10676 # Even if Python support is not compiled in, we need to have this file
10677 # included so that the "python" command, et.al., still exists.
10678 CONFIG_OBS="$CONFIG_OBS python/python.o"
10679 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
10682 # Work around Python http://bugs.python.org/issue10112. See also
10683 # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10684 # no effect. Note that the only test after this that uses Python is
10685 # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10686 # run without -export-dynamic too.
10687 PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10692 if test "${have_libpython}" != no; then
10693 HAVE_PYTHON_TRUE=
10694 HAVE_PYTHON_FALSE='#'
10695 else
10696 HAVE_PYTHON_TRUE='#'
10697 HAVE_PYTHON_FALSE=
10701 # -------------------- #
10702 # Check for libguile. #
10703 # -------------------- #
10710 # Check whether --with-guile was given.
10711 if test "${with_guile+set}" = set; then :
10712 withval=$with_guile;
10713 else
10714 with_guile=auto
10717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10718 $as_echo_n "checking whether to use guile... " >&6; }
10719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10720 $as_echo "$with_guile" >&6; }
10722 # Extract the first word of "pkg-config", so it can be a program name with args.
10723 set dummy pkg-config; ac_word=$2
10724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10725 $as_echo_n "checking for $ac_word... " >&6; }
10726 if ${ac_cv_path_pkg_config_prog_path+:} false; then :
10727 $as_echo_n "(cached) " >&6
10728 else
10729 case $pkg_config_prog_path in
10730 [\\/]* | ?:[\\/]*)
10731 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10734 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10735 for as_dir in $PATH
10737 IFS=$as_save_IFS
10738 test -z "$as_dir" && as_dir=.
10739 for ac_exec_ext in '' $ac_executable_extensions; do
10740 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10741 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10742 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10743 break 2
10745 done
10746 done
10747 IFS=$as_save_IFS
10749 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10751 esac
10753 pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10754 if test -n "$pkg_config_prog_path"; then
10755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10756 $as_echo "$pkg_config_prog_path" >&6; }
10757 else
10758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10759 $as_echo "no" >&6; }
10764 try_guile_versions="guile-2.0"
10765 have_libguile=no
10766 case "${with_guile}" in
10768 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10769 $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10771 auto)
10772 if test "${pkg_config_prog_path}" = "missing"; then
10773 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10774 $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10775 else
10777 pkg_config=${pkg_config_prog_path}
10778 guile_version_list=${try_guile_versions}
10779 flag_errors=no
10781 found_usable_guile=checking
10782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10783 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10784 for guile_version in ${guile_version_list}; do
10785 ${pkg_config} --exists ${guile_version} 2>/dev/null
10786 if test $? != 0; then
10787 continue
10789 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10790 if test $? != 0; then
10791 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10793 new_LIBS=`${pkg_config} --libs ${guile_version}`
10794 if test $? != 0; then
10795 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10797 found_usable_guile=${guile_version}
10798 break
10799 done
10800 if test "${found_usable_guile}" = "checking"; then
10801 if test "${flag_errors}" = "yes"; then
10802 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10803 else
10804 found_usable_guile=no
10807 if test "${found_usable_guile}" != no; then
10808 save_CPPFLAGS=$CPPFLAGS
10809 save_LIBS=$LIBS
10810 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10811 LIBS="$LIBS $new_LIBS"
10812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10813 /* end confdefs.h. */
10814 #include "libguile.h"
10816 main ()
10818 scm_init_guile ();
10820 return 0;
10822 _ACEOF
10823 if ac_fn_c_try_link "$LINENO"; then :
10824 have_libguile=yes
10825 GUILE_CPPFLAGS=$new_CPPFLAGS
10826 GUILE_LIBS=$new_LIBS
10827 else
10828 found_usable_guile=no
10830 rm -f core conftest.err conftest.$ac_objext \
10831 conftest$ac_exeext conftest.$ac_ext
10832 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10833 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
10835 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10840 CPPFLAGS=$save_CPPFLAGS
10841 LIBS=$save_LIBS
10842 if test "${found_usable_guile}" = no; then
10843 if test "${flag_errors}" = yes; then
10844 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10845 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10846 as_fn_error $? "linking guile version ${guile_version} test program failed
10847 See \`config.log' for more details" "$LINENO" 5; }
10851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10852 $as_echo "${found_usable_guile}" >&6; }
10856 yes)
10857 if test "${pkg_config_prog_path}" = "missing"; then
10858 as_fn_error $? "pkg-config not found" "$LINENO" 5
10861 pkg_config=${pkg_config_prog_path}
10862 guile_version_list=${try_guile_versions}
10863 flag_errors=yes
10865 found_usable_guile=checking
10866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10867 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10868 for guile_version in ${guile_version_list}; do
10869 ${pkg_config} --exists ${guile_version} 2>/dev/null
10870 if test $? != 0; then
10871 continue
10873 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10874 if test $? != 0; then
10875 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10877 new_LIBS=`${pkg_config} --libs ${guile_version}`
10878 if test $? != 0; then
10879 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10881 found_usable_guile=${guile_version}
10882 break
10883 done
10884 if test "${found_usable_guile}" = "checking"; then
10885 if test "${flag_errors}" = "yes"; then
10886 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10887 else
10888 found_usable_guile=no
10891 if test "${found_usable_guile}" != no; then
10892 save_CPPFLAGS=$CPPFLAGS
10893 save_LIBS=$LIBS
10894 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10895 LIBS="$LIBS $new_LIBS"
10896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10897 /* end confdefs.h. */
10898 #include "libguile.h"
10900 main ()
10902 scm_init_guile ();
10904 return 0;
10906 _ACEOF
10907 if ac_fn_c_try_link "$LINENO"; then :
10908 have_libguile=yes
10909 GUILE_CPPFLAGS=$new_CPPFLAGS
10910 GUILE_LIBS=$new_LIBS
10911 else
10912 found_usable_guile=no
10914 rm -f core conftest.err conftest.$ac_objext \
10915 conftest$ac_exeext conftest.$ac_ext
10916 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10917 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
10919 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10924 CPPFLAGS=$save_CPPFLAGS
10925 LIBS=$save_LIBS
10926 if test "${found_usable_guile}" = no; then
10927 if test "${flag_errors}" = yes; then
10928 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10929 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10930 as_fn_error $? "linking guile version ${guile_version} test program failed
10931 See \`config.log' for more details" "$LINENO" 5; }
10935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10936 $as_echo "${found_usable_guile}" >&6; }
10939 [\\/]* | ?:[\\/]*)
10940 if test -x "${with_guile}"; then
10942 pkg_config=${with_guile}
10943 guile_version_list=${try_guile_versions}
10944 flag_errors=yes
10946 found_usable_guile=checking
10947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10948 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10949 for guile_version in ${guile_version_list}; do
10950 ${pkg_config} --exists ${guile_version} 2>/dev/null
10951 if test $? != 0; then
10952 continue
10954 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10955 if test $? != 0; then
10956 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10958 new_LIBS=`${pkg_config} --libs ${guile_version}`
10959 if test $? != 0; then
10960 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10962 found_usable_guile=${guile_version}
10963 break
10964 done
10965 if test "${found_usable_guile}" = "checking"; then
10966 if test "${flag_errors}" = "yes"; then
10967 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10968 else
10969 found_usable_guile=no
10972 if test "${found_usable_guile}" != no; then
10973 save_CPPFLAGS=$CPPFLAGS
10974 save_LIBS=$LIBS
10975 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10976 LIBS="$LIBS $new_LIBS"
10977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10978 /* end confdefs.h. */
10979 #include "libguile.h"
10981 main ()
10983 scm_init_guile ();
10985 return 0;
10987 _ACEOF
10988 if ac_fn_c_try_link "$LINENO"; then :
10989 have_libguile=yes
10990 GUILE_CPPFLAGS=$new_CPPFLAGS
10991 GUILE_LIBS=$new_LIBS
10992 else
10993 found_usable_guile=no
10995 rm -f core conftest.err conftest.$ac_objext \
10996 conftest$ac_exeext conftest.$ac_ext
10997 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10998 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11000 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11005 CPPFLAGS=$save_CPPFLAGS
11006 LIBS=$save_LIBS
11007 if test "${found_usable_guile}" = no; then
11008 if test "${flag_errors}" = yes; then
11009 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11010 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11011 as_fn_error $? "linking guile version ${guile_version} test program failed
11012 See \`config.log' for more details" "$LINENO" 5; }
11016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11017 $as_echo "${found_usable_guile}" >&6; }
11019 else
11020 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
11023 "" | */*)
11024 # Disallow --with=guile="" and --with-guile=foo/bar.
11025 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
11028 # A space separate list of guile versions to try, in order.
11029 if test "${pkg_config_prog_path}" = "missing"; then
11030 as_fn_error $? "pkg-config not found" "$LINENO" 5
11033 pkg_config=${pkg_config_prog_path}
11034 guile_version_list=${with_guile}
11035 flag_errors=yes
11037 found_usable_guile=checking
11038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11039 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11040 for guile_version in ${guile_version_list}; do
11041 ${pkg_config} --exists ${guile_version} 2>/dev/null
11042 if test $? != 0; then
11043 continue
11045 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11046 if test $? != 0; then
11047 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11049 new_LIBS=`${pkg_config} --libs ${guile_version}`
11050 if test $? != 0; then
11051 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11053 found_usable_guile=${guile_version}
11054 break
11055 done
11056 if test "${found_usable_guile}" = "checking"; then
11057 if test "${flag_errors}" = "yes"; then
11058 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11059 else
11060 found_usable_guile=no
11063 if test "${found_usable_guile}" != no; then
11064 save_CPPFLAGS=$CPPFLAGS
11065 save_LIBS=$LIBS
11066 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11067 LIBS="$LIBS $new_LIBS"
11068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11069 /* end confdefs.h. */
11070 #include "libguile.h"
11072 main ()
11074 scm_init_guile ();
11076 return 0;
11078 _ACEOF
11079 if ac_fn_c_try_link "$LINENO"; then :
11080 have_libguile=yes
11081 GUILE_CPPFLAGS=$new_CPPFLAGS
11082 GUILE_LIBS=$new_LIBS
11083 else
11084 found_usable_guile=no
11086 rm -f core conftest.err conftest.$ac_objext \
11087 conftest$ac_exeext conftest.$ac_ext
11088 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11089 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11091 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11096 CPPFLAGS=$save_CPPFLAGS
11097 LIBS=$save_LIBS
11098 if test "${found_usable_guile}" = no; then
11099 if test "${flag_errors}" = yes; then
11100 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11101 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11102 as_fn_error $? "linking guile version ${guile_version} test program failed
11103 See \`config.log' for more details" "$LINENO" 5; }
11107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11108 $as_echo "${found_usable_guile}" >&6; }
11111 esac
11113 if test "${have_libguile}" != no; then
11114 case "${with_guile}" in
11115 [\\/]* | ?:[\\/]*)
11117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11118 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11119 if ${ac_cv_guild_program_name+:} false; then :
11120 $as_echo_n "(cached) " >&6
11121 else
11122 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
11124 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11125 # the 'guild' and 'bindir' variables. In that case, try to guess
11126 # what the program name is, at the risk of getting it wrong if
11127 # Guile was configured with '--program-suffix' or similar.
11128 if test "x$ac_cv_guild_program_name" = "x"; then
11129 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
11130 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11135 $as_echo "$ac_cv_guild_program_name" >&6; }
11137 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11138 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11141 GUILD="$ac_cv_guild_program_name"
11147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11148 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11149 if ${ac_cv_guild_program_name+:} false; then :
11150 $as_echo_n "(cached) " >&6
11151 else
11152 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11154 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11155 # the 'guild' and 'bindir' variables. In that case, try to guess
11156 # what the program name is, at the risk of getting it wrong if
11157 # Guile was configured with '--program-suffix' or similar.
11158 if test "x$ac_cv_guild_program_name" = "x"; then
11159 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11160 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11165 $as_echo "$ac_cv_guild_program_name" >&6; }
11167 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11168 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11171 GUILD="$ac_cv_guild_program_name"
11175 esac
11178 if test "$cross_compiling" = no; then
11179 GUILD_TARGET_FLAG=
11180 else
11181 GUILD_TARGET_FLAG="--target=$host"
11187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11188 $as_echo_n "checking whether guild supports this host... " >&6; }
11189 if ${ac_cv_guild_ok+:} false; then :
11190 $as_echo_n "(cached) " >&6
11191 else
11192 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11193 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11194 ac_cv_guild_ok=yes
11195 else
11196 ac_cv_guild_ok=no
11199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11200 $as_echo "$ac_cv_guild_ok" >&6; }
11202 if test "$ac_cv_guild_ok" = no; then
11203 have_libguile=no
11204 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11205 $as_echo "$as_me: WARNING: disabling guile support" >&2;}
11209 if test "${have_libguile}" != no; then
11211 $as_echo "#define HAVE_GUILE 1" >>confdefs.h
11213 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11214 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11215 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11216 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11217 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
11219 save_LIBS="$LIBS"
11220 save_CPPFLAGS="$CPPFLAGS"
11221 LIBS="$GUILE_LIBS"
11222 CPPFLAGS="$GUILE_CPPFLAGS"
11223 for ac_func in scm_new_smob
11224 do :
11225 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
11226 if test "x$ac_cv_func_scm_new_smob" = xyes; then :
11227 cat >>confdefs.h <<_ACEOF
11228 #define HAVE_SCM_NEW_SMOB 1
11229 _ACEOF
11232 done
11234 LIBS="$save_LIBS"
11235 CPPFLAGS="$save_CPPFLAGS"
11236 else
11237 # Even if Guile support is not compiled in, we need to have these files
11238 # included.
11239 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
11240 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11244 if test "${have_libguile}" != no; then
11245 HAVE_GUILE_TRUE=
11246 HAVE_GUILE_FALSE='#'
11247 else
11248 HAVE_GUILE_TRUE='#'
11249 HAVE_GUILE_FALSE=
11253 # ---------------------------- #
11254 # Check for source highlight. #
11255 # ---------------------------- #
11257 SRCHIGH_LIBS=
11258 SRCHIGH_CFLAGS=
11260 # Check whether --enable-source-highlight was given.
11261 if test "${enable_source_highlight+set}" = set; then :
11262 enableval=$enable_source_highlight; case "${enableval}" in
11263 yes) enable_source_highlight=yes ;;
11264 no) enable_source_highlight=no ;;
11265 *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;;
11266 esac
11267 else
11268 enable_source_highlight=auto
11272 if test "${enable_source_highlight}" != "no"; then
11273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
11274 $as_echo_n "checking for the source-highlight library... " >&6; }
11275 if test "${pkg_config_prog_path}" = "missing"; then
11276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
11277 $as_echo "no - pkg-config not found" >&6; }
11278 if test "${enable_source_highlight}" = "yes"; then
11279 as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
11281 else
11282 case "$LDFLAGS" in
11283 *static-libstdc*)
11284 as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
11286 esac
11288 if ${pkg_config_prog_path} --exists source-highlight; then
11289 SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
11290 SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
11292 $as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
11294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11295 $as_echo "yes" >&6; }
11296 else
11297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11298 $as_echo "no" >&6; }
11299 if test "${enable_source_highlight}" = "yes"; then
11300 as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
11308 # ------------------------- #
11309 # Checks for header files. #
11310 # ------------------------- #
11312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11313 $as_echo_n "checking for ANSI C header files... " >&6; }
11314 if ${ac_cv_header_stdc+:} false; then :
11315 $as_echo_n "(cached) " >&6
11316 else
11317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11318 /* end confdefs.h. */
11319 #include <stdlib.h>
11320 #include <stdarg.h>
11321 #include <string.h>
11322 #include <float.h>
11325 main ()
11329 return 0;
11331 _ACEOF
11332 if ac_fn_c_try_compile "$LINENO"; then :
11333 ac_cv_header_stdc=yes
11334 else
11335 ac_cv_header_stdc=no
11337 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11339 if test $ac_cv_header_stdc = yes; then
11340 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11342 /* end confdefs.h. */
11343 #include <string.h>
11345 _ACEOF
11346 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11347 $EGREP "memchr" >/dev/null 2>&1; then :
11349 else
11350 ac_cv_header_stdc=no
11352 rm -f conftest*
11356 if test $ac_cv_header_stdc = yes; then
11357 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11359 /* end confdefs.h. */
11360 #include <stdlib.h>
11362 _ACEOF
11363 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11364 $EGREP "free" >/dev/null 2>&1; then :
11366 else
11367 ac_cv_header_stdc=no
11369 rm -f conftest*
11373 if test $ac_cv_header_stdc = yes; then
11374 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11375 if test "$cross_compiling" = yes; then :
11377 else
11378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11379 /* end confdefs.h. */
11380 #include <ctype.h>
11381 #include <stdlib.h>
11382 #if ((' ' & 0x0FF) == 0x020)
11383 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11384 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11385 #else
11386 # define ISLOWER(c) \
11387 (('a' <= (c) && (c) <= 'i') \
11388 || ('j' <= (c) && (c) <= 'r') \
11389 || ('s' <= (c) && (c) <= 'z'))
11390 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11391 #endif
11393 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11395 main ()
11397 int i;
11398 for (i = 0; i < 256; i++)
11399 if (XOR (islower (i), ISLOWER (i))
11400 || toupper (i) != TOUPPER (i))
11401 return 2;
11402 return 0;
11404 _ACEOF
11405 if ac_fn_c_try_run "$LINENO"; then :
11407 else
11408 ac_cv_header_stdc=no
11410 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11411 conftest.$ac_objext conftest.beam conftest.$ac_ext
11416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11417 $as_echo "$ac_cv_header_stdc" >&6; }
11418 if test $ac_cv_header_stdc = yes; then
11420 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
11424 # elf_hp.h is for HP/UX 64-bit shared library support.
11425 for ac_header in nlist.h machine/reg.h poll.h sys/poll.h \
11426 thread_db.h \
11427 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11428 sys/resource.h sys/ptrace.h ptrace.h \
11429 sys/reg.h sys/debugreg.h sys/select.h \
11430 termios.h elf_hp.h
11431 do :
11432 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11433 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11434 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11435 cat >>confdefs.h <<_ACEOF
11436 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11437 _ACEOF
11441 done
11443 for ac_header in sys/user.h
11444 do :
11445 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11446 # include <sys/param.h>
11447 #endif
11450 if test "x$ac_cv_header_sys_user_h" = xyes; then :
11451 cat >>confdefs.h <<_ACEOF
11452 #define HAVE_SYS_USER_H 1
11453 _ACEOF
11457 done
11460 for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
11461 do :
11462 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11463 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11464 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11465 cat >>confdefs.h <<_ACEOF
11466 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11467 _ACEOF
11471 done
11473 for ac_header in term.h
11474 do :
11475 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
11476 # include <curses.h>
11477 #endif
11480 if test "x$ac_cv_header_term_h" = xyes; then :
11481 cat >>confdefs.h <<_ACEOF
11482 #define HAVE_TERM_H 1
11483 _ACEOF
11487 done
11490 # ------------------------- #
11491 # Checks for declarations. #
11492 # ------------------------- #
11495 # Check for presence and size of long long.
11496 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
11497 if test "x$ac_cv_type_long_long" = xyes; then :
11499 cat >>confdefs.h <<_ACEOF
11500 #define HAVE_LONG_LONG 1
11501 _ACEOF
11503 # The cast to long int works around a bug in the HP C Compiler
11504 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11505 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11506 # This bug is HP SR number 8606223364.
11507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
11508 $as_echo_n "checking size of long long... " >&6; }
11509 if ${ac_cv_sizeof_long_long+:} false; then :
11510 $as_echo_n "(cached) " >&6
11511 else
11512 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
11514 else
11515 if test "$ac_cv_type_long_long" = yes; then
11516 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11517 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11518 as_fn_error 77 "cannot compute sizeof (long long)
11519 See \`config.log' for more details" "$LINENO" 5; }
11520 else
11521 ac_cv_sizeof_long_long=0
11526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
11527 $as_echo "$ac_cv_sizeof_long_long" >&6; }
11531 cat >>confdefs.h <<_ACEOF
11532 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
11533 _ACEOF
11539 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
11540 ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
11541 if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
11542 ac_have_decl=1
11543 else
11544 ac_have_decl=0
11547 cat >>confdefs.h <<_ACEOF
11548 #define HAVE_DECL_BASENAME $ac_have_decl
11549 _ACEOF
11550 ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
11551 if test "x$ac_cv_have_decl_ffs" = xyes; then :
11552 ac_have_decl=1
11553 else
11554 ac_have_decl=0
11557 cat >>confdefs.h <<_ACEOF
11558 #define HAVE_DECL_FFS $ac_have_decl
11559 _ACEOF
11560 ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
11561 if test "x$ac_cv_have_decl_asprintf" = xyes; then :
11562 ac_have_decl=1
11563 else
11564 ac_have_decl=0
11567 cat >>confdefs.h <<_ACEOF
11568 #define HAVE_DECL_ASPRINTF $ac_have_decl
11569 _ACEOF
11570 ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
11571 if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
11572 ac_have_decl=1
11573 else
11574 ac_have_decl=0
11577 cat >>confdefs.h <<_ACEOF
11578 #define HAVE_DECL_VASPRINTF $ac_have_decl
11579 _ACEOF
11580 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11581 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11582 ac_have_decl=1
11583 else
11584 ac_have_decl=0
11587 cat >>confdefs.h <<_ACEOF
11588 #define HAVE_DECL_SNPRINTF $ac_have_decl
11589 _ACEOF
11590 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11591 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
11592 ac_have_decl=1
11593 else
11594 ac_have_decl=0
11597 cat >>confdefs.h <<_ACEOF
11598 #define HAVE_DECL_VSNPRINTF $ac_have_decl
11599 _ACEOF
11601 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
11602 if test "x$ac_cv_have_decl_strtol" = xyes; then :
11603 ac_have_decl=1
11604 else
11605 ac_have_decl=0
11608 cat >>confdefs.h <<_ACEOF
11609 #define HAVE_DECL_STRTOL $ac_have_decl
11610 _ACEOF
11611 ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
11612 if test "x$ac_cv_have_decl_strtoul" = xyes; then :
11613 ac_have_decl=1
11614 else
11615 ac_have_decl=0
11618 cat >>confdefs.h <<_ACEOF
11619 #define HAVE_DECL_STRTOUL $ac_have_decl
11620 _ACEOF
11621 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
11622 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
11623 ac_have_decl=1
11624 else
11625 ac_have_decl=0
11628 cat >>confdefs.h <<_ACEOF
11629 #define HAVE_DECL_STRTOLL $ac_have_decl
11630 _ACEOF
11631 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
11632 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
11633 ac_have_decl=1
11634 else
11635 ac_have_decl=0
11638 cat >>confdefs.h <<_ACEOF
11639 #define HAVE_DECL_STRTOULL $ac_have_decl
11640 _ACEOF
11642 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
11643 if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
11644 ac_have_decl=1
11645 else
11646 ac_have_decl=0
11649 cat >>confdefs.h <<_ACEOF
11650 #define HAVE_DECL_STRVERSCMP $ac_have_decl
11651 _ACEOF
11655 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11656 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11657 ac_have_decl=1
11658 else
11659 ac_have_decl=0
11662 cat >>confdefs.h <<_ACEOF
11663 #define HAVE_DECL_SNPRINTF $ac_have_decl
11664 _ACEOF
11667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11668 $as_echo_n "checking for LC_MESSAGES... " >&6; }
11669 if ${am_cv_val_LC_MESSAGES+:} false; then :
11670 $as_echo_n "(cached) " >&6
11671 else
11672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11673 /* end confdefs.h. */
11674 #include <locale.h>
11676 main ()
11678 return LC_MESSAGES
11680 return 0;
11682 _ACEOF
11683 if ac_fn_c_try_link "$LINENO"; then :
11684 am_cv_val_LC_MESSAGES=yes
11685 else
11686 am_cv_val_LC_MESSAGES=no
11688 rm -f core conftest.err conftest.$ac_objext \
11689 conftest$ac_exeext conftest.$ac_ext
11691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11692 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11693 if test $am_cv_val_LC_MESSAGES = yes; then
11695 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11700 # ------------------ #
11701 # Checks for types. #
11702 # ------------------ #
11704 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
11705 #include <sys/socket.h>
11708 if test "x$ac_cv_type_socklen_t" = xyes; then :
11710 cat >>confdefs.h <<_ACEOF
11711 #define HAVE_SOCKLEN_T 1
11712 _ACEOF
11718 # ------------------------------------- #
11719 # Checks for compiler characteristics. #
11720 # ------------------------------------- #
11722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11723 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11724 if ${ac_cv_c_const+:} false; then :
11725 $as_echo_n "(cached) " >&6
11726 else
11727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11728 /* end confdefs.h. */
11731 main ()
11734 #ifndef __cplusplus
11735 /* Ultrix mips cc rejects this sort of thing. */
11736 typedef int charset[2];
11737 const charset cs = { 0, 0 };
11738 /* SunOS 4.1.1 cc rejects this. */
11739 char const *const *pcpcc;
11740 char **ppc;
11741 /* NEC SVR4.0.2 mips cc rejects this. */
11742 struct point {int x, y;};
11743 static struct point const zero = {0,0};
11744 /* AIX XL C 1.02.0.0 rejects this.
11745 It does not let you subtract one const X* pointer from another in
11746 an arm of an if-expression whose if-part is not a constant
11747 expression */
11748 const char *g = "string";
11749 pcpcc = &g + (g ? g-g : 0);
11750 /* HPUX 7.0 cc rejects these. */
11751 ++pcpcc;
11752 ppc = (char**) pcpcc;
11753 pcpcc = (char const *const *) ppc;
11754 { /* SCO 3.2v4 cc rejects this sort of thing. */
11755 char tx;
11756 char *t = &tx;
11757 char const *s = 0 ? (char *) 0 : (char const *) 0;
11759 *t++ = 0;
11760 if (s) return 0;
11762 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11763 int x[] = {25, 17};
11764 const int *foo = &x[0];
11765 ++foo;
11767 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11768 typedef const int *iptr;
11769 iptr p = 0;
11770 ++p;
11772 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
11773 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11774 struct s { int j; const int *ap[3]; } bx;
11775 struct s *b = &bx; b->j = 5;
11777 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11778 const int foo = 10;
11779 if (!foo) return 0;
11781 return !cs[0] && !zero.x;
11782 #endif
11785 return 0;
11787 _ACEOF
11788 if ac_fn_c_try_compile "$LINENO"; then :
11789 ac_cv_c_const=yes
11790 else
11791 ac_cv_c_const=no
11793 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11796 $as_echo "$ac_cv_c_const" >&6; }
11797 if test $ac_cv_c_const = no; then
11799 $as_echo "#define const /**/" >>confdefs.h
11803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11804 $as_echo_n "checking for inline... " >&6; }
11805 if ${ac_cv_c_inline+:} false; then :
11806 $as_echo_n "(cached) " >&6
11807 else
11808 ac_cv_c_inline=no
11809 for ac_kw in inline __inline__ __inline; do
11810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11811 /* end confdefs.h. */
11812 #ifndef __cplusplus
11813 typedef int foo_t;
11814 static $ac_kw foo_t static_foo () {return 0; }
11815 $ac_kw foo_t foo () {return 0; }
11816 #endif
11818 _ACEOF
11819 if ac_fn_c_try_compile "$LINENO"; then :
11820 ac_cv_c_inline=$ac_kw
11822 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11823 test "$ac_cv_c_inline" != no && break
11824 done
11827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11828 $as_echo "$ac_cv_c_inline" >&6; }
11830 case $ac_cv_c_inline in
11831 inline | yes) ;;
11833 case $ac_cv_c_inline in
11834 no) ac_val=;;
11835 *) ac_val=$ac_cv_c_inline;;
11836 esac
11837 cat >>confdefs.h <<_ACEOF
11838 #ifndef __cplusplus
11839 #define inline $ac_val
11840 #endif
11841 _ACEOF
11843 esac
11845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11846 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11847 if ${ac_cv_c_bigendian+:} false; then :
11848 $as_echo_n "(cached) " >&6
11849 else
11850 ac_cv_c_bigendian=unknown
11851 # See if we're dealing with a universal compiler.
11852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11853 /* end confdefs.h. */
11854 #ifndef __APPLE_CC__
11855 not a universal capable compiler
11856 #endif
11857 typedef int dummy;
11859 _ACEOF
11860 if ac_fn_c_try_compile "$LINENO"; then :
11862 # Check for potential -arch flags. It is not universal unless
11863 # there are at least two -arch flags with different values.
11864 ac_arch=
11865 ac_prev=
11866 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11867 if test -n "$ac_prev"; then
11868 case $ac_word in
11869 i?86 | x86_64 | ppc | ppc64)
11870 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11871 ac_arch=$ac_word
11872 else
11873 ac_cv_c_bigendian=universal
11874 break
11877 esac
11878 ac_prev=
11879 elif test "x$ac_word" = "x-arch"; then
11880 ac_prev=arch
11882 done
11884 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11885 if test $ac_cv_c_bigendian = unknown; then
11886 # See if sys/param.h defines the BYTE_ORDER macro.
11887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11888 /* end confdefs.h. */
11889 #include <sys/types.h>
11890 #include <sys/param.h>
11893 main ()
11895 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11896 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11897 && LITTLE_ENDIAN)
11898 bogus endian macros
11899 #endif
11902 return 0;
11904 _ACEOF
11905 if ac_fn_c_try_compile "$LINENO"; then :
11906 # It does; now see whether it defined to BIG_ENDIAN or not.
11907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11908 /* end confdefs.h. */
11909 #include <sys/types.h>
11910 #include <sys/param.h>
11913 main ()
11915 #if BYTE_ORDER != BIG_ENDIAN
11916 not big endian
11917 #endif
11920 return 0;
11922 _ACEOF
11923 if ac_fn_c_try_compile "$LINENO"; then :
11924 ac_cv_c_bigendian=yes
11925 else
11926 ac_cv_c_bigendian=no
11928 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11930 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11932 if test $ac_cv_c_bigendian = unknown; then
11933 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11935 /* end confdefs.h. */
11936 #include <limits.h>
11939 main ()
11941 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11942 bogus endian macros
11943 #endif
11946 return 0;
11948 _ACEOF
11949 if ac_fn_c_try_compile "$LINENO"; then :
11950 # It does; now see whether it defined to _BIG_ENDIAN or not.
11951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11952 /* end confdefs.h. */
11953 #include <limits.h>
11956 main ()
11958 #ifndef _BIG_ENDIAN
11959 not big endian
11960 #endif
11963 return 0;
11965 _ACEOF
11966 if ac_fn_c_try_compile "$LINENO"; then :
11967 ac_cv_c_bigendian=yes
11968 else
11969 ac_cv_c_bigendian=no
11971 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11973 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11975 if test $ac_cv_c_bigendian = unknown; then
11976 # Compile a test program.
11977 if test "$cross_compiling" = yes; then :
11978 # Try to guess by grepping values from an object file.
11979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11980 /* end confdefs.h. */
11981 short int ascii_mm[] =
11982 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11983 short int ascii_ii[] =
11984 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11985 int use_ascii (int i) {
11986 return ascii_mm[i] + ascii_ii[i];
11988 short int ebcdic_ii[] =
11989 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11990 short int ebcdic_mm[] =
11991 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11992 int use_ebcdic (int i) {
11993 return ebcdic_mm[i] + ebcdic_ii[i];
11995 extern int foo;
11998 main ()
12000 return use_ascii (foo) == use_ebcdic (foo);
12002 return 0;
12004 _ACEOF
12005 if ac_fn_c_try_compile "$LINENO"; then :
12006 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12007 ac_cv_c_bigendian=yes
12009 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12010 if test "$ac_cv_c_bigendian" = unknown; then
12011 ac_cv_c_bigendian=no
12012 else
12013 # finding both strings is unlikely to happen, but who knows?
12014 ac_cv_c_bigendian=unknown
12018 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12019 else
12020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12021 /* end confdefs.h. */
12022 $ac_includes_default
12024 main ()
12027 /* Are we little or big endian? From Harbison&Steele. */
12028 union
12030 long int l;
12031 char c[sizeof (long int)];
12032 } u;
12033 u.l = 1;
12034 return u.c[sizeof (long int) - 1] == 1;
12037 return 0;
12039 _ACEOF
12040 if ac_fn_c_try_run "$LINENO"; then :
12041 ac_cv_c_bigendian=no
12042 else
12043 ac_cv_c_bigendian=yes
12045 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12046 conftest.$ac_objext conftest.beam conftest.$ac_ext
12051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12052 $as_echo "$ac_cv_c_bigendian" >&6; }
12053 case $ac_cv_c_bigendian in #(
12054 yes)
12055 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12056 ;; #(
12058 ;; #(
12059 universal)
12061 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12063 ;; #(
12065 as_fn_error $? "unknown endianness
12066 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12067 esac
12070 # ------------------------------ #
12071 # Checks for library functions. #
12072 # ------------------------------ #
12074 for ac_func in getuid getgid \
12075 pipe poll pread pread64 pwrite resize_term \
12076 getpgid setsid \
12077 sigaction sigsetmask socketpair \
12078 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
12079 setrlimit getrlimit posix_madvise waitpid \
12080 use_default_colors
12081 do :
12082 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12083 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12084 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12085 cat >>confdefs.h <<_ACEOF
12086 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12087 _ACEOF
12090 done
12093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12094 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12095 if ${am_cv_langinfo_codeset+:} false; then :
12096 $as_echo_n "(cached) " >&6
12097 else
12098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12099 /* end confdefs.h. */
12100 #include <langinfo.h>
12102 main ()
12104 char* cs = nl_langinfo(CODESET);
12106 return 0;
12108 _ACEOF
12109 if ac_fn_c_try_link "$LINENO"; then :
12110 am_cv_langinfo_codeset=yes
12111 else
12112 am_cv_langinfo_codeset=no
12114 rm -f core conftest.err conftest.$ac_objext \
12115 conftest$ac_exeext conftest.$ac_ext
12118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12119 $as_echo "$am_cv_langinfo_codeset" >&6; }
12120 if test $am_cv_langinfo_codeset = yes; then
12122 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12126 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
12127 if test "x$ac_cv_type_size_t" = xyes; then :
12129 else
12131 cat >>confdefs.h <<_ACEOF
12132 #define size_t unsigned int
12133 _ACEOF
12140 for ac_header in $ac_header_list
12141 do :
12142 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12143 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12145 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12146 cat >>confdefs.h <<_ACEOF
12147 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12148 _ACEOF
12152 done
12160 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12161 if test "x$ac_cv_type_pid_t" = xyes; then :
12163 else
12165 cat >>confdefs.h <<_ACEOF
12166 #define pid_t int
12167 _ACEOF
12171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12172 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12173 if ${ac_cv_path_SED+:} false; then :
12174 $as_echo_n "(cached) " >&6
12175 else
12176 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12177 for ac_i in 1 2 3 4 5 6 7; do
12178 ac_script="$ac_script$as_nl$ac_script"
12179 done
12180 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12181 { ac_script=; unset ac_script;}
12182 if test -z "$SED"; then
12183 ac_path_SED_found=false
12184 # Loop through the user's path and test for each of PROGNAME-LIST
12185 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12186 for as_dir in $PATH
12188 IFS=$as_save_IFS
12189 test -z "$as_dir" && as_dir=.
12190 for ac_prog in sed gsed; do
12191 for ac_exec_ext in '' $ac_executable_extensions; do
12192 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12193 as_fn_executable_p "$ac_path_SED" || continue
12194 # Check for GNU ac_path_SED and select it if it is found.
12195 # Check for GNU $ac_path_SED
12196 case `"$ac_path_SED" --version 2>&1` in
12197 *GNU*)
12198 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12200 ac_count=0
12201 $as_echo_n 0123456789 >"conftest.in"
12202 while :
12204 cat "conftest.in" "conftest.in" >"conftest.tmp"
12205 mv "conftest.tmp" "conftest.in"
12206 cp "conftest.in" "conftest.nl"
12207 $as_echo '' >> "conftest.nl"
12208 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12209 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12210 as_fn_arith $ac_count + 1 && ac_count=$as_val
12211 if test $ac_count -gt ${ac_path_SED_max-0}; then
12212 # Best one so far, save it but keep looking for a better one
12213 ac_cv_path_SED="$ac_path_SED"
12214 ac_path_SED_max=$ac_count
12216 # 10*(2^10) chars as input seems more than enough
12217 test $ac_count -gt 10 && break
12218 done
12219 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12220 esac
12222 $ac_path_SED_found && break 3
12223 done
12224 done
12225 done
12226 IFS=$as_save_IFS
12227 if test -z "$ac_cv_path_SED"; then
12228 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12230 else
12231 ac_cv_path_SED=$SED
12235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12236 $as_echo "$ac_cv_path_SED" >&6; }
12237 SED="$ac_cv_path_SED"
12238 rm -f conftest.sed
12241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12242 $as_echo_n "checking for ANSI C header files... " >&6; }
12243 if ${ac_cv_header_stdc+:} false; then :
12244 $as_echo_n "(cached) " >&6
12245 else
12246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12247 /* end confdefs.h. */
12248 #include <stdlib.h>
12249 #include <stdarg.h>
12250 #include <string.h>
12251 #include <float.h>
12254 main ()
12258 return 0;
12260 _ACEOF
12261 if ac_fn_c_try_compile "$LINENO"; then :
12262 ac_cv_header_stdc=yes
12263 else
12264 ac_cv_header_stdc=no
12266 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12268 if test $ac_cv_header_stdc = yes; then
12269 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12271 /* end confdefs.h. */
12272 #include <string.h>
12274 _ACEOF
12275 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12276 $EGREP "memchr" >/dev/null 2>&1; then :
12278 else
12279 ac_cv_header_stdc=no
12281 rm -f conftest*
12285 if test $ac_cv_header_stdc = yes; then
12286 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12288 /* end confdefs.h. */
12289 #include <stdlib.h>
12291 _ACEOF
12292 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12293 $EGREP "free" >/dev/null 2>&1; then :
12295 else
12296 ac_cv_header_stdc=no
12298 rm -f conftest*
12302 if test $ac_cv_header_stdc = yes; then
12303 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12304 if test "$cross_compiling" = yes; then :
12306 else
12307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12308 /* end confdefs.h. */
12309 #include <ctype.h>
12310 #include <stdlib.h>
12311 #if ((' ' & 0x0FF) == 0x020)
12312 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12313 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12314 #else
12315 # define ISLOWER(c) \
12316 (('a' <= (c) && (c) <= 'i') \
12317 || ('j' <= (c) && (c) <= 'r') \
12318 || ('s' <= (c) && (c) <= 'z'))
12319 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12320 #endif
12322 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12324 main ()
12326 int i;
12327 for (i = 0; i < 256; i++)
12328 if (XOR (islower (i), ISLOWER (i))
12329 || toupper (i) != TOUPPER (i))
12330 return 2;
12331 return 0;
12333 _ACEOF
12334 if ac_fn_c_try_run "$LINENO"; then :
12336 else
12337 ac_cv_header_stdc=no
12339 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12340 conftest.$ac_objext conftest.beam conftest.$ac_ext
12345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12346 $as_echo "$ac_cv_header_stdc" >&6; }
12347 if test $ac_cv_header_stdc = yes; then
12349 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
12353 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12354 # for constant arguments. Useless!
12355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12356 $as_echo_n "checking for working alloca.h... " >&6; }
12357 if ${ac_cv_working_alloca_h+:} false; then :
12358 $as_echo_n "(cached) " >&6
12359 else
12360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12361 /* end confdefs.h. */
12362 #include <alloca.h>
12364 main ()
12366 char *p = (char *) alloca (2 * sizeof (int));
12367 if (p) return 0;
12369 return 0;
12371 _ACEOF
12372 if ac_fn_c_try_link "$LINENO"; then :
12373 ac_cv_working_alloca_h=yes
12374 else
12375 ac_cv_working_alloca_h=no
12377 rm -f core conftest.err conftest.$ac_objext \
12378 conftest$ac_exeext conftest.$ac_ext
12380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12381 $as_echo "$ac_cv_working_alloca_h" >&6; }
12382 if test $ac_cv_working_alloca_h = yes; then
12384 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
12388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12389 $as_echo_n "checking for alloca... " >&6; }
12390 if ${ac_cv_func_alloca_works+:} false; then :
12391 $as_echo_n "(cached) " >&6
12392 else
12393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12394 /* end confdefs.h. */
12395 #ifdef __GNUC__
12396 # define alloca __builtin_alloca
12397 #else
12398 # ifdef _MSC_VER
12399 # include <malloc.h>
12400 # define alloca _alloca
12401 # else
12402 # ifdef HAVE_ALLOCA_H
12403 # include <alloca.h>
12404 # else
12405 # ifdef _AIX
12406 #pragma alloca
12407 # else
12408 # ifndef alloca /* predefined by HP cc +Olibcalls */
12409 void *alloca (size_t);
12410 # endif
12411 # endif
12412 # endif
12413 # endif
12414 #endif
12417 main ()
12419 char *p = (char *) alloca (1);
12420 if (p) return 0;
12422 return 0;
12424 _ACEOF
12425 if ac_fn_c_try_link "$LINENO"; then :
12426 ac_cv_func_alloca_works=yes
12427 else
12428 ac_cv_func_alloca_works=no
12430 rm -f core conftest.err conftest.$ac_objext \
12431 conftest$ac_exeext conftest.$ac_ext
12433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12434 $as_echo "$ac_cv_func_alloca_works" >&6; }
12436 if test $ac_cv_func_alloca_works = yes; then
12438 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
12440 else
12441 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12442 # that cause trouble. Some versions do not even contain alloca or
12443 # contain a buggy version. If you still want to use their alloca,
12444 # use ar to extract alloca.o from them instead of compiling alloca.c.
12446 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
12448 $as_echo "#define C_ALLOCA 1" >>confdefs.h
12451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12452 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12453 if ${ac_cv_os_cray+:} false; then :
12454 $as_echo_n "(cached) " >&6
12455 else
12456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12457 /* end confdefs.h. */
12458 #if defined CRAY && ! defined CRAY2
12459 webecray
12460 #else
12461 wenotbecray
12462 #endif
12464 _ACEOF
12465 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12466 $EGREP "webecray" >/dev/null 2>&1; then :
12467 ac_cv_os_cray=yes
12468 else
12469 ac_cv_os_cray=no
12471 rm -f conftest*
12474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12475 $as_echo "$ac_cv_os_cray" >&6; }
12476 if test $ac_cv_os_cray = yes; then
12477 for ac_func in _getb67 GETB67 getb67; do
12478 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12479 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12480 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12482 cat >>confdefs.h <<_ACEOF
12483 #define CRAY_STACKSEG_END $ac_func
12484 _ACEOF
12486 break
12489 done
12492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12493 $as_echo_n "checking stack direction for C alloca... " >&6; }
12494 if ${ac_cv_c_stack_direction+:} false; then :
12495 $as_echo_n "(cached) " >&6
12496 else
12497 if test "$cross_compiling" = yes; then :
12498 ac_cv_c_stack_direction=0
12499 else
12500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12501 /* end confdefs.h. */
12502 $ac_includes_default
12504 find_stack_direction (int *addr, int depth)
12506 int dir, dummy = 0;
12507 if (! addr)
12508 addr = &dummy;
12509 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
12510 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
12511 return dir + dummy;
12515 main (int argc, char **argv)
12517 return find_stack_direction (0, argc + !argv + 20) < 0;
12519 _ACEOF
12520 if ac_fn_c_try_run "$LINENO"; then :
12521 ac_cv_c_stack_direction=1
12522 else
12523 ac_cv_c_stack_direction=-1
12525 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12526 conftest.$ac_objext conftest.beam conftest.$ac_ext
12530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12531 $as_echo "$ac_cv_c_stack_direction" >&6; }
12532 cat >>confdefs.h <<_ACEOF
12533 #define STACK_DIRECTION $ac_cv_c_stack_direction
12534 _ACEOF
12540 WIN32APILIBS=
12541 case ${host} in
12542 *mingw32*)
12544 $as_echo "#define USE_WIN32API 1" >>confdefs.h
12546 WIN32APILIBS="-lws2_32"
12548 esac
12551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12552 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12553 if ${am_cv_langinfo_codeset+:} false; then :
12554 $as_echo_n "(cached) " >&6
12555 else
12556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12557 /* end confdefs.h. */
12558 #include <langinfo.h>
12560 main ()
12562 char* cs = nl_langinfo(CODESET);
12564 return 0;
12566 _ACEOF
12567 if ac_fn_c_try_link "$LINENO"; then :
12568 am_cv_langinfo_codeset=yes
12569 else
12570 am_cv_langinfo_codeset=no
12572 rm -f core conftest.err conftest.$ac_objext \
12573 conftest$ac_exeext conftest.$ac_ext
12576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12577 $as_echo "$am_cv_langinfo_codeset" >&6; }
12578 if test $am_cv_langinfo_codeset = yes; then
12580 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12585 for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/un.h sys/wait.h thread_db.h wait.h termios.h dlfcn.h linux/elf.h sys/procfs.h proc_service.h
12586 do :
12587 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12588 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12589 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12590 cat >>confdefs.h <<_ACEOF
12591 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12592 _ACEOF
12596 done
12600 for ac_func in getpagesize
12601 do :
12602 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12603 if test "x$ac_cv_func_getpagesize" = xyes; then :
12604 cat >>confdefs.h <<_ACEOF
12605 #define HAVE_GETPAGESIZE 1
12606 _ACEOF
12609 done
12611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12612 $as_echo_n "checking for working mmap... " >&6; }
12613 if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
12614 $as_echo_n "(cached) " >&6
12615 else
12616 if test "$cross_compiling" = yes; then :
12617 ac_cv_func_mmap_fixed_mapped=no
12618 else
12619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12620 /* end confdefs.h. */
12621 $ac_includes_default
12622 /* malloc might have been renamed as rpl_malloc. */
12623 #undef malloc
12625 /* Thanks to Mike Haertel and Jim Avera for this test.
12626 Here is a matrix of mmap possibilities:
12627 mmap private not fixed
12628 mmap private fixed at somewhere currently unmapped
12629 mmap private fixed at somewhere already mapped
12630 mmap shared not fixed
12631 mmap shared fixed at somewhere currently unmapped
12632 mmap shared fixed at somewhere already mapped
12633 For private mappings, we should verify that changes cannot be read()
12634 back from the file, nor mmap's back from the file at a different
12635 address. (There have been systems where private was not correctly
12636 implemented like the infamous i386 svr4.0, and systems where the
12637 VM page cache was not coherent with the file system buffer cache
12638 like early versions of FreeBSD and possibly contemporary NetBSD.)
12639 For shared mappings, we should conversely verify that changes get
12640 propagated back to all the places they're supposed to be.
12642 Grep wants private fixed already mapped.
12643 The main things grep needs to know about mmap are:
12644 * does it exist and is it safe to write into the mmap'd area
12645 * how to use it (BSD variants) */
12647 #include <fcntl.h>
12648 #include <sys/mman.h>
12650 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
12651 char *malloc ();
12652 #endif
12654 /* This mess was copied from the GNU getpagesize.h. */
12655 #ifndef HAVE_GETPAGESIZE
12656 # ifdef _SC_PAGESIZE
12657 # define getpagesize() sysconf(_SC_PAGESIZE)
12658 # else /* no _SC_PAGESIZE */
12659 # ifdef HAVE_SYS_PARAM_H
12660 # include <sys/param.h>
12661 # ifdef EXEC_PAGESIZE
12662 # define getpagesize() EXEC_PAGESIZE
12663 # else /* no EXEC_PAGESIZE */
12664 # ifdef NBPG
12665 # define getpagesize() NBPG * CLSIZE
12666 # ifndef CLSIZE
12667 # define CLSIZE 1
12668 # endif /* no CLSIZE */
12669 # else /* no NBPG */
12670 # ifdef NBPC
12671 # define getpagesize() NBPC
12672 # else /* no NBPC */
12673 # ifdef PAGESIZE
12674 # define getpagesize() PAGESIZE
12675 # endif /* PAGESIZE */
12676 # endif /* no NBPC */
12677 # endif /* no NBPG */
12678 # endif /* no EXEC_PAGESIZE */
12679 # else /* no HAVE_SYS_PARAM_H */
12680 # define getpagesize() 8192 /* punt totally */
12681 # endif /* no HAVE_SYS_PARAM_H */
12682 # endif /* no _SC_PAGESIZE */
12684 #endif /* no HAVE_GETPAGESIZE */
12687 main ()
12689 char *data, *data2, *data3;
12690 const char *cdata2;
12691 int i, pagesize;
12692 int fd, fd2;
12694 pagesize = getpagesize ();
12696 /* First, make a file with some known garbage in it. */
12697 data = (char *) malloc (pagesize);
12698 if (!data)
12699 return 1;
12700 for (i = 0; i < pagesize; ++i)
12701 *(data + i) = rand ();
12702 umask (0);
12703 fd = creat ("conftest.mmap", 0600);
12704 if (fd < 0)
12705 return 2;
12706 if (write (fd, data, pagesize) != pagesize)
12707 return 3;
12708 close (fd);
12710 /* Next, check that the tail of a page is zero-filled. File must have
12711 non-zero length, otherwise we risk SIGBUS for entire page. */
12712 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
12713 if (fd2 < 0)
12714 return 4;
12715 cdata2 = "";
12716 if (write (fd2, cdata2, 1) != 1)
12717 return 5;
12718 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
12719 if (data2 == MAP_FAILED)
12720 return 6;
12721 for (i = 0; i < pagesize; ++i)
12722 if (*(data2 + i))
12723 return 7;
12724 close (fd2);
12725 if (munmap (data2, pagesize))
12726 return 8;
12728 /* Next, try to mmap the file at a fixed address which already has
12729 something else allocated at it. If we can, also make sure that
12730 we see the same garbage. */
12731 fd = open ("conftest.mmap", O_RDWR);
12732 if (fd < 0)
12733 return 9;
12734 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12735 MAP_PRIVATE | MAP_FIXED, fd, 0L))
12736 return 10;
12737 for (i = 0; i < pagesize; ++i)
12738 if (*(data + i) != *(data2 + i))
12739 return 11;
12741 /* Finally, make sure that changes to the mapped area do not
12742 percolate back to the file as seen by read(). (This is a bug on
12743 some variants of i386 svr4.0.) */
12744 for (i = 0; i < pagesize; ++i)
12745 *(data2 + i) = *(data2 + i) + 1;
12746 data3 = (char *) malloc (pagesize);
12747 if (!data3)
12748 return 12;
12749 if (read (fd, data3, pagesize) != pagesize)
12750 return 13;
12751 for (i = 0; i < pagesize; ++i)
12752 if (*(data + i) != *(data3 + i))
12753 return 14;
12754 close (fd);
12755 return 0;
12757 _ACEOF
12758 if ac_fn_c_try_run "$LINENO"; then :
12759 ac_cv_func_mmap_fixed_mapped=yes
12760 else
12761 ac_cv_func_mmap_fixed_mapped=no
12763 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12764 conftest.$ac_objext conftest.beam conftest.$ac_ext
12768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12769 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
12770 if test $ac_cv_func_mmap_fixed_mapped = yes; then
12772 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
12775 rm -f conftest.mmap conftest.txt
12777 for ac_header in vfork.h
12778 do :
12779 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
12780 if test "x$ac_cv_header_vfork_h" = xyes; then :
12781 cat >>confdefs.h <<_ACEOF
12782 #define HAVE_VFORK_H 1
12783 _ACEOF
12787 done
12789 for ac_func in fork vfork
12790 do :
12791 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12792 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12793 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12794 cat >>confdefs.h <<_ACEOF
12795 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12796 _ACEOF
12799 done
12801 if test "x$ac_cv_func_fork" = xyes; then
12802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
12803 $as_echo_n "checking for working fork... " >&6; }
12804 if ${ac_cv_func_fork_works+:} false; then :
12805 $as_echo_n "(cached) " >&6
12806 else
12807 if test "$cross_compiling" = yes; then :
12808 ac_cv_func_fork_works=cross
12809 else
12810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12811 /* end confdefs.h. */
12812 $ac_includes_default
12814 main ()
12817 /* By Ruediger Kuhlmann. */
12818 return fork () < 0;
12821 return 0;
12823 _ACEOF
12824 if ac_fn_c_try_run "$LINENO"; then :
12825 ac_cv_func_fork_works=yes
12826 else
12827 ac_cv_func_fork_works=no
12829 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12830 conftest.$ac_objext conftest.beam conftest.$ac_ext
12834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
12835 $as_echo "$ac_cv_func_fork_works" >&6; }
12837 else
12838 ac_cv_func_fork_works=$ac_cv_func_fork
12840 if test "x$ac_cv_func_fork_works" = xcross; then
12841 case $host in
12842 *-*-amigaos* | *-*-msdosdjgpp*)
12843 # Override, as these systems have only a dummy fork() stub
12844 ac_cv_func_fork_works=no
12847 ac_cv_func_fork_works=yes
12849 esac
12850 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
12851 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
12853 ac_cv_func_vfork_works=$ac_cv_func_vfork
12854 if test "x$ac_cv_func_vfork" = xyes; then
12855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
12856 $as_echo_n "checking for working vfork... " >&6; }
12857 if ${ac_cv_func_vfork_works+:} false; then :
12858 $as_echo_n "(cached) " >&6
12859 else
12860 if test "$cross_compiling" = yes; then :
12861 ac_cv_func_vfork_works=cross
12862 else
12863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12864 /* end confdefs.h. */
12865 /* Thanks to Paul Eggert for this test. */
12866 $ac_includes_default
12867 #include <sys/wait.h>
12868 #ifdef HAVE_VFORK_H
12869 # include <vfork.h>
12870 #endif
12871 /* On some sparc systems, changes by the child to local and incoming
12872 argument registers are propagated back to the parent. The compiler
12873 is told about this with #include <vfork.h>, but some compilers
12874 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
12875 static variable whose address is put into a register that is
12876 clobbered by the vfork. */
12877 static void
12878 #ifdef __cplusplus
12879 sparc_address_test (int arg)
12880 # else
12881 sparc_address_test (arg) int arg;
12882 #endif
12884 static pid_t child;
12885 if (!child) {
12886 child = vfork ();
12887 if (child < 0) {
12888 perror ("vfork");
12889 _exit(2);
12891 if (!child) {
12892 arg = getpid();
12893 write(-1, "", 0);
12894 _exit (arg);
12900 main ()
12902 pid_t parent = getpid ();
12903 pid_t child;
12905 sparc_address_test (0);
12907 child = vfork ();
12909 if (child == 0) {
12910 /* Here is another test for sparc vfork register problems. This
12911 test uses lots of local variables, at least as many local
12912 variables as main has allocated so far including compiler
12913 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
12914 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
12915 reuse the register of parent for one of the local variables,
12916 since it will think that parent can't possibly be used any more
12917 in this routine. Assigning to the local variable will thus
12918 munge parent in the parent process. */
12919 pid_t
12920 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12921 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12922 /* Convince the compiler that p..p7 are live; otherwise, it might
12923 use the same hardware register for all 8 local variables. */
12924 if (p != p1 || p != p2 || p != p3 || p != p4
12925 || p != p5 || p != p6 || p != p7)
12926 _exit(1);
12928 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
12929 from child file descriptors. If the child closes a descriptor
12930 before it execs or exits, this munges the parent's descriptor
12931 as well. Test for this by closing stdout in the child. */
12932 _exit(close(fileno(stdout)) != 0);
12933 } else {
12934 int status;
12935 struct stat st;
12937 while (wait(&status) != child)
12939 return (
12940 /* Was there some problem with vforking? */
12941 child < 0
12943 /* Did the child fail? (This shouldn't happen.) */
12944 || status
12946 /* Did the vfork/compiler bug occur? */
12947 || parent != getpid()
12949 /* Did the file descriptor bug occur? */
12950 || fstat(fileno(stdout), &st) != 0
12954 _ACEOF
12955 if ac_fn_c_try_run "$LINENO"; then :
12956 ac_cv_func_vfork_works=yes
12957 else
12958 ac_cv_func_vfork_works=no
12960 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12961 conftest.$ac_objext conftest.beam conftest.$ac_ext
12965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
12966 $as_echo "$ac_cv_func_vfork_works" >&6; }
12969 if test "x$ac_cv_func_fork_works" = xcross; then
12970 ac_cv_func_vfork_works=$ac_cv_func_vfork
12971 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
12972 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
12975 if test "x$ac_cv_func_vfork_works" = xyes; then
12977 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
12979 else
12981 $as_echo "#define vfork fork" >>confdefs.h
12984 if test "x$ac_cv_func_fork_works" = xyes; then
12986 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
12990 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction \
12991 ptrace64 sbrk setns sigaltstack sigprocmask \
12992 setpgid setpgrp getrusage getauxval
12993 do :
12994 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12995 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12996 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12997 cat >>confdefs.h <<_ACEOF
12998 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12999 _ACEOF
13002 done
13005 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
13007 if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
13008 ac_have_decl=1
13009 else
13010 ac_have_decl=0
13013 cat >>confdefs.h <<_ACEOF
13014 #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
13015 _ACEOF
13018 if test "$cross_compiling" = yes; then :
13019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13020 /* end confdefs.h. */
13021 #include <sys/personality.h>
13023 main ()
13026 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
13027 # define ADDR_NO_RANDOMIZE 0x0040000
13028 # endif
13029 /* Test the flag could be set and stays set. */
13030 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13031 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13032 return 1
13034 return 0;
13036 _ACEOF
13037 if ac_fn_c_try_link "$LINENO"; then :
13038 have_personality=true
13039 else
13040 have_personality=false
13042 rm -f core conftest.err conftest.$ac_objext \
13043 conftest$ac_exeext conftest.$ac_ext
13044 else
13045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13046 /* end confdefs.h. */
13047 #include <sys/personality.h>
13049 main ()
13052 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
13053 # define ADDR_NO_RANDOMIZE 0x0040000
13054 # endif
13055 /* Test the flag could be set and stays set. */
13056 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13057 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13058 return 1
13060 return 0;
13062 _ACEOF
13063 if ac_fn_c_try_run "$LINENO"; then :
13064 have_personality=true
13065 else
13066 have_personality=false
13068 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13069 conftest.$ac_objext conftest.beam conftest.$ac_ext
13072 if $have_personality
13073 then
13075 $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
13079 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13080 if test "x$ac_cv_have_decl_strstr" = xyes; then :
13081 ac_have_decl=1
13082 else
13083 ac_have_decl=0
13086 cat >>confdefs.h <<_ACEOF
13087 #define HAVE_DECL_STRSTR $ac_have_decl
13088 _ACEOF
13091 # ----------------------- #
13092 # Checks for structures. #
13093 # ----------------------- #
13095 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
13096 if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
13098 cat >>confdefs.h <<_ACEOF
13099 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
13100 _ACEOF
13104 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
13105 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
13107 cat >>confdefs.h <<_ACEOF
13108 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13109 _ACEOF
13115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
13116 $as_echo_n "checking for library containing kinfo_getfile... " >&6; }
13117 if ${ac_cv_search_kinfo_getfile+:} false; then :
13118 $as_echo_n "(cached) " >&6
13119 else
13120 ac_func_search_save_LIBS=$LIBS
13121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13122 /* end confdefs.h. */
13124 /* Override any GCC internal prototype to avoid an error.
13125 Use char because int might match the return type of a GCC
13126 builtin and then its argument prototype would still apply. */
13127 #ifdef __cplusplus
13128 extern "C"
13129 #endif
13130 char kinfo_getfile ();
13132 main ()
13134 return kinfo_getfile ();
13136 return 0;
13138 _ACEOF
13139 for ac_lib in '' util util-freebsd; do
13140 if test -z "$ac_lib"; then
13141 ac_res="none required"
13142 else
13143 ac_res=-l$ac_lib
13144 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13146 if ac_fn_c_try_link "$LINENO"; then :
13147 ac_cv_search_kinfo_getfile=$ac_res
13149 rm -f core conftest.err conftest.$ac_objext \
13150 conftest$ac_exeext
13151 if ${ac_cv_search_kinfo_getfile+:} false; then :
13152 break
13154 done
13155 if ${ac_cv_search_kinfo_getfile+:} false; then :
13157 else
13158 ac_cv_search_kinfo_getfile=no
13160 rm conftest.$ac_ext
13161 LIBS=$ac_func_search_save_LIBS
13163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
13164 $as_echo "$ac_cv_search_kinfo_getfile" >&6; }
13165 ac_res=$ac_cv_search_kinfo_getfile
13166 if test "$ac_res" != no; then :
13167 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13169 $as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
13174 # Check for std::thread. This does not work on some platforms, like
13175 # mingw and DJGPP.
13176 ac_ext=cpp
13177 ac_cpp='$CXXCPP $CPPFLAGS'
13178 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13179 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13180 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13186 ac_ext=c
13187 ac_cpp='$CPP $CPPFLAGS'
13188 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13189 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13190 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13192 ax_pthread_ok=no
13194 # We used to check for pthread.h first, but this fails if pthread.h
13195 # requires special compiler flags (e.g. on Tru64 or Sequent).
13196 # It gets checked for in the link test anyway.
13198 # First of all, check if the user has set any of the PTHREAD_LIBS,
13199 # etcetera environment variables, and if threads linking works using
13200 # them:
13201 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
13202 ax_pthread_save_CC="$CC"
13203 ax_pthread_save_CFLAGS="$CFLAGS"
13204 ax_pthread_save_LIBS="$LIBS"
13205 if test "x$PTHREAD_CC" != "x"; then :
13206 CC="$PTHREAD_CC"
13208 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13209 LIBS="$PTHREAD_LIBS $LIBS"
13210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
13211 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
13212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13213 /* end confdefs.h. */
13215 /* Override any GCC internal prototype to avoid an error.
13216 Use char because int might match the return type of a GCC
13217 builtin and then its argument prototype would still apply. */
13218 #ifdef __cplusplus
13219 extern "C"
13220 #endif
13221 char pthread_join ();
13223 main ()
13225 return pthread_join ();
13227 return 0;
13229 _ACEOF
13230 if ac_fn_c_try_link "$LINENO"; then :
13231 ax_pthread_ok=yes
13233 rm -f core conftest.err conftest.$ac_objext \
13234 conftest$ac_exeext conftest.$ac_ext
13235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
13236 $as_echo "$ax_pthread_ok" >&6; }
13237 if test "x$ax_pthread_ok" = "xno"; then
13238 PTHREAD_LIBS=""
13239 PTHREAD_CFLAGS=""
13241 CC="$ax_pthread_save_CC"
13242 CFLAGS="$ax_pthread_save_CFLAGS"
13243 LIBS="$ax_pthread_save_LIBS"
13246 # We must check for the threads library under a number of different
13247 # names; the ordering is very important because some systems
13248 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
13249 # libraries is broken (non-POSIX).
13251 # Create a list of thread flags to try. Items starting with a "-" are
13252 # C compiler flags, and other items are library names, except for "none"
13253 # which indicates that we try without any flags at all, and "pthread-config"
13254 # which is a program returning the flags for the Pth emulation library.
13256 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
13258 # The ordering *is* (sometimes) important. Some notes on the
13259 # individual items follow:
13261 # pthreads: AIX (must check this before -lpthread)
13262 # none: in case threads are in libc; should be tried before -Kthread and
13263 # other compiler flags to prevent continual compiler warnings
13264 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
13265 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
13266 # (Note: HP C rejects this with "bad form for `-t' option")
13267 # -pthreads: Solaris/gcc (Note: HP C also rejects)
13268 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
13269 # doesn't hurt to check since this sometimes defines pthreads and
13270 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
13271 # is present but should not be used directly; and before -mthreads,
13272 # because the compiler interprets this as "-mt" + "-hreads")
13273 # -mthreads: Mingw32/gcc, Lynx/gcc
13274 # pthread: Linux, etcetera
13275 # --thread-safe: KAI C++
13276 # pthread-config: use pthread-config program (for GNU Pth library)
13278 case $host_os in
13280 freebsd*)
13282 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
13283 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
13285 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
13288 hpux*)
13290 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
13291 # multi-threading and also sets -lpthread."
13293 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
13296 openedition*)
13298 # IBM z/OS requires a feature-test macro to be defined in order to
13299 # enable POSIX threads at all, so give the user a hint if this is
13300 # not set. (We don't define these ourselves, as they can affect
13301 # other portions of the system API in unpredictable ways.)
13303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13304 /* end confdefs.h. */
13306 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
13307 AX_PTHREAD_ZOS_MISSING
13308 # endif
13310 _ACEOF
13311 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13312 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
13313 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
13314 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
13316 rm -f conftest*
13320 solaris*)
13322 # On Solaris (at least, for some versions), libc contains stubbed
13323 # (non-functional) versions of the pthreads routines, so link-based
13324 # tests will erroneously succeed. (N.B.: The stubs are missing
13325 # pthread_cleanup_push, or rather a function called by this macro,
13326 # so we could check for that, but who knows whether they'll stub
13327 # that too in a future libc.) So we'll check first for the
13328 # standard Solaris way of linking pthreads (-mt -lpthread).
13330 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
13332 esac
13334 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
13336 if test "x$GCC" = "xyes"; then :
13337 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
13340 # The presence of a feature test macro requesting re-entrant function
13341 # definitions is, on some systems, a strong hint that pthreads support is
13342 # correctly enabled
13344 case $host_os in
13345 darwin* | hpux* | linux* | osf* | solaris*)
13346 ax_pthread_check_macro="_REENTRANT"
13349 aix*)
13350 ax_pthread_check_macro="_THREAD_SAFE"
13354 ax_pthread_check_macro="--"
13356 esac
13357 if test "x$ax_pthread_check_macro" = "x--"; then :
13358 ax_pthread_check_cond=0
13359 else
13360 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
13363 # Are we compiling with Clang?
13365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
13366 $as_echo_n "checking whether $CC is Clang... " >&6; }
13367 if ${ax_cv_PTHREAD_CLANG+:} false; then :
13368 $as_echo_n "(cached) " >&6
13369 else
13370 ax_cv_PTHREAD_CLANG=no
13371 # Note that Autoconf sets GCC=yes for Clang as well as GCC
13372 if test "x$GCC" = "xyes"; then
13373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13374 /* end confdefs.h. */
13375 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
13376 # if defined(__clang__) && defined(__llvm__)
13377 AX_PTHREAD_CC_IS_CLANG
13378 # endif
13380 _ACEOF
13381 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13382 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
13383 ax_cv_PTHREAD_CLANG=yes
13385 rm -f conftest*
13390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
13391 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
13392 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
13394 ax_pthread_clang_warning=no
13396 # Clang needs special handling, because older versions handle the -pthread
13397 # option in a rather... idiosyncratic way
13399 if test "x$ax_pthread_clang" = "xyes"; then
13401 # Clang takes -pthread; it has never supported any other flag
13403 # (Note 1: This will need to be revisited if a system that Clang
13404 # supports has POSIX threads in a separate library. This tends not
13405 # to be the way of modern systems, but it's conceivable.)
13407 # (Note 2: On some systems, notably Darwin, -pthread is not needed
13408 # to get POSIX threads support; the API is always present and
13409 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
13410 # -pthread does define _REENTRANT, and while the Darwin headers
13411 # ignore this macro, third-party headers might not.)
13413 PTHREAD_CFLAGS="-pthread"
13414 PTHREAD_LIBS=
13416 ax_pthread_ok=yes
13418 # However, older versions of Clang make a point of warning the user
13419 # that, in an invocation where only linking and no compilation is
13420 # taking place, the -pthread option has no effect ("argument unused
13421 # during compilation"). They expect -pthread to be passed in only
13422 # when source code is being compiled.
13424 # Problem is, this is at odds with the way Automake and most other
13425 # C build frameworks function, which is that the same flags used in
13426 # compilation (CFLAGS) are also used in linking. Many systems
13427 # supported by AX_PTHREAD require exactly this for POSIX threads
13428 # support, and in fact it is often not straightforward to specify a
13429 # flag that is used only in the compilation phase and not in
13430 # linking. Such a scenario is extremely rare in practice.
13432 # Even though use of the -pthread flag in linking would only print
13433 # a warning, this can be a nuisance for well-run software projects
13434 # that build with -Werror. So if the active version of Clang has
13435 # this misfeature, we search for an option to squash it.
13437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
13438 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
13439 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
13440 $as_echo_n "(cached) " >&6
13441 else
13442 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
13443 # Create an alternate version of $ac_link that compiles and
13444 # links in two steps (.c -> .o, .o -> exe) instead of one
13445 # (.c -> exe), because the warning occurs only in the second
13446 # step
13447 ax_pthread_save_ac_link="$ac_link"
13448 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
13449 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
13450 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
13451 ax_pthread_save_CFLAGS="$CFLAGS"
13452 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
13453 if test "x$ax_pthread_try" = "xunknown"; then :
13454 break
13456 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
13457 ac_link="$ax_pthread_save_ac_link"
13458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13459 /* end confdefs.h. */
13460 int main(void){return 0;}
13461 _ACEOF
13462 if ac_fn_c_try_link "$LINENO"; then :
13463 ac_link="$ax_pthread_2step_ac_link"
13464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13465 /* end confdefs.h. */
13466 int main(void){return 0;}
13467 _ACEOF
13468 if ac_fn_c_try_link "$LINENO"; then :
13469 break
13471 rm -f core conftest.err conftest.$ac_objext \
13472 conftest$ac_exeext conftest.$ac_ext
13475 rm -f core conftest.err conftest.$ac_objext \
13476 conftest$ac_exeext conftest.$ac_ext
13477 done
13478 ac_link="$ax_pthread_save_ac_link"
13479 CFLAGS="$ax_pthread_save_CFLAGS"
13480 if test "x$ax_pthread_try" = "x"; then :
13481 ax_pthread_try=no
13483 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
13486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
13487 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
13489 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
13490 no | unknown) ;;
13491 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
13492 esac
13494 fi # $ax_pthread_clang = yes
13496 if test "x$ax_pthread_ok" = "xno"; then
13497 for ax_pthread_try_flag in $ax_pthread_flags; do
13499 case $ax_pthread_try_flag in
13500 none)
13501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
13502 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
13505 -mt,pthread)
13506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
13507 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
13508 PTHREAD_CFLAGS="-mt"
13509 PTHREAD_LIBS="-lpthread"
13513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
13514 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
13515 PTHREAD_CFLAGS="$ax_pthread_try_flag"
13518 pthread-config)
13519 # Extract the first word of "pthread-config", so it can be a program name with args.
13520 set dummy pthread-config; ac_word=$2
13521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13522 $as_echo_n "checking for $ac_word... " >&6; }
13523 if ${ac_cv_prog_ax_pthread_config+:} false; then :
13524 $as_echo_n "(cached) " >&6
13525 else
13526 if test -n "$ax_pthread_config"; then
13527 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
13528 else
13529 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13530 for as_dir in $PATH
13532 IFS=$as_save_IFS
13533 test -z "$as_dir" && as_dir=.
13534 for ac_exec_ext in '' $ac_executable_extensions; do
13535 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13536 ac_cv_prog_ax_pthread_config="yes"
13537 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13538 break 2
13540 done
13541 done
13542 IFS=$as_save_IFS
13544 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
13547 ax_pthread_config=$ac_cv_prog_ax_pthread_config
13548 if test -n "$ax_pthread_config"; then
13549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
13550 $as_echo "$ax_pthread_config" >&6; }
13551 else
13552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13553 $as_echo "no" >&6; }
13557 if test "x$ax_pthread_config" = "xno"; then :
13558 continue
13560 PTHREAD_CFLAGS="`pthread-config --cflags`"
13561 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
13565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
13566 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
13567 PTHREAD_LIBS="-l$ax_pthread_try_flag"
13569 esac
13571 ax_pthread_save_CFLAGS="$CFLAGS"
13572 ax_pthread_save_LIBS="$LIBS"
13573 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13574 LIBS="$PTHREAD_LIBS $LIBS"
13576 # Check for various functions. We must include pthread.h,
13577 # since some functions may be macros. (On the Sequent, we
13578 # need a special flag -Kthread to make this header compile.)
13579 # We check for pthread_join because it is in -lpthread on IRIX
13580 # while pthread_create is in libc. We check for pthread_attr_init
13581 # due to DEC craziness with -lpthreads. We check for
13582 # pthread_cleanup_push because it is one of the few pthread
13583 # functions on Solaris that doesn't have a non-functional libc stub.
13584 # We try pthread_create on general principles.
13586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13587 /* end confdefs.h. */
13588 #include <pthread.h>
13589 # if $ax_pthread_check_cond
13590 # error "$ax_pthread_check_macro must be defined"
13591 # endif
13592 static void routine(void *a) { a = 0; }
13593 static void *start_routine(void *a) { return a; }
13595 main ()
13597 pthread_t th; pthread_attr_t attr;
13598 pthread_create(&th, 0, start_routine, 0);
13599 pthread_join(th, 0);
13600 pthread_attr_init(&attr);
13601 pthread_cleanup_push(routine, 0);
13602 pthread_cleanup_pop(0) /* ; */
13604 return 0;
13606 _ACEOF
13607 if ac_fn_c_try_link "$LINENO"; then :
13608 ax_pthread_ok=yes
13610 rm -f core conftest.err conftest.$ac_objext \
13611 conftest$ac_exeext conftest.$ac_ext
13613 CFLAGS="$ax_pthread_save_CFLAGS"
13614 LIBS="$ax_pthread_save_LIBS"
13616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
13617 $as_echo "$ax_pthread_ok" >&6; }
13618 if test "x$ax_pthread_ok" = "xyes"; then :
13619 break
13622 PTHREAD_LIBS=""
13623 PTHREAD_CFLAGS=""
13624 done
13627 # Various other checks:
13628 if test "x$ax_pthread_ok" = "xyes"; then
13629 ax_pthread_save_CFLAGS="$CFLAGS"
13630 ax_pthread_save_LIBS="$LIBS"
13631 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13632 LIBS="$PTHREAD_LIBS $LIBS"
13634 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
13635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
13636 $as_echo_n "checking for joinable pthread attribute... " >&6; }
13637 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
13638 $as_echo_n "(cached) " >&6
13639 else
13640 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
13641 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
13642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13643 /* end confdefs.h. */
13644 #include <pthread.h>
13646 main ()
13648 int attr = $ax_pthread_attr; return attr /* ; */
13650 return 0;
13652 _ACEOF
13653 if ac_fn_c_try_link "$LINENO"; then :
13654 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
13656 rm -f core conftest.err conftest.$ac_objext \
13657 conftest$ac_exeext conftest.$ac_ext
13658 done
13661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
13662 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
13663 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
13664 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
13665 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
13667 cat >>confdefs.h <<_ACEOF
13668 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
13669 _ACEOF
13671 ax_pthread_joinable_attr_defined=yes
13675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
13676 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
13677 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
13678 $as_echo_n "(cached) " >&6
13679 else
13680 ax_cv_PTHREAD_SPECIAL_FLAGS=no
13681 case $host_os in
13682 solaris*)
13683 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
13685 esac
13688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
13689 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
13690 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
13691 test "x$ax_pthread_special_flags_added" != "xyes"; then :
13692 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
13693 ax_pthread_special_flags_added=yes
13696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
13697 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
13698 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
13699 $as_echo_n "(cached) " >&6
13700 else
13701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13702 /* end confdefs.h. */
13703 #include <pthread.h>
13705 main ()
13707 int i = PTHREAD_PRIO_INHERIT;
13709 return 0;
13711 _ACEOF
13712 if ac_fn_c_try_link "$LINENO"; then :
13713 ax_cv_PTHREAD_PRIO_INHERIT=yes
13714 else
13715 ax_cv_PTHREAD_PRIO_INHERIT=no
13717 rm -f core conftest.err conftest.$ac_objext \
13718 conftest$ac_exeext conftest.$ac_ext
13721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
13722 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
13723 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
13724 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
13726 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
13728 ax_pthread_prio_inherit_defined=yes
13732 CFLAGS="$ax_pthread_save_CFLAGS"
13733 LIBS="$ax_pthread_save_LIBS"
13735 # More AIX lossage: compile with *_r variant
13736 if test "x$GCC" != "xyes"; then
13737 case $host_os in
13738 aix*)
13739 case "x/$CC" in #(
13740 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
13741 #handle absolute path differently from PATH based program lookup
13742 case "x$CC" in #(
13743 x/*) :
13744 if as_fn_executable_p ${CC}_r; then :
13745 PTHREAD_CC="${CC}_r"
13746 fi ;; #(
13747 *) :
13748 for ac_prog in ${CC}_r
13750 # Extract the first word of "$ac_prog", so it can be a program name with args.
13751 set dummy $ac_prog; ac_word=$2
13752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13753 $as_echo_n "checking for $ac_word... " >&6; }
13754 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
13755 $as_echo_n "(cached) " >&6
13756 else
13757 if test -n "$PTHREAD_CC"; then
13758 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
13759 else
13760 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13761 for as_dir in $PATH
13763 IFS=$as_save_IFS
13764 test -z "$as_dir" && as_dir=.
13765 for ac_exec_ext in '' $ac_executable_extensions; do
13766 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13767 ac_cv_prog_PTHREAD_CC="$ac_prog"
13768 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13769 break 2
13771 done
13772 done
13773 IFS=$as_save_IFS
13777 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
13778 if test -n "$PTHREAD_CC"; then
13779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
13780 $as_echo "$PTHREAD_CC" >&6; }
13781 else
13782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13783 $as_echo "no" >&6; }
13787 test -n "$PTHREAD_CC" && break
13788 done
13789 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
13791 esac ;; #(
13792 *) :
13794 esac
13796 esac
13800 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
13806 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
13807 if test "x$ax_pthread_ok" = "xyes"; then
13808 threads=yes
13810 else
13811 ax_pthread_ok=no
13812 threads=no
13814 ac_ext=cpp
13815 ac_cpp='$CXXCPP $CPPFLAGS'
13816 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13817 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13818 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13821 if test "$threads" = "yes"; then
13822 save_LIBS="$LIBS"
13823 LIBS="$PTHREAD_LIBS $LIBS"
13824 save_CXXFLAGS="$CXXFLAGS"
13825 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
13826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
13827 $as_echo_n "checking for std::thread... " >&6; }
13828 if ${gdb_cv_cxx_std_thread+:} false; then :
13829 $as_echo_n "(cached) " >&6
13830 else
13831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13832 /* end confdefs.h. */
13833 #include <thread>
13834 void callback() { }
13836 main ()
13838 std::thread t(callback);
13840 return 0;
13842 _ACEOF
13843 if ac_fn_cxx_try_compile "$LINENO"; then :
13844 gdb_cv_cxx_std_thread=yes
13845 else
13846 gdb_cv_cxx_std_thread=no
13848 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
13851 $as_echo "$gdb_cv_cxx_std_thread" >&6; }
13853 # This check must be here, while LIBS includes any necessary
13854 # threading library.
13855 for ac_func in pthread_sigmask pthread_setname_np
13856 do :
13857 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13858 ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
13859 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13860 cat >>confdefs.h <<_ACEOF
13861 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13862 _ACEOF
13865 done
13868 LIBS="$save_LIBS"
13869 CXXFLAGS="$save_CXXFLAGS"
13871 if test "$gdb_cv_cxx_std_thread" = "yes"; then
13873 $as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
13876 ac_ext=c
13877 ac_cpp='$CPP $CPPFLAGS'
13878 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13879 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13880 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13884 $as_echo_n "checking for sigsetjmp... " >&6; }
13885 if ${gdb_cv_func_sigsetjmp+:} false; then :
13886 $as_echo_n "(cached) " >&6
13887 else
13888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13889 /* end confdefs.h. */
13891 #include <setjmp.h>
13894 main ()
13896 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
13898 return 0;
13900 _ACEOF
13901 if ac_fn_c_try_compile "$LINENO"; then :
13902 gdb_cv_func_sigsetjmp=yes
13903 else
13904 gdb_cv_func_sigsetjmp=no
13906 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13909 $as_echo "$gdb_cv_func_sigsetjmp" >&6; }
13910 if test "$gdb_cv_func_sigsetjmp" = "yes"; then
13912 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
13917 # Check whether --with-intel_pt was given.
13918 if test "${with_intel_pt+set}" = set; then :
13919 withval=$with_intel_pt;
13920 else
13921 with_intel_pt=auto
13924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
13925 $as_echo_n "checking whether to use intel pt... " >&6; }
13926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
13927 $as_echo "$with_intel_pt" >&6; }
13929 if test "${with_intel_pt}" = no; then
13930 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
13931 $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
13932 HAVE_LIBIPT=no
13933 else
13934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13935 /* end confdefs.h. */
13937 #include <linux/perf_event.h>
13938 #ifndef PERF_ATTR_SIZE_VER5
13939 # error
13940 #endif
13942 _ACEOF
13943 if ac_fn_c_try_cpp "$LINENO"; then :
13944 perf_event=yes
13945 else
13946 perf_event=no
13948 rm -f conftest.err conftest.i conftest.$ac_ext
13949 if test "$perf_event" != yes; then
13950 if test "$with_intel_pt" = yes; then
13951 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
13952 else
13953 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
13954 $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
13966 use_additional=yes
13968 acl_save_prefix="$prefix"
13969 prefix="$acl_final_prefix"
13970 acl_save_exec_prefix="$exec_prefix"
13971 exec_prefix="$acl_final_exec_prefix"
13973 eval additional_includedir=\"$includedir\"
13974 eval additional_libdir=\"$libdir\"
13976 exec_prefix="$acl_save_exec_prefix"
13977 prefix="$acl_save_prefix"
13980 # Check whether --with-libipt-prefix was given.
13981 if test "${with_libipt_prefix+set}" = set; then :
13982 withval=$with_libipt_prefix;
13983 if test "X$withval" = "Xno"; then
13984 use_additional=no
13985 else
13986 if test "X$withval" = "X"; then
13988 acl_save_prefix="$prefix"
13989 prefix="$acl_final_prefix"
13990 acl_save_exec_prefix="$exec_prefix"
13991 exec_prefix="$acl_final_exec_prefix"
13993 eval additional_includedir=\"$includedir\"
13994 eval additional_libdir=\"$libdir\"
13996 exec_prefix="$acl_save_exec_prefix"
13997 prefix="$acl_save_prefix"
13999 else
14000 additional_includedir="$withval/include"
14001 additional_libdir="$withval/lib"
14007 LIBIPT=
14008 LTLIBIPT=
14009 INCIPT=
14010 rpathdirs=
14011 ltrpathdirs=
14012 names_already_handled=
14013 names_next_round='ipt '
14014 while test -n "$names_next_round"; do
14015 names_this_round="$names_next_round"
14016 names_next_round=
14017 for name in $names_this_round; do
14018 already_handled=
14019 for n in $names_already_handled; do
14020 if test "$n" = "$name"; then
14021 already_handled=yes
14022 break
14024 done
14025 if test -z "$already_handled"; then
14026 names_already_handled="$names_already_handled $name"
14027 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14028 eval value=\"\$HAVE_LIB$uppername\"
14029 if test -n "$value"; then
14030 if test "$value" = yes; then
14031 eval value=\"\$LIB$uppername\"
14032 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
14033 eval value=\"\$LTLIB$uppername\"
14034 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
14035 else
14038 else
14039 found_dir=
14040 found_la=
14041 found_so=
14042 found_a=
14043 if test $use_additional = yes; then
14044 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
14045 found_dir="$additional_libdir"
14046 found_so="$additional_libdir/lib$name.$shlibext"
14047 if test -f "$additional_libdir/lib$name.la"; then
14048 found_la="$additional_libdir/lib$name.la"
14050 else
14051 if test -f "$additional_libdir/lib$name.$libext"; then
14052 found_dir="$additional_libdir"
14053 found_a="$additional_libdir/lib$name.$libext"
14054 if test -f "$additional_libdir/lib$name.la"; then
14055 found_la="$additional_libdir/lib$name.la"
14060 if test "X$found_dir" = "X"; then
14061 for x in $LDFLAGS $LTLIBIPT; do
14063 acl_save_prefix="$prefix"
14064 prefix="$acl_final_prefix"
14065 acl_save_exec_prefix="$exec_prefix"
14066 exec_prefix="$acl_final_exec_prefix"
14067 eval x=\"$x\"
14068 exec_prefix="$acl_save_exec_prefix"
14069 prefix="$acl_save_prefix"
14071 case "$x" in
14072 -L*)
14073 dir=`echo "X$x" | sed -e 's/^X-L//'`
14074 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
14075 found_dir="$dir"
14076 found_so="$dir/lib$name.$shlibext"
14077 if test -f "$dir/lib$name.la"; then
14078 found_la="$dir/lib$name.la"
14080 else
14081 if test -f "$dir/lib$name.$libext"; then
14082 found_dir="$dir"
14083 found_a="$dir/lib$name.$libext"
14084 if test -f "$dir/lib$name.la"; then
14085 found_la="$dir/lib$name.la"
14090 esac
14091 if test "X$found_dir" != "X"; then
14092 break
14094 done
14096 if test "X$found_dir" != "X"; then
14097 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
14098 if test "X$found_so" != "X"; then
14099 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14100 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14101 else
14102 haveit=
14103 for x in $ltrpathdirs; do
14104 if test "X$x" = "X$found_dir"; then
14105 haveit=yes
14106 break
14108 done
14109 if test -z "$haveit"; then
14110 ltrpathdirs="$ltrpathdirs $found_dir"
14112 if test "$hardcode_direct" = yes; then
14113 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14114 else
14115 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14116 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14117 haveit=
14118 for x in $rpathdirs; do
14119 if test "X$x" = "X$found_dir"; then
14120 haveit=yes
14121 break
14123 done
14124 if test -z "$haveit"; then
14125 rpathdirs="$rpathdirs $found_dir"
14127 else
14128 haveit=
14129 for x in $LDFLAGS $LIBIPT; do
14131 acl_save_prefix="$prefix"
14132 prefix="$acl_final_prefix"
14133 acl_save_exec_prefix="$exec_prefix"
14134 exec_prefix="$acl_final_exec_prefix"
14135 eval x=\"$x\"
14136 exec_prefix="$acl_save_exec_prefix"
14137 prefix="$acl_save_prefix"
14139 if test "X$x" = "X-L$found_dir"; then
14140 haveit=yes
14141 break
14143 done
14144 if test -z "$haveit"; then
14145 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
14147 if test "$hardcode_minus_L" != no; then
14148 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14149 else
14150 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14155 else
14156 if test "X$found_a" != "X"; then
14157 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
14158 else
14159 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
14162 additional_includedir=
14163 case "$found_dir" in
14164 */lib | */lib/)
14165 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14166 additional_includedir="$basedir/include"
14168 esac
14169 if test "X$additional_includedir" != "X"; then
14170 if test "X$additional_includedir" != "X/usr/include"; then
14171 haveit=
14172 if test "X$additional_includedir" = "X/usr/local/include"; then
14173 if test -n "$GCC"; then
14174 case $host_os in
14175 linux*) haveit=yes;;
14176 esac
14179 if test -z "$haveit"; then
14180 for x in $CPPFLAGS $INCIPT; do
14182 acl_save_prefix="$prefix"
14183 prefix="$acl_final_prefix"
14184 acl_save_exec_prefix="$exec_prefix"
14185 exec_prefix="$acl_final_exec_prefix"
14186 eval x=\"$x\"
14187 exec_prefix="$acl_save_exec_prefix"
14188 prefix="$acl_save_prefix"
14190 if test "X$x" = "X-I$additional_includedir"; then
14191 haveit=yes
14192 break
14194 done
14195 if test -z "$haveit"; then
14196 if test -d "$additional_includedir"; then
14197 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
14203 if test -n "$found_la"; then
14204 save_libdir="$libdir"
14205 case "$found_la" in
14206 */* | *\\*) . "$found_la" ;;
14207 *) . "./$found_la" ;;
14208 esac
14209 libdir="$save_libdir"
14210 for dep in $dependency_libs; do
14211 case "$dep" in
14212 -L*)
14213 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14214 if test "X$additional_libdir" != "X/usr/lib"; then
14215 haveit=
14216 if test "X$additional_libdir" = "X/usr/local/lib"; then
14217 if test -n "$GCC"; then
14218 case $host_os in
14219 linux*) haveit=yes;;
14220 esac
14223 if test -z "$haveit"; then
14224 haveit=
14225 for x in $LDFLAGS $LIBIPT; do
14227 acl_save_prefix="$prefix"
14228 prefix="$acl_final_prefix"
14229 acl_save_exec_prefix="$exec_prefix"
14230 exec_prefix="$acl_final_exec_prefix"
14231 eval x=\"$x\"
14232 exec_prefix="$acl_save_exec_prefix"
14233 prefix="$acl_save_prefix"
14235 if test "X$x" = "X-L$additional_libdir"; then
14236 haveit=yes
14237 break
14239 done
14240 if test -z "$haveit"; then
14241 if test -d "$additional_libdir"; then
14242 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
14245 haveit=
14246 for x in $LDFLAGS $LTLIBIPT; do
14248 acl_save_prefix="$prefix"
14249 prefix="$acl_final_prefix"
14250 acl_save_exec_prefix="$exec_prefix"
14251 exec_prefix="$acl_final_exec_prefix"
14252 eval x=\"$x\"
14253 exec_prefix="$acl_save_exec_prefix"
14254 prefix="$acl_save_prefix"
14256 if test "X$x" = "X-L$additional_libdir"; then
14257 haveit=yes
14258 break
14260 done
14261 if test -z "$haveit"; then
14262 if test -d "$additional_libdir"; then
14263 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
14269 -R*)
14270 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14271 if test "$enable_rpath" != no; then
14272 haveit=
14273 for x in $rpathdirs; do
14274 if test "X$x" = "X$dir"; then
14275 haveit=yes
14276 break
14278 done
14279 if test -z "$haveit"; then
14280 rpathdirs="$rpathdirs $dir"
14282 haveit=
14283 for x in $ltrpathdirs; do
14284 if test "X$x" = "X$dir"; then
14285 haveit=yes
14286 break
14288 done
14289 if test -z "$haveit"; then
14290 ltrpathdirs="$ltrpathdirs $dir"
14294 -l*)
14295 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14297 *.la)
14298 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14301 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
14302 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
14304 esac
14305 done
14307 else
14308 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14309 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
14313 done
14314 done
14315 if test "X$rpathdirs" != "X"; then
14316 if test -n "$hardcode_libdir_separator"; then
14317 alldirs=
14318 for found_dir in $rpathdirs; do
14319 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
14320 done
14321 acl_save_libdir="$libdir"
14322 libdir="$alldirs"
14323 eval flag=\"$hardcode_libdir_flag_spec\"
14324 libdir="$acl_save_libdir"
14325 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
14326 else
14327 for found_dir in $rpathdirs; do
14328 acl_save_libdir="$libdir"
14329 libdir="$found_dir"
14330 eval flag=\"$hardcode_libdir_flag_spec\"
14331 libdir="$acl_save_libdir"
14332 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
14333 done
14336 if test "X$ltrpathdirs" != "X"; then
14337 for found_dir in $ltrpathdirs; do
14338 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
14339 done
14343 ac_save_CPPFLAGS="$CPPFLAGS"
14345 for element in $INCIPT; do
14346 haveit=
14347 for x in $CPPFLAGS; do
14349 acl_save_prefix="$prefix"
14350 prefix="$acl_final_prefix"
14351 acl_save_exec_prefix="$exec_prefix"
14352 exec_prefix="$acl_final_exec_prefix"
14353 eval x=\"$x\"
14354 exec_prefix="$acl_save_exec_prefix"
14355 prefix="$acl_save_prefix"
14357 if test "X$x" = "X$element"; then
14358 haveit=yes
14359 break
14361 done
14362 if test -z "$haveit"; then
14363 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14365 done
14368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
14369 $as_echo_n "checking for libipt... " >&6; }
14370 if ${ac_cv_libipt+:} false; then :
14371 $as_echo_n "(cached) " >&6
14372 else
14374 ac_save_LIBS="$LIBS"
14375 LIBS="$LIBS $LIBIPT"
14376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14377 /* end confdefs.h. */
14378 #include "intel-pt.h"
14380 main ()
14382 pt_insn_alloc_decoder (0);
14384 return 0;
14386 _ACEOF
14387 if ac_fn_c_try_link "$LINENO"; then :
14388 ac_cv_libipt=yes
14389 else
14390 ac_cv_libipt=no
14392 rm -f core conftest.err conftest.$ac_objext \
14393 conftest$ac_exeext conftest.$ac_ext
14394 LIBS="$ac_save_LIBS"
14397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
14398 $as_echo "$ac_cv_libipt" >&6; }
14399 if test "$ac_cv_libipt" = yes; then
14400 HAVE_LIBIPT=yes
14402 $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
14404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
14405 $as_echo_n "checking how to link with libipt... " >&6; }
14406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
14407 $as_echo "$LIBIPT" >&6; }
14408 else
14409 HAVE_LIBIPT=no
14410 CPPFLAGS="$ac_save_CPPFLAGS"
14411 LIBIPT=
14412 LTLIBIPT=
14420 if test "$HAVE_LIBIPT" != yes; then
14421 if test "$with_intel_pt" = yes; then
14422 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
14423 else
14424 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
14425 $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
14427 else
14428 save_LIBS=$LIBS
14429 LIBS="$LIBS $LIBIPT"
14430 for ac_func in pt_insn_event
14431 do :
14432 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
14433 if test "x$ac_cv_func_pt_insn_event" = xyes; then :
14434 cat >>confdefs.h <<_ACEOF
14435 #define HAVE_PT_INSN_EVENT 1
14436 _ACEOF
14439 done
14441 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
14443 if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
14445 cat >>confdefs.h <<_ACEOF
14446 #define HAVE_STRUCT_PT_INSN_ENABLED 1
14447 _ACEOF
14451 ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
14453 if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
14455 cat >>confdefs.h <<_ACEOF
14456 #define HAVE_STRUCT_PT_INSN_RESYNCED 1
14457 _ACEOF
14462 LIBS=$save_LIBS
14466 if test "$ac_cv_header_sys_procfs_h" = yes; then
14467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
14468 $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
14469 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
14470 $as_echo_n "(cached) " >&6
14471 else
14472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14473 /* end confdefs.h. */
14475 #define _SYSCALL32
14476 /* Needed for new procfs interface on sparc-solaris. */
14477 #define _STRUCTURED_PROC 1
14478 #include <sys/procfs.h>
14480 main ()
14482 gregset_t avar
14484 return 0;
14486 _ACEOF
14487 if ac_fn_c_try_compile "$LINENO"; then :
14488 bfd_cv_have_sys_procfs_type_gregset_t=yes
14489 else
14490 bfd_cv_have_sys_procfs_type_gregset_t=no
14493 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14496 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
14498 $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
14501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14502 $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
14504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
14505 $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
14506 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
14507 $as_echo_n "(cached) " >&6
14508 else
14509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14510 /* end confdefs.h. */
14512 #define _SYSCALL32
14513 /* Needed for new procfs interface on sparc-solaris. */
14514 #define _STRUCTURED_PROC 1
14515 #include <sys/procfs.h>
14517 main ()
14519 fpregset_t avar
14521 return 0;
14523 _ACEOF
14524 if ac_fn_c_try_compile "$LINENO"; then :
14525 bfd_cv_have_sys_procfs_type_fpregset_t=yes
14526 else
14527 bfd_cv_have_sys_procfs_type_fpregset_t=no
14530 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14533 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
14535 $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
14538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14539 $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
14541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
14542 $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
14543 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
14544 $as_echo_n "(cached) " >&6
14545 else
14546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14547 /* end confdefs.h. */
14549 #define _SYSCALL32
14550 /* Needed for new procfs interface on sparc-solaris. */
14551 #define _STRUCTURED_PROC 1
14552 #include <sys/procfs.h>
14554 main ()
14556 prgregset_t avar
14558 return 0;
14560 _ACEOF
14561 if ac_fn_c_try_compile "$LINENO"; then :
14562 bfd_cv_have_sys_procfs_type_prgregset_t=yes
14563 else
14564 bfd_cv_have_sys_procfs_type_prgregset_t=no
14567 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14570 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
14572 $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
14575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14576 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
14578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
14579 $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
14580 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
14581 $as_echo_n "(cached) " >&6
14582 else
14583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14584 /* end confdefs.h. */
14586 #define _SYSCALL32
14587 /* Needed for new procfs interface on sparc-solaris. */
14588 #define _STRUCTURED_PROC 1
14589 #include <sys/procfs.h>
14591 main ()
14593 prfpregset_t avar
14595 return 0;
14597 _ACEOF
14598 if ac_fn_c_try_compile "$LINENO"; then :
14599 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
14600 else
14601 bfd_cv_have_sys_procfs_type_prfpregset_t=no
14604 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14607 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
14609 $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
14612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14613 $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
14615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14616 $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
14617 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
14618 $as_echo_n "(cached) " >&6
14619 else
14620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14621 /* end confdefs.h. */
14623 #define _SYSCALL32
14624 /* Needed for new procfs interface on sparc-solaris. */
14625 #define _STRUCTURED_PROC 1
14626 #include <sys/procfs.h>
14628 main ()
14630 prgregset32_t avar
14632 return 0;
14634 _ACEOF
14635 if ac_fn_c_try_compile "$LINENO"; then :
14636 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
14637 else
14638 bfd_cv_have_sys_procfs_type_prgregset32_t=no
14641 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14644 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
14646 $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
14649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14650 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
14652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14653 $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
14654 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
14655 $as_echo_n "(cached) " >&6
14656 else
14657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14658 /* end confdefs.h. */
14660 #define _SYSCALL32
14661 /* Needed for new procfs interface on sparc-solaris. */
14662 #define _STRUCTURED_PROC 1
14663 #include <sys/procfs.h>
14665 main ()
14667 lwpid_t avar
14669 return 0;
14671 _ACEOF
14672 if ac_fn_c_try_compile "$LINENO"; then :
14673 bfd_cv_have_sys_procfs_type_lwpid_t=yes
14674 else
14675 bfd_cv_have_sys_procfs_type_lwpid_t=no
14678 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14681 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
14683 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
14686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14687 $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
14689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14690 $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
14691 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
14692 $as_echo_n "(cached) " >&6
14693 else
14694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14695 /* end confdefs.h. */
14697 #define _SYSCALL32
14698 /* Needed for new procfs interface on sparc-solaris. */
14699 #define _STRUCTURED_PROC 1
14700 #include <sys/procfs.h>
14702 main ()
14704 psaddr_t avar
14706 return 0;
14708 _ACEOF
14709 if ac_fn_c_try_compile "$LINENO"; then :
14710 bfd_cv_have_sys_procfs_type_psaddr_t=yes
14711 else
14712 bfd_cv_have_sys_procfs_type_psaddr_t=no
14715 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14718 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
14720 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
14723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14724 $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
14726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
14727 $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
14728 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
14729 $as_echo_n "(cached) " >&6
14730 else
14731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14732 /* end confdefs.h. */
14734 #define _SYSCALL32
14735 /* Needed for new procfs interface on sparc-solaris. */
14736 #define _STRUCTURED_PROC 1
14737 #include <sys/procfs.h>
14739 main ()
14741 elf_fpregset_t avar
14743 return 0;
14745 _ACEOF
14746 if ac_fn_c_try_compile "$LINENO"; then :
14747 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
14748 else
14749 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
14752 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14755 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
14757 $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
14760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
14761 $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
14766 # Check the return and argument types of ptrace.
14769 for ac_header in sys/ptrace.h ptrace.h
14770 do :
14771 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14772 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14773 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14774 cat >>confdefs.h <<_ACEOF
14775 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14776 _ACEOF
14780 done
14783 gdb_ptrace_headers='
14784 #include <sys/types.h>
14785 #if HAVE_SYS_PTRACE_H
14786 # include <sys/ptrace.h>
14787 #endif
14788 #if HAVE_UNISTD_H
14789 # include <unistd.h>
14790 #endif
14792 # There is no point in checking if we don't have a prototype.
14793 ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
14795 if test "x$ac_cv_have_decl_ptrace" = xyes; then :
14796 ac_have_decl=1
14797 else
14798 ac_have_decl=0
14801 cat >>confdefs.h <<_ACEOF
14802 #define HAVE_DECL_PTRACE $ac_have_decl
14803 _ACEOF
14804 if test $ac_have_decl = 1; then :
14806 else
14808 : ${gdb_cv_func_ptrace_ret='int'}
14809 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
14813 # Check return type. Varargs (used on GNU/Linux) conflict with the
14814 # empty argument list, so check for that explicitly.
14815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
14816 $as_echo_n "checking return type of ptrace... " >&6; }
14817 if ${gdb_cv_func_ptrace_ret+:} false; then :
14818 $as_echo_n "(cached) " >&6
14819 else
14820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14821 /* end confdefs.h. */
14822 $gdb_ptrace_headers
14824 main ()
14826 extern long ptrace (enum __ptrace_request, ...);
14828 return 0;
14830 _ACEOF
14831 if ac_fn_c_try_compile "$LINENO"; then :
14832 gdb_cv_func_ptrace_ret='long'
14833 else
14834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14835 /* end confdefs.h. */
14836 $gdb_ptrace_headers
14838 main ()
14840 extern int ptrace ();
14842 return 0;
14844 _ACEOF
14845 if ac_fn_c_try_compile "$LINENO"; then :
14846 gdb_cv_func_ptrace_ret='int'
14847 else
14848 gdb_cv_func_ptrace_ret='long'
14850 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14852 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
14855 $as_echo "$gdb_cv_func_ptrace_ret" >&6; }
14857 cat >>confdefs.h <<_ACEOF
14858 #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
14859 _ACEOF
14861 # Check argument types.
14862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
14863 $as_echo_n "checking types of arguments for ptrace... " >&6; }
14864 if ${gdb_cv_func_ptrace_args+:} false; then :
14865 $as_echo_n "(cached) " >&6
14866 else
14868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14869 /* end confdefs.h. */
14870 $gdb_ptrace_headers
14872 main ()
14874 extern long ptrace (enum __ptrace_request, ...);
14876 return 0;
14878 _ACEOF
14879 if ac_fn_c_try_compile "$LINENO"; then :
14880 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
14881 else
14883 for gdb_arg1 in 'int' 'long'; do
14884 for gdb_arg2 in 'pid_t' 'int' 'long'; do
14885 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
14886 for gdb_arg4 in 'int' 'long' 'void *'; do
14887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14888 /* end confdefs.h. */
14889 $gdb_ptrace_headers
14891 main ()
14894 extern $gdb_cv_func_ptrace_ret
14895 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
14898 return 0;
14900 _ACEOF
14901 if ac_fn_c_try_compile "$LINENO"; then :
14902 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
14903 break 4;
14905 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14906 for gdb_arg5 in 'int *' 'int' 'long'; do
14907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14908 /* end confdefs.h. */
14909 $gdb_ptrace_headers
14911 main ()
14914 extern $gdb_cv_func_ptrace_ret
14915 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
14918 return 0;
14920 _ACEOF
14921 if ac_fn_c_try_compile "$LINENO"; then :
14923 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
14924 break 5;
14926 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14927 done
14928 done
14929 done
14930 done
14931 done
14932 # Provide a safe default value.
14933 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
14936 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
14939 $as_echo "$gdb_cv_func_ptrace_args" >&6; }
14940 ac_save_IFS=$IFS; IFS=','
14941 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
14942 IFS=$ac_save_IFS
14943 shift
14945 cat >>confdefs.h <<_ACEOF
14946 #define PTRACE_TYPE_ARG1 $1
14947 _ACEOF
14950 cat >>confdefs.h <<_ACEOF
14951 #define PTRACE_TYPE_ARG3 $3
14952 _ACEOF
14955 cat >>confdefs.h <<_ACEOF
14956 #define PTRACE_TYPE_ARG4 $4
14957 _ACEOF
14959 if test -n "$5"; then
14961 cat >>confdefs.h <<_ACEOF
14962 #define PTRACE_TYPE_ARG5 $5
14963 _ACEOF
14968 if test "$cross_compiling" = no; then
14969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
14970 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
14971 if ${ac_cv_func_setpgrp_void+:} false; then :
14972 $as_echo_n "(cached) " >&6
14973 else
14974 if test "$cross_compiling" = yes; then :
14975 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
14976 else
14977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14978 /* end confdefs.h. */
14979 $ac_includes_default
14981 main ()
14983 /* If this system has a BSD-style setpgrp which takes arguments,
14984 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
14985 exit successfully. */
14986 return setpgrp (1,1) != -1;
14988 return 0;
14990 _ACEOF
14991 if ac_fn_c_try_run "$LINENO"; then :
14992 ac_cv_func_setpgrp_void=no
14993 else
14994 ac_cv_func_setpgrp_void=yes
14996 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14997 conftest.$ac_objext conftest.beam conftest.$ac_ext
15001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15002 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
15003 if test $ac_cv_func_setpgrp_void = yes; then
15005 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
15009 else
15010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15011 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15012 if ${ac_cv_func_setpgrp_void+:} false; then :
15013 $as_echo_n "(cached) " >&6
15014 else
15015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15016 /* end confdefs.h. */
15018 #include <unistd.h>
15021 main ()
15024 if (setpgrp(1,1) == -1)
15025 exit (0);
15026 else
15027 exit (1);
15030 return 0;
15032 _ACEOF
15033 if ac_fn_c_try_compile "$LINENO"; then :
15034 ac_cv_func_setpgrp_void=no
15035 else
15036 ac_cv_func_setpgrp_void=yes
15038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15041 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
15042 if test "$ac_cv_func_setpgrp_void" = yes; then
15043 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
15048 # Assume we'll default to using the included libiberty regex.
15049 gdb_use_included_regex=yes
15051 # However, if the system regex is GNU regex, then default to *not*
15052 # using the included regex.
15053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
15054 $as_echo_n "checking for GNU regex... " >&6; }
15055 if ${gdb_cv_have_gnu_regex+:} false; then :
15056 $as_echo_n "(cached) " >&6
15057 else
15058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15059 /* end confdefs.h. */
15060 #include <gnu-versions.h>
15062 main ()
15064 #define REGEX_INTERFACE_VERSION 1
15065 #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
15066 # error "Version mismatch"
15067 #endif
15069 return 0;
15071 _ACEOF
15072 if ac_fn_c_try_compile "$LINENO"; then :
15073 gdb_cv_have_gnu_regex=yes
15074 else
15075 gdb_cv_have_gnu_regex=no
15077 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
15080 $as_echo "$gdb_cv_have_gnu_regex" >&6; }
15081 if test "$gdb_cv_have_gnu_regex" = yes; then
15082 gdb_use_included_regex=no
15086 # Check whether --with-included-regex was given.
15087 if test "${with_included_regex+set}" = set; then :
15088 withval=$with_included_regex; gdb_with_regex=$withval
15089 else
15090 gdb_with_regex=$gdb_use_included_regex
15093 if test "$gdb_with_regex" = yes; then
15095 $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
15099 # Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
15100 ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
15101 #include <sys/proc.h>
15104 if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
15106 cat >>confdefs.h <<_ACEOF
15107 #define HAVE_STRUCT_THREAD_TD_PCB 1
15108 _ACEOF
15114 # See if <sys/lwp.h> defines `struct lwp`.
15115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
15116 $as_echo_n "checking for struct lwp... " >&6; }
15117 if ${gdb_cv_struct_lwp+:} false; then :
15118 $as_echo_n "(cached) " >&6
15119 else
15120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15121 /* end confdefs.h. */
15122 #include <sys/param.h>
15123 #define _KMEMUSER
15124 #include <sys/lwp.h>
15126 main ()
15128 struct lwp l;
15130 return 0;
15132 _ACEOF
15133 if ac_fn_c_try_compile "$LINENO"; then :
15134 gdb_cv_struct_lwp=yes
15135 else
15136 gdb_cv_struct_lwp=no
15138 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
15141 $as_echo "$gdb_cv_struct_lwp" >&6; }
15142 if test "$gdb_cv_struct_lwp" = yes; then
15144 $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
15148 # See if <machine/reg.h> degines `struct reg'.
15149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
15150 $as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
15151 if ${gdb_cv_struct_reg+:} false; then :
15152 $as_echo_n "(cached) " >&6
15153 else
15154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15155 /* end confdefs.h. */
15156 #include <sys/types.h>
15157 #include <machine/reg.h>
15159 main ()
15161 struct reg r;
15163 return 0;
15165 _ACEOF
15166 if ac_fn_c_try_compile "$LINENO"; then :
15167 gdb_cv_struct_reg=yes
15168 else
15169 gdb_cv_struct_reg=no
15171 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
15174 $as_echo "$gdb_cv_struct_reg" >&6; }
15175 if test "$gdb_cv_struct_reg" = yes; then
15177 $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
15181 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
15182 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
15183 ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
15184 #include <machine/reg.h>
15186 if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
15188 cat >>confdefs.h <<_ACEOF
15189 #define HAVE_STRUCT_REG_R_FS 1
15190 _ACEOF
15194 ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
15195 #include <machine/reg.h>
15197 if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
15199 cat >>confdefs.h <<_ACEOF
15200 #define HAVE_STRUCT_REG_R_GS 1
15201 _ACEOF
15207 # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
15208 # Older amd64 Linux's don't have the fs_base and gs_base members of
15209 # `struct user_regs_struct'.
15210 ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/types.h>
15211 #include <sys/user.h>
15213 if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then :
15215 cat >>confdefs.h <<_ACEOF
15216 #define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
15217 _ACEOF
15221 ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/types.h>
15222 #include <sys/user.h>
15224 if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then :
15226 cat >>confdefs.h <<_ACEOF
15227 #define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
15228 _ACEOF
15234 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
15235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
15236 $as_echo_n "checking for PTRACE_GETREGS... " >&6; }
15237 if ${gdb_cv_have_ptrace_getregs+:} false; then :
15238 $as_echo_n "(cached) " >&6
15239 else
15240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15241 /* end confdefs.h. */
15242 #include <sys/ptrace.h>
15244 main ()
15246 PTRACE_GETREGS;
15248 return 0;
15250 _ACEOF
15251 if ac_fn_c_try_compile "$LINENO"; then :
15252 gdb_cv_have_ptrace_getregs=yes
15253 else
15254 gdb_cv_have_ptrace_getregs=no
15256 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
15260 $as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
15261 if test "$gdb_cv_have_ptrace_getregs" = yes; then
15263 $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
15267 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
15268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
15269 $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
15270 if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
15271 $as_echo_n "(cached) " >&6
15272 else
15273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15274 /* end confdefs.h. */
15275 #include <sys/ptrace.h>
15277 main ()
15279 PTRACE_GETFPXREGS;
15281 return 0;
15283 _ACEOF
15284 if ac_fn_c_try_compile "$LINENO"; then :
15285 gdb_cv_have_ptrace_getfpxregs=yes
15286 else
15287 gdb_cv_have_ptrace_getfpxregs=no
15289 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
15293 $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
15294 if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then
15296 $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
15300 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
15301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
15302 $as_echo_n "checking for PT_GETDBREGS... " >&6; }
15303 if ${gdb_cv_have_pt_getdbregs+:} false; then :
15304 $as_echo_n "(cached) " >&6
15305 else
15306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15307 /* end confdefs.h. */
15308 #include <sys/types.h>
15309 #include <sys/ptrace.h>
15311 main ()
15313 PT_GETDBREGS;
15315 return 0;
15317 _ACEOF
15318 if ac_fn_c_try_compile "$LINENO"; then :
15319 gdb_cv_have_pt_getdbregs=yes
15320 else
15321 gdb_cv_have_pt_getdbregs=no
15323 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
15327 $as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
15328 if test "$gdb_cv_have_pt_getdbregs" = yes; then
15330 $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
15334 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
15335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
15336 $as_echo_n "checking for PT_GETXMMREGS... " >&6; }
15337 if ${gdb_cv_have_pt_getxmmregs+:} false; then :
15338 $as_echo_n "(cached) " >&6
15339 else
15340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15341 /* end confdefs.h. */
15342 #include <sys/types.h>
15343 #include <sys/ptrace.h>
15345 main ()
15347 PT_GETXMMREGS;
15349 return 0;
15351 _ACEOF
15352 if ac_fn_c_try_compile "$LINENO"; then :
15353 gdb_cv_have_pt_getxmmregs=yes
15354 else
15355 gdb_cv_have_pt_getxmmregs=no
15357 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
15361 $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
15362 if test "$gdb_cv_have_pt_getxmmregs" = yes; then
15364 $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
15368 # See if <sys/ptrace.h> supports LWP names on FreeBSD
15369 # Older FreeBSD versions don't have the pl_tdname member of
15370 # `struct ptrace_lwpinfo'.
15371 ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
15373 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
15375 cat >>confdefs.h <<_ACEOF
15376 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
15377 _ACEOF
15383 # See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
15384 # pl_syscall_code member of `struct ptrace_lwpinfo' was added in
15385 # FreeBSD 10.3.
15386 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>
15388 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
15390 cat >>confdefs.h <<_ACEOF
15391 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
15392 _ACEOF
15398 # Check if the compiler supports the `long long' type.
15400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
15401 $as_echo_n "checking for long long support in compiler... " >&6; }
15402 if ${gdb_cv_c_long_long+:} false; then :
15403 $as_echo_n "(cached) " >&6
15404 else
15405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15406 /* end confdefs.h. */
15407 extern long long foo;
15409 main ()
15411 switch (foo & 2) { case 0: return 1; }
15413 return 0;
15415 _ACEOF
15416 if ac_fn_c_try_compile "$LINENO"; then :
15417 gdb_cv_c_long_long=yes
15418 else
15419 gdb_cv_c_long_long=no
15421 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
15424 $as_echo "$gdb_cv_c_long_long" >&6; }
15425 if test "$gdb_cv_c_long_long" != yes; then
15426 # libdecnumber requires long long.
15427 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
15430 # Check if the compiler and runtime support printing long longs.
15432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
15433 $as_echo_n "checking for long long support in printf... " >&6; }
15434 if ${gdb_cv_printf_has_long_long+:} false; then :
15435 $as_echo_n "(cached) " >&6
15436 else
15437 if test "$cross_compiling" = yes; then :
15438 gdb_cv_printf_has_long_long=no
15439 else
15440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15441 /* end confdefs.h. */
15442 $ac_includes_default
15444 main ()
15446 char buf[32];
15447 long long l = 0;
15448 l = (l << 16) + 0x0123;
15449 l = (l << 16) + 0x4567;
15450 l = (l << 16) + 0x89ab;
15451 l = (l << 16) + 0xcdef;
15452 sprintf (buf, "0x%016llx", l);
15453 return (strcmp ("0x0123456789abcdef", buf));
15455 return 0;
15457 _ACEOF
15458 if ac_fn_c_try_run "$LINENO"; then :
15459 gdb_cv_printf_has_long_long=yes
15460 else
15461 gdb_cv_printf_has_long_long=no
15463 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15464 conftest.$ac_objext conftest.beam conftest.$ac_ext
15468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
15469 $as_echo "$gdb_cv_printf_has_long_long" >&6; }
15470 if test "$gdb_cv_printf_has_long_long" = yes; then
15472 $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
15476 # Check if the compiler and runtime support printing decfloats.
15478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
15479 $as_echo_n "checking for decfloat support in printf... " >&6; }
15480 if ${gdb_cv_printf_has_decfloat+:} false; then :
15481 $as_echo_n "(cached) " >&6
15482 else
15483 if test "$cross_compiling" = yes; then :
15484 gdb_cv_printf_has_decfloat=no
15485 else
15486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15487 /* end confdefs.h. */
15488 $ac_includes_default
15490 main ()
15492 char buf[64];
15493 _Decimal32 d32 = 1.2345df;
15494 _Decimal64 d64 = 1.2345dd;
15495 _Decimal128 d128 = 1.2345dl;
15496 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
15497 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
15499 return 0;
15501 _ACEOF
15502 if ac_fn_c_try_run "$LINENO"; then :
15503 gdb_cv_printf_has_decfloat=yes
15504 else
15505 gdb_cv_printf_has_decfloat=no
15507 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15508 conftest.$ac_objext conftest.beam conftest.$ac_ext
15512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
15513 $as_echo "$gdb_cv_printf_has_decfloat" >&6; }
15514 if test "$gdb_cv_printf_has_decfloat" = yes; then
15516 $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
15520 # Check if the compiler supports the `long double' type. We can't use
15521 # AC_C_LONG_DOUBLE because that one does additional checks on the
15522 # constants defined in <float.h> that fail on some systems,
15523 # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
15525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
15526 $as_echo_n "checking for long double support in compiler... " >&6; }
15527 if ${gdb_cv_c_long_double+:} false; then :
15528 $as_echo_n "(cached) " >&6
15529 else
15530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15531 /* end confdefs.h. */
15532 long double foo;
15533 _ACEOF
15534 if ac_fn_c_try_compile "$LINENO"; then :
15535 gdb_cv_c_long_double=yes
15536 else
15537 gdb_cv_c_long_double=no
15539 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
15542 $as_echo "$gdb_cv_c_long_double" >&6; }
15543 if test "$gdb_cv_c_long_double" = yes; then
15545 $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
15549 # Check if the compiler and runtime support printing long doubles.
15551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
15552 $as_echo_n "checking for long double support in printf... " >&6; }
15553 if ${gdb_cv_printf_has_long_double+:} false; then :
15554 $as_echo_n "(cached) " >&6
15555 else
15556 if test "$cross_compiling" = yes; then :
15557 gdb_cv_printf_has_long_double=no
15558 else
15559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15560 /* end confdefs.h. */
15561 $ac_includes_default
15563 main ()
15565 char buf[16];
15566 long double f = 3.141592653;
15567 sprintf (buf, "%Lg", f);
15568 return (strncmp ("3.14159", buf, 7));
15570 return 0;
15572 _ACEOF
15573 if ac_fn_c_try_run "$LINENO"; then :
15574 gdb_cv_printf_has_long_double=yes
15575 else
15576 gdb_cv_printf_has_long_double=no
15578 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15579 conftest.$ac_objext conftest.beam conftest.$ac_ext
15583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
15584 $as_echo "$gdb_cv_printf_has_long_double" >&6; }
15585 if test "$gdb_cv_printf_has_long_double" = yes; then
15587 $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
15591 # Check if the compiler and runtime support scanning long doubles.
15593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
15594 $as_echo_n "checking for long double support in scanf... " >&6; }
15595 if ${gdb_cv_scanf_has_long_double+:} false; then :
15596 $as_echo_n "(cached) " >&6
15597 else
15598 if test "$cross_compiling" = yes; then :
15599 gdb_cv_scanf_has_long_double=no
15600 else
15601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15602 /* end confdefs.h. */
15603 #include <stdio.h>
15605 main ()
15607 char *buf = "3.141592653";
15608 long double f = 0;
15609 sscanf (buf, "%Lg", &f);
15610 return !(f > 3.14159 && f < 3.14160);
15612 return 0;
15614 _ACEOF
15615 if ac_fn_c_try_run "$LINENO"; then :
15616 gdb_cv_scanf_has_long_double=yes
15617 else
15618 gdb_cv_scanf_has_long_double=no
15620 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15621 conftest.$ac_objext conftest.beam conftest.$ac_ext
15625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
15626 $as_echo "$gdb_cv_scanf_has_long_double" >&6; }
15627 if test "$gdb_cv_scanf_has_long_double" = yes; then
15629 $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
15633 case ${host_os} in
15634 aix*)
15635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
15636 $as_echo_n "checking for -bbigtoc option... " >&6; }
15637 if ${gdb_cv_bigtoc+:} false; then :
15638 $as_echo_n "(cached) " >&6
15639 else
15641 SAVE_LDFLAGS=$LDFLAGS
15643 case $GCC in
15644 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
15645 *) gdb_cv_bigtoc=-bbigtoc ;;
15646 esac
15648 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
15649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15650 /* end confdefs.h. */
15653 main ()
15655 int i;
15657 return 0;
15659 _ACEOF
15660 if ac_fn_c_try_link "$LINENO"; then :
15662 else
15663 gdb_cv_bigtoc=
15665 rm -f core conftest.err conftest.$ac_objext \
15666 conftest$ac_exeext conftest.$ac_ext
15667 LDFLAGS="${SAVE_LDFLAGS}"
15670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
15671 $as_echo "$gdb_cv_bigtoc" >&6; }
15672 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
15674 esac
15676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
15677 $as_echo_n "checking for the dynamic export flag... " >&6; }
15678 dynamic_list=false
15679 if test "${gdb_native}" = yes; then
15680 # The dynamically loaded libthread_db needs access to symbols in the gdb
15681 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
15682 # may not be supported there.
15683 old_LDFLAGS="$LDFLAGS"
15684 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
15685 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
15686 LDFLAGS="$LDFLAGS $RDYNAMIC"
15687 if test "${have_libpython}" = no; then
15688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15689 /* end confdefs.h. */
15692 main ()
15696 return 0;
15698 _ACEOF
15699 if ac_fn_c_try_link "$LINENO"; then :
15700 dynamic_list=true
15702 rm -f core conftest.err conftest.$ac_objext \
15703 conftest$ac_exeext conftest.$ac_ext
15704 else
15705 # Workaround http://bugs.python.org/issue4434 where static
15706 # libpythonX.Y.a would get its symbols required for
15707 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
15708 # Problem does not happen for the recommended libpythonX.Y.so linkage.
15710 # Note the workaround for Python
15711 # http://bugs.python.org/issue10112 earlier has removed
15712 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
15713 # here too, as otherwise it'd make this -Wl,--dynamic-list test
15714 # always pass.
15715 old_CFLAGS="$CFLAGS"
15716 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
15717 old_LIBS="$LIBS"
15718 LIBS="$LIBS $PYTHON_LIBS"
15719 old_CPPFLAGS="$CPPFLAGS"
15720 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
15721 if test "$cross_compiling" = yes; then :
15722 true
15723 else
15724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15725 /* end confdefs.h. */
15726 #include "Python.h"
15728 main ()
15730 int err;
15731 Py_Initialize ();
15732 err = PyRun_SimpleString ("import itertools\n");
15733 Py_Finalize ();
15734 return err == 0 ? 0 : 1;
15736 return 0;
15738 _ACEOF
15739 if ac_fn_c_try_run "$LINENO"; then :
15740 dynamic_list=true
15742 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15743 conftest.$ac_objext conftest.beam conftest.$ac_ext
15746 LIBS="$old_LIBS"
15747 CFLAGS="$old_CFLAGS"
15748 CPPFLAGS="$old_CPPFLAGS"
15750 LDFLAGS="$old_LDFLAGS"
15752 if $dynamic_list; then
15753 found="-Wl,--dynamic-list"
15754 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
15755 else
15756 found="-rdynamic"
15757 RDYNAMIC="-rdynamic"
15760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
15761 $as_echo "$found" >&6; }
15764 if test "${build}" = "${host}" -a "${host}" = "${target}" ; then
15765 case ${host_os} in
15766 aix*)
15767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
15768 $as_echo_n "checking for AiX thread debugging library... " >&6; }
15769 if ${gdb_cv_have_aix_thread_debug+:} false; then :
15770 $as_echo_n "(cached) " >&6
15771 else
15772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15773 /* end confdefs.h. */
15774 #include <sys/pthdebug.h>
15776 main ()
15778 #ifndef PTHDB_VERSION_3
15779 #error
15780 #endif
15782 return 0;
15784 _ACEOF
15785 if ac_fn_c_try_compile "$LINENO"; then :
15786 gdb_cv_have_aix_thread_debug=yes
15787 else
15788 gdb_cv_have_aix_thread_debug=no
15790 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
15794 $as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
15795 if test "$gdb_cv_have_aix_thread_debug" = yes; then
15796 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
15797 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
15798 LIBS="$LIBS -lpthdebug"
15800 # Older versions of AIX do not provide the declaration for
15801 # the getthrds function (it appears that it was introduced
15802 # with AIX 6.x).
15803 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
15805 if test "x$ac_cv_have_decl_getthrds" = xyes; then :
15806 ac_have_decl=1
15807 else
15808 ac_have_decl=0
15811 cat >>confdefs.h <<_ACEOF
15812 #define HAVE_DECL_GETTHRDS $ac_have_decl
15813 _ACEOF
15817 esac
15821 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
15822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
15823 $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
15824 if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
15825 $as_echo_n "(cached) " >&6
15826 else
15827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15828 /* end confdefs.h. */
15829 #include <thread_db.h>
15831 main ()
15833 int i = TD_NOTALLOC;
15835 return 0;
15837 _ACEOF
15838 if ac_fn_c_try_compile "$LINENO"; then :
15839 gdb_cv_thread_db_h_has_td_notalloc=yes
15840 else
15841 gdb_cv_thread_db_h_has_td_notalloc=no
15844 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
15848 $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
15849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
15850 $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
15851 if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
15852 $as_echo_n "(cached) " >&6
15853 else
15854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15855 /* end confdefs.h. */
15856 #include <thread_db.h>
15858 main ()
15860 int i = TD_VERSION;
15862 return 0;
15864 _ACEOF
15865 if ac_fn_c_try_compile "$LINENO"; then :
15866 gdb_cv_thread_db_h_has_td_version=yes
15867 else
15868 gdb_cv_thread_db_h_has_td_version=no
15871 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
15875 $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
15876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
15877 $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
15878 if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
15879 $as_echo_n "(cached) " >&6
15880 else
15881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15882 /* end confdefs.h. */
15883 #include <thread_db.h>
15885 main ()
15887 int i = TD_NOTLS;
15889 return 0;
15891 _ACEOF
15892 if ac_fn_c_try_compile "$LINENO"; then :
15893 gdb_cv_thread_db_h_has_td_notls=yes
15894 else
15895 gdb_cv_thread_db_h_has_td_notls=no
15898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
15902 $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
15904 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
15906 $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
15909 if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
15911 $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
15914 if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
15916 $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
15920 case $host_os in
15921 go32* | *djgpp*)
15922 gdbinit=gdb.ini
15925 gdbinit=.gdbinit
15927 esac
15929 cat >>confdefs.h <<_ACEOF
15930 #define GDBINIT "$gdbinit"
15931 _ACEOF
15935 # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
15936 # except that the argument to --with-sysroot is optional.
15937 # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
15938 if test "x$with_sysroot" = xyes; then
15939 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
15942 # Check whether --with-sysroot was given.
15943 if test "${with_sysroot+set}" = set; then :
15944 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
15945 else
15946 TARGET_SYSTEM_ROOT=
15950 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15951 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15952 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
15953 ac_define_dir=`eval echo $ac_define_dir`
15955 cat >>confdefs.h <<_ACEOF
15956 #define TARGET_SYSTEM_ROOT "$ac_define_dir"
15957 _ACEOF
15962 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15963 if test "x$prefix" = xNONE; then
15964 test_prefix=/usr/local
15965 else
15966 test_prefix=$prefix
15968 else
15969 test_prefix=$exec_prefix
15971 value=0
15972 case ${ac_define_dir} in
15973 "${test_prefix}"|"${test_prefix}/"*|\
15974 '${exec_prefix}'|'${exec_prefix}/'*)
15975 value=1
15977 esac
15979 cat >>confdefs.h <<_ACEOF
15980 #define TARGET_SYSTEM_ROOT_RELOCATABLE $value
15981 _ACEOF
15987 # Check whether --with-system-gdbinit was given.
15988 if test "${with_system_gdbinit+set}" = set; then :
15989 withval=$with_system_gdbinit;
15990 SYSTEM_GDBINIT=$withval
15991 else
15992 SYSTEM_GDBINIT=
15996 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15997 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15998 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
15999 ac_define_dir=`eval echo $ac_define_dir`
16001 cat >>confdefs.h <<_ACEOF
16002 #define SYSTEM_GDBINIT "$ac_define_dir"
16003 _ACEOF
16008 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16009 if test "x$prefix" = xNONE; then
16010 test_prefix=/usr/local
16011 else
16012 test_prefix=$prefix
16014 else
16015 test_prefix=$exec_prefix
16017 value=0
16018 case ${ac_define_dir} in
16019 "${test_prefix}"|"${test_prefix}/"*|\
16020 '${exec_prefix}'|'${exec_prefix}/'*)
16021 value=1
16023 esac
16025 cat >>confdefs.h <<_ACEOF
16026 #define SYSTEM_GDBINIT_RELOCATABLE $value
16027 _ACEOF
16033 # Check whether --with-system-gdbinit-dir was given.
16034 if test "${with_system_gdbinit_dir+set}" = set; then :
16035 withval=$with_system_gdbinit_dir;
16036 SYSTEM_GDBINIT_DIR=$withval
16037 else
16038 SYSTEM_GDBINIT_DIR=
16042 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16043 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16044 ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR`
16045 ac_define_dir=`eval echo $ac_define_dir`
16047 cat >>confdefs.h <<_ACEOF
16048 #define SYSTEM_GDBINIT_DIR "$ac_define_dir"
16049 _ACEOF
16054 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16055 if test "x$prefix" = xNONE; then
16056 test_prefix=/usr/local
16057 else
16058 test_prefix=$prefix
16060 else
16061 test_prefix=$exec_prefix
16063 value=0
16064 case ${ac_define_dir} in
16065 "${test_prefix}"|"${test_prefix}/"*|\
16066 '${exec_prefix}'|'${exec_prefix}/'*)
16067 value=1
16069 esac
16071 cat >>confdefs.h <<_ACEOF
16072 #define SYSTEM_GDBINIT_DIR_RELOCATABLE $value
16073 _ACEOF
16079 # Check whether --enable-werror was given.
16080 if test "${enable_werror+set}" = set; then :
16081 enableval=$enable_werror; case "${enableval}" in
16082 yes | y) ERROR_ON_WARNING="yes" ;;
16083 no | n) ERROR_ON_WARNING="no" ;;
16084 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
16085 esac
16089 # Enable -Werror by default when using gcc. Turn it off for releases.
16090 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
16091 ERROR_ON_WARNING=yes
16094 WERROR_CFLAGS=""
16095 if test "${ERROR_ON_WARNING}" = yes ; then
16096 WERROR_CFLAGS="-Werror"
16099 # The options we'll try to enable.
16100 build_warnings="-Wall -Wpointer-arith \
16101 -Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
16102 -Wno-switch -Wno-char-subscripts \
16103 -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
16104 -Wno-sign-compare -Wno-error=maybe-uninitialized \
16105 -Wno-mismatched-tags \
16106 -Wno-error=deprecated-register \
16107 -Wsuggest-override \
16108 -Wimplicit-fallthrough=3 \
16109 -Wduplicated-cond \
16110 -Wshadow=local \
16111 -Wdeprecated-copy \
16112 -Wdeprecated-copy-dtor \
16113 -Wredundant-move \
16114 -Wmissing-declarations \
16115 -Wstrict-null-sentinel \
16118 case "${host}" in
16119 *-*-mingw32*)
16120 # Enable -Wno-format by default when using gcc on mingw since many
16121 # GCC versions complain about %I64.
16122 build_warnings="$build_warnings -Wno-format" ;;
16123 *-*-solaris*)
16124 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
16125 # doesn't understand.
16126 build_warnings="$build_warnings -Wno-unknown-pragmas"
16127 # Solaris 11 <unistd.h> marks vfork deprecated.
16128 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
16130 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
16131 # but there's a special case for this below.
16132 build_warnings="$build_warnings -Wformat-nonliteral" ;;
16133 esac
16135 # Check whether --enable-build-warnings was given.
16136 if test "${enable_build_warnings+set}" = set; then :
16137 enableval=$enable_build_warnings; case "${enableval}" in
16138 yes) ;;
16139 no) build_warnings="-w";;
16140 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16141 build_warnings="${build_warnings} ${t}";;
16142 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16143 build_warnings="${t} ${build_warnings}";;
16144 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16145 esac
16146 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
16147 echo "Setting compiler warning flags = $build_warnings" 6>&1
16150 # Check whether --enable-gdb-build-warnings was given.
16151 if test "${enable_gdb_build_warnings+set}" = set; then :
16152 enableval=$enable_gdb_build_warnings; case "${enableval}" in
16153 yes) ;;
16154 no) build_warnings="-w";;
16155 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16156 build_warnings="${build_warnings} ${t}";;
16157 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16158 build_warnings="${t} ${build_warnings}";;
16159 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16160 esac
16161 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
16162 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
16166 # The set of warnings supported by a C++ compiler is not the same as
16167 # of the C compiler.
16168 ac_ext=cpp
16169 ac_cpp='$CXXCPP $CPPFLAGS'
16170 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16171 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16172 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16175 WARN_CFLAGS=""
16176 if test "x${build_warnings}" != x -a "x$GCC" = xyes
16177 then
16178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
16179 $as_echo_n "checking compiler warning flags... " >&6; }
16180 # Separate out the -Werror flag as some files just cannot be
16181 # compiled with it enabled.
16182 for w in ${build_warnings}; do
16183 # GCC does not complain about -Wno-unknown-warning. Invert
16184 # and test -Wunknown-warning instead.
16185 case $w in
16186 -Wno-*)
16187 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
16188 -Wformat-nonliteral)
16189 # gcc requires -Wformat before -Wformat-nonliteral
16190 # will work, so stick them together.
16191 w="-Wformat $w"
16192 wtest="$w"
16195 wtest=$w ;;
16196 esac
16198 case $w in
16199 -Werr*) WERROR_CFLAGS=-Werror ;;
16201 # Check whether GCC accepts it.
16202 saved_CFLAGS="$CFLAGS"
16203 CFLAGS="$CFLAGS -Werror $wtest"
16204 saved_CXXFLAGS="$CXXFLAGS"
16205 CXXFLAGS="$CXXFLAGS -Werror $wtest"
16206 if test "x$w" = "x-Wunused-variable"; then
16207 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
16208 # fixed in GCC 4.9. This test is derived from the gdb
16209 # source code that triggered this bug in GCC.
16210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16211 /* end confdefs.h. */
16212 struct scoped_restore_base {};
16213 struct scoped_restore_tmpl : public scoped_restore_base {
16214 ~scoped_restore_tmpl() {}
16217 main ()
16219 const scoped_restore_base &b = scoped_restore_tmpl();
16221 return 0;
16223 _ACEOF
16224 if ac_fn_cxx_try_compile "$LINENO"; then :
16225 WARN_CFLAGS="${WARN_CFLAGS} $w"
16227 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16228 else
16229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16230 /* end confdefs.h. */
16233 main ()
16237 return 0;
16239 _ACEOF
16240 if ac_fn_cxx_try_compile "$LINENO"; then :
16241 WARN_CFLAGS="${WARN_CFLAGS} $w"
16243 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16245 CFLAGS="$saved_CFLAGS"
16246 CXXFLAGS="$saved_CXXFLAGS"
16247 esac
16248 done
16249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
16250 $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
16255 ac_ext=c
16256 ac_cpp='$CPP $CPPFLAGS'
16257 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16258 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16259 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16263 # Check whether --enable-ubsan was given.
16264 if test "${enable_ubsan+set}" = set; then :
16265 enableval=$enable_ubsan;
16266 else
16267 enable_ubsan=no
16270 if test "x$enable_ubsan" = xauto; then
16271 if $development; then
16272 enable_ubsan=yes
16275 ac_ext=cpp
16276 ac_cpp='$CXXCPP $CPPFLAGS'
16277 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16278 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16279 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16281 if test "x$enable_ubsan" = xyes; then
16282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
16283 $as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
16284 saved_CXXFLAGS="$CXXFLAGS"
16285 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16287 /* end confdefs.h. */
16290 main ()
16294 return 0;
16296 _ACEOF
16297 if ac_fn_cxx_try_link "$LINENO"; then :
16298 enable_ubsan=yes
16299 else
16300 enable_ubsan=no
16302 rm -f core conftest.err conftest.$ac_objext \
16303 conftest$ac_exeext conftest.$ac_ext
16304 CXXFLAGS="$saved_CXXFLAGS"
16305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
16306 $as_echo "$enable_ubsan" >&6; }
16307 if test "x$enable_ubsan" = xyes; then
16308 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16309 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
16312 ac_ext=c
16313 ac_cpp='$CPP $CPPFLAGS'
16314 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16315 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16316 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16320 # In the Cygwin environment, we need some additional flags.
16321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
16322 $as_echo_n "checking for cygwin... " >&6; }
16323 if ${gdb_cv_os_cygwin+:} false; then :
16324 $as_echo_n "(cached) " >&6
16325 else
16326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16327 /* end confdefs.h. */
16329 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
16330 lose
16331 #endif
16332 _ACEOF
16333 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16334 $EGREP "^lose$" >/dev/null 2>&1; then :
16335 gdb_cv_os_cygwin=yes
16336 else
16337 gdb_cv_os_cygwin=no
16339 rm -f conftest*
16342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
16343 $as_echo "$gdb_cv_os_cygwin" >&6; }
16346 SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
16347 case ${host} in
16348 *go32* ) SER_HARDWIRE=ser-go32.o ;;
16349 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
16350 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
16351 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
16352 esac
16355 # libreadline needs libuser32.a in a cygwin environment
16356 WIN32LIBS=
16357 if test x"$gdb_cv_os_cygwin" = xyes; then
16358 WIN32LIBS="-luser32"
16359 case "${target}" in
16360 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
16362 esac
16365 # The ser-tcp.c module requires sockets.
16366 # Note that WIN32APILIBS is set by GDB_AC_COMMON.
16367 WIN32LIBS="$WIN32LIBS $WIN32APILIBS"
16369 # Add ELF support to GDB, but only if BFD includes ELF support.
16371 OLD_CFLAGS=$CFLAGS
16372 OLD_LDFLAGS=$LDFLAGS
16373 OLD_LIBS=$LIBS
16374 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16375 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16376 # always want our bfd.
16377 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
16378 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16379 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
16380 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
16381 LIBS="-lbfd -liberty -lz $intl $LIBS"
16382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
16383 $as_echo_n "checking for ELF support in BFD... " >&6; }
16384 if ${gdb_cv_var_elf+:} false; then :
16385 $as_echo_n "(cached) " >&6
16386 else
16387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16388 /* end confdefs.h. */
16389 #include <stdlib.h>
16390 #include "bfd.h"
16391 #include "elf-bfd.h"
16394 main ()
16396 return bfd_get_elf_phdr_upper_bound (NULL);
16398 return 0;
16400 _ACEOF
16401 if ac_fn_c_try_link "$LINENO"; then :
16402 gdb_cv_var_elf=yes
16403 else
16404 gdb_cv_var_elf=no
16406 rm -f core conftest.err conftest.$ac_objext \
16407 conftest$ac_exeext conftest.$ac_ext
16409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
16410 $as_echo "$gdb_cv_var_elf" >&6; }
16411 CFLAGS=$OLD_CFLAGS
16412 LDFLAGS=$OLD_LDFLAGS
16413 LIBS=$OLD_LIBS
16414 if test "$gdb_cv_var_elf" = yes; then
16415 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
16417 $as_echo "#define HAVE_ELF 1" >>confdefs.h
16419 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
16420 if test "$plugins" = "yes"; then
16421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
16422 $as_echo_n "checking for library containing dlopen... " >&6; }
16423 if ${ac_cv_search_dlopen+:} false; then :
16424 $as_echo_n "(cached) " >&6
16425 else
16426 ac_func_search_save_LIBS=$LIBS
16427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16428 /* end confdefs.h. */
16430 /* Override any GCC internal prototype to avoid an error.
16431 Use char because int might match the return type of a GCC
16432 builtin and then its argument prototype would still apply. */
16433 #ifdef __cplusplus
16434 extern "C"
16435 #endif
16436 char dlopen ();
16438 main ()
16440 return dlopen ();
16442 return 0;
16444 _ACEOF
16445 for ac_lib in '' dl; do
16446 if test -z "$ac_lib"; then
16447 ac_res="none required"
16448 else
16449 ac_res=-l$ac_lib
16450 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16452 if ac_fn_c_try_link "$LINENO"; then :
16453 ac_cv_search_dlopen=$ac_res
16455 rm -f core conftest.err conftest.$ac_objext \
16456 conftest$ac_exeext
16457 if ${ac_cv_search_dlopen+:} false; then :
16458 break
16460 done
16461 if ${ac_cv_search_dlopen+:} false; then :
16463 else
16464 ac_cv_search_dlopen=no
16466 rm conftest.$ac_ext
16467 LIBS=$ac_func_search_save_LIBS
16469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
16470 $as_echo "$ac_cv_search_dlopen" >&6; }
16471 ac_res=$ac_cv_search_dlopen
16472 if test "$ac_res" != no; then :
16473 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16480 # Add macho support to GDB, but only if BFD includes it.
16482 OLD_CFLAGS=$CFLAGS
16483 OLD_LDFLAGS=$LDFLAGS
16484 OLD_LIBS=$LIBS
16485 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16486 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16487 # always want our bfd.
16488 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
16489 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16490 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
16491 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
16492 LIBS="-lbfd -liberty -lz $intl $LIBS"
16493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
16494 $as_echo_n "checking for Mach-O support in BFD... " >&6; }
16495 if ${gdb_cv_var_macho+:} false; then :
16496 $as_echo_n "(cached) " >&6
16497 else
16498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16499 /* end confdefs.h. */
16500 #include <stdlib.h>
16501 #include "bfd.h"
16502 #include "mach-o.h"
16505 main ()
16507 return bfd_mach_o_lookup_command (NULL, 0, NULL);
16509 return 0;
16511 _ACEOF
16512 if ac_fn_c_try_link "$LINENO"; then :
16513 gdb_cv_var_macho=yes
16514 else
16515 gdb_cv_var_macho=no
16517 rm -f core conftest.err conftest.$ac_objext \
16518 conftest$ac_exeext conftest.$ac_ext
16520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
16521 $as_echo "$gdb_cv_var_macho" >&6; }
16522 CFLAGS=$OLD_CFLAGS
16523 LDFLAGS=$OLD_LDFLAGS
16524 LIBS=$OLD_LIBS
16525 if test "$gdb_cv_var_macho" = yes; then
16526 CONFIG_OBS="$CONFIG_OBS machoread.o"
16529 # Add any host-specific objects to GDB.
16530 CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
16532 # If building on ELF, look for lzma support for embedded compressed debug info.
16533 if test "$gdb_cv_var_elf" = yes; then
16535 # Check whether --with-lzma was given.
16536 if test "${with_lzma+set}" = set; then :
16537 withval=$with_lzma;
16538 else
16539 with_lzma=auto
16542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
16543 $as_echo_n "checking whether to use lzma... " >&6; }
16544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
16545 $as_echo "$with_lzma" >&6; }
16547 if test "${with_lzma}" != no; then
16556 use_additional=yes
16558 acl_save_prefix="$prefix"
16559 prefix="$acl_final_prefix"
16560 acl_save_exec_prefix="$exec_prefix"
16561 exec_prefix="$acl_final_exec_prefix"
16563 eval additional_includedir=\"$includedir\"
16564 eval additional_libdir=\"$libdir\"
16566 exec_prefix="$acl_save_exec_prefix"
16567 prefix="$acl_save_prefix"
16570 # Check whether --with-liblzma-prefix was given.
16571 if test "${with_liblzma_prefix+set}" = set; then :
16572 withval=$with_liblzma_prefix;
16573 if test "X$withval" = "Xno"; then
16574 use_additional=no
16575 else
16576 if test "X$withval" = "X"; then
16578 acl_save_prefix="$prefix"
16579 prefix="$acl_final_prefix"
16580 acl_save_exec_prefix="$exec_prefix"
16581 exec_prefix="$acl_final_exec_prefix"
16583 eval additional_includedir=\"$includedir\"
16584 eval additional_libdir=\"$libdir\"
16586 exec_prefix="$acl_save_exec_prefix"
16587 prefix="$acl_save_prefix"
16589 else
16590 additional_includedir="$withval/include"
16591 additional_libdir="$withval/lib"
16597 LIBLZMA=
16598 LTLIBLZMA=
16599 INCLZMA=
16600 rpathdirs=
16601 ltrpathdirs=
16602 names_already_handled=
16603 names_next_round='lzma '
16604 while test -n "$names_next_round"; do
16605 names_this_round="$names_next_round"
16606 names_next_round=
16607 for name in $names_this_round; do
16608 already_handled=
16609 for n in $names_already_handled; do
16610 if test "$n" = "$name"; then
16611 already_handled=yes
16612 break
16614 done
16615 if test -z "$already_handled"; then
16616 names_already_handled="$names_already_handled $name"
16617 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16618 eval value=\"\$HAVE_LIB$uppername\"
16619 if test -n "$value"; then
16620 if test "$value" = yes; then
16621 eval value=\"\$LIB$uppername\"
16622 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
16623 eval value=\"\$LTLIB$uppername\"
16624 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
16625 else
16628 else
16629 found_dir=
16630 found_la=
16631 found_so=
16632 found_a=
16633 if test $use_additional = yes; then
16634 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
16635 found_dir="$additional_libdir"
16636 found_so="$additional_libdir/lib$name.$shlibext"
16637 if test -f "$additional_libdir/lib$name.la"; then
16638 found_la="$additional_libdir/lib$name.la"
16640 else
16641 if test -f "$additional_libdir/lib$name.$libext"; then
16642 found_dir="$additional_libdir"
16643 found_a="$additional_libdir/lib$name.$libext"
16644 if test -f "$additional_libdir/lib$name.la"; then
16645 found_la="$additional_libdir/lib$name.la"
16650 if test "X$found_dir" = "X"; then
16651 for x in $LDFLAGS $LTLIBLZMA; do
16653 acl_save_prefix="$prefix"
16654 prefix="$acl_final_prefix"
16655 acl_save_exec_prefix="$exec_prefix"
16656 exec_prefix="$acl_final_exec_prefix"
16657 eval x=\"$x\"
16658 exec_prefix="$acl_save_exec_prefix"
16659 prefix="$acl_save_prefix"
16661 case "$x" in
16662 -L*)
16663 dir=`echo "X$x" | sed -e 's/^X-L//'`
16664 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
16665 found_dir="$dir"
16666 found_so="$dir/lib$name.$shlibext"
16667 if test -f "$dir/lib$name.la"; then
16668 found_la="$dir/lib$name.la"
16670 else
16671 if test -f "$dir/lib$name.$libext"; then
16672 found_dir="$dir"
16673 found_a="$dir/lib$name.$libext"
16674 if test -f "$dir/lib$name.la"; then
16675 found_la="$dir/lib$name.la"
16680 esac
16681 if test "X$found_dir" != "X"; then
16682 break
16684 done
16686 if test "X$found_dir" != "X"; then
16687 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
16688 if test "X$found_so" != "X"; then
16689 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
16690 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16691 else
16692 haveit=
16693 for x in $ltrpathdirs; do
16694 if test "X$x" = "X$found_dir"; then
16695 haveit=yes
16696 break
16698 done
16699 if test -z "$haveit"; then
16700 ltrpathdirs="$ltrpathdirs $found_dir"
16702 if test "$hardcode_direct" = yes; then
16703 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16704 else
16705 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
16706 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16707 haveit=
16708 for x in $rpathdirs; do
16709 if test "X$x" = "X$found_dir"; then
16710 haveit=yes
16711 break
16713 done
16714 if test -z "$haveit"; then
16715 rpathdirs="$rpathdirs $found_dir"
16717 else
16718 haveit=
16719 for x in $LDFLAGS $LIBLZMA; do
16721 acl_save_prefix="$prefix"
16722 prefix="$acl_final_prefix"
16723 acl_save_exec_prefix="$exec_prefix"
16724 exec_prefix="$acl_final_exec_prefix"
16725 eval x=\"$x\"
16726 exec_prefix="$acl_save_exec_prefix"
16727 prefix="$acl_save_prefix"
16729 if test "X$x" = "X-L$found_dir"; then
16730 haveit=yes
16731 break
16733 done
16734 if test -z "$haveit"; then
16735 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
16737 if test "$hardcode_minus_L" != no; then
16738 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16739 else
16740 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16745 else
16746 if test "X$found_a" != "X"; then
16747 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
16748 else
16749 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
16752 additional_includedir=
16753 case "$found_dir" in
16754 */lib | */lib/)
16755 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16756 additional_includedir="$basedir/include"
16758 esac
16759 if test "X$additional_includedir" != "X"; then
16760 if test "X$additional_includedir" != "X/usr/include"; then
16761 haveit=
16762 if test "X$additional_includedir" = "X/usr/local/include"; then
16763 if test -n "$GCC"; then
16764 case $host_os in
16765 linux*) haveit=yes;;
16766 esac
16769 if test -z "$haveit"; then
16770 for x in $CPPFLAGS $INCLZMA; do
16772 acl_save_prefix="$prefix"
16773 prefix="$acl_final_prefix"
16774 acl_save_exec_prefix="$exec_prefix"
16775 exec_prefix="$acl_final_exec_prefix"
16776 eval x=\"$x\"
16777 exec_prefix="$acl_save_exec_prefix"
16778 prefix="$acl_save_prefix"
16780 if test "X$x" = "X-I$additional_includedir"; then
16781 haveit=yes
16782 break
16784 done
16785 if test -z "$haveit"; then
16786 if test -d "$additional_includedir"; then
16787 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
16793 if test -n "$found_la"; then
16794 save_libdir="$libdir"
16795 case "$found_la" in
16796 */* | *\\*) . "$found_la" ;;
16797 *) . "./$found_la" ;;
16798 esac
16799 libdir="$save_libdir"
16800 for dep in $dependency_libs; do
16801 case "$dep" in
16802 -L*)
16803 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16804 if test "X$additional_libdir" != "X/usr/lib"; then
16805 haveit=
16806 if test "X$additional_libdir" = "X/usr/local/lib"; then
16807 if test -n "$GCC"; then
16808 case $host_os in
16809 linux*) haveit=yes;;
16810 esac
16813 if test -z "$haveit"; then
16814 haveit=
16815 for x in $LDFLAGS $LIBLZMA; do
16817 acl_save_prefix="$prefix"
16818 prefix="$acl_final_prefix"
16819 acl_save_exec_prefix="$exec_prefix"
16820 exec_prefix="$acl_final_exec_prefix"
16821 eval x=\"$x\"
16822 exec_prefix="$acl_save_exec_prefix"
16823 prefix="$acl_save_prefix"
16825 if test "X$x" = "X-L$additional_libdir"; then
16826 haveit=yes
16827 break
16829 done
16830 if test -z "$haveit"; then
16831 if test -d "$additional_libdir"; then
16832 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
16835 haveit=
16836 for x in $LDFLAGS $LTLIBLZMA; do
16838 acl_save_prefix="$prefix"
16839 prefix="$acl_final_prefix"
16840 acl_save_exec_prefix="$exec_prefix"
16841 exec_prefix="$acl_final_exec_prefix"
16842 eval x=\"$x\"
16843 exec_prefix="$acl_save_exec_prefix"
16844 prefix="$acl_save_prefix"
16846 if test "X$x" = "X-L$additional_libdir"; then
16847 haveit=yes
16848 break
16850 done
16851 if test -z "$haveit"; then
16852 if test -d "$additional_libdir"; then
16853 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
16859 -R*)
16860 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16861 if test "$enable_rpath" != no; then
16862 haveit=
16863 for x in $rpathdirs; do
16864 if test "X$x" = "X$dir"; then
16865 haveit=yes
16866 break
16868 done
16869 if test -z "$haveit"; then
16870 rpathdirs="$rpathdirs $dir"
16872 haveit=
16873 for x in $ltrpathdirs; do
16874 if test "X$x" = "X$dir"; then
16875 haveit=yes
16876 break
16878 done
16879 if test -z "$haveit"; then
16880 ltrpathdirs="$ltrpathdirs $dir"
16884 -l*)
16885 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16887 *.la)
16888 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16891 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
16892 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
16894 esac
16895 done
16897 else
16898 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16899 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
16903 done
16904 done
16905 if test "X$rpathdirs" != "X"; then
16906 if test -n "$hardcode_libdir_separator"; then
16907 alldirs=
16908 for found_dir in $rpathdirs; do
16909 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16910 done
16911 acl_save_libdir="$libdir"
16912 libdir="$alldirs"
16913 eval flag=\"$hardcode_libdir_flag_spec\"
16914 libdir="$acl_save_libdir"
16915 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16916 else
16917 for found_dir in $rpathdirs; do
16918 acl_save_libdir="$libdir"
16919 libdir="$found_dir"
16920 eval flag=\"$hardcode_libdir_flag_spec\"
16921 libdir="$acl_save_libdir"
16922 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16923 done
16926 if test "X$ltrpathdirs" != "X"; then
16927 for found_dir in $ltrpathdirs; do
16928 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
16929 done
16933 ac_save_CPPFLAGS="$CPPFLAGS"
16935 for element in $INCLZMA; do
16936 haveit=
16937 for x in $CPPFLAGS; do
16939 acl_save_prefix="$prefix"
16940 prefix="$acl_final_prefix"
16941 acl_save_exec_prefix="$exec_prefix"
16942 exec_prefix="$acl_final_exec_prefix"
16943 eval x=\"$x\"
16944 exec_prefix="$acl_save_exec_prefix"
16945 prefix="$acl_save_prefix"
16947 if test "X$x" = "X$element"; then
16948 haveit=yes
16949 break
16951 done
16952 if test -z "$haveit"; then
16953 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16955 done
16958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
16959 $as_echo_n "checking for liblzma... " >&6; }
16960 if ${ac_cv_liblzma+:} false; then :
16961 $as_echo_n "(cached) " >&6
16962 else
16964 ac_save_LIBS="$LIBS"
16965 LIBS="$LIBS $LIBLZMA"
16966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16967 /* end confdefs.h. */
16968 #include "lzma.h"
16970 main ()
16972 lzma_index_iter iter;
16973 lzma_index_iter_init (&iter, 0);
16974 lzma_mf_is_supported (LZMA_MF_HC3);
16976 return 0;
16978 _ACEOF
16979 if ac_fn_c_try_link "$LINENO"; then :
16980 ac_cv_liblzma=yes
16981 else
16982 ac_cv_liblzma=no
16984 rm -f core conftest.err conftest.$ac_objext \
16985 conftest$ac_exeext conftest.$ac_ext
16986 LIBS="$ac_save_LIBS"
16989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
16990 $as_echo "$ac_cv_liblzma" >&6; }
16991 if test "$ac_cv_liblzma" = yes; then
16992 HAVE_LIBLZMA=yes
16994 $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
16996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
16997 $as_echo_n "checking how to link with liblzma... " >&6; }
16998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
16999 $as_echo "$LIBLZMA" >&6; }
17000 else
17001 HAVE_LIBLZMA=no
17002 CPPFLAGS="$ac_save_CPPFLAGS"
17003 LIBLZMA=
17004 LTLIBLZMA=
17012 if test "$HAVE_LIBLZMA" != yes; then
17013 if test "$with_lzma" = yes; then
17014 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
17020 LIBGUI="../libgui/src/libgui.a"
17021 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
17025 WIN32LDAPP=
17029 case "${host}" in
17030 *-*-cygwin* | *-*-mingw* )
17031 configdir="win"
17034 configdir="unix"
17036 esac
17038 GDBTKLIBS=
17039 if test "${enable_gdbtk}" = "yes"; then
17041 # Gdbtk must have an absolute path to srcdir in order to run
17042 # properly when not installed.
17043 here=`pwd`
17044 cd ${srcdir}
17045 GDBTK_SRC_DIR=`pwd`
17046 cd $here
17050 # Ok, lets find the tcl configuration
17051 # First, look for one uninstalled.
17052 # the alternative search directory is invoked by --with-tcl
17055 if test x"${no_tcl}" = x ; then
17056 # we reset no_tcl in case something fails here
17057 no_tcl=true
17059 # Check whether --with-tcl was given.
17060 if test "${with_tcl+set}" = set; then :
17061 withval=$with_tcl; with_tclconfig=${withval}
17064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
17065 $as_echo_n "checking for Tcl configuration... " >&6; }
17066 if ${ac_cv_c_tclconfig+:} false; then :
17067 $as_echo_n "(cached) " >&6
17068 else
17071 # First check to see if --with-tcl was specified.
17072 case "${host}" in
17073 *-*-cygwin*) platDir="win" ;;
17074 *) platDir="unix" ;;
17075 esac
17076 if test x"${with_tclconfig}" != x ; then
17077 if test -f "${with_tclconfig}/tclConfig.sh" ; then
17078 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
17079 else
17080 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
17084 # then check for a private Tcl installation
17085 if test x"${ac_cv_c_tclconfig}" = x ; then
17086 for i in \
17087 ../tcl \
17088 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17089 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
17090 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
17091 ../../tcl \
17092 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17093 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
17094 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
17095 ../../../tcl \
17096 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17097 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
17098 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
17099 if test -f "$i/$platDir/tclConfig.sh" ; then
17100 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17101 break
17103 done
17106 # on Darwin, check in Framework installation locations
17107 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
17108 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17109 `ls -d /Library/Frameworks 2>/dev/null` \
17110 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17111 `ls -d /System/Library/Frameworks 2>/dev/null` \
17112 ; do
17113 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
17114 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
17115 break
17117 done
17120 # check in a few common install locations
17121 if test x"${ac_cv_c_tclconfig}" = x ; then
17122 for i in `ls -d ${libdir} 2>/dev/null` \
17123 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17124 `ls -d ${prefix}/lib 2>/dev/null` \
17125 `ls -d /usr/local/lib 2>/dev/null` \
17126 `ls -d /usr/contrib/lib 2>/dev/null` \
17127 `ls -d /usr/lib 2>/dev/null` \
17128 ; do
17129 if test -f "$i/tclConfig.sh" ; then
17130 ac_cv_c_tclconfig=`(cd $i; pwd)`
17131 break
17133 done
17136 # check in a few other private locations
17137 if test x"${ac_cv_c_tclconfig}" = x ; then
17138 for i in \
17139 ${srcdir}/../tcl \
17140 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17141 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
17142 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
17143 if test -f "$i/$platDir/tclConfig.sh" ; then
17144 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17145 break
17147 done
17153 if test x"${ac_cv_c_tclconfig}" = x ; then
17154 TCL_BIN_DIR="# no Tcl configs found"
17155 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
17156 $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
17157 else
17158 no_tcl=
17159 TCL_BIN_DIR=${ac_cv_c_tclconfig}
17160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
17161 $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
17166 # If $no_tk is nonempty, then we can't do Tk, and there is no
17167 # point to doing Tcl.
17170 # Ok, lets find the tk configuration
17171 # First, look for one uninstalled.
17172 # the alternative search directory is invoked by --with-tk
17175 if test x"${no_tk}" = x ; then
17176 # we reset no_tk in case something fails here
17177 no_tk=true
17179 # Check whether --with-tk was given.
17180 if test "${with_tk+set}" = set; then :
17181 withval=$with_tk; with_tkconfig=${withval}
17184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
17185 $as_echo_n "checking for Tk configuration... " >&6; }
17186 if ${ac_cv_c_tkconfig+:} false; then :
17187 $as_echo_n "(cached) " >&6
17188 else
17191 # First check to see if --with-tkconfig was specified.
17192 if test x"${with_tkconfig}" != x ; then
17193 if test -f "${with_tkconfig}/tkConfig.sh" ; then
17194 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
17195 else
17196 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
17200 # then check for a private Tk library
17201 case "${host}" in
17202 *-*-cygwin*) platDir="win" ;;
17203 *) platDir="unix" ;;
17204 esac
17205 if test x"${ac_cv_c_tkconfig}" = x ; then
17206 for i in \
17207 ../tk \
17208 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17209 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
17210 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
17211 ../../tk \
17212 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17213 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
17214 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
17215 ../../../tk \
17216 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17217 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
17218 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
17219 if test -f "$i/$platDir/tkConfig.sh" ; then
17220 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17221 break
17223 done
17226 # on Darwin, check in Framework installation locations
17227 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
17228 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17229 `ls -d /Library/Frameworks 2>/dev/null` \
17230 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17231 `ls -d /System/Library/Frameworks 2>/dev/null` \
17232 ; do
17233 if test -f "$i/Tk.framework/tkConfig.sh" ; then
17234 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
17235 break
17237 done
17240 # check in a few common install locations
17241 if test x"${ac_cv_c_tkconfig}" = x ; then
17242 for i in `ls -d ${libdir} 2>/dev/null` \
17243 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17244 `ls -d ${prefix}/lib 2>/dev/null` \
17245 `ls -d /usr/local/lib 2>/dev/null` \
17246 `ls -d /usr/contrib/lib 2>/dev/null` \
17247 `ls -d /usr/lib 2>/dev/null` \
17248 ; do
17249 if test -f "$i/tkConfig.sh" ; then
17250 ac_cv_c_tkconfig=`(cd $i; pwd)`
17251 break
17253 done
17255 # check in a few other private locations
17256 if test x"${ac_cv_c_tkconfig}" = x ; then
17257 for i in \
17258 ${srcdir}/../tk \
17259 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17260 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
17261 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
17262 if test -f "$i/$platDir/tkConfig.sh" ; then
17263 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17264 break
17266 done
17272 if test x"${ac_cv_c_tkconfig}" = x ; then
17273 TK_BIN_DIR="# no Tk configs found"
17274 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
17275 $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
17276 else
17277 no_tk=
17278 TK_BIN_DIR=${ac_cv_c_tkconfig}
17279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
17280 $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
17285 if test -z "${no_tcl}" -a -z "${no_tk}"; then
17287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
17288 $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
17290 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
17291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17292 $as_echo "loading" >&6; }
17293 . ${TCL_BIN_DIR}/tclConfig.sh
17294 else
17295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
17296 $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
17299 # eval is required to do the TCL_DBGX substitution
17300 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
17301 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
17303 # If the TCL_BIN_DIR is the build directory (not the install directory),
17304 # then set the common variable name to the value of the build variables.
17305 # For example, the variable TCL_LIB_SPEC will be set to the value
17306 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
17307 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
17308 # installed and uninstalled version of Tcl.
17309 if test -f "${TCL_BIN_DIR}/Makefile" ; then
17310 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
17311 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
17312 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
17313 elif test "`uname -s`" = "Darwin"; then
17314 # If Tcl was built as a framework, attempt to use the libraries
17315 # from the framework at the given location so that linking works
17316 # against Tcl.framework installed in an arbitrary location.
17317 case ${TCL_DEFS} in
17318 *TCL_FRAMEWORK*)
17319 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
17320 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
17321 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
17322 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
17323 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
17324 break
17326 done
17328 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
17329 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
17330 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
17333 esac
17336 # eval is required to do the TCL_DBGX substitution
17337 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
17338 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
17339 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
17340 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
17356 # Check for in-tree tcl
17357 here=`pwd`
17358 cd ${srcdir}/..
17359 topdir=`pwd`
17360 cd ${here}
17362 intree="no"
17363 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
17364 intree="yes"
17367 # Find Tcl private headers
17368 if test x"${intree}" = xno; then
17370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
17371 $as_echo_n "checking for Tcl private headers... " >&6; }
17372 private_dir=""
17373 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
17374 if test -f ${dir}/tclInt.h ; then
17375 private_dir=${dir}
17378 if test x"${private_dir}" = x; then
17379 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
17380 else
17381 TCL_PRIVATE_INCLUDE="-I${private_dir}"
17382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17383 $as_echo "${private_dir}" >&6; }
17386 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
17387 TCL_LIBRARY="${TCL_LIB_SPEC}"
17388 TCL_DEPS=""
17389 else
17390 # If building tcl in the same src tree, private headers
17391 # are not needed, but we need to be sure to use the right
17392 # headers library
17393 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
17394 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
17395 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
17402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
17403 $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
17405 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
17406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17407 $as_echo "loading" >&6; }
17408 . ${TK_BIN_DIR}/tkConfig.sh
17409 else
17410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
17411 $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
17414 # eval is required to do the TK_DBGX substitution
17415 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
17416 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
17418 # If the TK_BIN_DIR is the build directory (not the install directory),
17419 # then set the common variable name to the value of the build variables.
17420 # For example, the variable TK_LIB_SPEC will be set to the value
17421 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
17422 # instead of TK_BUILD_LIB_SPEC since it will work with both an
17423 # installed and uninstalled version of Tcl.
17424 if test -f "${TK_BIN_DIR}/Makefile" ; then
17425 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
17426 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
17427 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
17428 elif test "`uname -s`" = "Darwin"; then
17429 # If Tk was built as a framework, attempt to use the libraries
17430 # from the framework at the given location so that linking works
17431 # against Tk.framework installed in an arbitrary location.
17432 case ${TK_DEFS} in
17433 *TK_FRAMEWORK*)
17434 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
17435 for i in "`cd ${TK_BIN_DIR}; pwd`" \
17436 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
17437 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
17438 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
17439 break
17441 done
17443 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
17444 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
17445 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
17448 esac
17451 # eval is required to do the TK_DBGX substitution
17452 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
17453 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
17454 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
17455 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
17470 # Check for in-tree Tk
17471 intree="no"
17472 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
17473 intree="yes"
17476 # Find Tk private headers
17477 if test x"${intree}" = xno; then
17479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
17480 $as_echo_n "checking for Tk private headers... " >&6; }
17481 private_dir=""
17482 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
17483 if test -f ${dir}/tkInt.h; then
17484 private_dir=${dir}
17487 if test x"${private_dir}" = x; then
17488 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
17489 else
17490 TK_PRIVATE_INCLUDE="-I${private_dir}"
17491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17492 $as_echo "${private_dir}" >&6; }
17495 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
17496 TK_LIBRARY=${TK_LIB_SPEC}
17497 TK_DEPS=""
17498 else
17499 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
17500 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
17501 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
17508 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
17510 # Include some libraries that Tcl and Tk want.
17511 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
17512 # Yes, the ordering seems wrong here. But it isn't.
17513 # TK_LIBS is the list of libraries that need to be linked
17514 # after Tcl/Tk. Note that this isn't put into LIBS. If it
17515 # were in LIBS then any link tests after this point would
17516 # try to include things like `$(LIBGUI)', which wouldn't work.
17517 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
17519 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
17520 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
17521 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
17522 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
17523 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
17524 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
17525 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
17527 if test x"$gdb_cv_os_cygwin" = xyes; then
17528 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
17529 WIN32LDAPP="-Wl,--subsystem,console"
17530 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
17533 subdirs="$subdirs gdbtk"
17545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
17546 $as_echo_n "checking for X... " >&6; }
17549 # Check whether --with-x was given.
17550 if test "${with_x+set}" = set; then :
17551 withval=$with_x;
17554 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
17555 if test "x$with_x" = xno; then
17556 # The user explicitly disabled X.
17557 have_x=disabled
17558 else
17559 case $x_includes,$x_libraries in #(
17560 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
17561 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
17562 $as_echo_n "(cached) " >&6
17563 else
17564 # One or both of the vars are not set, and there is no cached value.
17565 ac_x_includes=no ac_x_libraries=no
17566 rm -f -r conftest.dir
17567 if mkdir conftest.dir; then
17568 cd conftest.dir
17569 cat >Imakefile <<'_ACEOF'
17570 incroot:
17571 @echo incroot='${INCROOT}'
17572 usrlibdir:
17573 @echo usrlibdir='${USRLIBDIR}'
17574 libdir:
17575 @echo libdir='${LIBDIR}'
17576 _ACEOF
17577 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
17578 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
17579 for ac_var in incroot usrlibdir libdir; do
17580 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
17581 done
17582 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
17583 for ac_extension in a so sl dylib la dll; do
17584 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
17585 test -f "$ac_im_libdir/libX11.$ac_extension"; then
17586 ac_im_usrlibdir=$ac_im_libdir; break
17588 done
17589 # Screen out bogus values from the imake configuration. They are
17590 # bogus both because they are the default anyway, and because
17591 # using them would break gcc on systems where it needs fixed includes.
17592 case $ac_im_incroot in
17593 /usr/include) ac_x_includes= ;;
17594 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
17595 esac
17596 case $ac_im_usrlibdir in
17597 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
17598 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
17599 esac
17601 cd ..
17602 rm -f -r conftest.dir
17605 # Standard set of common directories for X headers.
17606 # Check X11 before X11Rn because it is often a symlink to the current release.
17607 ac_x_header_dirs='
17608 /usr/X11/include
17609 /usr/X11R7/include
17610 /usr/X11R6/include
17611 /usr/X11R5/include
17612 /usr/X11R4/include
17614 /usr/include/X11
17615 /usr/include/X11R7
17616 /usr/include/X11R6
17617 /usr/include/X11R5
17618 /usr/include/X11R4
17620 /usr/local/X11/include
17621 /usr/local/X11R7/include
17622 /usr/local/X11R6/include
17623 /usr/local/X11R5/include
17624 /usr/local/X11R4/include
17626 /usr/local/include/X11
17627 /usr/local/include/X11R7
17628 /usr/local/include/X11R6
17629 /usr/local/include/X11R5
17630 /usr/local/include/X11R4
17632 /usr/X386/include
17633 /usr/x386/include
17634 /usr/XFree86/include/X11
17636 /usr/include
17637 /usr/local/include
17638 /usr/unsupported/include
17639 /usr/athena/include
17640 /usr/local/x11r5/include
17641 /usr/lpp/Xamples/include
17643 /usr/openwin/include
17644 /usr/openwin/share/include'
17646 if test "$ac_x_includes" = no; then
17647 # Guess where to find include files, by looking for Xlib.h.
17648 # First, try using that file with no special directory specified.
17649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17650 /* end confdefs.h. */
17651 #include <X11/Xlib.h>
17652 _ACEOF
17653 if ac_fn_c_try_cpp "$LINENO"; then :
17654 # We can compile using X headers with no special include directory.
17655 ac_x_includes=
17656 else
17657 for ac_dir in $ac_x_header_dirs; do
17658 if test -r "$ac_dir/X11/Xlib.h"; then
17659 ac_x_includes=$ac_dir
17660 break
17662 done
17664 rm -f conftest.err conftest.i conftest.$ac_ext
17665 fi # $ac_x_includes = no
17667 if test "$ac_x_libraries" = no; then
17668 # Check for the libraries.
17669 # See if we find them without any special options.
17670 # Don't add to $LIBS permanently.
17671 ac_save_LIBS=$LIBS
17672 LIBS="-lX11 $LIBS"
17673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17674 /* end confdefs.h. */
17675 #include <X11/Xlib.h>
17677 main ()
17679 XrmInitialize ()
17681 return 0;
17683 _ACEOF
17684 if ac_fn_c_try_link "$LINENO"; then :
17685 LIBS=$ac_save_LIBS
17686 # We can link X programs with no special library path.
17687 ac_x_libraries=
17688 else
17689 LIBS=$ac_save_LIBS
17690 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
17692 # Don't even attempt the hair of trying to link an X program!
17693 for ac_extension in a so sl dylib la dll; do
17694 if test -r "$ac_dir/libX11.$ac_extension"; then
17695 ac_x_libraries=$ac_dir
17696 break 2
17698 done
17699 done
17701 rm -f core conftest.err conftest.$ac_objext \
17702 conftest$ac_exeext conftest.$ac_ext
17703 fi # $ac_x_libraries = no
17705 case $ac_x_includes,$ac_x_libraries in #(
17706 no,* | *,no | *\'*)
17707 # Didn't find X, or a directory has "'" in its name.
17708 ac_cv_have_x="have_x=no";; #(
17710 # Record where we found X for the cache.
17711 ac_cv_have_x="have_x=yes\
17712 ac_x_includes='$ac_x_includes'\
17713 ac_x_libraries='$ac_x_libraries'"
17714 esac
17716 ;; #(
17717 *) have_x=yes;;
17718 esac
17719 eval "$ac_cv_have_x"
17720 fi # $with_x != no
17722 if test "$have_x" != yes; then
17723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
17724 $as_echo "$have_x" >&6; }
17725 no_x=yes
17726 else
17727 # If each of the values was on the command line, it overrides each guess.
17728 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
17729 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
17730 # Update the cache value to reflect the command line values.
17731 ac_cv_have_x="have_x=yes\
17732 ac_x_includes='$x_includes'\
17733 ac_x_libraries='$x_libraries'"
17734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
17735 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
17739 # Unlike the sim directory, whether a simulator is linked is controlled by
17740 # presence of a gdb_sim definition in the target configure.tgt entry.
17741 # This code just checks for a few cases where we'd like to ignore those
17742 # definitions, even when they're present in the '.mt' file. These cases
17743 # are when --disable-sim is specified, or if the simulator directory is
17744 # not part of the source tree.
17746 # Check whether --enable-sim was given.
17747 if test "${enable_sim+set}" = set; then :
17748 enableval=$enable_sim; echo "enable_sim = $enable_sim";
17749 echo "enableval = ${enableval}";
17750 case "${enableval}" in
17751 yes) ignore_sim=false ;;
17752 no) ignore_sim=true ;;
17753 *) ignore_sim=false ;;
17754 esac
17755 else
17756 ignore_sim=false
17760 if test ! -d "${srcdir}/../sim"; then
17761 ignore_sim=true
17764 SIM=
17765 SIM_OBS=
17766 if test "${ignore_sim}" = "false"; then
17767 if test x"${gdb_sim}" != x ; then
17768 SIM="${gdb_sim}"
17769 SIM_OBS="remote-sim.o"
17771 $as_echo "#define WITH_SIM 1" >>confdefs.h
17774 # Some tdep code should only be compiled in when the ppc sim is
17775 # built. PR sim/13418.
17776 case $target in
17777 powerpc*-*-*)
17779 $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
17782 esac
17799 # List of host floatformats.
17801 cat >>confdefs.h <<_ACEOF
17802 #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
17803 _ACEOF
17806 cat >>confdefs.h <<_ACEOF
17807 #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
17808 _ACEOF
17811 cat >>confdefs.h <<_ACEOF
17812 #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
17813 _ACEOF
17816 # target_subdir is used by the testsuite to find the target libraries.
17817 target_subdir=
17818 if test "${host}" != "${target}"; then
17819 target_subdir="${target_alias}/"
17823 # Import nat definitions.
17824 nat_makefile_frag=/dev/null
17825 if test "${gdb_native}" = "yes"; then
17826 . ${srcdir}/configure.nat
17827 nativefile=$NAT_FILE
17840 if test x"${gdb_osabi}" != x ; then
17842 cat >>confdefs.h <<_ACEOF
17843 #define GDB_OSABI_DEFAULT $gdb_osabi
17844 _ACEOF
17848 # Check for babeltrace and babeltrace-ctf
17850 # Check whether --with-babeltrace was given.
17851 if test "${with_babeltrace+set}" = set; then :
17852 withval=$with_babeltrace;
17853 else
17854 with_babeltrace=auto
17857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
17858 $as_echo_n "checking whether to use babeltrace... " >&6; }
17859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
17860 $as_echo "$with_babeltrace" >&6; }
17862 if test "x$with_babeltrace" = "xno"; then
17863 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
17864 $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
17865 else
17866 # Append -Werror to CFLAGS so that configure can catch the warning
17867 # "assignment from incompatible pointer type", which is related to
17868 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
17869 # in GDB, while babeltrace 1.0.3 is broken.
17870 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
17871 # safe to save and restore CFLAGS here.
17872 saved_CFLAGS=$CFLAGS
17873 CFLAGS="$CFLAGS -Werror"
17882 use_additional=yes
17884 acl_save_prefix="$prefix"
17885 prefix="$acl_final_prefix"
17886 acl_save_exec_prefix="$exec_prefix"
17887 exec_prefix="$acl_final_exec_prefix"
17889 eval additional_includedir=\"$includedir\"
17890 eval additional_libdir=\"$libdir\"
17892 exec_prefix="$acl_save_exec_prefix"
17893 prefix="$acl_save_prefix"
17896 # Check whether --with-libbabeltrace-prefix was given.
17897 if test "${with_libbabeltrace_prefix+set}" = set; then :
17898 withval=$with_libbabeltrace_prefix;
17899 if test "X$withval" = "Xno"; then
17900 use_additional=no
17901 else
17902 if test "X$withval" = "X"; then
17904 acl_save_prefix="$prefix"
17905 prefix="$acl_final_prefix"
17906 acl_save_exec_prefix="$exec_prefix"
17907 exec_prefix="$acl_final_exec_prefix"
17909 eval additional_includedir=\"$includedir\"
17910 eval additional_libdir=\"$libdir\"
17912 exec_prefix="$acl_save_exec_prefix"
17913 prefix="$acl_save_prefix"
17915 else
17916 additional_includedir="$withval/include"
17917 additional_libdir="$withval/lib"
17923 LIBBABELTRACE=
17924 LTLIBBABELTRACE=
17925 INCBABELTRACE=
17926 rpathdirs=
17927 ltrpathdirs=
17928 names_already_handled=
17929 names_next_round='babeltrace babeltrace-ctf'
17930 while test -n "$names_next_round"; do
17931 names_this_round="$names_next_round"
17932 names_next_round=
17933 for name in $names_this_round; do
17934 already_handled=
17935 for n in $names_already_handled; do
17936 if test "$n" = "$name"; then
17937 already_handled=yes
17938 break
17940 done
17941 if test -z "$already_handled"; then
17942 names_already_handled="$names_already_handled $name"
17943 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17944 eval value=\"\$HAVE_LIB$uppername\"
17945 if test -n "$value"; then
17946 if test "$value" = yes; then
17947 eval value=\"\$LIB$uppername\"
17948 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
17949 eval value=\"\$LTLIB$uppername\"
17950 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
17951 else
17954 else
17955 found_dir=
17956 found_la=
17957 found_so=
17958 found_a=
17959 if test $use_additional = yes; then
17960 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
17961 found_dir="$additional_libdir"
17962 found_so="$additional_libdir/lib$name.$shlibext"
17963 if test -f "$additional_libdir/lib$name.la"; then
17964 found_la="$additional_libdir/lib$name.la"
17966 else
17967 if test -f "$additional_libdir/lib$name.$libext"; then
17968 found_dir="$additional_libdir"
17969 found_a="$additional_libdir/lib$name.$libext"
17970 if test -f "$additional_libdir/lib$name.la"; then
17971 found_la="$additional_libdir/lib$name.la"
17976 if test "X$found_dir" = "X"; then
17977 for x in $LDFLAGS $LTLIBBABELTRACE; do
17979 acl_save_prefix="$prefix"
17980 prefix="$acl_final_prefix"
17981 acl_save_exec_prefix="$exec_prefix"
17982 exec_prefix="$acl_final_exec_prefix"
17983 eval x=\"$x\"
17984 exec_prefix="$acl_save_exec_prefix"
17985 prefix="$acl_save_prefix"
17987 case "$x" in
17988 -L*)
17989 dir=`echo "X$x" | sed -e 's/^X-L//'`
17990 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
17991 found_dir="$dir"
17992 found_so="$dir/lib$name.$shlibext"
17993 if test -f "$dir/lib$name.la"; then
17994 found_la="$dir/lib$name.la"
17996 else
17997 if test -f "$dir/lib$name.$libext"; then
17998 found_dir="$dir"
17999 found_a="$dir/lib$name.$libext"
18000 if test -f "$dir/lib$name.la"; then
18001 found_la="$dir/lib$name.la"
18006 esac
18007 if test "X$found_dir" != "X"; then
18008 break
18010 done
18012 if test "X$found_dir" != "X"; then
18013 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
18014 if test "X$found_so" != "X"; then
18015 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18016 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18017 else
18018 haveit=
18019 for x in $ltrpathdirs; do
18020 if test "X$x" = "X$found_dir"; then
18021 haveit=yes
18022 break
18024 done
18025 if test -z "$haveit"; then
18026 ltrpathdirs="$ltrpathdirs $found_dir"
18028 if test "$hardcode_direct" = yes; then
18029 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18030 else
18031 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18032 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18033 haveit=
18034 for x in $rpathdirs; do
18035 if test "X$x" = "X$found_dir"; then
18036 haveit=yes
18037 break
18039 done
18040 if test -z "$haveit"; then
18041 rpathdirs="$rpathdirs $found_dir"
18043 else
18044 haveit=
18045 for x in $LDFLAGS $LIBBABELTRACE; do
18047 acl_save_prefix="$prefix"
18048 prefix="$acl_final_prefix"
18049 acl_save_exec_prefix="$exec_prefix"
18050 exec_prefix="$acl_final_exec_prefix"
18051 eval x=\"$x\"
18052 exec_prefix="$acl_save_exec_prefix"
18053 prefix="$acl_save_prefix"
18055 if test "X$x" = "X-L$found_dir"; then
18056 haveit=yes
18057 break
18059 done
18060 if test -z "$haveit"; then
18061 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
18063 if test "$hardcode_minus_L" != no; then
18064 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18065 else
18066 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18071 else
18072 if test "X$found_a" != "X"; then
18073 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
18074 else
18075 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
18078 additional_includedir=
18079 case "$found_dir" in
18080 */lib | */lib/)
18081 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18082 additional_includedir="$basedir/include"
18084 esac
18085 if test "X$additional_includedir" != "X"; then
18086 if test "X$additional_includedir" != "X/usr/include"; then
18087 haveit=
18088 if test "X$additional_includedir" = "X/usr/local/include"; then
18089 if test -n "$GCC"; then
18090 case $host_os in
18091 linux*) haveit=yes;;
18092 esac
18095 if test -z "$haveit"; then
18096 for x in $CPPFLAGS $INCBABELTRACE; do
18098 acl_save_prefix="$prefix"
18099 prefix="$acl_final_prefix"
18100 acl_save_exec_prefix="$exec_prefix"
18101 exec_prefix="$acl_final_exec_prefix"
18102 eval x=\"$x\"
18103 exec_prefix="$acl_save_exec_prefix"
18104 prefix="$acl_save_prefix"
18106 if test "X$x" = "X-I$additional_includedir"; then
18107 haveit=yes
18108 break
18110 done
18111 if test -z "$haveit"; then
18112 if test -d "$additional_includedir"; then
18113 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
18119 if test -n "$found_la"; then
18120 save_libdir="$libdir"
18121 case "$found_la" in
18122 */* | *\\*) . "$found_la" ;;
18123 *) . "./$found_la" ;;
18124 esac
18125 libdir="$save_libdir"
18126 for dep in $dependency_libs; do
18127 case "$dep" in
18128 -L*)
18129 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18130 if test "X$additional_libdir" != "X/usr/lib"; then
18131 haveit=
18132 if test "X$additional_libdir" = "X/usr/local/lib"; then
18133 if test -n "$GCC"; then
18134 case $host_os in
18135 linux*) haveit=yes;;
18136 esac
18139 if test -z "$haveit"; then
18140 haveit=
18141 for x in $LDFLAGS $LIBBABELTRACE; do
18143 acl_save_prefix="$prefix"
18144 prefix="$acl_final_prefix"
18145 acl_save_exec_prefix="$exec_prefix"
18146 exec_prefix="$acl_final_exec_prefix"
18147 eval x=\"$x\"
18148 exec_prefix="$acl_save_exec_prefix"
18149 prefix="$acl_save_prefix"
18151 if test "X$x" = "X-L$additional_libdir"; then
18152 haveit=yes
18153 break
18155 done
18156 if test -z "$haveit"; then
18157 if test -d "$additional_libdir"; then
18158 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
18161 haveit=
18162 for x in $LDFLAGS $LTLIBBABELTRACE; do
18164 acl_save_prefix="$prefix"
18165 prefix="$acl_final_prefix"
18166 acl_save_exec_prefix="$exec_prefix"
18167 exec_prefix="$acl_final_exec_prefix"
18168 eval x=\"$x\"
18169 exec_prefix="$acl_save_exec_prefix"
18170 prefix="$acl_save_prefix"
18172 if test "X$x" = "X-L$additional_libdir"; then
18173 haveit=yes
18174 break
18176 done
18177 if test -z "$haveit"; then
18178 if test -d "$additional_libdir"; then
18179 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
18185 -R*)
18186 dir=`echo "X$dep" | sed -e 's/^X-R//'`
18187 if test "$enable_rpath" != no; then
18188 haveit=
18189 for x in $rpathdirs; do
18190 if test "X$x" = "X$dir"; then
18191 haveit=yes
18192 break
18194 done
18195 if test -z "$haveit"; then
18196 rpathdirs="$rpathdirs $dir"
18198 haveit=
18199 for x in $ltrpathdirs; do
18200 if test "X$x" = "X$dir"; then
18201 haveit=yes
18202 break
18204 done
18205 if test -z "$haveit"; then
18206 ltrpathdirs="$ltrpathdirs $dir"
18210 -l*)
18211 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
18213 *.la)
18214 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
18217 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
18218 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
18220 esac
18221 done
18223 else
18224 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18225 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
18229 done
18230 done
18231 if test "X$rpathdirs" != "X"; then
18232 if test -n "$hardcode_libdir_separator"; then
18233 alldirs=
18234 for found_dir in $rpathdirs; do
18235 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
18236 done
18237 acl_save_libdir="$libdir"
18238 libdir="$alldirs"
18239 eval flag=\"$hardcode_libdir_flag_spec\"
18240 libdir="$acl_save_libdir"
18241 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18242 else
18243 for found_dir in $rpathdirs; do
18244 acl_save_libdir="$libdir"
18245 libdir="$found_dir"
18246 eval flag=\"$hardcode_libdir_flag_spec\"
18247 libdir="$acl_save_libdir"
18248 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18249 done
18252 if test "X$ltrpathdirs" != "X"; then
18253 for found_dir in $ltrpathdirs; do
18254 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
18255 done
18259 ac_save_CPPFLAGS="$CPPFLAGS"
18261 for element in $INCBABELTRACE; do
18262 haveit=
18263 for x in $CPPFLAGS; do
18265 acl_save_prefix="$prefix"
18266 prefix="$acl_final_prefix"
18267 acl_save_exec_prefix="$exec_prefix"
18268 exec_prefix="$acl_final_exec_prefix"
18269 eval x=\"$x\"
18270 exec_prefix="$acl_save_exec_prefix"
18271 prefix="$acl_save_prefix"
18273 if test "X$x" = "X$element"; then
18274 haveit=yes
18275 break
18277 done
18278 if test -z "$haveit"; then
18279 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
18281 done
18284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
18285 $as_echo_n "checking for libbabeltrace... " >&6; }
18286 if ${ac_cv_libbabeltrace+:} false; then :
18287 $as_echo_n "(cached) " >&6
18288 else
18290 ac_save_LIBS="$LIBS"
18291 LIBS="$LIBS $LIBBABELTRACE"
18292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18293 /* end confdefs.h. */
18294 #include <babeltrace/babeltrace.h>
18295 #include <babeltrace/ctf/events.h>
18296 #include <babeltrace/ctf/iterator.h>
18298 main ()
18300 struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
18301 struct bt_ctf_event *event = NULL;
18302 const struct bt_definition *scope;
18304 pos->type = BT_SEEK_BEGIN;
18305 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
18306 scope = bt_ctf_get_top_level_scope (event,
18307 BT_STREAM_EVENT_HEADER);
18308 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
18311 return 0;
18313 _ACEOF
18314 if ac_fn_c_try_link "$LINENO"; then :
18315 ac_cv_libbabeltrace=yes
18316 else
18317 ac_cv_libbabeltrace=no
18319 rm -f core conftest.err conftest.$ac_objext \
18320 conftest$ac_exeext conftest.$ac_ext
18321 LIBS="$ac_save_LIBS"
18324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
18325 $as_echo "$ac_cv_libbabeltrace" >&6; }
18326 if test "$ac_cv_libbabeltrace" = yes; then
18327 HAVE_LIBBABELTRACE=yes
18329 $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
18331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
18332 $as_echo_n "checking how to link with libbabeltrace... " >&6; }
18333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
18334 $as_echo "$LIBBABELTRACE" >&6; }
18335 else
18336 HAVE_LIBBABELTRACE=no
18337 CPPFLAGS="$ac_save_CPPFLAGS"
18338 LIBBABELTRACE=
18339 LTLIBBABELTRACE=
18347 CFLAGS=$saved_CFLAGS
18349 if test "$HAVE_LIBBABELTRACE" != yes; then
18350 if test "$with_babeltrace" = yes; then
18351 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
18352 else
18353 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
18354 $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
18359 # Check for xxhash
18361 # Check whether --with-xxhash was given.
18362 if test "${with_xxhash+set}" = set; then :
18363 withval=$with_xxhash;
18364 else
18365 with_xxhash=auto
18369 if test "x$with_xxhash" != "xno"; then
18378 use_additional=yes
18380 acl_save_prefix="$prefix"
18381 prefix="$acl_final_prefix"
18382 acl_save_exec_prefix="$exec_prefix"
18383 exec_prefix="$acl_final_exec_prefix"
18385 eval additional_includedir=\"$includedir\"
18386 eval additional_libdir=\"$libdir\"
18388 exec_prefix="$acl_save_exec_prefix"
18389 prefix="$acl_save_prefix"
18392 # Check whether --with-libxxhash-prefix was given.
18393 if test "${with_libxxhash_prefix+set}" = set; then :
18394 withval=$with_libxxhash_prefix;
18395 if test "X$withval" = "Xno"; then
18396 use_additional=no
18397 else
18398 if test "X$withval" = "X"; then
18400 acl_save_prefix="$prefix"
18401 prefix="$acl_final_prefix"
18402 acl_save_exec_prefix="$exec_prefix"
18403 exec_prefix="$acl_final_exec_prefix"
18405 eval additional_includedir=\"$includedir\"
18406 eval additional_libdir=\"$libdir\"
18408 exec_prefix="$acl_save_exec_prefix"
18409 prefix="$acl_save_prefix"
18411 else
18412 additional_includedir="$withval/include"
18413 additional_libdir="$withval/lib"
18419 LIBXXHASH=
18420 LTLIBXXHASH=
18421 INCXXHASH=
18422 rpathdirs=
18423 ltrpathdirs=
18424 names_already_handled=
18425 names_next_round='xxhash '
18426 while test -n "$names_next_round"; do
18427 names_this_round="$names_next_round"
18428 names_next_round=
18429 for name in $names_this_round; do
18430 already_handled=
18431 for n in $names_already_handled; do
18432 if test "$n" = "$name"; then
18433 already_handled=yes
18434 break
18436 done
18437 if test -z "$already_handled"; then
18438 names_already_handled="$names_already_handled $name"
18439 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18440 eval value=\"\$HAVE_LIB$uppername\"
18441 if test -n "$value"; then
18442 if test "$value" = yes; then
18443 eval value=\"\$LIB$uppername\"
18444 test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
18445 eval value=\"\$LTLIB$uppername\"
18446 test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
18447 else
18450 else
18451 found_dir=
18452 found_la=
18453 found_so=
18454 found_a=
18455 if test $use_additional = yes; then
18456 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
18457 found_dir="$additional_libdir"
18458 found_so="$additional_libdir/lib$name.$shlibext"
18459 if test -f "$additional_libdir/lib$name.la"; then
18460 found_la="$additional_libdir/lib$name.la"
18462 else
18463 if test -f "$additional_libdir/lib$name.$libext"; then
18464 found_dir="$additional_libdir"
18465 found_a="$additional_libdir/lib$name.$libext"
18466 if test -f "$additional_libdir/lib$name.la"; then
18467 found_la="$additional_libdir/lib$name.la"
18472 if test "X$found_dir" = "X"; then
18473 for x in $LDFLAGS $LTLIBXXHASH; do
18475 acl_save_prefix="$prefix"
18476 prefix="$acl_final_prefix"
18477 acl_save_exec_prefix="$exec_prefix"
18478 exec_prefix="$acl_final_exec_prefix"
18479 eval x=\"$x\"
18480 exec_prefix="$acl_save_exec_prefix"
18481 prefix="$acl_save_prefix"
18483 case "$x" in
18484 -L*)
18485 dir=`echo "X$x" | sed -e 's/^X-L//'`
18486 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
18487 found_dir="$dir"
18488 found_so="$dir/lib$name.$shlibext"
18489 if test -f "$dir/lib$name.la"; then
18490 found_la="$dir/lib$name.la"
18492 else
18493 if test -f "$dir/lib$name.$libext"; then
18494 found_dir="$dir"
18495 found_a="$dir/lib$name.$libext"
18496 if test -f "$dir/lib$name.la"; then
18497 found_la="$dir/lib$name.la"
18502 esac
18503 if test "X$found_dir" != "X"; then
18504 break
18506 done
18508 if test "X$found_dir" != "X"; then
18509 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
18510 if test "X$found_so" != "X"; then
18511 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18512 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18513 else
18514 haveit=
18515 for x in $ltrpathdirs; do
18516 if test "X$x" = "X$found_dir"; then
18517 haveit=yes
18518 break
18520 done
18521 if test -z "$haveit"; then
18522 ltrpathdirs="$ltrpathdirs $found_dir"
18524 if test "$hardcode_direct" = yes; then
18525 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18526 else
18527 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18528 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18529 haveit=
18530 for x in $rpathdirs; do
18531 if test "X$x" = "X$found_dir"; then
18532 haveit=yes
18533 break
18535 done
18536 if test -z "$haveit"; then
18537 rpathdirs="$rpathdirs $found_dir"
18539 else
18540 haveit=
18541 for x in $LDFLAGS $LIBXXHASH; do
18543 acl_save_prefix="$prefix"
18544 prefix="$acl_final_prefix"
18545 acl_save_exec_prefix="$exec_prefix"
18546 exec_prefix="$acl_final_exec_prefix"
18547 eval x=\"$x\"
18548 exec_prefix="$acl_save_exec_prefix"
18549 prefix="$acl_save_prefix"
18551 if test "X$x" = "X-L$found_dir"; then
18552 haveit=yes
18553 break
18555 done
18556 if test -z "$haveit"; then
18557 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
18559 if test "$hardcode_minus_L" != no; then
18560 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18561 else
18562 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
18567 else
18568 if test "X$found_a" != "X"; then
18569 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
18570 else
18571 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
18574 additional_includedir=
18575 case "$found_dir" in
18576 */lib | */lib/)
18577 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18578 additional_includedir="$basedir/include"
18580 esac
18581 if test "X$additional_includedir" != "X"; then
18582 if test "X$additional_includedir" != "X/usr/include"; then
18583 haveit=
18584 if test "X$additional_includedir" = "X/usr/local/include"; then
18585 if test -n "$GCC"; then
18586 case $host_os in
18587 linux*) haveit=yes;;
18588 esac
18591 if test -z "$haveit"; then
18592 for x in $CPPFLAGS $INCXXHASH; do
18594 acl_save_prefix="$prefix"
18595 prefix="$acl_final_prefix"
18596 acl_save_exec_prefix="$exec_prefix"
18597 exec_prefix="$acl_final_exec_prefix"
18598 eval x=\"$x\"
18599 exec_prefix="$acl_save_exec_prefix"
18600 prefix="$acl_save_prefix"
18602 if test "X$x" = "X-I$additional_includedir"; then
18603 haveit=yes
18604 break
18606 done
18607 if test -z "$haveit"; then
18608 if test -d "$additional_includedir"; then
18609 INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
18615 if test -n "$found_la"; then
18616 save_libdir="$libdir"
18617 case "$found_la" in
18618 */* | *\\*) . "$found_la" ;;
18619 *) . "./$found_la" ;;
18620 esac
18621 libdir="$save_libdir"
18622 for dep in $dependency_libs; do
18623 case "$dep" in
18624 -L*)
18625 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18626 if test "X$additional_libdir" != "X/usr/lib"; then
18627 haveit=
18628 if test "X$additional_libdir" = "X/usr/local/lib"; then
18629 if test -n "$GCC"; then
18630 case $host_os in
18631 linux*) haveit=yes;;
18632 esac
18635 if test -z "$haveit"; then
18636 haveit=
18637 for x in $LDFLAGS $LIBXXHASH; do
18639 acl_save_prefix="$prefix"
18640 prefix="$acl_final_prefix"
18641 acl_save_exec_prefix="$exec_prefix"
18642 exec_prefix="$acl_final_exec_prefix"
18643 eval x=\"$x\"
18644 exec_prefix="$acl_save_exec_prefix"
18645 prefix="$acl_save_prefix"
18647 if test "X$x" = "X-L$additional_libdir"; then
18648 haveit=yes
18649 break
18651 done
18652 if test -z "$haveit"; then
18653 if test -d "$additional_libdir"; then
18654 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
18657 haveit=
18658 for x in $LDFLAGS $LTLIBXXHASH; do
18660 acl_save_prefix="$prefix"
18661 prefix="$acl_final_prefix"
18662 acl_save_exec_prefix="$exec_prefix"
18663 exec_prefix="$acl_final_exec_prefix"
18664 eval x=\"$x\"
18665 exec_prefix="$acl_save_exec_prefix"
18666 prefix="$acl_save_prefix"
18668 if test "X$x" = "X-L$additional_libdir"; then
18669 haveit=yes
18670 break
18672 done
18673 if test -z "$haveit"; then
18674 if test -d "$additional_libdir"; then
18675 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
18681 -R*)
18682 dir=`echo "X$dep" | sed -e 's/^X-R//'`
18683 if test "$enable_rpath" != no; then
18684 haveit=
18685 for x in $rpathdirs; do
18686 if test "X$x" = "X$dir"; then
18687 haveit=yes
18688 break
18690 done
18691 if test -z "$haveit"; then
18692 rpathdirs="$rpathdirs $dir"
18694 haveit=
18695 for x in $ltrpathdirs; do
18696 if test "X$x" = "X$dir"; then
18697 haveit=yes
18698 break
18700 done
18701 if test -z "$haveit"; then
18702 ltrpathdirs="$ltrpathdirs $dir"
18706 -l*)
18707 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
18709 *.la)
18710 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
18713 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
18714 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
18716 esac
18717 done
18719 else
18720 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
18721 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
18725 done
18726 done
18727 if test "X$rpathdirs" != "X"; then
18728 if test -n "$hardcode_libdir_separator"; then
18729 alldirs=
18730 for found_dir in $rpathdirs; do
18731 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
18732 done
18733 acl_save_libdir="$libdir"
18734 libdir="$alldirs"
18735 eval flag=\"$hardcode_libdir_flag_spec\"
18736 libdir="$acl_save_libdir"
18737 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
18738 else
18739 for found_dir in $rpathdirs; do
18740 acl_save_libdir="$libdir"
18741 libdir="$found_dir"
18742 eval flag=\"$hardcode_libdir_flag_spec\"
18743 libdir="$acl_save_libdir"
18744 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
18745 done
18748 if test "X$ltrpathdirs" != "X"; then
18749 for found_dir in $ltrpathdirs; do
18750 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
18751 done
18755 ac_save_CPPFLAGS="$CPPFLAGS"
18757 for element in $INCXXHASH; do
18758 haveit=
18759 for x in $CPPFLAGS; do
18761 acl_save_prefix="$prefix"
18762 prefix="$acl_final_prefix"
18763 acl_save_exec_prefix="$exec_prefix"
18764 exec_prefix="$acl_final_exec_prefix"
18765 eval x=\"$x\"
18766 exec_prefix="$acl_save_exec_prefix"
18767 prefix="$acl_save_prefix"
18769 if test "X$x" = "X$element"; then
18770 haveit=yes
18771 break
18773 done
18774 if test -z "$haveit"; then
18775 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
18777 done
18780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
18781 $as_echo_n "checking for libxxhash... " >&6; }
18782 if ${ac_cv_libxxhash+:} false; then :
18783 $as_echo_n "(cached) " >&6
18784 else
18786 ac_save_LIBS="$LIBS"
18787 LIBS="$LIBS $LIBXXHASH"
18788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18789 /* end confdefs.h. */
18790 #include <xxhash.h>
18792 main ()
18794 XXH32("foo", 3, 0);
18797 return 0;
18799 _ACEOF
18800 if ac_fn_c_try_link "$LINENO"; then :
18801 ac_cv_libxxhash=yes
18802 else
18803 ac_cv_libxxhash=no
18805 rm -f core conftest.err conftest.$ac_objext \
18806 conftest$ac_exeext conftest.$ac_ext
18807 LIBS="$ac_save_LIBS"
18810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
18811 $as_echo "$ac_cv_libxxhash" >&6; }
18812 if test "$ac_cv_libxxhash" = yes; then
18813 HAVE_LIBXXHASH=yes
18815 $as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
18817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
18818 $as_echo_n "checking how to link with libxxhash... " >&6; }
18819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
18820 $as_echo "$LIBXXHASH" >&6; }
18821 else
18822 HAVE_LIBXXHASH=no
18823 CPPFLAGS="$ac_save_CPPFLAGS"
18824 LIBXXHASH=
18825 LTLIBXXHASH=
18833 if test "$HAVE_LIBXXHASH" != yes; then
18834 if test "$with_xxhash" = yes; then
18835 as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
18838 if test "x$with_xxhash" = "xauto"; then
18839 with_xxhash="$HAVE_LIBXXHASH"
18843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
18844 $as_echo_n "checking whether to use xxhash... " >&6; }
18845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
18846 $as_echo "$with_xxhash" >&6; }
18848 NM_H=
18849 rm -f nm.h
18850 if test "${nativefile}" != ""; then
18851 case "${nativefile}" in
18852 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
18853 * ) GDB_NM_FILE="${nativefile}"
18854 esac
18855 ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE"
18858 cat >>confdefs.h <<_ACEOF
18859 #define GDB_NM_FILE "${GDB_NM_FILE}"
18860 _ACEOF
18862 NM_H=nm.h
18867 for ac_prog in xsltproc
18869 # Extract the first word of "$ac_prog", so it can be a program name with args.
18870 set dummy $ac_prog; ac_word=$2
18871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18872 $as_echo_n "checking for $ac_word... " >&6; }
18873 if ${ac_cv_path_XSLTPROC+:} false; then :
18874 $as_echo_n "(cached) " >&6
18875 else
18876 case $XSLTPROC in
18877 [\\/]* | ?:[\\/]*)
18878 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18881 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18882 for as_dir in $PATH
18884 IFS=$as_save_IFS
18885 test -z "$as_dir" && as_dir=.
18886 for ac_exec_ext in '' $ac_executable_extensions; do
18887 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18888 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18889 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18890 break 2
18892 done
18893 done
18894 IFS=$as_save_IFS
18897 esac
18899 XSLTPROC=$ac_cv_path_XSLTPROC
18900 if test -n "$XSLTPROC"; then
18901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18902 $as_echo "$XSLTPROC" >&6; }
18903 else
18904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18905 $as_echo "no" >&6; }
18909 test -n "$XSLTPROC" && break
18910 done
18911 test -n "$XSLTPROC" || XSLTPROC="missing"
18913 if test "x$USE_MAINTAINER_MODE" = xyes; then
18914 if test "${XSLTPROC}" = missing; then
18915 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
18923 $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
18927 # Check whether we will enable the inclusion of unit tests when
18928 # compiling GDB.
18930 # The default value of this option changes depending whether we're on
18931 # development mode (in which case it's "true") or not (in which case
18932 # it's "false").
18933 # Check whether --enable-unit-tests was given.
18934 if test "${enable_unit_tests+set}" = set; then :
18935 enableval=$enable_unit_tests; case "${enableval}" in
18936 yes) enable_unittests=true ;;
18937 no) enable_unittests=false ;;
18938 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
18939 esac
18940 else
18941 enable_unittests=$development
18945 if $enable_unittests; then
18947 $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
18950 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS) selftest-arch.o"
18951 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS) selftest-arch.c"
18957 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
18958 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
18959 if test "x$GDB_TRANSFORM_NAME" = x; then
18960 GDB_TRANSFORM_NAME=gdb
18965 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
18966 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
18967 if test "x$GCORE_TRANSFORM_NAME" = x; then
18968 GCORE_TRANSFORM_NAME=gcore
18972 ac_config_files="$ac_config_files gcore"
18974 ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
18977 cat >confcache <<\_ACEOF
18978 # This file is a shell script that caches the results of configure
18979 # tests run on this system so they can be shared between configure
18980 # scripts and configure runs, see configure's option --config-cache.
18981 # It is not useful on other systems. If it contains results you don't
18982 # want to keep, you may remove or edit it.
18984 # config.status only pays attention to the cache file if you give it
18985 # the --recheck option to rerun configure.
18987 # `ac_cv_env_foo' variables (set or unset) will be overridden when
18988 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18989 # following values.
18991 _ACEOF
18993 # The following way of writing the cache mishandles newlines in values,
18994 # but we know of no workaround that is simple, portable, and efficient.
18995 # So, we kill variables containing newlines.
18996 # Ultrix sh set writes to stderr and can't be redirected directly,
18997 # and sets the high bit in the cache file unless we assign to the vars.
18999 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19000 eval ac_val=\$$ac_var
19001 case $ac_val in #(
19002 *${as_nl}*)
19003 case $ac_var in #(
19004 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19005 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19006 esac
19007 case $ac_var in #(
19008 _ | IFS | as_nl) ;; #(
19009 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19010 *) { eval $ac_var=; unset $ac_var;} ;;
19011 esac ;;
19012 esac
19013 done
19015 (set) 2>&1 |
19016 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19017 *${as_nl}ac_space=\ *)
19018 # `set' does not quote correctly, so add quotes: double-quote
19019 # substitution turns \\\\ into \\, and sed turns \\ into \.
19020 sed -n \
19021 "s/'/'\\\\''/g;
19022 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19023 ;; #(
19025 # `set' quotes correctly as required by POSIX, so do not add quotes.
19026 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19028 esac |
19029 sort
19031 sed '
19032 /^ac_cv_env_/b end
19033 t clear
19034 :clear
19035 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19036 t end
19037 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19038 :end' >>confcache
19039 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19040 if test -w "$cache_file"; then
19041 if test "x$cache_file" != "x/dev/null"; then
19042 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19043 $as_echo "$as_me: updating cache $cache_file" >&6;}
19044 if test ! -f "$cache_file" || test -h "$cache_file"; then
19045 cat confcache >"$cache_file"
19046 else
19047 case $cache_file in #(
19048 */* | ?:*)
19049 mv -f confcache "$cache_file"$$ &&
19050 mv -f "$cache_file"$$ "$cache_file" ;; #(
19052 mv -f confcache "$cache_file" ;;
19053 esac
19056 else
19057 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19058 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19061 rm -f confcache
19063 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19064 # Let make expand exec_prefix.
19065 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19067 DEFS=-DHAVE_CONFIG_H
19069 ac_libobjs=
19070 ac_ltlibobjs=
19072 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19073 # 1. Remove the extension, and $U if already installed.
19074 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19075 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19076 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19077 # will be set to the directory where LIBOBJS objects are built.
19078 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19079 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19080 done
19081 LIBOBJS=$ac_libobjs
19083 LTLIBOBJS=$ac_ltlibobjs
19086 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
19087 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
19088 Usually this means the macro was only invoked conditionally." "$LINENO" 5
19090 if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
19091 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
19092 Usually this means the macro was only invoked conditionally." "$LINENO" 5
19094 if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
19095 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
19096 Usually this means the macro was only invoked conditionally." "$LINENO" 5
19100 : "${CONFIG_STATUS=./config.status}"
19101 ac_write_fail=0
19102 ac_clean_files_save=$ac_clean_files
19103 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19104 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19105 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19106 as_write_fail=0
19107 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19108 #! $SHELL
19109 # Generated by $as_me.
19110 # Run this file to recreate the current configuration.
19111 # Compiler output produced by configure, useful for debugging
19112 # configure, is in config.log if it exists.
19114 debug=false
19115 ac_cs_recheck=false
19116 ac_cs_silent=false
19118 SHELL=\${CONFIG_SHELL-$SHELL}
19119 export SHELL
19120 _ASEOF
19121 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19122 ## -------------------- ##
19123 ## M4sh Initialization. ##
19124 ## -------------------- ##
19126 # Be more Bourne compatible
19127 DUALCASE=1; export DUALCASE # for MKS sh
19128 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19129 emulate sh
19130 NULLCMD=:
19131 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19132 # is contrary to our usage. Disable this feature.
19133 alias -g '${1+"$@"}'='"$@"'
19134 setopt NO_GLOB_SUBST
19135 else
19136 case `(set -o) 2>/dev/null` in #(
19137 *posix*) :
19138 set -o posix ;; #(
19139 *) :
19141 esac
19145 as_nl='
19147 export as_nl
19148 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19149 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19150 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19151 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19152 # Prefer a ksh shell builtin over an external printf program on Solaris,
19153 # but without wasting forks for bash or zsh.
19154 if test -z "$BASH_VERSION$ZSH_VERSION" \
19155 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19156 as_echo='print -r --'
19157 as_echo_n='print -rn --'
19158 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19159 as_echo='printf %s\n'
19160 as_echo_n='printf %s'
19161 else
19162 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19163 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19164 as_echo_n='/usr/ucb/echo -n'
19165 else
19166 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19167 as_echo_n_body='eval
19168 arg=$1;
19169 case $arg in #(
19170 *"$as_nl"*)
19171 expr "X$arg" : "X\\(.*\\)$as_nl";
19172 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19173 esac;
19174 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19176 export as_echo_n_body
19177 as_echo_n='sh -c $as_echo_n_body as_echo'
19179 export as_echo_body
19180 as_echo='sh -c $as_echo_body as_echo'
19183 # The user is always right.
19184 if test "${PATH_SEPARATOR+set}" != set; then
19185 PATH_SEPARATOR=:
19186 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19187 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19188 PATH_SEPARATOR=';'
19193 # IFS
19194 # We need space, tab and new line, in precisely that order. Quoting is
19195 # there to prevent editors from complaining about space-tab.
19196 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19197 # splitting by setting IFS to empty value.)
19198 IFS=" "" $as_nl"
19200 # Find who we are. Look in the path if we contain no directory separator.
19201 as_myself=
19202 case $0 in #((
19203 *[\\/]* ) as_myself=$0 ;;
19204 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19205 for as_dir in $PATH
19207 IFS=$as_save_IFS
19208 test -z "$as_dir" && as_dir=.
19209 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19210 done
19211 IFS=$as_save_IFS
19214 esac
19215 # We did not find ourselves, most probably we were run as `sh COMMAND'
19216 # in which case we are not to be found in the path.
19217 if test "x$as_myself" = x; then
19218 as_myself=$0
19220 if test ! -f "$as_myself"; then
19221 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19222 exit 1
19225 # Unset variables that we do not need and which cause bugs (e.g. in
19226 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19227 # suppresses any "Segmentation fault" message there. '((' could
19228 # trigger a bug in pdksh 5.2.14.
19229 for as_var in BASH_ENV ENV MAIL MAILPATH
19230 do eval test x\${$as_var+set} = xset \
19231 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19232 done
19233 PS1='$ '
19234 PS2='> '
19235 PS4='+ '
19237 # NLS nuisances.
19238 LC_ALL=C
19239 export LC_ALL
19240 LANGUAGE=C
19241 export LANGUAGE
19243 # CDPATH.
19244 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19247 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19248 # ----------------------------------------
19249 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19250 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19251 # script with STATUS, using 1 if that was 0.
19252 as_fn_error ()
19254 as_status=$1; test $as_status -eq 0 && as_status=1
19255 if test "$4"; then
19256 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19257 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19259 $as_echo "$as_me: error: $2" >&2
19260 as_fn_exit $as_status
19261 } # as_fn_error
19264 # as_fn_set_status STATUS
19265 # -----------------------
19266 # Set $? to STATUS, without forking.
19267 as_fn_set_status ()
19269 return $1
19270 } # as_fn_set_status
19272 # as_fn_exit STATUS
19273 # -----------------
19274 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19275 as_fn_exit ()
19277 set +e
19278 as_fn_set_status $1
19279 exit $1
19280 } # as_fn_exit
19282 # as_fn_unset VAR
19283 # ---------------
19284 # Portably unset VAR.
19285 as_fn_unset ()
19287 { eval $1=; unset $1;}
19289 as_unset=as_fn_unset
19290 # as_fn_append VAR VALUE
19291 # ----------------------
19292 # Append the text in VALUE to the end of the definition contained in VAR. Take
19293 # advantage of any shell optimizations that allow amortized linear growth over
19294 # repeated appends, instead of the typical quadratic growth present in naive
19295 # implementations.
19296 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19297 eval 'as_fn_append ()
19299 eval $1+=\$2
19301 else
19302 as_fn_append ()
19304 eval $1=\$$1\$2
19306 fi # as_fn_append
19308 # as_fn_arith ARG...
19309 # ------------------
19310 # Perform arithmetic evaluation on the ARGs, and store the result in the
19311 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19312 # must be portable across $(()) and expr.
19313 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19314 eval 'as_fn_arith ()
19316 as_val=$(( $* ))
19318 else
19319 as_fn_arith ()
19321 as_val=`expr "$@" || test $? -eq 1`
19323 fi # as_fn_arith
19326 if expr a : '\(a\)' >/dev/null 2>&1 &&
19327 test "X`expr 00001 : '.*\(...\)'`" = X001; then
19328 as_expr=expr
19329 else
19330 as_expr=false
19333 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19334 as_basename=basename
19335 else
19336 as_basename=false
19339 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19340 as_dirname=dirname
19341 else
19342 as_dirname=false
19345 as_me=`$as_basename -- "$0" ||
19346 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19347 X"$0" : 'X\(//\)$' \| \
19348 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19349 $as_echo X/"$0" |
19350 sed '/^.*\/\([^/][^/]*\)\/*$/{
19351 s//\1/
19354 /^X\/\(\/\/\)$/{
19355 s//\1/
19358 /^X\/\(\/\).*/{
19359 s//\1/
19362 s/.*/./; q'`
19364 # Avoid depending upon Character Ranges.
19365 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19366 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19367 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19368 as_cr_digits='0123456789'
19369 as_cr_alnum=$as_cr_Letters$as_cr_digits
19371 ECHO_C= ECHO_N= ECHO_T=
19372 case `echo -n x` in #(((((
19373 -n*)
19374 case `echo 'xy\c'` in
19375 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19376 xy) ECHO_C='\c';;
19377 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19378 ECHO_T=' ';;
19379 esac;;
19381 ECHO_N='-n';;
19382 esac
19384 rm -f conf$$ conf$$.exe conf$$.file
19385 if test -d conf$$.dir; then
19386 rm -f conf$$.dir/conf$$.file
19387 else
19388 rm -f conf$$.dir
19389 mkdir conf$$.dir 2>/dev/null
19391 if (echo >conf$$.file) 2>/dev/null; then
19392 if ln -s conf$$.file conf$$ 2>/dev/null; then
19393 as_ln_s='ln -s'
19394 # ... but there are two gotchas:
19395 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19396 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19397 # In both cases, we have to default to `cp -pR'.
19398 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19399 as_ln_s='cp -pR'
19400 elif ln conf$$.file conf$$ 2>/dev/null; then
19401 as_ln_s=ln
19402 else
19403 as_ln_s='cp -pR'
19405 else
19406 as_ln_s='cp -pR'
19408 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19409 rmdir conf$$.dir 2>/dev/null
19412 # as_fn_mkdir_p
19413 # -------------
19414 # Create "$as_dir" as a directory, including parents if necessary.
19415 as_fn_mkdir_p ()
19418 case $as_dir in #(
19419 -*) as_dir=./$as_dir;;
19420 esac
19421 test -d "$as_dir" || eval $as_mkdir_p || {
19422 as_dirs=
19423 while :; do
19424 case $as_dir in #(
19425 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19426 *) as_qdir=$as_dir;;
19427 esac
19428 as_dirs="'$as_qdir' $as_dirs"
19429 as_dir=`$as_dirname -- "$as_dir" ||
19430 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19431 X"$as_dir" : 'X\(//\)[^/]' \| \
19432 X"$as_dir" : 'X\(//\)$' \| \
19433 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19434 $as_echo X"$as_dir" |
19435 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19436 s//\1/
19439 /^X\(\/\/\)[^/].*/{
19440 s//\1/
19443 /^X\(\/\/\)$/{
19444 s//\1/
19447 /^X\(\/\).*/{
19448 s//\1/
19451 s/.*/./; q'`
19452 test -d "$as_dir" && break
19453 done
19454 test -z "$as_dirs" || eval "mkdir $as_dirs"
19455 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19458 } # as_fn_mkdir_p
19459 if mkdir -p . 2>/dev/null; then
19460 as_mkdir_p='mkdir -p "$as_dir"'
19461 else
19462 test -d ./-p && rmdir ./-p
19463 as_mkdir_p=false
19467 # as_fn_executable_p FILE
19468 # -----------------------
19469 # Test if FILE is an executable regular file.
19470 as_fn_executable_p ()
19472 test -f "$1" && test -x "$1"
19473 } # as_fn_executable_p
19474 as_test_x='test -x'
19475 as_executable_p=as_fn_executable_p
19477 # Sed expression to map a string onto a valid CPP name.
19478 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19480 # Sed expression to map a string onto a valid variable name.
19481 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19484 exec 6>&1
19485 ## ----------------------------------- ##
19486 ## Main body of $CONFIG_STATUS script. ##
19487 ## ----------------------------------- ##
19488 _ASEOF
19489 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19491 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19492 # Save the log message, to keep $0 and so on meaningful, and to
19493 # report actual input values of CONFIG_FILES etc. instead of their
19494 # values after options handling.
19495 ac_log="
19496 This file was extended by $as_me, which was
19497 generated by GNU Autoconf 2.69. Invocation command line was
19499 CONFIG_FILES = $CONFIG_FILES
19500 CONFIG_HEADERS = $CONFIG_HEADERS
19501 CONFIG_LINKS = $CONFIG_LINKS
19502 CONFIG_COMMANDS = $CONFIG_COMMANDS
19503 $ $0 $@
19505 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19508 _ACEOF
19510 case $ac_config_files in *"
19511 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19512 esac
19514 case $ac_config_headers in *"
19515 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19516 esac
19519 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19520 # Files that config.status was made for.
19521 config_files="$ac_config_files"
19522 config_headers="$ac_config_headers"
19523 config_links="$ac_config_links"
19524 config_commands="$ac_config_commands"
19526 _ACEOF
19528 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19529 ac_cs_usage="\
19530 \`$as_me' instantiates files and other configuration actions
19531 from templates according to the current configuration. Unless the files
19532 and actions are specified as TAGs, all are instantiated by default.
19534 Usage: $0 [OPTION]... [TAG]...
19536 -h, --help print this help, then exit
19537 -V, --version print version number and configuration settings, then exit
19538 --config print configuration, then exit
19539 -q, --quiet, --silent
19540 do not print progress messages
19541 -d, --debug don't remove temporary files
19542 --recheck update $as_me by reconfiguring in the same conditions
19543 --file=FILE[:TEMPLATE]
19544 instantiate the configuration file FILE
19545 --header=FILE[:TEMPLATE]
19546 instantiate the configuration header FILE
19548 Configuration files:
19549 $config_files
19551 Configuration headers:
19552 $config_headers
19554 Configuration links:
19555 $config_links
19557 Configuration commands:
19558 $config_commands
19560 Report bugs to the package provider."
19562 _ACEOF
19563 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19564 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19565 ac_cs_version="\\
19566 config.status
19567 configured by $0, generated by GNU Autoconf 2.69,
19568 with options \\"\$ac_cs_config\\"
19570 Copyright (C) 2012 Free Software Foundation, Inc.
19571 This config.status script is free software; the Free Software Foundation
19572 gives unlimited permission to copy, distribute and modify it."
19574 ac_pwd='$ac_pwd'
19575 srcdir='$srcdir'
19576 INSTALL='$INSTALL'
19577 AWK='$AWK'
19578 test -n "\$AWK" || AWK=awk
19579 _ACEOF
19581 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19582 # The default lists apply if the user does not specify any file.
19583 ac_need_defaults=:
19584 while test $# != 0
19586 case $1 in
19587 --*=?*)
19588 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19589 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19590 ac_shift=:
19592 --*=)
19593 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19594 ac_optarg=
19595 ac_shift=:
19598 ac_option=$1
19599 ac_optarg=$2
19600 ac_shift=shift
19602 esac
19604 case $ac_option in
19605 # Handling of the options.
19606 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19607 ac_cs_recheck=: ;;
19608 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19609 $as_echo "$ac_cs_version"; exit ;;
19610 --config | --confi | --conf | --con | --co | --c )
19611 $as_echo "$ac_cs_config"; exit ;;
19612 --debug | --debu | --deb | --de | --d | -d )
19613 debug=: ;;
19614 --file | --fil | --fi | --f )
19615 $ac_shift
19616 case $ac_optarg in
19617 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19618 '') as_fn_error $? "missing file argument" ;;
19619 esac
19620 as_fn_append CONFIG_FILES " '$ac_optarg'"
19621 ac_need_defaults=false;;
19622 --header | --heade | --head | --hea )
19623 $ac_shift
19624 case $ac_optarg in
19625 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19626 esac
19627 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19628 ac_need_defaults=false;;
19629 --he | --h)
19630 # Conflict between --help and --header
19631 as_fn_error $? "ambiguous option: \`$1'
19632 Try \`$0 --help' for more information.";;
19633 --help | --hel | -h )
19634 $as_echo "$ac_cs_usage"; exit ;;
19635 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19636 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19637 ac_cs_silent=: ;;
19639 # This is an error.
19640 -*) as_fn_error $? "unrecognized option: \`$1'
19641 Try \`$0 --help' for more information." ;;
19643 *) as_fn_append ac_config_targets " $1"
19644 ac_need_defaults=false ;;
19646 esac
19647 shift
19648 done
19650 ac_configure_extra_args=
19652 if $ac_cs_silent; then
19653 exec 6>/dev/null
19654 ac_configure_extra_args="$ac_configure_extra_args --silent"
19657 _ACEOF
19658 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19659 if \$ac_cs_recheck; then
19660 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19661 shift
19662 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19663 CONFIG_SHELL='$SHELL'
19664 export CONFIG_SHELL
19665 exec "\$@"
19668 _ACEOF
19669 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19670 exec 5>>config.log
19672 echo
19673 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19674 ## Running $as_me. ##
19675 _ASBOX
19676 $as_echo "$ac_log"
19677 } >&5
19679 _ACEOF
19680 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19682 # INIT-COMMANDS
19684 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
19685 GDB_NM_FILE=$GDB_NM_FILE
19687 _ACEOF
19689 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19691 # Handling of arguments.
19692 for ac_config_target in $ac_config_targets
19694 case $ac_config_target in
19695 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
19696 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
19697 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
19698 "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;;
19699 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
19700 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19701 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
19702 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
19703 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
19704 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
19706 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19707 esac
19708 done
19711 # If the user did not use the arguments to specify the items to instantiate,
19712 # then the envvar interface is used. Set only those that are not.
19713 # We use the long form for the default assignment because of an extremely
19714 # bizarre bug on SunOS 4.1.3.
19715 if $ac_need_defaults; then
19716 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19717 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19718 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
19719 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19722 # Have a temporary directory for convenience. Make it in the build tree
19723 # simply because there is no reason against having it here, and in addition,
19724 # creating and moving files from /tmp can sometimes cause problems.
19725 # Hook for its removal unless debugging.
19726 # Note that there is a small window in which the directory will not be cleaned:
19727 # after its creation but before its name has been assigned to `$tmp'.
19728 $debug ||
19730 tmp= ac_tmp=
19731 trap 'exit_status=$?
19732 : "${ac_tmp:=$tmp}"
19733 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
19735 trap 'as_fn_exit 1' 1 2 13 15
19737 # Create a (secure) tmp directory for tmp files.
19740 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19741 test -d "$tmp"
19742 } ||
19744 tmp=./conf$$-$RANDOM
19745 (umask 077 && mkdir "$tmp")
19746 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19747 ac_tmp=$tmp
19749 # Set up the scripts for CONFIG_FILES section.
19750 # No need to generate them if there are no CONFIG_FILES.
19751 # This happens for instance with `./config.status config.h'.
19752 if test -n "$CONFIG_FILES"; then
19754 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
19755 ac_cs_awk_getline=:
19756 ac_cs_awk_pipe_init=
19757 ac_cs_awk_read_file='
19758 while ((getline aline < (F[key])) > 0)
19759 print(aline)
19760 close(F[key])'
19761 ac_cs_awk_pipe_fini=
19762 else
19763 ac_cs_awk_getline=false
19764 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
19765 ac_cs_awk_read_file='
19766 print "|#_!!_#|"
19767 print "cat " F[key] " &&"
19768 '$ac_cs_awk_pipe_init
19769 # The final `:' finishes the AND list.
19770 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
19772 ac_cr=`echo X | tr X '\015'`
19773 # On cygwin, bash can eat \r inside `` if the user requested igncr.
19774 # But we know of no other shell where ac_cr would be empty at this
19775 # point, so we can use a bashism as a fallback.
19776 if test "x$ac_cr" = x; then
19777 eval ac_cr=\$\'\\r\'
19779 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19780 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19781 ac_cs_awk_cr='\\r'
19782 else
19783 ac_cs_awk_cr=$ac_cr
19786 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
19787 _ACEOF
19789 # Create commands to substitute file output variables.
19791 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
19792 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
19793 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
19794 echo "_ACAWK" &&
19795 echo "_ACEOF"
19796 } >conf$$files.sh &&
19797 . ./conf$$files.sh ||
19798 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19799 rm -f conf$$files.sh
19802 echo "cat >conf$$subs.awk <<_ACEOF" &&
19803 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19804 echo "_ACEOF"
19805 } >conf$$subs.sh ||
19806 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19807 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
19808 ac_delim='%!_!# '
19809 for ac_last_try in false false false false false :; do
19810 . ./conf$$subs.sh ||
19811 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19813 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19814 if test $ac_delim_n = $ac_delim_num; then
19815 break
19816 elif $ac_last_try; then
19817 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19818 else
19819 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19821 done
19822 rm -f conf$$subs.sh
19824 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19825 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
19826 _ACEOF
19827 sed -n '
19829 s/^/S["/; s/!.*/"]=/
19832 s/^[^!]*!//
19833 :repl
19834 t repl
19835 s/'"$ac_delim"'$//
19836 t delim
19839 s/\(.\{148\}\)..*/\1/
19840 t more1
19841 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19844 b repl
19845 :more1
19846 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19849 s/.\{148\}//
19850 t nl
19851 :delim
19853 s/\(.\{148\}\)..*/\1/
19854 t more2
19855 s/["\\]/\\&/g; s/^/"/; s/$/"/
19858 :more2
19859 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19862 s/.\{148\}//
19863 t delim
19864 ' <conf$$subs.awk | sed '
19865 /^[^""]/{
19867 s/\n//
19869 ' >>$CONFIG_STATUS || ac_write_fail=1
19870 rm -f conf$$subs.awk
19871 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19872 _ACAWK
19873 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
19874 for (key in S) S_is_set[key] = 1
19875 FS = "\a"
19876 \$ac_cs_awk_pipe_init
19879 line = $ 0
19880 nfields = split(line, field, "@")
19881 substed = 0
19882 len = length(field[1])
19883 for (i = 2; i < nfields; i++) {
19884 key = field[i]
19885 keylen = length(key)
19886 if (S_is_set[key]) {
19887 value = S[key]
19888 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19889 len += length(value) + length(field[++i])
19890 substed = 1
19891 } else
19892 len += 1 + keylen
19894 if (nfields == 3 && !substed) {
19895 key = field[2]
19896 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
19897 \$ac_cs_awk_read_file
19898 next
19901 print line
19903 \$ac_cs_awk_pipe_fini
19904 _ACAWK
19905 _ACEOF
19906 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19907 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
19908 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
19909 else
19911 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
19912 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
19913 _ACEOF
19915 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
19916 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
19917 # trailing colons and then remove the whole line if VPATH becomes empty
19918 # (actually we leave an empty line to preserve line numbers).
19919 if test "x$srcdir" = x.; then
19920 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
19922 s///
19923 s/^/:/
19924 s/[ ]*$/:/
19925 s/:\$(srcdir):/:/g
19926 s/:\${srcdir}:/:/g
19927 s/:@srcdir@:/:/g
19928 s/^:*//
19929 s/:*$//
19931 s/\(=[ ]*\).*/\1/
19933 s/\n//
19934 s/^[^=]*=[ ]*$//
19938 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19939 fi # test -n "$CONFIG_FILES"
19941 # Set up the scripts for CONFIG_HEADERS section.
19942 # No need to generate them if there are no CONFIG_HEADERS.
19943 # This happens for instance with `./config.status Makefile'.
19944 if test -n "$CONFIG_HEADERS"; then
19945 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
19946 BEGIN {
19947 _ACEOF
19949 # Transform confdefs.h into an awk script `defines.awk', embedded as
19950 # here-document in config.status, that substitutes the proper values into
19951 # config.h.in to produce config.h.
19953 # Create a delimiter string that does not exist in confdefs.h, to ease
19954 # handling of long lines.
19955 ac_delim='%!_!# '
19956 for ac_last_try in false false :; do
19957 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
19958 if test -z "$ac_tt"; then
19959 break
19960 elif $ac_last_try; then
19961 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
19962 else
19963 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19965 done
19967 # For the awk script, D is an array of macro values keyed by name,
19968 # likewise P contains macro parameters if any. Preserve backslash
19969 # newline sequences.
19971 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
19972 sed -n '
19973 s/.\{148\}/&'"$ac_delim"'/g
19974 t rset
19975 :rset
19976 s/^[ ]*#[ ]*define[ ][ ]*/ /
19977 t def
19979 :def
19980 s/\\$//
19981 t bsnl
19982 s/["\\]/\\&/g
19983 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
19984 D["\1"]=" \3"/p
19985 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
19987 :bsnl
19988 s/["\\]/\\&/g
19989 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
19990 D["\1"]=" \3\\\\\\n"\\/p
19991 t cont
19992 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
19993 t cont
19995 :cont
19997 s/.\{148\}/&'"$ac_delim"'/g
19998 t clear
19999 :clear
20000 s/\\$//
20001 t bsnlc
20002 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20004 :bsnlc
20005 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20006 b cont
20007 ' <confdefs.h | sed '
20008 s/'"$ac_delim"'/"\\\
20009 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20011 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20012 for (key in D) D_is_set[key] = 1
20013 FS = "\a"
20015 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20016 line = \$ 0
20017 split(line, arg, " ")
20018 if (arg[1] == "#") {
20019 defundef = arg[2]
20020 mac1 = arg[3]
20021 } else {
20022 defundef = substr(arg[1], 2)
20023 mac1 = arg[2]
20025 split(mac1, mac2, "(") #)
20026 macro = mac2[1]
20027 prefix = substr(line, 1, index(line, defundef) - 1)
20028 if (D_is_set[macro]) {
20029 # Preserve the white space surrounding the "#".
20030 print prefix "define", macro P[macro] D[macro]
20031 next
20032 } else {
20033 # Replace #undef with comments. This is necessary, for example,
20034 # in the case of _POSIX_SOURCE, which is predefined and required
20035 # on some systems where configure will not decide to define it.
20036 if (defundef == "undef") {
20037 print "/*", prefix defundef, macro, "*/"
20038 next
20042 { print }
20043 _ACAWK
20044 _ACEOF
20045 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20046 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20047 fi # test -n "$CONFIG_HEADERS"
20050 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20051 shift
20052 for ac_tag
20054 case $ac_tag in
20055 :[FHLC]) ac_mode=$ac_tag; continue;;
20056 esac
20057 case $ac_mode$ac_tag in
20058 :[FHL]*:*);;
20059 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20060 :[FH]-) ac_tag=-:-;;
20061 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20062 esac
20063 ac_save_IFS=$IFS
20064 IFS=:
20065 set x $ac_tag
20066 IFS=$ac_save_IFS
20067 shift
20068 ac_file=$1
20069 shift
20071 case $ac_mode in
20072 :L) ac_source=$1;;
20073 :[FH])
20074 ac_file_inputs=
20075 for ac_f
20077 case $ac_f in
20078 -) ac_f="$ac_tmp/stdin";;
20079 *) # Look for the file first in the build tree, then in the source tree
20080 # (if the path is not absolute). The absolute path cannot be DOS-style,
20081 # because $ac_f cannot contain `:'.
20082 test -f "$ac_f" ||
20083 case $ac_f in
20084 [\\/$]*) false;;
20085 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20086 esac ||
20087 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20088 esac
20089 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20090 as_fn_append ac_file_inputs " '$ac_f'"
20091 done
20093 # Let's still pretend it is `configure' which instantiates (i.e., don't
20094 # use $as_me), people would be surprised to read:
20095 # /* config.h. Generated by config.status. */
20096 configure_input='Generated from '`
20097 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20098 `' by configure.'
20099 if test x"$ac_file" != x-; then
20100 configure_input="$ac_file. $configure_input"
20101 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20102 $as_echo "$as_me: creating $ac_file" >&6;}
20104 # Neutralize special characters interpreted by sed in replacement strings.
20105 case $configure_input in #(
20106 *\&* | *\|* | *\\* )
20107 ac_sed_conf_input=`$as_echo "$configure_input" |
20108 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20109 *) ac_sed_conf_input=$configure_input;;
20110 esac
20112 case $ac_tag in
20113 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20114 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20115 esac
20117 esac
20119 ac_dir=`$as_dirname -- "$ac_file" ||
20120 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20121 X"$ac_file" : 'X\(//\)[^/]' \| \
20122 X"$ac_file" : 'X\(//\)$' \| \
20123 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20124 $as_echo X"$ac_file" |
20125 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20126 s//\1/
20129 /^X\(\/\/\)[^/].*/{
20130 s//\1/
20133 /^X\(\/\/\)$/{
20134 s//\1/
20137 /^X\(\/\).*/{
20138 s//\1/
20141 s/.*/./; q'`
20142 as_dir="$ac_dir"; as_fn_mkdir_p
20143 ac_builddir=.
20145 case "$ac_dir" in
20146 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20148 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20149 # A ".." for each directory in $ac_dir_suffix.
20150 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20151 case $ac_top_builddir_sub in
20152 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20153 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20154 esac ;;
20155 esac
20156 ac_abs_top_builddir=$ac_pwd
20157 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20158 # for backward compatibility:
20159 ac_top_builddir=$ac_top_build_prefix
20161 case $srcdir in
20162 .) # We are building in place.
20163 ac_srcdir=.
20164 ac_top_srcdir=$ac_top_builddir_sub
20165 ac_abs_top_srcdir=$ac_pwd ;;
20166 [\\/]* | ?:[\\/]* ) # Absolute name.
20167 ac_srcdir=$srcdir$ac_dir_suffix;
20168 ac_top_srcdir=$srcdir
20169 ac_abs_top_srcdir=$srcdir ;;
20170 *) # Relative name.
20171 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20172 ac_top_srcdir=$ac_top_build_prefix$srcdir
20173 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20174 esac
20175 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20178 case $ac_mode in
20181 # CONFIG_FILE
20184 case $INSTALL in
20185 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20186 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20187 esac
20188 _ACEOF
20190 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20191 # If the template does not know about datarootdir, expand it.
20192 # FIXME: This hack should be removed a few years after 2.60.
20193 ac_datarootdir_hack=; ac_datarootdir_seen=
20194 ac_sed_dataroot='
20195 /datarootdir/ {
20199 /@datadir@/p
20200 /@docdir@/p
20201 /@infodir@/p
20202 /@localedir@/p
20203 /@mandir@/p'
20204 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20205 *datarootdir*) ac_datarootdir_seen=yes;;
20206 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20207 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20208 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20209 _ACEOF
20210 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20211 ac_datarootdir_hack='
20212 s&@datadir@&$datadir&g
20213 s&@docdir@&$docdir&g
20214 s&@infodir@&$infodir&g
20215 s&@localedir@&$localedir&g
20216 s&@mandir@&$mandir&g
20217 s&\\\${datarootdir}&$datarootdir&g' ;;
20218 esac
20219 _ACEOF
20221 # Neutralize VPATH when `$srcdir' = `.'.
20222 # Shell code in configure.ac might set extrasub.
20223 # FIXME: do we really want to maintain this feature?
20224 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20225 ac_sed_extra="$ac_vpsub
20226 $extrasub
20227 _ACEOF
20228 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20230 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20231 s|@configure_input@|$ac_sed_conf_input|;t t
20232 s&@top_builddir@&$ac_top_builddir_sub&;t t
20233 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20234 s&@srcdir@&$ac_srcdir&;t t
20235 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20236 s&@top_srcdir@&$ac_top_srcdir&;t t
20237 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20238 s&@builddir@&$ac_builddir&;t t
20239 s&@abs_builddir@&$ac_abs_builddir&;t t
20240 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20241 s&@INSTALL@&$ac_INSTALL&;t t
20242 $ac_datarootdir_hack
20244 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
20245 if $ac_cs_awk_getline; then
20246 $AWK -f "$ac_tmp/subs.awk"
20247 else
20248 $AWK -f "$ac_tmp/subs.awk" | $SHELL
20249 fi \
20250 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20252 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20253 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20254 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20255 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20256 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20257 which seems to be undefined. Please make sure it is defined" >&5
20258 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20259 which seems to be undefined. Please make sure it is defined" >&2;}
20261 rm -f "$ac_tmp/stdin"
20262 case $ac_file in
20263 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20264 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20265 esac \
20266 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20270 # CONFIG_HEADER
20272 if test x"$ac_file" != x-; then
20274 $as_echo "/* $configure_input */" \
20275 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20276 } >"$ac_tmp/config.h" \
20277 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20278 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20279 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20280 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20281 else
20282 rm -f "$ac_file"
20283 mv "$ac_tmp/config.h" "$ac_file" \
20284 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20286 else
20287 $as_echo "/* $configure_input */" \
20288 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20289 || as_fn_error $? "could not create -" "$LINENO" 5
20294 # CONFIG_LINK
20297 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20299 else
20300 # Prefer the file from the source tree if names are identical.
20301 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20302 ac_source=$srcdir/$ac_source
20305 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20306 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20308 if test ! -r "$ac_source"; then
20309 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20311 rm -f "$ac_file"
20313 # Try a relative symlink, then a hard link, then a copy.
20314 case $ac_source in
20315 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20316 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20317 esac
20318 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20319 ln "$ac_source" "$ac_file" 2>/dev/null ||
20320 cp -p "$ac_source" "$ac_file" ||
20321 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20324 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20325 $as_echo "$as_me: executing $ac_file commands" >&6;}
20327 esac
20330 case $ac_file$ac_mode in
20331 "config.h":H) echo > stamp-h ;;
20332 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
20333 "nm.h":L) echo > stamp-nmh ;;
20334 "gcore":F) chmod +x gcore ;;
20336 esac
20337 done # for ac_tag
20340 as_fn_exit 0
20341 _ACEOF
20342 ac_clean_files=$ac_clean_files_save
20344 test $ac_write_fail = 0 ||
20345 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20348 # configure is writing to config.log, and then calls config.status.
20349 # config.status does its own redirection, appending to config.log.
20350 # Unfortunately, on DOS this fails, as config.log is still kept open
20351 # by configure, so config.status won't be able to write to it; its
20352 # output is simply discarded. So we exec the FD to /dev/null,
20353 # effectively closing config.log, so it can be properly (re)opened and
20354 # appended to by config.status. When coming back to configure, we
20355 # need to make the FD available again.
20356 if test "$no_create" != yes; then
20357 ac_cs_success=:
20358 ac_config_status_args=
20359 test "$silent" = yes &&
20360 ac_config_status_args="$ac_config_status_args --quiet"
20361 exec 5>/dev/null
20362 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20363 exec 5>>config.log
20364 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20365 # would make configure fail if this is the last instruction.
20366 $ac_cs_success || as_fn_exit 1
20370 # CONFIG_SUBDIRS section.
20372 if test "$no_recursion" != yes; then
20374 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
20375 # so they do not pile up.
20376 ac_sub_configure_args=
20377 ac_prev=
20378 eval "set x $ac_configure_args"
20379 shift
20380 for ac_arg
20382 if test -n "$ac_prev"; then
20383 ac_prev=
20384 continue
20386 case $ac_arg in
20387 -cache-file | --cache-file | --cache-fil | --cache-fi \
20388 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
20389 ac_prev=cache_file ;;
20390 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
20391 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
20392 | --c=*)
20394 --config-cache | -C)
20396 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
20397 ac_prev=srcdir ;;
20398 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
20400 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
20401 ac_prev=prefix ;;
20402 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
20404 --disable-option-checking)
20407 case $ac_arg in
20408 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
20409 esac
20410 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
20411 esac
20412 done
20414 # Always prepend --prefix to ensure using the same prefix
20415 # in subdir configurations.
20416 ac_arg="--prefix=$prefix"
20417 case $ac_arg in
20418 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
20419 esac
20420 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
20422 # Pass --silent
20423 if test "$silent" = yes; then
20424 ac_sub_configure_args="--silent $ac_sub_configure_args"
20427 # Always prepend --disable-option-checking to silence warnings, since
20428 # different subdirs can have different --enable and --with options.
20429 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
20431 ac_popdir=`pwd`
20432 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
20434 # Do not complain, so a configure script can configure whichever
20435 # parts of a large source tree are present.
20436 test -d "$srcdir/$ac_dir" || continue
20438 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
20439 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
20440 $as_echo "$ac_msg" >&6
20441 as_dir="$ac_dir"; as_fn_mkdir_p
20442 ac_builddir=.
20444 case "$ac_dir" in
20445 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20447 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20448 # A ".." for each directory in $ac_dir_suffix.
20449 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20450 case $ac_top_builddir_sub in
20451 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20452 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20453 esac ;;
20454 esac
20455 ac_abs_top_builddir=$ac_pwd
20456 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20457 # for backward compatibility:
20458 ac_top_builddir=$ac_top_build_prefix
20460 case $srcdir in
20461 .) # We are building in place.
20462 ac_srcdir=.
20463 ac_top_srcdir=$ac_top_builddir_sub
20464 ac_abs_top_srcdir=$ac_pwd ;;
20465 [\\/]* | ?:[\\/]* ) # Absolute name.
20466 ac_srcdir=$srcdir$ac_dir_suffix;
20467 ac_top_srcdir=$srcdir
20468 ac_abs_top_srcdir=$srcdir ;;
20469 *) # Relative name.
20470 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20471 ac_top_srcdir=$ac_top_build_prefix$srcdir
20472 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20473 esac
20474 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20477 cd "$ac_dir"
20479 # Check for guested configure; otherwise get Cygnus style configure.
20480 if test -f "$ac_srcdir/configure.gnu"; then
20481 ac_sub_configure=$ac_srcdir/configure.gnu
20482 elif test -f "$ac_srcdir/configure"; then
20483 ac_sub_configure=$ac_srcdir/configure
20484 elif test -f "$ac_srcdir/configure.in"; then
20485 # This should be Cygnus configure.
20486 ac_sub_configure=$ac_aux_dir/configure
20487 else
20488 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
20489 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
20490 ac_sub_configure=
20493 # The recursion is here.
20494 if test -n "$ac_sub_configure"; then
20495 # Make the cache file name correct relative to the subdirectory.
20496 case $cache_file in
20497 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
20498 *) # Relative name.
20499 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
20500 esac
20502 { $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
20503 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
20504 # The eval makes quoting arguments work.
20505 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
20506 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
20507 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
20510 cd "$ac_popdir"
20511 done
20513 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20514 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20515 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}