gdb: add .flake8 file
[deliverable/binutils-gdb.git] / gdb / configure
... / ...
CommitLineData
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69.
4#
5#
6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7#
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
14
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if 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
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
31fi
32
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_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.
43if 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 --'
47elif (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'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
79fi
80
81
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
90as_myself=
91case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94for as_dir in $PATH
95do
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
100IFS=$as_save_IFS
101
102 ;;
103esac
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.
106if test "x$as_myself" = x; then
107 as_myself=$0
108fi
109if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112fi
113
114# Unset variables that we do not need and which cause bugs (e.g. in
115# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116# suppresses any "Segmentation fault" message there. '((' could
117# trigger a bug in pdksh 5.2.14.
118for as_var in BASH_ENV ENV MAIL MAILPATH
119do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121done
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export LANGUAGE
131
132# CDPATH.
133(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135# Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140# neutralization value for shells without unset; and this also
141# works around shells that cannot unset nonexistent variables.
142# Preserve -v and -x to the replacement shell.
143BASH_ENV=/dev/null
144ENV=/dev/null
145(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151esac
152exec $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
156as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
160if 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
168else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174esac
175fi
176"
177 as_required="as_fn_return () { (exit \$1); }
178as_fn_success () { as_fn_return 0; }
179as_fn_failure () { as_fn_return 1; }
180as_fn_ret_success () { return 0; }
181as_fn_ret_failure () { return 1; }
182
183exitcode=0
184as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190else
191 exitcode=1; echo positional parameters were not saved.
192fi
193test x\$exitcode = x0 || exit 1
194test -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
199test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202else
203 as_have_required=no
204fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209as_found=false
210for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211do
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225fi
226fi
227 done;;
228 esac
229 as_found=false
230done
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
234fi; }
235IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241# neutralization value for shells without unset; and this also
242# works around shells that cannot unset nonexistent variables.
243# Preserve -v and -x to the replacement shell.
244BASH_ENV=/dev/null
245ENV=/dev/null
246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252esac
253exec $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
257exit 255
258fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266 else
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268$0: including any error possibly output before this
269$0: message. Then install a modern shell, or manually run
270$0: the script under such a shell if you do have one."
271 fi
272 exit 1
273fi
274fi
275fi
276SHELL=${CONFIG_SHELL-/bin/sh}
277export SHELL
278# Unset more variables known to interfere with behavior of common tools.
279CLICOLOR_FORCE= GREP_OPTIONS=
280unset CLICOLOR_FORCE GREP_OPTIONS
281
282## --------------------- ##
283## M4sh Shell Functions. ##
284## --------------------- ##
285# as_fn_unset VAR
286# ---------------
287# Portably unset VAR.
288as_fn_unset ()
289{
290 { eval $1=; unset $1;}
291}
292as_unset=as_fn_unset
293
294# as_fn_set_status STATUS
295# -----------------------
296# Set $? to STATUS, without forking.
297as_fn_set_status ()
298{
299 return $1
300} # as_fn_set_status
301
302# as_fn_exit STATUS
303# -----------------
304# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305as_fn_exit ()
306{
307 set +e
308 as_fn_set_status $1
309 exit $1
310} # as_fn_exit
311
312# as_fn_mkdir_p
313# -------------
314# Create "$as_dir" as a directory, including parents if necessary.
315as_fn_mkdir_p ()
316{
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334$as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358} # as_fn_mkdir_p
359
360# as_fn_executable_p FILE
361# -----------------------
362# Test if FILE is an executable regular file.
363as_fn_executable_p ()
364{
365 test -f "$1" && test -x "$1"
366} # as_fn_executable_p
367# as_fn_append VAR VALUE
368# ----------------------
369# Append the text in VALUE to the end of the definition contained in VAR. Take
370# advantage of any shell optimizations that allow amortized linear growth over
371# repeated appends, instead of the typical quadratic growth present in naive
372# implementations.
373if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383fi # as_fn_append
384
385# as_fn_arith ARG...
386# ------------------
387# Perform arithmetic evaluation on the ARGs, and store the result in the
388# global $as_val. Take advantage of shells that can avoid forks. The arguments
389# must be portable across $(()) and expr.
390if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400fi # as_fn_arith
401
402
403# as_fn_error STATUS ERROR [LINENO LOG_FD]
404# ----------------------------------------
405# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407# script with STATUS, using 1 if that was 0.
408as_fn_error ()
409{
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414 fi
415 $as_echo "$as_me: error: $2" >&2
416 as_fn_exit $as_status
417} # as_fn_error
418
419if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
421 as_expr=expr
422else
423 as_expr=false
424fi
425
426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427 as_basename=basename
428else
429 as_basename=false
430fi
431
432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434else
435 as_dirname=false
436fi
437
438as_me=`$as_basename -- "$0" ||
439$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442$as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
456
457# Avoid depending upon Character Ranges.
458as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461as_cr_digits='0123456789'
462as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
474 sed '
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
479 N
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482 t loop
483 s/-\n.*//
484 ' >$as_me.lineno &&
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
496 # Exit status is that of the last command.
497 exit
498}
499
500ECHO_C= ECHO_N= ECHO_T=
501case `echo -n x` in #(((((
502-n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509*)
510 ECHO_N='-n';;
511esac
512
513rm -f conf$$ conf$$.exe conf$$.file
514if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
516else
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
519fi
520if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
522 as_ln_s='ln -s'
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526 # In both cases, we have to default to `cp -pR'.
527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528 as_ln_s='cp -pR'
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
532 as_ln_s='cp -pR'
533 fi
534else
535 as_ln_s='cp -pR'
536fi
537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538rmdir conf$$.dir 2>/dev/null
539
540if mkdir -p . 2>/dev/null; then
541 as_mkdir_p='mkdir -p "$as_dir"'
542else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545fi
546
547as_test_x='test -x'
548as_executable_p=as_fn_executable_p
549
550# Sed expression to map a string onto a valid CPP name.
551as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553# Sed expression to map a string onto a valid variable name.
554as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 6>&1
559
560# Name of the host.
561# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562# so uname gets run too.
563ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565#
566# Initializations.
567#
568ac_default_prefix=/usr/local
569ac_clean_files=
570ac_config_libobj_dir=.
571LIBOBJS=
572cross_compiling=no
573subdirs=
574MFLAGS=
575MAKEFLAGS=
576
577# Identity of this package.
578PACKAGE_NAME=
579PACKAGE_TARNAME=
580PACKAGE_VERSION=
581PACKAGE_STRING=
582PACKAGE_BUGREPORT=
583PACKAGE_URL=
584
585ac_unique_file="main.c"
586# Factoring default headers for most tests.
587ac_includes_default="\
588#include <stdio.h>
589#ifdef HAVE_SYS_TYPES_H
590# include <sys/types.h>
591#endif
592#ifdef HAVE_SYS_STAT_H
593# include <sys/stat.h>
594#endif
595#ifdef STDC_HEADERS
596# include <stdlib.h>
597# include <stddef.h>
598#else
599# ifdef HAVE_STDLIB_H
600# include <stdlib.h>
601# endif
602#endif
603#ifdef HAVE_STRING_H
604# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
605# include <memory.h>
606# endif
607# include <string.h>
608#endif
609#ifdef HAVE_STRINGS_H
610# include <strings.h>
611#endif
612#ifdef HAVE_INTTYPES_H
613# include <inttypes.h>
614#endif
615#ifdef HAVE_STDINT_H
616# include <stdint.h>
617#endif
618#ifdef HAVE_UNISTD_H
619# include <unistd.h>
620#endif"
621
622ac_header_list=
623enable_option_checking=no
624ac_subst_vars='LTLIBOBJS
625LIBOBJS
626NM_TRANSFORM_NAME
627GAS_TRANSFORM_NAME
628READELF_TRANSFORM_NAME
629STRIP_TRANSFORM_NAME
630GCORE_TRANSFORM_NAME
631GDB_TRANSFORM_NAME
632XSLTPROC
633NM_H
634GDB_NM_FILE
635LTLIBXXHASH
636LIBXXHASH
637HAVE_LIBXXHASH
638CTF_DEPS
639LIBCTF
640enable_libctf
641LTLIBBABELTRACE
642LIBBABELTRACE
643HAVE_LIBBABELTRACE
644HAVE_NATIVE_GCORE_HOST
645NAT_GENERATED_FILES
646XM_CLIBS
647MH_CFLAGS
648LOADLIBES
649NAT_CDEPS
650NATDEPFILES
651NAT_FILE
652target_subdir
653CONFIG_UNINSTALL
654CONFIG_INSTALL
655CONFIG_CLEAN
656CONFIG_ALL
657CONFIG_SRCS
658CONFIG_DEPS
659CONFIG_OBS
660PROFILE_CFLAGS
661ENABLE_CFLAGS
662SIM_OBS
663SIM
664XMKMF
665GDBTK_SRC_DIR
666GDBTK_CFLAGS
667GDBTKLIBS
668X_LIBS
669X_LDFLAGS
670X_CFLAGS
671subdirs
672TK_XINCLUDES
673TK_DEPS
674TK_LIBRARY
675TK_INCLUDE
676TK_STUB_LIB_SPEC
677TK_STUB_LIB_FLAG
678TK_STUB_LIB_FILE
679TK_LIB_SPEC
680TK_LIB_FLAG
681TK_LIB_FILE
682TK_SRC_DIR
683TK_BIN_DIR
684TK_VERSION
685TCL_DEPS
686TCL_LIBRARY
687TCL_INCLUDE
688TCL_STUB_LIB_SPEC
689TCL_STUB_LIB_FLAG
690TCL_STUB_LIB_FILE
691TCL_LIB_SPEC
692TCL_LIB_FLAG
693TCL_LIB_FILE
694TCL_SRC_DIR
695TCL_BIN_DIR
696TCL_PATCH_LEVEL
697TCL_VERSION
698WIN32LDAPP
699WIN32LIBS
700GUI_CFLAGS_X
701LIBGUI
702LTLIBLZMA
703LIBLZMA
704HAVE_LIBLZMA
705SER_HARDWIRE
706WERROR_CFLAGS
707WARN_CFLAGS
708SYSTEM_GDBINIT_DIR
709SYSTEM_GDBINIT
710TARGET_SYSTEM_ROOT
711CONFIG_LDFLAGS
712RDYNAMIC
713LTLIBIPT
714LIBIPT
715HAVE_LIBIPT
716PTHREAD_CFLAGS
717PTHREAD_LIBS
718PTHREAD_CC
719ax_pthread_config
720SED
721ALLOCA
722SRCHIGH_CFLAGS
723SRCHIGH_LIBS
724HAVE_GUILE_FALSE
725HAVE_GUILE_TRUE
726GUILE_LIBS
727GUILE_CPPFLAGS
728GUILD_TARGET_FLAG
729GUILD
730pkg_config_prog_path
731HAVE_PYTHON_FALSE
732HAVE_PYTHON_TRUE
733PYTHON_LIBS
734PYTHON_CPPFLAGS
735PYTHON_CFLAGS
736python_prog_path
737LTLIBMPFR
738LIBMPFR
739HAVE_LIBMPFR
740LTLIBGMP
741LIBGMP
742HAVE_LIBGMP
743LTLIBEXPAT
744LIBEXPAT
745HAVE_LIBEXPAT
746JIT_READER_DIR
747TARGET_PTR
748READLINE_TEXI_INCFLAG
749READLINE_CFLAGS
750READLINE_DEPS
751READLINE
752LTLIBICONV
753LIBICONV
754zlibinc
755zlibdir
756MIG
757WINDRES
758DLLTOOL
759AR
760YFLAGS
761YACC
762RANLIB
763LN_S
764INSTALL_DATA
765INSTALL_SCRIPT
766INSTALL_PROGRAM
767AWK
768REPORT_BUGS_TEXI
769REPORT_BUGS_TO
770PKGVERSION
771CODESIGN_CERT
772DEBUGINFOD_LIBS
773DEBUGINFOD_CFLAGS
774PKG_CONFIG_LIBDIR
775PKG_CONFIG_PATH
776PKG_CONFIG
777HAVE_NATIVE_GCORE_TARGET
778TARGET_OBS
779RPATH_ENVVAR
780GDB_DATADIR
781DEBUGDIR
782MAKEINFO_EXTRA_FLAGS
783MAKEINFOFLAGS
784MAKEINFO
785PACKAGE
786CATOBJEXT
787GENCAT
788INSTOBJEXT
789DATADIRNAME
790CATALOGS
791POSUB
792GMSGFMT
793XGETTEXT
794INCINTL
795LIBINTL_DEP
796LIBINTL
797USE_NLS
798CCDEPMODE
799DEPDIR
800am__leading_dot
801CXX_DIALECT
802HAVE_CXX11
803target_noncanonical
804INSTALL_STRIP_PROGRAM
805STRIP
806install_sh
807LARGEFILE_CPPFLAGS
808target_os
809target_vendor
810target_cpu
811target
812host_os
813host_vendor
814host_cpu
815host
816build_os
817build_vendor
818build_cpu
819build
820EGREP
821GREP
822CPP
823ac_ct_CXX
824CXXFLAGS
825CXX
826OBJEXT
827EXEEXT
828ac_ct_CC
829CPPFLAGS
830LDFLAGS
831CFLAGS
832CC
833MAINT
834MAINTAINER_MODE_FALSE
835MAINTAINER_MODE_TRUE
836target_alias
837host_alias
838build_alias
839LIBS
840ECHO_T
841ECHO_N
842ECHO_C
843DEFS
844mandir
845localedir
846libdir
847psdir
848pdfdir
849dvidir
850htmldir
851infodir
852docdir
853oldincludedir
854includedir
855localstatedir
856sharedstatedir
857sysconfdir
858datadir
859datarootdir
860libexecdir
861sbindir
862bindir
863program_transform_name
864prefix
865exec_prefix
866PACKAGE_URL
867PACKAGE_BUGREPORT
868PACKAGE_STRING
869PACKAGE_VERSION
870PACKAGE_TARNAME
871PACKAGE_NAME
872PATH_SEPARATOR
873SHELL'
874ac_subst_files='nat_makefile_frag'
875ac_user_opts='
876enable_option_checking
877enable_maintainer_mode
878enable_plugins
879enable_largefile
880with_separate_debug_dir
881with_gdb_datadir
882with_relocated_sources
883with_auto_load_dir
884with_auto_load_safe_path
885enable_shared
886enable_targets
887enable_64_bit_bfd
888enable_gdbmi
889enable_tui
890enable_gdbtk
891with_debuginfod
892with_libunwind_ia64
893with_curses
894enable_profiling
895enable_codesign
896with_pkgversion
897with_bugurl
898with_system_zlib
899with_gnu_ld
900enable_rpath
901with_libiconv_prefix
902with_libiconv_type
903with_iconv_bin
904with_system_readline
905with_jit_reader_dir
906with_expat
907with_libexpat_prefix
908with_libexpat_type
909with_libgmp_prefix
910with_libgmp_type
911with_mpfr
912with_libmpfr_prefix
913with_libmpfr_type
914with_python
915with_python_libdir
916with_guile
917enable_source_highlight
918with_intel_pt
919with_libipt_prefix
920with_libipt_type
921with_sysroot
922with_system_gdbinit
923with_system_gdbinit_dir
924enable_werror
925enable_build_warnings
926enable_gdb_build_warnings
927enable_ubsan
928with_lzma
929with_liblzma_prefix
930with_liblzma_type
931with_tcl
932with_tk
933with_x
934enable_sim
935with_babeltrace
936with_libbabeltrace_prefix
937with_libbabeltrace_type
938with_xxhash
939enable_libctf
940with_libxxhash_prefix
941with_libxxhash_type
942enable_unit_tests
943'
944 ac_precious_vars='build_alias
945host_alias
946target_alias
947CC
948CFLAGS
949LDFLAGS
950LIBS
951CPPFLAGS
952CXX
953CXXFLAGS
954CCC
955CPP
956MAKEINFO
957MAKEINFOFLAGS
958PKG_CONFIG
959PKG_CONFIG_PATH
960PKG_CONFIG_LIBDIR
961DEBUGINFOD_CFLAGS
962DEBUGINFOD_LIBS
963YACC
964YFLAGS
965XMKMF'
966ac_subdirs_all='gdbtk'
967
968# Initialize some variables set by options.
969ac_init_help=
970ac_init_version=false
971ac_unrecognized_opts=
972ac_unrecognized_sep=
973# The variables have the same names as the options, with
974# dashes changed to underlines.
975cache_file=/dev/null
976exec_prefix=NONE
977no_create=
978no_recursion=
979prefix=NONE
980program_prefix=NONE
981program_suffix=NONE
982program_transform_name=s,x,x,
983silent=
984site=
985srcdir=
986verbose=
987x_includes=NONE
988x_libraries=NONE
989
990# Installation directory options.
991# These are left unexpanded so users can "make install exec_prefix=/foo"
992# and all the variables that are supposed to be based on exec_prefix
993# by default will actually change.
994# Use braces instead of parens because sh, perl, etc. also accept them.
995# (The list follows the same order as the GNU Coding Standards.)
996bindir='${exec_prefix}/bin'
997sbindir='${exec_prefix}/sbin'
998libexecdir='${exec_prefix}/libexec'
999datarootdir='${prefix}/share'
1000datadir='${datarootdir}'
1001sysconfdir='${prefix}/etc'
1002sharedstatedir='${prefix}/com'
1003localstatedir='${prefix}/var'
1004includedir='${prefix}/include'
1005oldincludedir='/usr/include'
1006docdir='${datarootdir}/doc/${PACKAGE}'
1007infodir='${datarootdir}/info'
1008htmldir='${docdir}'
1009dvidir='${docdir}'
1010pdfdir='${docdir}'
1011psdir='${docdir}'
1012libdir='${exec_prefix}/lib'
1013localedir='${datarootdir}/locale'
1014mandir='${datarootdir}/man'
1015
1016ac_prev=
1017ac_dashdash=
1018for ac_option
1019do
1020 # If the previous option needs an argument, assign it.
1021 if test -n "$ac_prev"; then
1022 eval $ac_prev=\$ac_option
1023 ac_prev=
1024 continue
1025 fi
1026
1027 case $ac_option in
1028 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1029 *=) ac_optarg= ;;
1030 *) ac_optarg=yes ;;
1031 esac
1032
1033 # Accept the important Cygnus configure options, so we can diagnose typos.
1034
1035 case $ac_dashdash$ac_option in
1036 --)
1037 ac_dashdash=yes ;;
1038
1039 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1040 ac_prev=bindir ;;
1041 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1042 bindir=$ac_optarg ;;
1043
1044 -build | --build | --buil | --bui | --bu)
1045 ac_prev=build_alias ;;
1046 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1047 build_alias=$ac_optarg ;;
1048
1049 -cache-file | --cache-file | --cache-fil | --cache-fi \
1050 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1051 ac_prev=cache_file ;;
1052 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1053 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1054 cache_file=$ac_optarg ;;
1055
1056 --config-cache | -C)
1057 cache_file=config.cache ;;
1058
1059 -datadir | --datadir | --datadi | --datad)
1060 ac_prev=datadir ;;
1061 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1062 datadir=$ac_optarg ;;
1063
1064 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1065 | --dataroo | --dataro | --datar)
1066 ac_prev=datarootdir ;;
1067 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1068 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1069 datarootdir=$ac_optarg ;;
1070
1071 -disable-* | --disable-*)
1072 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1073 # Reject names that are not valid shell variable names.
1074 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1075 as_fn_error $? "invalid feature name: $ac_useropt"
1076 ac_useropt_orig=$ac_useropt
1077 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1078 case $ac_user_opts in
1079 *"
1080"enable_$ac_useropt"
1081"*) ;;
1082 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1083 ac_unrecognized_sep=', ';;
1084 esac
1085 eval enable_$ac_useropt=no ;;
1086
1087 -docdir | --docdir | --docdi | --doc | --do)
1088 ac_prev=docdir ;;
1089 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1090 docdir=$ac_optarg ;;
1091
1092 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1093 ac_prev=dvidir ;;
1094 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1095 dvidir=$ac_optarg ;;
1096
1097 -enable-* | --enable-*)
1098 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1099 # Reject names that are not valid shell variable names.
1100 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1101 as_fn_error $? "invalid feature name: $ac_useropt"
1102 ac_useropt_orig=$ac_useropt
1103 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1104 case $ac_user_opts in
1105 *"
1106"enable_$ac_useropt"
1107"*) ;;
1108 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1109 ac_unrecognized_sep=', ';;
1110 esac
1111 eval enable_$ac_useropt=\$ac_optarg ;;
1112
1113 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1114 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1115 | --exec | --exe | --ex)
1116 ac_prev=exec_prefix ;;
1117 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1118 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1119 | --exec=* | --exe=* | --ex=*)
1120 exec_prefix=$ac_optarg ;;
1121
1122 -gas | --gas | --ga | --g)
1123 # Obsolete; use --with-gas.
1124 with_gas=yes ;;
1125
1126 -help | --help | --hel | --he | -h)
1127 ac_init_help=long ;;
1128 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1129 ac_init_help=recursive ;;
1130 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1131 ac_init_help=short ;;
1132
1133 -host | --host | --hos | --ho)
1134 ac_prev=host_alias ;;
1135 -host=* | --host=* | --hos=* | --ho=*)
1136 host_alias=$ac_optarg ;;
1137
1138 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1139 ac_prev=htmldir ;;
1140 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1141 | --ht=*)
1142 htmldir=$ac_optarg ;;
1143
1144 -includedir | --includedir | --includedi | --included | --include \
1145 | --includ | --inclu | --incl | --inc)
1146 ac_prev=includedir ;;
1147 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1148 | --includ=* | --inclu=* | --incl=* | --inc=*)
1149 includedir=$ac_optarg ;;
1150
1151 -infodir | --infodir | --infodi | --infod | --info | --inf)
1152 ac_prev=infodir ;;
1153 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1154 infodir=$ac_optarg ;;
1155
1156 -libdir | --libdir | --libdi | --libd)
1157 ac_prev=libdir ;;
1158 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1159 libdir=$ac_optarg ;;
1160
1161 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1162 | --libexe | --libex | --libe)
1163 ac_prev=libexecdir ;;
1164 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1165 | --libexe=* | --libex=* | --libe=*)
1166 libexecdir=$ac_optarg ;;
1167
1168 -localedir | --localedir | --localedi | --localed | --locale)
1169 ac_prev=localedir ;;
1170 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1171 localedir=$ac_optarg ;;
1172
1173 -localstatedir | --localstatedir | --localstatedi | --localstated \
1174 | --localstate | --localstat | --localsta | --localst | --locals)
1175 ac_prev=localstatedir ;;
1176 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1177 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1178 localstatedir=$ac_optarg ;;
1179
1180 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1181 ac_prev=mandir ;;
1182 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1183 mandir=$ac_optarg ;;
1184
1185 -nfp | --nfp | --nf)
1186 # Obsolete; use --without-fp.
1187 with_fp=no ;;
1188
1189 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1190 | --no-cr | --no-c | -n)
1191 no_create=yes ;;
1192
1193 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1194 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1195 no_recursion=yes ;;
1196
1197 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1198 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1199 | --oldin | --oldi | --old | --ol | --o)
1200 ac_prev=oldincludedir ;;
1201 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1202 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1203 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1204 oldincludedir=$ac_optarg ;;
1205
1206 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1207 ac_prev=prefix ;;
1208 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1209 prefix=$ac_optarg ;;
1210
1211 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1212 | --program-pre | --program-pr | --program-p)
1213 ac_prev=program_prefix ;;
1214 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1215 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1216 program_prefix=$ac_optarg ;;
1217
1218 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1219 | --program-suf | --program-su | --program-s)
1220 ac_prev=program_suffix ;;
1221 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1222 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1223 program_suffix=$ac_optarg ;;
1224
1225 -program-transform-name | --program-transform-name \
1226 | --program-transform-nam | --program-transform-na \
1227 | --program-transform-n | --program-transform- \
1228 | --program-transform | --program-transfor \
1229 | --program-transfo | --program-transf \
1230 | --program-trans | --program-tran \
1231 | --progr-tra | --program-tr | --program-t)
1232 ac_prev=program_transform_name ;;
1233 -program-transform-name=* | --program-transform-name=* \
1234 | --program-transform-nam=* | --program-transform-na=* \
1235 | --program-transform-n=* | --program-transform-=* \
1236 | --program-transform=* | --program-transfor=* \
1237 | --program-transfo=* | --program-transf=* \
1238 | --program-trans=* | --program-tran=* \
1239 | --progr-tra=* | --program-tr=* | --program-t=*)
1240 program_transform_name=$ac_optarg ;;
1241
1242 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1243 ac_prev=pdfdir ;;
1244 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1245 pdfdir=$ac_optarg ;;
1246
1247 -psdir | --psdir | --psdi | --psd | --ps)
1248 ac_prev=psdir ;;
1249 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1250 psdir=$ac_optarg ;;
1251
1252 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1253 | -silent | --silent | --silen | --sile | --sil)
1254 silent=yes ;;
1255
1256 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1257 ac_prev=sbindir ;;
1258 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1259 | --sbi=* | --sb=*)
1260 sbindir=$ac_optarg ;;
1261
1262 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1263 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1264 | --sharedst | --shareds | --shared | --share | --shar \
1265 | --sha | --sh)
1266 ac_prev=sharedstatedir ;;
1267 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1268 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1269 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1270 | --sha=* | --sh=*)
1271 sharedstatedir=$ac_optarg ;;
1272
1273 -site | --site | --sit)
1274 ac_prev=site ;;
1275 -site=* | --site=* | --sit=*)
1276 site=$ac_optarg ;;
1277
1278 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1279 ac_prev=srcdir ;;
1280 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1281 srcdir=$ac_optarg ;;
1282
1283 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1284 | --syscon | --sysco | --sysc | --sys | --sy)
1285 ac_prev=sysconfdir ;;
1286 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1287 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1288 sysconfdir=$ac_optarg ;;
1289
1290 -target | --target | --targe | --targ | --tar | --ta | --t)
1291 ac_prev=target_alias ;;
1292 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1293 target_alias=$ac_optarg ;;
1294
1295 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1296 verbose=yes ;;
1297
1298 -version | --version | --versio | --versi | --vers | -V)
1299 ac_init_version=: ;;
1300
1301 -with-* | --with-*)
1302 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1303 # Reject names that are not valid shell variable names.
1304 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1305 as_fn_error $? "invalid package name: $ac_useropt"
1306 ac_useropt_orig=$ac_useropt
1307 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1308 case $ac_user_opts in
1309 *"
1310"with_$ac_useropt"
1311"*) ;;
1312 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1313 ac_unrecognized_sep=', ';;
1314 esac
1315 eval with_$ac_useropt=\$ac_optarg ;;
1316
1317 -without-* | --without-*)
1318 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1319 # Reject names that are not valid shell variable names.
1320 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1321 as_fn_error $? "invalid package name: $ac_useropt"
1322 ac_useropt_orig=$ac_useropt
1323 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1324 case $ac_user_opts in
1325 *"
1326"with_$ac_useropt"
1327"*) ;;
1328 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1329 ac_unrecognized_sep=', ';;
1330 esac
1331 eval with_$ac_useropt=no ;;
1332
1333 --x)
1334 # Obsolete; use --with-x.
1335 with_x=yes ;;
1336
1337 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1338 | --x-incl | --x-inc | --x-in | --x-i)
1339 ac_prev=x_includes ;;
1340 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1341 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1342 x_includes=$ac_optarg ;;
1343
1344 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1345 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1346 ac_prev=x_libraries ;;
1347 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1348 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1349 x_libraries=$ac_optarg ;;
1350
1351 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1352Try \`$0 --help' for more information"
1353 ;;
1354
1355 *=*)
1356 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1357 # Reject names that are not valid shell variable names.
1358 case $ac_envvar in #(
1359 '' | [0-9]* | *[!_$as_cr_alnum]* )
1360 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1361 esac
1362 eval $ac_envvar=\$ac_optarg
1363 export $ac_envvar ;;
1364
1365 *)
1366 # FIXME: should be removed in autoconf 3.0.
1367 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1368 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1369 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1370 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1371 ;;
1372
1373 esac
1374done
1375
1376if test -n "$ac_prev"; then
1377 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1378 as_fn_error $? "missing argument to $ac_option"
1379fi
1380
1381if test -n "$ac_unrecognized_opts"; then
1382 case $enable_option_checking in
1383 no) ;;
1384 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1385 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1386 esac
1387fi
1388
1389# Check all directory arguments for consistency.
1390for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1391 datadir sysconfdir sharedstatedir localstatedir includedir \
1392 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1393 libdir localedir mandir
1394do
1395 eval ac_val=\$$ac_var
1396 # Remove trailing slashes.
1397 case $ac_val in
1398 */ )
1399 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1400 eval $ac_var=\$ac_val;;
1401 esac
1402 # Be sure to have absolute directory names.
1403 case $ac_val in
1404 [\\/$]* | ?:[\\/]* ) continue;;
1405 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1406 esac
1407 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1408done
1409
1410# There might be people who depend on the old broken behavior: `$host'
1411# used to hold the argument of --host etc.
1412# FIXME: To remove some day.
1413build=$build_alias
1414host=$host_alias
1415target=$target_alias
1416
1417# FIXME: To remove some day.
1418if test "x$host_alias" != x; then
1419 if test "x$build_alias" = x; then
1420 cross_compiling=maybe
1421 elif test "x$build_alias" != "x$host_alias"; then
1422 cross_compiling=yes
1423 fi
1424fi
1425
1426ac_tool_prefix=
1427test -n "$host_alias" && ac_tool_prefix=$host_alias-
1428
1429test "$silent" = yes && exec 6>/dev/null
1430
1431
1432ac_pwd=`pwd` && test -n "$ac_pwd" &&
1433ac_ls_di=`ls -di .` &&
1434ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1435 as_fn_error $? "working directory cannot be determined"
1436test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1437 as_fn_error $? "pwd does not report name of working directory"
1438
1439
1440# Find the source files, if location was not specified.
1441if test -z "$srcdir"; then
1442 ac_srcdir_defaulted=yes
1443 # Try the directory containing this script, then the parent directory.
1444 ac_confdir=`$as_dirname -- "$as_myself" ||
1445$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1446 X"$as_myself" : 'X\(//\)[^/]' \| \
1447 X"$as_myself" : 'X\(//\)$' \| \
1448 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1449$as_echo X"$as_myself" |
1450 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1451 s//\1/
1452 q
1453 }
1454 /^X\(\/\/\)[^/].*/{
1455 s//\1/
1456 q
1457 }
1458 /^X\(\/\/\)$/{
1459 s//\1/
1460 q
1461 }
1462 /^X\(\/\).*/{
1463 s//\1/
1464 q
1465 }
1466 s/.*/./; q'`
1467 srcdir=$ac_confdir
1468 if test ! -r "$srcdir/$ac_unique_file"; then
1469 srcdir=..
1470 fi
1471else
1472 ac_srcdir_defaulted=no
1473fi
1474if test ! -r "$srcdir/$ac_unique_file"; then
1475 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1476 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1477fi
1478ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1479ac_abs_confdir=`(
1480 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1481 pwd)`
1482# When building in place, set srcdir=.
1483if test "$ac_abs_confdir" = "$ac_pwd"; then
1484 srcdir=.
1485fi
1486# Remove unnecessary trailing slashes from srcdir.
1487# Double slashes in file names in object file debugging info
1488# mess up M-x gdb in Emacs.
1489case $srcdir in
1490*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1491esac
1492for ac_var in $ac_precious_vars; do
1493 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1494 eval ac_env_${ac_var}_value=\$${ac_var}
1495 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1496 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1497done
1498
1499#
1500# Report the --help message.
1501#
1502if test "$ac_init_help" = "long"; then
1503 # Omit some internal or obsolete options to make the list less imposing.
1504 # This message is too long to be a string in the A/UX 3.1 sh.
1505 cat <<_ACEOF
1506\`configure' configures this package to adapt to many kinds of systems.
1507
1508Usage: $0 [OPTION]... [VAR=VALUE]...
1509
1510To assign environment variables (e.g., CC, CFLAGS...), specify them as
1511VAR=VALUE. See below for descriptions of some of the useful variables.
1512
1513Defaults for the options are specified in brackets.
1514
1515Configuration:
1516 -h, --help display this help and exit
1517 --help=short display options specific to this package
1518 --help=recursive display the short help of all the included packages
1519 -V, --version display version information and exit
1520 -q, --quiet, --silent do not print \`checking ...' messages
1521 --cache-file=FILE cache test results in FILE [disabled]
1522 -C, --config-cache alias for \`--cache-file=config.cache'
1523 -n, --no-create do not create output files
1524 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1525
1526Installation directories:
1527 --prefix=PREFIX install architecture-independent files in PREFIX
1528 [$ac_default_prefix]
1529 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1530 [PREFIX]
1531
1532By default, \`make install' will install all the files in
1533\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1534an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1535for instance \`--prefix=\$HOME'.
1536
1537For better control, use the options below.
1538
1539Fine tuning of the installation directories:
1540 --bindir=DIR user executables [EPREFIX/bin]
1541 --sbindir=DIR system admin executables [EPREFIX/sbin]
1542 --libexecdir=DIR program executables [EPREFIX/libexec]
1543 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1544 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1545 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1546 --libdir=DIR object code libraries [EPREFIX/lib]
1547 --includedir=DIR C header files [PREFIX/include]
1548 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1549 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1550 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1551 --infodir=DIR info documentation [DATAROOTDIR/info]
1552 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1553 --mandir=DIR man documentation [DATAROOTDIR/man]
1554 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1555 --htmldir=DIR html documentation [DOCDIR]
1556 --dvidir=DIR dvi documentation [DOCDIR]
1557 --pdfdir=DIR pdf documentation [DOCDIR]
1558 --psdir=DIR ps documentation [DOCDIR]
1559_ACEOF
1560
1561 cat <<\_ACEOF
1562
1563Program names:
1564 --program-prefix=PREFIX prepend PREFIX to installed program names
1565 --program-suffix=SUFFIX append SUFFIX to installed program names
1566 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1567
1568X features:
1569 --x-includes=DIR X include files are in DIR
1570 --x-libraries=DIR X library files are in DIR
1571
1572System types:
1573 --build=BUILD configure for building on BUILD [guessed]
1574 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1575 --target=TARGET configure for building compilers for TARGET [HOST]
1576_ACEOF
1577fi
1578
1579if test -n "$ac_init_help"; then
1580
1581 cat <<\_ACEOF
1582
1583Optional Features:
1584 --disable-option-checking ignore unrecognized --enable/--with options
1585 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1586 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1587 --enable-maintainer-mode
1588 enable make rules and dependencies not useful (and
1589 sometimes confusing) to the casual installer
1590 --enable-plugins Enable support for plugins
1591 --disable-largefile omit support for large files
1592 --enable-shared build shared libraries [default=yes]
1593 --enable-targets=TARGETS
1594 alternative target configurations
1595 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
1596 --disable-gdbmi disable machine-interface (MI)
1597 --enable-tui enable full-screen terminal user interface (TUI)
1598 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1599 --enable-profiling enable profiling of GDB
1600 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
1601 --disable-rpath do not hardcode runtime library paths
1602 --enable-source-highlight
1603 enable source-highlight for source listings
1604 --enable-werror treat compile warnings as errors
1605 --enable-build-warnings enable build-time compiler warnings if gcc is used
1606 --enable-gdb-build-warnings
1607 enable GDB specific build-time compiler warnings if
1608 gcc is used
1609 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
1610 --enable-sim link gdb with simulator
1611 --enable-libctf Handle .ctf type-info sections [default=yes]
1612 --enable-unit-tests Enable the inclusion of unit tests when compiling
1613 GDB
1614
1615Optional Packages:
1616 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1617 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1618 --with-separate-debug-dir=PATH
1619 look for global separate debug info in this path
1620 [LIBDIR/debug]
1621 --with-gdb-datadir=PATH look for global separate data files in this path
1622 [DATADIR/gdb]
1623 --with-relocated-sources=PATH
1624 automatically relocate this path for source files
1625 --with-auto-load-dir=PATH
1626 directories from which to load auto-loaded scripts
1627 [$debugdir:$datadir/auto-load]
1628 --with-auto-load-safe-path=PATH
1629 directories safe to hold auto-loaded files
1630 [--with-auto-load-dir]
1631 --without-auto-load-safe-path
1632 do not restrict auto-loaded files locations
1633 --with-debuginfod Enable debuginfo lookups with debuginfod
1634 (auto/yes/no)
1635 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
1636 --with-curses use the curses library instead of the termcap
1637 library
1638 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1639 --with-bugurl=URL Direct users to URL to report a bug
1640 --with-system-zlib use installed libz
1641 --with-gnu-ld assume the C compiler uses GNU ld default=no
1642 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1643 --without-libiconv-prefix don't search for libiconv in includedir and libdir
1644 --with-libiconv-type=TYPE type of library to search for (auto/static/shared)
1645 --with-iconv-bin=PATH specify where to find the iconv program
1646 --with-system-readline use installed readline library
1647 --with-jit-reader-dir=PATH
1648 directory to load the JIT readers from
1649 --with-expat include expat support (auto/yes/no)
1650 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1651 --without-libexpat-prefix don't search for libexpat in includedir and libdir
1652 --with-libexpat-type=TYPE type of library to search for (auto/static/shared)
1653 --with-libgmp-prefix[=DIR] search for libgmp in DIR/include and DIR/lib
1654 --without-libgmp-prefix don't search for libgmp in includedir and libdir
1655 --with-libgmp-type=TYPE type of library to search for (auto/static/shared)
1656 --with-mpfr include MPFR support (auto/yes/no)
1657 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1658 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
1659 --with-libmpfr-type=TYPE type of library to search for (auto/static/shared)
1660 --with-python[=PYTHON] include python support
1661 (auto/yes/no/<python-program>)
1662 --with-python-libdir[=DIR]
1663 search for python's libraries in DIR
1664 --with-guile[=GUILE] include guile support
1665 (auto/yes/no/<guile-version>/<pkg-config-program>)
1666 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
1667 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1668 --without-libipt-prefix don't search for libipt in includedir and libdir
1669 --with-libipt-type=TYPE type of library to search for (auto/static/shared)
1670 --with-sysroot[=DIR] search for usr/lib et al within DIR
1671 --with-system-gdbinit=PATH
1672 automatically load a system-wide gdbinit file
1673 --with-system-gdbinit-dir=PATH
1674 automatically load system-wide gdbinit files from
1675 this directory
1676 --with-lzma support lzma compression (auto/yes/no)
1677 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1678 --without-liblzma-prefix don't search for liblzma in includedir and libdir
1679 --with-liblzma-type=TYPE type of library to search for (auto/static/shared)
1680 --with-tcl directory containing tcl configuration (tclConfig.sh)
1681 --with-tk directory containing tk configuration (tkConfig.sh)
1682 --with-x use the X Window System
1683 --with-babeltrace include babeltrace support (auto/yes/no)
1684 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1685 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
1686 --with-libbabeltrace-type=TYPE type of library to search for (auto/static/shared)
1687 --with-xxhash use libxxhash for hashing (faster) (auto/yes/no)
1688 --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib
1689 --without-libxxhash-prefix don't search for libxxhash in includedir and libdir
1690 --with-libxxhash-type=TYPE type of library to search for (auto/static/shared)
1691
1692Some influential environment variables:
1693 CC C compiler command
1694 CFLAGS C compiler flags
1695 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1696 nonstandard directory <lib dir>
1697 LIBS libraries to pass to the linker, e.g. -l<library>
1698 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1699 you have headers in a nonstandard directory <include dir>
1700 CXX C++ compiler command
1701 CXXFLAGS C++ compiler flags
1702 CPP C preprocessor
1703 MAKEINFO Parent configure detects if it is of sufficient version.
1704 MAKEINFOFLAGS
1705 Parameters for MAKEINFO.
1706 PKG_CONFIG path to pkg-config utility
1707 PKG_CONFIG_PATH
1708 directories to add to pkg-config's search path
1709 PKG_CONFIG_LIBDIR
1710 path overriding pkg-config's built-in search path
1711 DEBUGINFOD_CFLAGS
1712 C compiler flags for DEBUGINFOD, overriding pkg-config
1713 DEBUGINFOD_LIBS
1714 linker flags for DEBUGINFOD, overriding pkg-config
1715 YACC The `Yet Another Compiler Compiler' implementation to use.
1716 Defaults to the first program found out of: `bison -y', `byacc',
1717 `yacc'.
1718 YFLAGS The list of arguments that will be passed by default to $YACC.
1719 This script will default YFLAGS to the empty string to avoid a
1720 default value of `-d' given by some make applications.
1721 XMKMF Path to xmkmf, Makefile generator for X Window System
1722
1723Use these variables to override the choices made by `configure' or to help
1724it to find libraries and programs with nonstandard names/locations.
1725
1726Report bugs to the package provider.
1727_ACEOF
1728ac_status=$?
1729fi
1730
1731if test "$ac_init_help" = "recursive"; then
1732 # If there are subdirs, report their specific --help.
1733 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1734 test -d "$ac_dir" ||
1735 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1736 continue
1737 ac_builddir=.
1738
1739case "$ac_dir" in
1740.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1741*)
1742 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1743 # A ".." for each directory in $ac_dir_suffix.
1744 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1745 case $ac_top_builddir_sub in
1746 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1747 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1748 esac ;;
1749esac
1750ac_abs_top_builddir=$ac_pwd
1751ac_abs_builddir=$ac_pwd$ac_dir_suffix
1752# for backward compatibility:
1753ac_top_builddir=$ac_top_build_prefix
1754
1755case $srcdir in
1756 .) # We are building in place.
1757 ac_srcdir=.
1758 ac_top_srcdir=$ac_top_builddir_sub
1759 ac_abs_top_srcdir=$ac_pwd ;;
1760 [\\/]* | ?:[\\/]* ) # Absolute name.
1761 ac_srcdir=$srcdir$ac_dir_suffix;
1762 ac_top_srcdir=$srcdir
1763 ac_abs_top_srcdir=$srcdir ;;
1764 *) # Relative name.
1765 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1766 ac_top_srcdir=$ac_top_build_prefix$srcdir
1767 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1768esac
1769ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1770
1771 cd "$ac_dir" || { ac_status=$?; continue; }
1772 # Check for guested configure.
1773 if test -f "$ac_srcdir/configure.gnu"; then
1774 echo &&
1775 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1776 elif test -f "$ac_srcdir/configure"; then
1777 echo &&
1778 $SHELL "$ac_srcdir/configure" --help=recursive
1779 else
1780 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1781 fi || ac_status=$?
1782 cd "$ac_pwd" || { ac_status=$?; break; }
1783 done
1784fi
1785
1786test -n "$ac_init_help" && exit $ac_status
1787if $ac_init_version; then
1788 cat <<\_ACEOF
1789configure
1790generated by GNU Autoconf 2.69
1791
1792Copyright (C) 2012 Free Software Foundation, Inc.
1793This configure script is free software; the Free Software Foundation
1794gives unlimited permission to copy, distribute and modify it.
1795_ACEOF
1796 exit
1797fi
1798
1799## ------------------------ ##
1800## Autoconf initialization. ##
1801## ------------------------ ##
1802
1803# ac_fn_c_try_compile LINENO
1804# --------------------------
1805# Try to compile conftest.$ac_ext, and return whether this succeeded.
1806ac_fn_c_try_compile ()
1807{
1808 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1809 rm -f conftest.$ac_objext
1810 if { { ac_try="$ac_compile"
1811case "(($ac_try" in
1812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1813 *) ac_try_echo=$ac_try;;
1814esac
1815eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1816$as_echo "$ac_try_echo"; } >&5
1817 (eval "$ac_compile") 2>conftest.err
1818 ac_status=$?
1819 if test -s conftest.err; then
1820 grep -v '^ *+' conftest.err >conftest.er1
1821 cat conftest.er1 >&5
1822 mv -f conftest.er1 conftest.err
1823 fi
1824 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1825 test $ac_status = 0; } && {
1826 test -z "$ac_c_werror_flag" ||
1827 test ! -s conftest.err
1828 } && test -s conftest.$ac_objext; then :
1829 ac_retval=0
1830else
1831 $as_echo "$as_me: failed program was:" >&5
1832sed 's/^/| /' conftest.$ac_ext >&5
1833
1834 ac_retval=1
1835fi
1836 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1837 as_fn_set_status $ac_retval
1838
1839} # ac_fn_c_try_compile
1840
1841# ac_fn_cxx_try_compile LINENO
1842# ----------------------------
1843# Try to compile conftest.$ac_ext, and return whether this succeeded.
1844ac_fn_cxx_try_compile ()
1845{
1846 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1847 rm -f conftest.$ac_objext
1848 if { { ac_try="$ac_compile"
1849case "(($ac_try" in
1850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1851 *) ac_try_echo=$ac_try;;
1852esac
1853eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1854$as_echo "$ac_try_echo"; } >&5
1855 (eval "$ac_compile") 2>conftest.err
1856 ac_status=$?
1857 if test -s conftest.err; then
1858 grep -v '^ *+' conftest.err >conftest.er1
1859 cat conftest.er1 >&5
1860 mv -f conftest.er1 conftest.err
1861 fi
1862 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1863 test $ac_status = 0; } && {
1864 test -z "$ac_cxx_werror_flag" ||
1865 test ! -s conftest.err
1866 } && test -s conftest.$ac_objext; then :
1867 ac_retval=0
1868else
1869 $as_echo "$as_me: failed program was:" >&5
1870sed 's/^/| /' conftest.$ac_ext >&5
1871
1872 ac_retval=1
1873fi
1874 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1875 as_fn_set_status $ac_retval
1876
1877} # ac_fn_cxx_try_compile
1878
1879# ac_fn_c_try_cpp LINENO
1880# ----------------------
1881# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1882ac_fn_c_try_cpp ()
1883{
1884 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1885 if { { ac_try="$ac_cpp conftest.$ac_ext"
1886case "(($ac_try" in
1887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1888 *) ac_try_echo=$ac_try;;
1889esac
1890eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1891$as_echo "$ac_try_echo"; } >&5
1892 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1893 ac_status=$?
1894 if test -s conftest.err; then
1895 grep -v '^ *+' conftest.err >conftest.er1
1896 cat conftest.er1 >&5
1897 mv -f conftest.er1 conftest.err
1898 fi
1899 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1900 test $ac_status = 0; } > conftest.i && {
1901 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1902 test ! -s conftest.err
1903 }; then :
1904 ac_retval=0
1905else
1906 $as_echo "$as_me: failed program was:" >&5
1907sed 's/^/| /' conftest.$ac_ext >&5
1908
1909 ac_retval=1
1910fi
1911 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1912 as_fn_set_status $ac_retval
1913
1914} # ac_fn_c_try_cpp
1915
1916# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1917# -------------------------------------------------------
1918# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1919# the include files in INCLUDES and setting the cache variable VAR
1920# accordingly.
1921ac_fn_c_check_header_mongrel ()
1922{
1923 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1924 if eval \${$3+:} false; then :
1925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1926$as_echo_n "checking for $2... " >&6; }
1927if eval \${$3+:} false; then :
1928 $as_echo_n "(cached) " >&6
1929fi
1930eval ac_res=\$$3
1931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1932$as_echo "$ac_res" >&6; }
1933else
1934 # Is the header compilable?
1935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1936$as_echo_n "checking $2 usability... " >&6; }
1937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1938/* end confdefs.h. */
1939$4
1940#include <$2>
1941_ACEOF
1942if ac_fn_c_try_compile "$LINENO"; then :
1943 ac_header_compiler=yes
1944else
1945 ac_header_compiler=no
1946fi
1947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1949$as_echo "$ac_header_compiler" >&6; }
1950
1951# Is the header present?
1952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1953$as_echo_n "checking $2 presence... " >&6; }
1954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1955/* end confdefs.h. */
1956#include <$2>
1957_ACEOF
1958if ac_fn_c_try_cpp "$LINENO"; then :
1959 ac_header_preproc=yes
1960else
1961 ac_header_preproc=no
1962fi
1963rm -f conftest.err conftest.i conftest.$ac_ext
1964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1965$as_echo "$ac_header_preproc" >&6; }
1966
1967# So? What about this header?
1968case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1969 yes:no: )
1970 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1971$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1972 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1973$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1974 ;;
1975 no:yes:* )
1976 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1977$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1978 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1979$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1980 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1981$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1982 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1983$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1984 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1985$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1986 ;;
1987esac
1988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1989$as_echo_n "checking for $2... " >&6; }
1990if eval \${$3+:} false; then :
1991 $as_echo_n "(cached) " >&6
1992else
1993 eval "$3=\$ac_header_compiler"
1994fi
1995eval ac_res=\$$3
1996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1997$as_echo "$ac_res" >&6; }
1998fi
1999 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2000
2001} # ac_fn_c_check_header_mongrel
2002
2003# ac_fn_c_try_run LINENO
2004# ----------------------
2005# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2006# that executables *can* be run.
2007ac_fn_c_try_run ()
2008{
2009 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2010 if { { ac_try="$ac_link"
2011case "(($ac_try" in
2012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2013 *) ac_try_echo=$ac_try;;
2014esac
2015eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2016$as_echo "$ac_try_echo"; } >&5
2017 (eval "$ac_link") 2>&5
2018 ac_status=$?
2019 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2020 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2021 { { case "(($ac_try" in
2022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2023 *) ac_try_echo=$ac_try;;
2024esac
2025eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2026$as_echo "$ac_try_echo"; } >&5
2027 (eval "$ac_try") 2>&5
2028 ac_status=$?
2029 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2030 test $ac_status = 0; }; }; then :
2031 ac_retval=0
2032else
2033 $as_echo "$as_me: program exited with status $ac_status" >&5
2034 $as_echo "$as_me: failed program was:" >&5
2035sed 's/^/| /' conftest.$ac_ext >&5
2036
2037 ac_retval=$ac_status
2038fi
2039 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2040 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2041 as_fn_set_status $ac_retval
2042
2043} # ac_fn_c_try_run
2044
2045# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2046# -------------------------------------------------------
2047# Tests whether HEADER exists and can be compiled using the include files in
2048# INCLUDES, setting the cache variable VAR accordingly.
2049ac_fn_c_check_header_compile ()
2050{
2051 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2053$as_echo_n "checking for $2... " >&6; }
2054if eval \${$3+:} false; then :
2055 $as_echo_n "(cached) " >&6
2056else
2057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2058/* end confdefs.h. */
2059$4
2060#include <$2>
2061_ACEOF
2062if ac_fn_c_try_compile "$LINENO"; then :
2063 eval "$3=yes"
2064else
2065 eval "$3=no"
2066fi
2067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2068fi
2069eval ac_res=\$$3
2070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2071$as_echo "$ac_res" >&6; }
2072 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2073
2074} # ac_fn_c_check_header_compile
2075
2076# ac_fn_c_try_link LINENO
2077# -----------------------
2078# Try to link conftest.$ac_ext, and return whether this succeeded.
2079ac_fn_c_try_link ()
2080{
2081 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2082 rm -f conftest.$ac_objext conftest$ac_exeext
2083 if { { ac_try="$ac_link"
2084case "(($ac_try" in
2085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2086 *) ac_try_echo=$ac_try;;
2087esac
2088eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2089$as_echo "$ac_try_echo"; } >&5
2090 (eval "$ac_link") 2>conftest.err
2091 ac_status=$?
2092 if test -s conftest.err; then
2093 grep -v '^ *+' conftest.err >conftest.er1
2094 cat conftest.er1 >&5
2095 mv -f conftest.er1 conftest.err
2096 fi
2097 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2098 test $ac_status = 0; } && {
2099 test -z "$ac_c_werror_flag" ||
2100 test ! -s conftest.err
2101 } && test -s conftest$ac_exeext && {
2102 test "$cross_compiling" = yes ||
2103 test -x conftest$ac_exeext
2104 }; then :
2105 ac_retval=0
2106else
2107 $as_echo "$as_me: failed program was:" >&5
2108sed 's/^/| /' conftest.$ac_ext >&5
2109
2110 ac_retval=1
2111fi
2112 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2113 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2114 # interfere with the next link command; also delete a directory that is
2115 # left behind by Apple's compiler. We do this before executing the actions.
2116 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2117 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2118 as_fn_set_status $ac_retval
2119
2120} # ac_fn_c_try_link
2121
2122# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2123# --------------------------------------------
2124# Tries to find the compile-time value of EXPR in a program that includes
2125# INCLUDES, setting VAR accordingly. Returns whether the value could be
2126# computed
2127ac_fn_c_compute_int ()
2128{
2129 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2130 if test "$cross_compiling" = yes; then
2131 # Depending upon the size, compute the lo and hi bounds.
2132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2133/* end confdefs.h. */
2134$4
2135int
2136main ()
2137{
2138static int test_array [1 - 2 * !(($2) >= 0)];
2139test_array [0] = 0;
2140return test_array [0];
2141
2142 ;
2143 return 0;
2144}
2145_ACEOF
2146if ac_fn_c_try_compile "$LINENO"; then :
2147 ac_lo=0 ac_mid=0
2148 while :; do
2149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2150/* end confdefs.h. */
2151$4
2152int
2153main ()
2154{
2155static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2156test_array [0] = 0;
2157return test_array [0];
2158
2159 ;
2160 return 0;
2161}
2162_ACEOF
2163if ac_fn_c_try_compile "$LINENO"; then :
2164 ac_hi=$ac_mid; break
2165else
2166 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2167 if test $ac_lo -le $ac_mid; then
2168 ac_lo= ac_hi=
2169 break
2170 fi
2171 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2172fi
2173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2174 done
2175else
2176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2177/* end confdefs.h. */
2178$4
2179int
2180main ()
2181{
2182static int test_array [1 - 2 * !(($2) < 0)];
2183test_array [0] = 0;
2184return test_array [0];
2185
2186 ;
2187 return 0;
2188}
2189_ACEOF
2190if ac_fn_c_try_compile "$LINENO"; then :
2191 ac_hi=-1 ac_mid=-1
2192 while :; do
2193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2194/* end confdefs.h. */
2195$4
2196int
2197main ()
2198{
2199static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2200test_array [0] = 0;
2201return test_array [0];
2202
2203 ;
2204 return 0;
2205}
2206_ACEOF
2207if ac_fn_c_try_compile "$LINENO"; then :
2208 ac_lo=$ac_mid; break
2209else
2210 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2211 if test $ac_mid -le $ac_hi; then
2212 ac_lo= ac_hi=
2213 break
2214 fi
2215 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2216fi
2217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2218 done
2219else
2220 ac_lo= ac_hi=
2221fi
2222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2223fi
2224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2225# Binary search between lo and hi bounds.
2226while test "x$ac_lo" != "x$ac_hi"; do
2227 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2229/* end confdefs.h. */
2230$4
2231int
2232main ()
2233{
2234static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2235test_array [0] = 0;
2236return test_array [0];
2237
2238 ;
2239 return 0;
2240}
2241_ACEOF
2242if ac_fn_c_try_compile "$LINENO"; then :
2243 ac_hi=$ac_mid
2244else
2245 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2246fi
2247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2248done
2249case $ac_lo in #((
2250?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2251'') ac_retval=1 ;;
2252esac
2253 else
2254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2255/* end confdefs.h. */
2256$4
2257static long int longval () { return $2; }
2258static unsigned long int ulongval () { return $2; }
2259#include <stdio.h>
2260#include <stdlib.h>
2261int
2262main ()
2263{
2264
2265 FILE *f = fopen ("conftest.val", "w");
2266 if (! f)
2267 return 1;
2268 if (($2) < 0)
2269 {
2270 long int i = longval ();
2271 if (i != ($2))
2272 return 1;
2273 fprintf (f, "%ld", i);
2274 }
2275 else
2276 {
2277 unsigned long int i = ulongval ();
2278 if (i != ($2))
2279 return 1;
2280 fprintf (f, "%lu", i);
2281 }
2282 /* Do not output a trailing newline, as this causes \r\n confusion
2283 on some platforms. */
2284 return ferror (f) || fclose (f) != 0;
2285
2286 ;
2287 return 0;
2288}
2289_ACEOF
2290if ac_fn_c_try_run "$LINENO"; then :
2291 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2292else
2293 ac_retval=1
2294fi
2295rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2296 conftest.$ac_objext conftest.beam conftest.$ac_ext
2297rm -f conftest.val
2298
2299 fi
2300 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2301 as_fn_set_status $ac_retval
2302
2303} # ac_fn_c_compute_int
2304
2305# ac_fn_c_check_func LINENO FUNC VAR
2306# ----------------------------------
2307# Tests whether FUNC exists, setting the cache variable VAR accordingly
2308ac_fn_c_check_func ()
2309{
2310 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2312$as_echo_n "checking for $2... " >&6; }
2313if eval \${$3+:} false; then :
2314 $as_echo_n "(cached) " >&6
2315else
2316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2317/* end confdefs.h. */
2318/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2319 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2320#define $2 innocuous_$2
2321
2322/* System header to define __stub macros and hopefully few prototypes,
2323 which can conflict with char $2 (); below.
2324 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2325 <limits.h> exists even on freestanding compilers. */
2326
2327#ifdef __STDC__
2328# include <limits.h>
2329#else
2330# include <assert.h>
2331#endif
2332
2333#undef $2
2334
2335/* Override any GCC internal prototype to avoid an error.
2336 Use char because int might match the return type of a GCC
2337 builtin and then its argument prototype would still apply. */
2338#ifdef __cplusplus
2339extern "C"
2340#endif
2341char $2 ();
2342/* The GNU C library defines this for functions which it implements
2343 to always fail with ENOSYS. Some functions are actually named
2344 something starting with __ and the normal name is an alias. */
2345#if defined __stub_$2 || defined __stub___$2
2346choke me
2347#endif
2348
2349int
2350main ()
2351{
2352return $2 ();
2353 ;
2354 return 0;
2355}
2356_ACEOF
2357if ac_fn_c_try_link "$LINENO"; then :
2358 eval "$3=yes"
2359else
2360 eval "$3=no"
2361fi
2362rm -f core conftest.err conftest.$ac_objext \
2363 conftest$ac_exeext conftest.$ac_ext
2364fi
2365eval ac_res=\$$3
2366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2367$as_echo "$ac_res" >&6; }
2368 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2369
2370} # ac_fn_c_check_func
2371
2372# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2373# -------------------------------------------
2374# Tests whether TYPE exists after having included INCLUDES, setting cache
2375# variable VAR accordingly.
2376ac_fn_c_check_type ()
2377{
2378 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2380$as_echo_n "checking for $2... " >&6; }
2381if eval \${$3+:} false; then :
2382 $as_echo_n "(cached) " >&6
2383else
2384 eval "$3=no"
2385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2386/* end confdefs.h. */
2387$4
2388int
2389main ()
2390{
2391if (sizeof ($2))
2392 return 0;
2393 ;
2394 return 0;
2395}
2396_ACEOF
2397if ac_fn_c_try_compile "$LINENO"; then :
2398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2399/* end confdefs.h. */
2400$4
2401int
2402main ()
2403{
2404if (sizeof (($2)))
2405 return 0;
2406 ;
2407 return 0;
2408}
2409_ACEOF
2410if ac_fn_c_try_compile "$LINENO"; then :
2411
2412else
2413 eval "$3=yes"
2414fi
2415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2416fi
2417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2418fi
2419eval ac_res=\$$3
2420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2421$as_echo "$ac_res" >&6; }
2422 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2423
2424} # ac_fn_c_check_type
2425
2426# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2427# ---------------------------------------------
2428# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2429# accordingly.
2430ac_fn_c_check_decl ()
2431{
2432 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2433 as_decl_name=`echo $2|sed 's/ *(.*//'`
2434 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2436$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2437if eval \${$3+:} false; then :
2438 $as_echo_n "(cached) " >&6
2439else
2440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2441/* end confdefs.h. */
2442$4
2443int
2444main ()
2445{
2446#ifndef $as_decl_name
2447#ifdef __cplusplus
2448 (void) $as_decl_use;
2449#else
2450 (void) $as_decl_name;
2451#endif
2452#endif
2453
2454 ;
2455 return 0;
2456}
2457_ACEOF
2458if ac_fn_c_try_compile "$LINENO"; then :
2459 eval "$3=yes"
2460else
2461 eval "$3=no"
2462fi
2463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2464fi
2465eval ac_res=\$$3
2466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2467$as_echo "$ac_res" >&6; }
2468 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2469
2470} # ac_fn_c_check_decl
2471
2472# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2473# ----------------------------------------------------
2474# Tries to find if the field MEMBER exists in type AGGR, after including
2475# INCLUDES, setting cache variable VAR accordingly.
2476ac_fn_c_check_member ()
2477{
2478 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2480$as_echo_n "checking for $2.$3... " >&6; }
2481if eval \${$4+:} false; then :
2482 $as_echo_n "(cached) " >&6
2483else
2484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2485/* end confdefs.h. */
2486$5
2487int
2488main ()
2489{
2490static $2 ac_aggr;
2491if (ac_aggr.$3)
2492return 0;
2493 ;
2494 return 0;
2495}
2496_ACEOF
2497if ac_fn_c_try_compile "$LINENO"; then :
2498 eval "$4=yes"
2499else
2500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2501/* end confdefs.h. */
2502$5
2503int
2504main ()
2505{
2506static $2 ac_aggr;
2507if (sizeof ac_aggr.$3)
2508return 0;
2509 ;
2510 return 0;
2511}
2512_ACEOF
2513if ac_fn_c_try_compile "$LINENO"; then :
2514 eval "$4=yes"
2515else
2516 eval "$4=no"
2517fi
2518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2519fi
2520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2521fi
2522eval ac_res=\$$4
2523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2524$as_echo "$ac_res" >&6; }
2525 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2526
2527} # ac_fn_c_check_member
2528
2529# ac_fn_cxx_try_link LINENO
2530# -------------------------
2531# Try to link conftest.$ac_ext, and return whether this succeeded.
2532ac_fn_cxx_try_link ()
2533{
2534 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2535 rm -f conftest.$ac_objext conftest$ac_exeext
2536 if { { ac_try="$ac_link"
2537case "(($ac_try" in
2538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2539 *) ac_try_echo=$ac_try;;
2540esac
2541eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2542$as_echo "$ac_try_echo"; } >&5
2543 (eval "$ac_link") 2>conftest.err
2544 ac_status=$?
2545 if test -s conftest.err; then
2546 grep -v '^ *+' conftest.err >conftest.er1
2547 cat conftest.er1 >&5
2548 mv -f conftest.er1 conftest.err
2549 fi
2550 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2551 test $ac_status = 0; } && {
2552 test -z "$ac_cxx_werror_flag" ||
2553 test ! -s conftest.err
2554 } && test -s conftest$ac_exeext && {
2555 test "$cross_compiling" = yes ||
2556 test -x conftest$ac_exeext
2557 }; then :
2558 ac_retval=0
2559else
2560 $as_echo "$as_me: failed program was:" >&5
2561sed 's/^/| /' conftest.$ac_ext >&5
2562
2563 ac_retval=1
2564fi
2565 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2566 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2567 # interfere with the next link command; also delete a directory that is
2568 # left behind by Apple's compiler. We do this before executing the actions.
2569 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2570 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2571 as_fn_set_status $ac_retval
2572
2573} # ac_fn_cxx_try_link
2574
2575# ac_fn_cxx_check_func LINENO FUNC VAR
2576# ------------------------------------
2577# Tests whether FUNC exists, setting the cache variable VAR accordingly
2578ac_fn_cxx_check_func ()
2579{
2580 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2582$as_echo_n "checking for $2... " >&6; }
2583if eval \${$3+:} false; then :
2584 $as_echo_n "(cached) " >&6
2585else
2586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2587/* end confdefs.h. */
2588/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2589 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2590#define $2 innocuous_$2
2591
2592/* System header to define __stub macros and hopefully few prototypes,
2593 which can conflict with char $2 (); below.
2594 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2595 <limits.h> exists even on freestanding compilers. */
2596
2597#ifdef __STDC__
2598# include <limits.h>
2599#else
2600# include <assert.h>
2601#endif
2602
2603#undef $2
2604
2605/* Override any GCC internal prototype to avoid an error.
2606 Use char because int might match the return type of a GCC
2607 builtin and then its argument prototype would still apply. */
2608#ifdef __cplusplus
2609extern "C"
2610#endif
2611char $2 ();
2612/* The GNU C library defines this for functions which it implements
2613 to always fail with ENOSYS. Some functions are actually named
2614 something starting with __ and the normal name is an alias. */
2615#if defined __stub_$2 || defined __stub___$2
2616choke me
2617#endif
2618
2619int
2620main ()
2621{
2622return $2 ();
2623 ;
2624 return 0;
2625}
2626_ACEOF
2627if ac_fn_cxx_try_link "$LINENO"; then :
2628 eval "$3=yes"
2629else
2630 eval "$3=no"
2631fi
2632rm -f core conftest.err conftest.$ac_objext \
2633 conftest$ac_exeext conftest.$ac_ext
2634fi
2635eval ac_res=\$$3
2636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2637$as_echo "$ac_res" >&6; }
2638 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2639
2640} # ac_fn_cxx_check_func
2641cat >config.log <<_ACEOF
2642This file contains any messages produced by compilers while
2643running configure, to aid debugging if configure makes a mistake.
2644
2645It was created by $as_me, which was
2646generated by GNU Autoconf 2.69. Invocation command line was
2647
2648 $ $0 $@
2649
2650_ACEOF
2651exec 5>>config.log
2652{
2653cat <<_ASUNAME
2654## --------- ##
2655## Platform. ##
2656## --------- ##
2657
2658hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2659uname -m = `(uname -m) 2>/dev/null || echo unknown`
2660uname -r = `(uname -r) 2>/dev/null || echo unknown`
2661uname -s = `(uname -s) 2>/dev/null || echo unknown`
2662uname -v = `(uname -v) 2>/dev/null || echo unknown`
2663
2664/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2665/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2666
2667/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2668/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2669/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2670/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2671/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2672/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2673/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2674
2675_ASUNAME
2676
2677as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2678for as_dir in $PATH
2679do
2680 IFS=$as_save_IFS
2681 test -z "$as_dir" && as_dir=.
2682 $as_echo "PATH: $as_dir"
2683 done
2684IFS=$as_save_IFS
2685
2686} >&5
2687
2688cat >&5 <<_ACEOF
2689
2690
2691## ----------- ##
2692## Core tests. ##
2693## ----------- ##
2694
2695_ACEOF
2696
2697
2698# Keep a trace of the command line.
2699# Strip out --no-create and --no-recursion so they do not pile up.
2700# Strip out --silent because we don't want to record it for future runs.
2701# Also quote any args containing shell meta-characters.
2702# Make two passes to allow for proper duplicate-argument suppression.
2703ac_configure_args=
2704ac_configure_args0=
2705ac_configure_args1=
2706ac_must_keep_next=false
2707for ac_pass in 1 2
2708do
2709 for ac_arg
2710 do
2711 case $ac_arg in
2712 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2713 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2714 | -silent | --silent | --silen | --sile | --sil)
2715 continue ;;
2716 *\'*)
2717 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2718 esac
2719 case $ac_pass in
2720 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2721 2)
2722 as_fn_append ac_configure_args1 " '$ac_arg'"
2723 if test $ac_must_keep_next = true; then
2724 ac_must_keep_next=false # Got value, back to normal.
2725 else
2726 case $ac_arg in
2727 *=* | --config-cache | -C | -disable-* | --disable-* \
2728 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2729 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2730 | -with-* | --with-* | -without-* | --without-* | --x)
2731 case "$ac_configure_args0 " in
2732 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2733 esac
2734 ;;
2735 -* ) ac_must_keep_next=true ;;
2736 esac
2737 fi
2738 as_fn_append ac_configure_args " '$ac_arg'"
2739 ;;
2740 esac
2741 done
2742done
2743{ ac_configure_args0=; unset ac_configure_args0;}
2744{ ac_configure_args1=; unset ac_configure_args1;}
2745
2746# When interrupted or exit'd, cleanup temporary files, and complete
2747# config.log. We remove comments because anyway the quotes in there
2748# would cause problems or look ugly.
2749# WARNING: Use '\'' to represent an apostrophe within the trap.
2750# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2751trap 'exit_status=$?
2752 # Save into config.log some information that might help in debugging.
2753 {
2754 echo
2755
2756 $as_echo "## ---------------- ##
2757## Cache variables. ##
2758## ---------------- ##"
2759 echo
2760 # The following way of writing the cache mishandles newlines in values,
2761(
2762 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2763 eval ac_val=\$$ac_var
2764 case $ac_val in #(
2765 *${as_nl}*)
2766 case $ac_var in #(
2767 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2768$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2769 esac
2770 case $ac_var in #(
2771 _ | IFS | as_nl) ;; #(
2772 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2773 *) { eval $ac_var=; unset $ac_var;} ;;
2774 esac ;;
2775 esac
2776 done
2777 (set) 2>&1 |
2778 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2779 *${as_nl}ac_space=\ *)
2780 sed -n \
2781 "s/'\''/'\''\\\\'\'''\''/g;
2782 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2783 ;; #(
2784 *)
2785 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2786 ;;
2787 esac |
2788 sort
2789)
2790 echo
2791
2792 $as_echo "## ----------------- ##
2793## Output variables. ##
2794## ----------------- ##"
2795 echo
2796 for ac_var in $ac_subst_vars
2797 do
2798 eval ac_val=\$$ac_var
2799 case $ac_val in
2800 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2801 esac
2802 $as_echo "$ac_var='\''$ac_val'\''"
2803 done | sort
2804 echo
2805
2806 if test -n "$ac_subst_files"; then
2807 $as_echo "## ------------------- ##
2808## File substitutions. ##
2809## ------------------- ##"
2810 echo
2811 for ac_var in $ac_subst_files
2812 do
2813 eval ac_val=\$$ac_var
2814 case $ac_val in
2815 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2816 esac
2817 $as_echo "$ac_var='\''$ac_val'\''"
2818 done | sort
2819 echo
2820 fi
2821
2822 if test -s confdefs.h; then
2823 $as_echo "## ----------- ##
2824## confdefs.h. ##
2825## ----------- ##"
2826 echo
2827 cat confdefs.h
2828 echo
2829 fi
2830 test "$ac_signal" != 0 &&
2831 $as_echo "$as_me: caught signal $ac_signal"
2832 $as_echo "$as_me: exit $exit_status"
2833 } >&5
2834 rm -f core *.core core.conftest.* &&
2835 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2836 exit $exit_status
2837' 0
2838for ac_signal in 1 2 13 15; do
2839 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2840done
2841ac_signal=0
2842
2843# confdefs.h avoids OS command line length limits that DEFS can exceed.
2844rm -f -r conftest* confdefs.h
2845
2846$as_echo "/* confdefs.h */" > confdefs.h
2847
2848# Predefined preprocessor variables.
2849
2850cat >>confdefs.h <<_ACEOF
2851#define PACKAGE_NAME "$PACKAGE_NAME"
2852_ACEOF
2853
2854cat >>confdefs.h <<_ACEOF
2855#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2856_ACEOF
2857
2858cat >>confdefs.h <<_ACEOF
2859#define PACKAGE_VERSION "$PACKAGE_VERSION"
2860_ACEOF
2861
2862cat >>confdefs.h <<_ACEOF
2863#define PACKAGE_STRING "$PACKAGE_STRING"
2864_ACEOF
2865
2866cat >>confdefs.h <<_ACEOF
2867#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2868_ACEOF
2869
2870cat >>confdefs.h <<_ACEOF
2871#define PACKAGE_URL "$PACKAGE_URL"
2872_ACEOF
2873
2874
2875# Let the site file select an alternate cache file if it wants to.
2876# Prefer an explicitly selected file to automatically selected ones.
2877ac_site_file1=NONE
2878ac_site_file2=NONE
2879if test -n "$CONFIG_SITE"; then
2880 # We do not want a PATH search for config.site.
2881 case $CONFIG_SITE in #((
2882 -*) ac_site_file1=./$CONFIG_SITE;;
2883 */*) ac_site_file1=$CONFIG_SITE;;
2884 *) ac_site_file1=./$CONFIG_SITE;;
2885 esac
2886elif test "x$prefix" != xNONE; then
2887 ac_site_file1=$prefix/share/config.site
2888 ac_site_file2=$prefix/etc/config.site
2889else
2890 ac_site_file1=$ac_default_prefix/share/config.site
2891 ac_site_file2=$ac_default_prefix/etc/config.site
2892fi
2893for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2894do
2895 test "x$ac_site_file" = xNONE && continue
2896 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2897 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2898$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2899 sed 's/^/| /' "$ac_site_file" >&5
2900 . "$ac_site_file" \
2901 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2902$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2903as_fn_error $? "failed to load site script $ac_site_file
2904See \`config.log' for more details" "$LINENO" 5; }
2905 fi
2906done
2907
2908if test -r "$cache_file"; then
2909 # Some versions of bash will fail to source /dev/null (special files
2910 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2911 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2912 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2913$as_echo "$as_me: loading cache $cache_file" >&6;}
2914 case $cache_file in
2915 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2916 *) . "./$cache_file";;
2917 esac
2918 fi
2919else
2920 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2921$as_echo "$as_me: creating cache $cache_file" >&6;}
2922 >$cache_file
2923fi
2924
2925as_fn_append ac_header_list " stdlib.h"
2926as_fn_append ac_header_list " unistd.h"
2927as_fn_append ac_header_list " sys/param.h"
2928# Check that the precious variables saved in the cache have kept the same
2929# value.
2930ac_cache_corrupted=false
2931for ac_var in $ac_precious_vars; do
2932 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2933 eval ac_new_set=\$ac_env_${ac_var}_set
2934 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2935 eval ac_new_val=\$ac_env_${ac_var}_value
2936 case $ac_old_set,$ac_new_set in
2937 set,)
2938 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2939$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2940 ac_cache_corrupted=: ;;
2941 ,set)
2942 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2943$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2944 ac_cache_corrupted=: ;;
2945 ,);;
2946 *)
2947 if test "x$ac_old_val" != "x$ac_new_val"; then
2948 # differences in whitespace do not lead to failure.
2949 ac_old_val_w=`echo x $ac_old_val`
2950 ac_new_val_w=`echo x $ac_new_val`
2951 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2952 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2953$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2954 ac_cache_corrupted=:
2955 else
2956 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2957$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2958 eval $ac_var=\$ac_old_val
2959 fi
2960 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2961$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2962 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2963$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2964 fi;;
2965 esac
2966 # Pass precious variables to config.status.
2967 if test "$ac_new_set" = set; then
2968 case $ac_new_val in
2969 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2970 *) ac_arg=$ac_var=$ac_new_val ;;
2971 esac
2972 case " $ac_configure_args " in
2973 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2974 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2975 esac
2976 fi
2977done
2978if $ac_cache_corrupted; then
2979 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2980$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2981 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2982$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2983 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2984fi
2985## -------------------- ##
2986## Main body of script. ##
2987## -------------------- ##
2988
2989ac_ext=c
2990ac_cpp='$CPP $CPPFLAGS'
2991ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2992ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2993ac_compiler_gnu=$ac_cv_c_compiler_gnu
2994
2995
2996
2997
2998
2999
3000
3001ac_config_headers="$ac_config_headers config.h:config.in"
3002
3003
3004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3005$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
3006 # Check whether --enable-maintainer-mode was given.
3007if test "${enable_maintainer_mode+set}" = set; then :
3008 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3009else
3010 USE_MAINTAINER_MODE=no
3011fi
3012
3013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3014$as_echo "$USE_MAINTAINER_MODE" >&6; }
3015 if test $USE_MAINTAINER_MODE = yes; then
3016 MAINTAINER_MODE_TRUE=
3017 MAINTAINER_MODE_FALSE='#'
3018else
3019 MAINTAINER_MODE_TRUE='#'
3020 MAINTAINER_MODE_FALSE=
3021fi
3022
3023 MAINT=$MAINTAINER_MODE_TRUE
3024
3025
3026
3027ac_ext=c
3028ac_cpp='$CPP $CPPFLAGS'
3029ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3030ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3031ac_compiler_gnu=$ac_cv_c_compiler_gnu
3032if test -n "$ac_tool_prefix"; then
3033 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3034set dummy ${ac_tool_prefix}gcc; ac_word=$2
3035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3036$as_echo_n "checking for $ac_word... " >&6; }
3037if ${ac_cv_prog_CC+:} false; then :
3038 $as_echo_n "(cached) " >&6
3039else
3040 if test -n "$CC"; then
3041 ac_cv_prog_CC="$CC" # Let the user override the test.
3042else
3043as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3044for as_dir in $PATH
3045do
3046 IFS=$as_save_IFS
3047 test -z "$as_dir" && as_dir=.
3048 for ac_exec_ext in '' $ac_executable_extensions; do
3049 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3050 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3051 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3052 break 2
3053 fi
3054done
3055 done
3056IFS=$as_save_IFS
3057
3058fi
3059fi
3060CC=$ac_cv_prog_CC
3061if test -n "$CC"; then
3062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3063$as_echo "$CC" >&6; }
3064else
3065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3066$as_echo "no" >&6; }
3067fi
3068
3069
3070fi
3071if test -z "$ac_cv_prog_CC"; then
3072 ac_ct_CC=$CC
3073 # Extract the first word of "gcc", so it can be a program name with args.
3074set dummy gcc; ac_word=$2
3075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3076$as_echo_n "checking for $ac_word... " >&6; }
3077if ${ac_cv_prog_ac_ct_CC+:} false; then :
3078 $as_echo_n "(cached) " >&6
3079else
3080 if test -n "$ac_ct_CC"; then
3081 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3082else
3083as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3084for as_dir in $PATH
3085do
3086 IFS=$as_save_IFS
3087 test -z "$as_dir" && as_dir=.
3088 for ac_exec_ext in '' $ac_executable_extensions; do
3089 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3090 ac_cv_prog_ac_ct_CC="gcc"
3091 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3092 break 2
3093 fi
3094done
3095 done
3096IFS=$as_save_IFS
3097
3098fi
3099fi
3100ac_ct_CC=$ac_cv_prog_ac_ct_CC
3101if test -n "$ac_ct_CC"; then
3102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3103$as_echo "$ac_ct_CC" >&6; }
3104else
3105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3106$as_echo "no" >&6; }
3107fi
3108
3109 if test "x$ac_ct_CC" = x; then
3110 CC=""
3111 else
3112 case $cross_compiling:$ac_tool_warned in
3113yes:)
3114{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3115$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3116ac_tool_warned=yes ;;
3117esac
3118 CC=$ac_ct_CC
3119 fi
3120else
3121 CC="$ac_cv_prog_CC"
3122fi
3123
3124if test -z "$CC"; then
3125 if test -n "$ac_tool_prefix"; then
3126 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3127set dummy ${ac_tool_prefix}cc; ac_word=$2
3128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3129$as_echo_n "checking for $ac_word... " >&6; }
3130if ${ac_cv_prog_CC+:} false; then :
3131 $as_echo_n "(cached) " >&6
3132else
3133 if test -n "$CC"; then
3134 ac_cv_prog_CC="$CC" # Let the user override the test.
3135else
3136as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3137for as_dir in $PATH
3138do
3139 IFS=$as_save_IFS
3140 test -z "$as_dir" && as_dir=.
3141 for ac_exec_ext in '' $ac_executable_extensions; do
3142 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3143 ac_cv_prog_CC="${ac_tool_prefix}cc"
3144 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3145 break 2
3146 fi
3147done
3148 done
3149IFS=$as_save_IFS
3150
3151fi
3152fi
3153CC=$ac_cv_prog_CC
3154if test -n "$CC"; then
3155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3156$as_echo "$CC" >&6; }
3157else
3158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3159$as_echo "no" >&6; }
3160fi
3161
3162
3163 fi
3164fi
3165if test -z "$CC"; then
3166 # Extract the first word of "cc", so it can be a program name with args.
3167set dummy cc; ac_word=$2
3168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3169$as_echo_n "checking for $ac_word... " >&6; }
3170if ${ac_cv_prog_CC+:} false; then :
3171 $as_echo_n "(cached) " >&6
3172else
3173 if test -n "$CC"; then
3174 ac_cv_prog_CC="$CC" # Let the user override the test.
3175else
3176 ac_prog_rejected=no
3177as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3178for as_dir in $PATH
3179do
3180 IFS=$as_save_IFS
3181 test -z "$as_dir" && as_dir=.
3182 for ac_exec_ext in '' $ac_executable_extensions; do
3183 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3184 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3185 ac_prog_rejected=yes
3186 continue
3187 fi
3188 ac_cv_prog_CC="cc"
3189 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3190 break 2
3191 fi
3192done
3193 done
3194IFS=$as_save_IFS
3195
3196if test $ac_prog_rejected = yes; then
3197 # We found a bogon in the path, so make sure we never use it.
3198 set dummy $ac_cv_prog_CC
3199 shift
3200 if test $# != 0; then
3201 # We chose a different compiler from the bogus one.
3202 # However, it has the same basename, so the bogon will be chosen
3203 # first if we set CC to just the basename; use the full file name.
3204 shift
3205 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3206 fi
3207fi
3208fi
3209fi
3210CC=$ac_cv_prog_CC
3211if test -n "$CC"; then
3212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3213$as_echo "$CC" >&6; }
3214else
3215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3216$as_echo "no" >&6; }
3217fi
3218
3219
3220fi
3221if test -z "$CC"; then
3222 if test -n "$ac_tool_prefix"; then
3223 for ac_prog in cl.exe
3224 do
3225 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3226set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3228$as_echo_n "checking for $ac_word... " >&6; }
3229if ${ac_cv_prog_CC+:} false; then :
3230 $as_echo_n "(cached) " >&6
3231else
3232 if test -n "$CC"; then
3233 ac_cv_prog_CC="$CC" # Let the user override the test.
3234else
3235as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3236for as_dir in $PATH
3237do
3238 IFS=$as_save_IFS
3239 test -z "$as_dir" && as_dir=.
3240 for ac_exec_ext in '' $ac_executable_extensions; do
3241 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3242 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3243 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3244 break 2
3245 fi
3246done
3247 done
3248IFS=$as_save_IFS
3249
3250fi
3251fi
3252CC=$ac_cv_prog_CC
3253if test -n "$CC"; then
3254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3255$as_echo "$CC" >&6; }
3256else
3257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3258$as_echo "no" >&6; }
3259fi
3260
3261
3262 test -n "$CC" && break
3263 done
3264fi
3265if test -z "$CC"; then
3266 ac_ct_CC=$CC
3267 for ac_prog in cl.exe
3268do
3269 # Extract the first word of "$ac_prog", so it can be a program name with args.
3270set dummy $ac_prog; ac_word=$2
3271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3272$as_echo_n "checking for $ac_word... " >&6; }
3273if ${ac_cv_prog_ac_ct_CC+:} false; then :
3274 $as_echo_n "(cached) " >&6
3275else
3276 if test -n "$ac_ct_CC"; then
3277 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3278else
3279as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3280for as_dir in $PATH
3281do
3282 IFS=$as_save_IFS
3283 test -z "$as_dir" && as_dir=.
3284 for ac_exec_ext in '' $ac_executable_extensions; do
3285 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3286 ac_cv_prog_ac_ct_CC="$ac_prog"
3287 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3288 break 2
3289 fi
3290done
3291 done
3292IFS=$as_save_IFS
3293
3294fi
3295fi
3296ac_ct_CC=$ac_cv_prog_ac_ct_CC
3297if test -n "$ac_ct_CC"; then
3298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3299$as_echo "$ac_ct_CC" >&6; }
3300else
3301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3302$as_echo "no" >&6; }
3303fi
3304
3305
3306 test -n "$ac_ct_CC" && break
3307done
3308
3309 if test "x$ac_ct_CC" = x; then
3310 CC=""
3311 else
3312 case $cross_compiling:$ac_tool_warned in
3313yes:)
3314{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3315$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3316ac_tool_warned=yes ;;
3317esac
3318 CC=$ac_ct_CC
3319 fi
3320fi
3321
3322fi
3323
3324
3325test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3326$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3327as_fn_error $? "no acceptable C compiler found in \$PATH
3328See \`config.log' for more details" "$LINENO" 5; }
3329
3330# Provide some information about the compiler.
3331$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3332set X $ac_compile
3333ac_compiler=$2
3334for ac_option in --version -v -V -qversion; do
3335 { { ac_try="$ac_compiler $ac_option >&5"
3336case "(($ac_try" in
3337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3338 *) ac_try_echo=$ac_try;;
3339esac
3340eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3341$as_echo "$ac_try_echo"; } >&5
3342 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3343 ac_status=$?
3344 if test -s conftest.err; then
3345 sed '10a\
3346... rest of stderr output deleted ...
3347 10q' conftest.err >conftest.er1
3348 cat conftest.er1 >&5
3349 fi
3350 rm -f conftest.er1 conftest.err
3351 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3352 test $ac_status = 0; }
3353done
3354
3355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3356/* end confdefs.h. */
3357
3358int
3359main ()
3360{
3361
3362 ;
3363 return 0;
3364}
3365_ACEOF
3366ac_clean_files_save=$ac_clean_files
3367ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3368# Try to create an executable without -o first, disregard a.out.
3369# It will help us diagnose broken compilers, and finding out an intuition
3370# of exeext.
3371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3372$as_echo_n "checking whether the C compiler works... " >&6; }
3373ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3374
3375# The possible output files:
3376ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3377
3378ac_rmfiles=
3379for ac_file in $ac_files
3380do
3381 case $ac_file in
3382 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3383 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3384 esac
3385done
3386rm -f $ac_rmfiles
3387
3388if { { ac_try="$ac_link_default"
3389case "(($ac_try" in
3390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3391 *) ac_try_echo=$ac_try;;
3392esac
3393eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3394$as_echo "$ac_try_echo"; } >&5
3395 (eval "$ac_link_default") 2>&5
3396 ac_status=$?
3397 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3398 test $ac_status = 0; }; then :
3399 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3400# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3401# in a Makefile. We should not override ac_cv_exeext if it was cached,
3402# so that the user can short-circuit this test for compilers unknown to
3403# Autoconf.
3404for ac_file in $ac_files ''
3405do
3406 test -f "$ac_file" || continue
3407 case $ac_file in
3408 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3409 ;;
3410 [ab].out )
3411 # We found the default executable, but exeext='' is most
3412 # certainly right.
3413 break;;
3414 *.* )
3415 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3416 then :; else
3417 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3418 fi
3419 # We set ac_cv_exeext here because the later test for it is not
3420 # safe: cross compilers may not add the suffix if given an `-o'
3421 # argument, so we may need to know it at that point already.
3422 # Even if this section looks crufty: it has the advantage of
3423 # actually working.
3424 break;;
3425 * )
3426 break;;
3427 esac
3428done
3429test "$ac_cv_exeext" = no && ac_cv_exeext=
3430
3431else
3432 ac_file=''
3433fi
3434if test -z "$ac_file"; then :
3435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3436$as_echo "no" >&6; }
3437$as_echo "$as_me: failed program was:" >&5
3438sed 's/^/| /' conftest.$ac_ext >&5
3439
3440{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3441$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3442as_fn_error 77 "C compiler cannot create executables
3443See \`config.log' for more details" "$LINENO" 5; }
3444else
3445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3446$as_echo "yes" >&6; }
3447fi
3448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3449$as_echo_n "checking for C compiler default output file name... " >&6; }
3450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3451$as_echo "$ac_file" >&6; }
3452ac_exeext=$ac_cv_exeext
3453
3454rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3455ac_clean_files=$ac_clean_files_save
3456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3457$as_echo_n "checking for suffix of executables... " >&6; }
3458if { { ac_try="$ac_link"
3459case "(($ac_try" in
3460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3461 *) ac_try_echo=$ac_try;;
3462esac
3463eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3464$as_echo "$ac_try_echo"; } >&5
3465 (eval "$ac_link") 2>&5
3466 ac_status=$?
3467 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3468 test $ac_status = 0; }; then :
3469 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3470# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3471# work properly (i.e., refer to `conftest.exe'), while it won't with
3472# `rm'.
3473for ac_file in conftest.exe conftest conftest.*; do
3474 test -f "$ac_file" || continue
3475 case $ac_file in
3476 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3477 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3478 break;;
3479 * ) break;;
3480 esac
3481done
3482else
3483 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3484$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3485as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3486See \`config.log' for more details" "$LINENO" 5; }
3487fi
3488rm -f conftest conftest$ac_cv_exeext
3489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3490$as_echo "$ac_cv_exeext" >&6; }
3491
3492rm -f conftest.$ac_ext
3493EXEEXT=$ac_cv_exeext
3494ac_exeext=$EXEEXT
3495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3496/* end confdefs.h. */
3497#include <stdio.h>
3498int
3499main ()
3500{
3501FILE *f = fopen ("conftest.out", "w");
3502 return ferror (f) || fclose (f) != 0;
3503
3504 ;
3505 return 0;
3506}
3507_ACEOF
3508ac_clean_files="$ac_clean_files conftest.out"
3509# Check that the compiler produces executables we can run. If not, either
3510# the compiler is broken, or we cross compile.
3511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3512$as_echo_n "checking whether we are cross compiling... " >&6; }
3513if test "$cross_compiling" != yes; then
3514 { { ac_try="$ac_link"
3515case "(($ac_try" in
3516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3517 *) ac_try_echo=$ac_try;;
3518esac
3519eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3520$as_echo "$ac_try_echo"; } >&5
3521 (eval "$ac_link") 2>&5
3522 ac_status=$?
3523 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3524 test $ac_status = 0; }
3525 if { ac_try='./conftest$ac_cv_exeext'
3526 { { case "(($ac_try" in
3527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3528 *) ac_try_echo=$ac_try;;
3529esac
3530eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3531$as_echo "$ac_try_echo"; } >&5
3532 (eval "$ac_try") 2>&5
3533 ac_status=$?
3534 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3535 test $ac_status = 0; }; }; then
3536 cross_compiling=no
3537 else
3538 if test "$cross_compiling" = maybe; then
3539 cross_compiling=yes
3540 else
3541 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3542$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3543as_fn_error $? "cannot run C compiled programs.
3544If you meant to cross compile, use \`--host'.
3545See \`config.log' for more details" "$LINENO" 5; }
3546 fi
3547 fi
3548fi
3549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3550$as_echo "$cross_compiling" >&6; }
3551
3552rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3553ac_clean_files=$ac_clean_files_save
3554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3555$as_echo_n "checking for suffix of object files... " >&6; }
3556if ${ac_cv_objext+:} false; then :
3557 $as_echo_n "(cached) " >&6
3558else
3559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3560/* end confdefs.h. */
3561
3562int
3563main ()
3564{
3565
3566 ;
3567 return 0;
3568}
3569_ACEOF
3570rm -f conftest.o conftest.obj
3571if { { ac_try="$ac_compile"
3572case "(($ac_try" in
3573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3574 *) ac_try_echo=$ac_try;;
3575esac
3576eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3577$as_echo "$ac_try_echo"; } >&5
3578 (eval "$ac_compile") 2>&5
3579 ac_status=$?
3580 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3581 test $ac_status = 0; }; then :
3582 for ac_file in conftest.o conftest.obj conftest.*; do
3583 test -f "$ac_file" || continue;
3584 case $ac_file in
3585 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3586 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3587 break;;
3588 esac
3589done
3590else
3591 $as_echo "$as_me: failed program was:" >&5
3592sed 's/^/| /' conftest.$ac_ext >&5
3593
3594{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3595$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3596as_fn_error $? "cannot compute suffix of object files: cannot compile
3597See \`config.log' for more details" "$LINENO" 5; }
3598fi
3599rm -f conftest.$ac_cv_objext conftest.$ac_ext
3600fi
3601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3602$as_echo "$ac_cv_objext" >&6; }
3603OBJEXT=$ac_cv_objext
3604ac_objext=$OBJEXT
3605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3606$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3607if ${ac_cv_c_compiler_gnu+:} false; then :
3608 $as_echo_n "(cached) " >&6
3609else
3610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3611/* end confdefs.h. */
3612
3613int
3614main ()
3615{
3616#ifndef __GNUC__
3617 choke me
3618#endif
3619
3620 ;
3621 return 0;
3622}
3623_ACEOF
3624if ac_fn_c_try_compile "$LINENO"; then :
3625 ac_compiler_gnu=yes
3626else
3627 ac_compiler_gnu=no
3628fi
3629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3630ac_cv_c_compiler_gnu=$ac_compiler_gnu
3631
3632fi
3633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3634$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3635if test $ac_compiler_gnu = yes; then
3636 GCC=yes
3637else
3638 GCC=
3639fi
3640ac_test_CFLAGS=${CFLAGS+set}
3641ac_save_CFLAGS=$CFLAGS
3642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3643$as_echo_n "checking whether $CC accepts -g... " >&6; }
3644if ${ac_cv_prog_cc_g+:} false; then :
3645 $as_echo_n "(cached) " >&6
3646else
3647 ac_save_c_werror_flag=$ac_c_werror_flag
3648 ac_c_werror_flag=yes
3649 ac_cv_prog_cc_g=no
3650 CFLAGS="-g"
3651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3652/* end confdefs.h. */
3653
3654int
3655main ()
3656{
3657
3658 ;
3659 return 0;
3660}
3661_ACEOF
3662if ac_fn_c_try_compile "$LINENO"; then :
3663 ac_cv_prog_cc_g=yes
3664else
3665 CFLAGS=""
3666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3667/* end confdefs.h. */
3668
3669int
3670main ()
3671{
3672
3673 ;
3674 return 0;
3675}
3676_ACEOF
3677if ac_fn_c_try_compile "$LINENO"; then :
3678
3679else
3680 ac_c_werror_flag=$ac_save_c_werror_flag
3681 CFLAGS="-g"
3682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3683/* end confdefs.h. */
3684
3685int
3686main ()
3687{
3688
3689 ;
3690 return 0;
3691}
3692_ACEOF
3693if ac_fn_c_try_compile "$LINENO"; then :
3694 ac_cv_prog_cc_g=yes
3695fi
3696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3697fi
3698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3699fi
3700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3701 ac_c_werror_flag=$ac_save_c_werror_flag
3702fi
3703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3704$as_echo "$ac_cv_prog_cc_g" >&6; }
3705if test "$ac_test_CFLAGS" = set; then
3706 CFLAGS=$ac_save_CFLAGS
3707elif test $ac_cv_prog_cc_g = yes; then
3708 if test "$GCC" = yes; then
3709 CFLAGS="-g -O2"
3710 else
3711 CFLAGS="-g"
3712 fi
3713else
3714 if test "$GCC" = yes; then
3715 CFLAGS="-O2"
3716 else
3717 CFLAGS=
3718 fi
3719fi
3720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3721$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3722if ${ac_cv_prog_cc_c89+:} false; then :
3723 $as_echo_n "(cached) " >&6
3724else
3725 ac_cv_prog_cc_c89=no
3726ac_save_CC=$CC
3727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3728/* end confdefs.h. */
3729#include <stdarg.h>
3730#include <stdio.h>
3731struct stat;
3732/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3733struct buf { int x; };
3734FILE * (*rcsopen) (struct buf *, struct stat *, int);
3735static char *e (p, i)
3736 char **p;
3737 int i;
3738{
3739 return p[i];
3740}
3741static char *f (char * (*g) (char **, int), char **p, ...)
3742{
3743 char *s;
3744 va_list v;
3745 va_start (v,p);
3746 s = g (p, va_arg (v,int));
3747 va_end (v);
3748 return s;
3749}
3750
3751/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3752 function prototypes and stuff, but not '\xHH' hex character constants.
3753 These don't provoke an error unfortunately, instead are silently treated
3754 as 'x'. The following induces an error, until -std is added to get
3755 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3756 array size at least. It's necessary to write '\x00'==0 to get something
3757 that's true only with -std. */
3758int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3759
3760/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3761 inside strings and character constants. */
3762#define FOO(x) 'x'
3763int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3764
3765int test (int i, double x);
3766struct s1 {int (*f) (int a);};
3767struct s2 {int (*f) (double a);};
3768int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3769int argc;
3770char **argv;
3771int
3772main ()
3773{
3774return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3775 ;
3776 return 0;
3777}
3778_ACEOF
3779for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3780 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3781do
3782 CC="$ac_save_CC $ac_arg"
3783 if ac_fn_c_try_compile "$LINENO"; then :
3784 ac_cv_prog_cc_c89=$ac_arg
3785fi
3786rm -f core conftest.err conftest.$ac_objext
3787 test "x$ac_cv_prog_cc_c89" != "xno" && break
3788done
3789rm -f conftest.$ac_ext
3790CC=$ac_save_CC
3791
3792fi
3793# AC_CACHE_VAL
3794case "x$ac_cv_prog_cc_c89" in
3795 x)
3796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3797$as_echo "none needed" >&6; } ;;
3798 xno)
3799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3800$as_echo "unsupported" >&6; } ;;
3801 *)
3802 CC="$CC $ac_cv_prog_cc_c89"
3803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3804$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3805esac
3806if test "x$ac_cv_prog_cc_c89" != xno; then :
3807
3808fi
3809
3810ac_ext=c
3811ac_cpp='$CPP $CPPFLAGS'
3812ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3813ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3814ac_compiler_gnu=$ac_cv_c_compiler_gnu
3815
3816ac_ext=cpp
3817ac_cpp='$CXXCPP $CPPFLAGS'
3818ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3819ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3820ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3821if test -z "$CXX"; then
3822 if test -n "$CCC"; then
3823 CXX=$CCC
3824 else
3825 if test -n "$ac_tool_prefix"; then
3826 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3827 do
3828 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3829set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3831$as_echo_n "checking for $ac_word... " >&6; }
3832if ${ac_cv_prog_CXX+:} false; then :
3833 $as_echo_n "(cached) " >&6
3834else
3835 if test -n "$CXX"; then
3836 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3837else
3838as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3839for as_dir in $PATH
3840do
3841 IFS=$as_save_IFS
3842 test -z "$as_dir" && as_dir=.
3843 for ac_exec_ext in '' $ac_executable_extensions; do
3844 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3845 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3846 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3847 break 2
3848 fi
3849done
3850 done
3851IFS=$as_save_IFS
3852
3853fi
3854fi
3855CXX=$ac_cv_prog_CXX
3856if test -n "$CXX"; then
3857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3858$as_echo "$CXX" >&6; }
3859else
3860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3861$as_echo "no" >&6; }
3862fi
3863
3864
3865 test -n "$CXX" && break
3866 done
3867fi
3868if test -z "$CXX"; then
3869 ac_ct_CXX=$CXX
3870 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3871do
3872 # Extract the first word of "$ac_prog", so it can be a program name with args.
3873set dummy $ac_prog; ac_word=$2
3874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3875$as_echo_n "checking for $ac_word... " >&6; }
3876if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3877 $as_echo_n "(cached) " >&6
3878else
3879 if test -n "$ac_ct_CXX"; then
3880 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3881else
3882as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3883for as_dir in $PATH
3884do
3885 IFS=$as_save_IFS
3886 test -z "$as_dir" && as_dir=.
3887 for ac_exec_ext in '' $ac_executable_extensions; do
3888 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3889 ac_cv_prog_ac_ct_CXX="$ac_prog"
3890 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3891 break 2
3892 fi
3893done
3894 done
3895IFS=$as_save_IFS
3896
3897fi
3898fi
3899ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3900if test -n "$ac_ct_CXX"; then
3901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3902$as_echo "$ac_ct_CXX" >&6; }
3903else
3904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3905$as_echo "no" >&6; }
3906fi
3907
3908
3909 test -n "$ac_ct_CXX" && break
3910done
3911
3912 if test "x$ac_ct_CXX" = x; then
3913 CXX="g++"
3914 else
3915 case $cross_compiling:$ac_tool_warned in
3916yes:)
3917{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3918$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3919ac_tool_warned=yes ;;
3920esac
3921 CXX=$ac_ct_CXX
3922 fi
3923fi
3924
3925 fi
3926fi
3927# Provide some information about the compiler.
3928$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3929set X $ac_compile
3930ac_compiler=$2
3931for ac_option in --version -v -V -qversion; do
3932 { { ac_try="$ac_compiler $ac_option >&5"
3933case "(($ac_try" in
3934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3935 *) ac_try_echo=$ac_try;;
3936esac
3937eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3938$as_echo "$ac_try_echo"; } >&5
3939 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3940 ac_status=$?
3941 if test -s conftest.err; then
3942 sed '10a\
3943... rest of stderr output deleted ...
3944 10q' conftest.err >conftest.er1
3945 cat conftest.er1 >&5
3946 fi
3947 rm -f conftest.er1 conftest.err
3948 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3949 test $ac_status = 0; }
3950done
3951
3952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3953$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3954if ${ac_cv_cxx_compiler_gnu+:} false; then :
3955 $as_echo_n "(cached) " >&6
3956else
3957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3958/* end confdefs.h. */
3959
3960int
3961main ()
3962{
3963#ifndef __GNUC__
3964 choke me
3965#endif
3966
3967 ;
3968 return 0;
3969}
3970_ACEOF
3971if ac_fn_cxx_try_compile "$LINENO"; then :
3972 ac_compiler_gnu=yes
3973else
3974 ac_compiler_gnu=no
3975fi
3976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3977ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3978
3979fi
3980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3981$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3982if test $ac_compiler_gnu = yes; then
3983 GXX=yes
3984else
3985 GXX=
3986fi
3987ac_test_CXXFLAGS=${CXXFLAGS+set}
3988ac_save_CXXFLAGS=$CXXFLAGS
3989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3990$as_echo_n "checking whether $CXX accepts -g... " >&6; }
3991if ${ac_cv_prog_cxx_g+:} false; then :
3992 $as_echo_n "(cached) " >&6
3993else
3994 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3995 ac_cxx_werror_flag=yes
3996 ac_cv_prog_cxx_g=no
3997 CXXFLAGS="-g"
3998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3999/* end confdefs.h. */
4000
4001int
4002main ()
4003{
4004
4005 ;
4006 return 0;
4007}
4008_ACEOF
4009if ac_fn_cxx_try_compile "$LINENO"; then :
4010 ac_cv_prog_cxx_g=yes
4011else
4012 CXXFLAGS=""
4013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4014/* end confdefs.h. */
4015
4016int
4017main ()
4018{
4019
4020 ;
4021 return 0;
4022}
4023_ACEOF
4024if ac_fn_cxx_try_compile "$LINENO"; then :
4025
4026else
4027 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4028 CXXFLAGS="-g"
4029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4030/* end confdefs.h. */
4031
4032int
4033main ()
4034{
4035
4036 ;
4037 return 0;
4038}
4039_ACEOF
4040if ac_fn_cxx_try_compile "$LINENO"; then :
4041 ac_cv_prog_cxx_g=yes
4042fi
4043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4044fi
4045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4046fi
4047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4048 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4049fi
4050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4051$as_echo "$ac_cv_prog_cxx_g" >&6; }
4052if test "$ac_test_CXXFLAGS" = set; then
4053 CXXFLAGS=$ac_save_CXXFLAGS
4054elif test $ac_cv_prog_cxx_g = yes; then
4055 if test "$GXX" = yes; then
4056 CXXFLAGS="-g -O2"
4057 else
4058 CXXFLAGS="-g"
4059 fi
4060else
4061 if test "$GXX" = yes; then
4062 CXXFLAGS="-O2"
4063 else
4064 CXXFLAGS=
4065 fi
4066fi
4067ac_ext=c
4068ac_cpp='$CPP $CPPFLAGS'
4069ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4070ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4071ac_compiler_gnu=$ac_cv_c_compiler_gnu
4072
4073
4074
4075ac_ext=c
4076ac_cpp='$CPP $CPPFLAGS'
4077ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4078ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4079ac_compiler_gnu=$ac_cv_c_compiler_gnu
4080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4081$as_echo_n "checking how to run the C preprocessor... " >&6; }
4082# On Suns, sometimes $CPP names a directory.
4083if test -n "$CPP" && test -d "$CPP"; then
4084 CPP=
4085fi
4086if test -z "$CPP"; then
4087 if ${ac_cv_prog_CPP+:} false; then :
4088 $as_echo_n "(cached) " >&6
4089else
4090 # Double quotes because CPP needs to be expanded
4091 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4092 do
4093 ac_preproc_ok=false
4094for ac_c_preproc_warn_flag in '' yes
4095do
4096 # Use a header file that comes with gcc, so configuring glibc
4097 # with a fresh cross-compiler works.
4098 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4099 # <limits.h> exists even on freestanding compilers.
4100 # On the NeXT, cc -E runs the code through the compiler's parser,
4101 # not just through cpp. "Syntax error" is here to catch this case.
4102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4103/* end confdefs.h. */
4104#ifdef __STDC__
4105# include <limits.h>
4106#else
4107# include <assert.h>
4108#endif
4109 Syntax error
4110_ACEOF
4111if ac_fn_c_try_cpp "$LINENO"; then :
4112
4113else
4114 # Broken: fails on valid input.
4115continue
4116fi
4117rm -f conftest.err conftest.i conftest.$ac_ext
4118
4119 # OK, works on sane cases. Now check whether nonexistent headers
4120 # can be detected and how.
4121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4122/* end confdefs.h. */
4123#include <ac_nonexistent.h>
4124_ACEOF
4125if ac_fn_c_try_cpp "$LINENO"; then :
4126 # Broken: success on invalid input.
4127continue
4128else
4129 # Passes both tests.
4130ac_preproc_ok=:
4131break
4132fi
4133rm -f conftest.err conftest.i conftest.$ac_ext
4134
4135done
4136# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4137rm -f conftest.i conftest.err conftest.$ac_ext
4138if $ac_preproc_ok; then :
4139 break
4140fi
4141
4142 done
4143 ac_cv_prog_CPP=$CPP
4144
4145fi
4146 CPP=$ac_cv_prog_CPP
4147else
4148 ac_cv_prog_CPP=$CPP
4149fi
4150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4151$as_echo "$CPP" >&6; }
4152ac_preproc_ok=false
4153for ac_c_preproc_warn_flag in '' yes
4154do
4155 # Use a header file that comes with gcc, so configuring glibc
4156 # with a fresh cross-compiler works.
4157 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4158 # <limits.h> exists even on freestanding compilers.
4159 # On the NeXT, cc -E runs the code through the compiler's parser,
4160 # not just through cpp. "Syntax error" is here to catch this case.
4161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4162/* end confdefs.h. */
4163#ifdef __STDC__
4164# include <limits.h>
4165#else
4166# include <assert.h>
4167#endif
4168 Syntax error
4169_ACEOF
4170if ac_fn_c_try_cpp "$LINENO"; then :
4171
4172else
4173 # Broken: fails on valid input.
4174continue
4175fi
4176rm -f conftest.err conftest.i conftest.$ac_ext
4177
4178 # OK, works on sane cases. Now check whether nonexistent headers
4179 # can be detected and how.
4180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4181/* end confdefs.h. */
4182#include <ac_nonexistent.h>
4183_ACEOF
4184if ac_fn_c_try_cpp "$LINENO"; then :
4185 # Broken: success on invalid input.
4186continue
4187else
4188 # Passes both tests.
4189ac_preproc_ok=:
4190break
4191fi
4192rm -f conftest.err conftest.i conftest.$ac_ext
4193
4194done
4195# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4196rm -f conftest.i conftest.err conftest.$ac_ext
4197if $ac_preproc_ok; then :
4198
4199else
4200 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4201$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4202as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4203See \`config.log' for more details" "$LINENO" 5; }
4204fi
4205
4206ac_ext=c
4207ac_cpp='$CPP $CPPFLAGS'
4208ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4209ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4210ac_compiler_gnu=$ac_cv_c_compiler_gnu
4211
4212
4213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4214$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4215if ${ac_cv_path_GREP+:} false; then :
4216 $as_echo_n "(cached) " >&6
4217else
4218 if test -z "$GREP"; then
4219 ac_path_GREP_found=false
4220 # Loop through the user's path and test for each of PROGNAME-LIST
4221 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4222for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4223do
4224 IFS=$as_save_IFS
4225 test -z "$as_dir" && as_dir=.
4226 for ac_prog in grep ggrep; do
4227 for ac_exec_ext in '' $ac_executable_extensions; do
4228 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4229 as_fn_executable_p "$ac_path_GREP" || continue
4230# Check for GNU ac_path_GREP and select it if it is found.
4231 # Check for GNU $ac_path_GREP
4232case `"$ac_path_GREP" --version 2>&1` in
4233*GNU*)
4234 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4235*)
4236 ac_count=0
4237 $as_echo_n 0123456789 >"conftest.in"
4238 while :
4239 do
4240 cat "conftest.in" "conftest.in" >"conftest.tmp"
4241 mv "conftest.tmp" "conftest.in"
4242 cp "conftest.in" "conftest.nl"
4243 $as_echo 'GREP' >> "conftest.nl"
4244 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4245 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4246 as_fn_arith $ac_count + 1 && ac_count=$as_val
4247 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4248 # Best one so far, save it but keep looking for a better one
4249 ac_cv_path_GREP="$ac_path_GREP"
4250 ac_path_GREP_max=$ac_count
4251 fi
4252 # 10*(2^10) chars as input seems more than enough
4253 test $ac_count -gt 10 && break
4254 done
4255 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4256esac
4257
4258 $ac_path_GREP_found && break 3
4259 done
4260 done
4261 done
4262IFS=$as_save_IFS
4263 if test -z "$ac_cv_path_GREP"; then
4264 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4265 fi
4266else
4267 ac_cv_path_GREP=$GREP
4268fi
4269
4270fi
4271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4272$as_echo "$ac_cv_path_GREP" >&6; }
4273 GREP="$ac_cv_path_GREP"
4274
4275
4276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4277$as_echo_n "checking for egrep... " >&6; }
4278if ${ac_cv_path_EGREP+:} false; then :
4279 $as_echo_n "(cached) " >&6
4280else
4281 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4282 then ac_cv_path_EGREP="$GREP -E"
4283 else
4284 if test -z "$EGREP"; then
4285 ac_path_EGREP_found=false
4286 # Loop through the user's path and test for each of PROGNAME-LIST
4287 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4288for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4289do
4290 IFS=$as_save_IFS
4291 test -z "$as_dir" && as_dir=.
4292 for ac_prog in egrep; do
4293 for ac_exec_ext in '' $ac_executable_extensions; do
4294 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4295 as_fn_executable_p "$ac_path_EGREP" || continue
4296# Check for GNU ac_path_EGREP and select it if it is found.
4297 # Check for GNU $ac_path_EGREP
4298case `"$ac_path_EGREP" --version 2>&1` in
4299*GNU*)
4300 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4301*)
4302 ac_count=0
4303 $as_echo_n 0123456789 >"conftest.in"
4304 while :
4305 do
4306 cat "conftest.in" "conftest.in" >"conftest.tmp"
4307 mv "conftest.tmp" "conftest.in"
4308 cp "conftest.in" "conftest.nl"
4309 $as_echo 'EGREP' >> "conftest.nl"
4310 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4311 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4312 as_fn_arith $ac_count + 1 && ac_count=$as_val
4313 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4314 # Best one so far, save it but keep looking for a better one
4315 ac_cv_path_EGREP="$ac_path_EGREP"
4316 ac_path_EGREP_max=$ac_count
4317 fi
4318 # 10*(2^10) chars as input seems more than enough
4319 test $ac_count -gt 10 && break
4320 done
4321 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4322esac
4323
4324 $ac_path_EGREP_found && break 3
4325 done
4326 done
4327 done
4328IFS=$as_save_IFS
4329 if test -z "$ac_cv_path_EGREP"; then
4330 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4331 fi
4332else
4333 ac_cv_path_EGREP=$EGREP
4334fi
4335
4336 fi
4337fi
4338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4339$as_echo "$ac_cv_path_EGREP" >&6; }
4340 EGREP="$ac_cv_path_EGREP"
4341
4342
4343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4344$as_echo_n "checking for ANSI C header files... " >&6; }
4345if ${ac_cv_header_stdc+:} false; then :
4346 $as_echo_n "(cached) " >&6
4347else
4348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4349/* end confdefs.h. */
4350#include <stdlib.h>
4351#include <stdarg.h>
4352#include <string.h>
4353#include <float.h>
4354
4355int
4356main ()
4357{
4358
4359 ;
4360 return 0;
4361}
4362_ACEOF
4363if ac_fn_c_try_compile "$LINENO"; then :
4364 ac_cv_header_stdc=yes
4365else
4366 ac_cv_header_stdc=no
4367fi
4368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4369
4370if test $ac_cv_header_stdc = yes; then
4371 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4373/* end confdefs.h. */
4374#include <string.h>
4375
4376_ACEOF
4377if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4378 $EGREP "memchr" >/dev/null 2>&1; then :
4379
4380else
4381 ac_cv_header_stdc=no
4382fi
4383rm -f conftest*
4384
4385fi
4386
4387if test $ac_cv_header_stdc = yes; then
4388 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4390/* end confdefs.h. */
4391#include <stdlib.h>
4392
4393_ACEOF
4394if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4395 $EGREP "free" >/dev/null 2>&1; then :
4396
4397else
4398 ac_cv_header_stdc=no
4399fi
4400rm -f conftest*
4401
4402fi
4403
4404if test $ac_cv_header_stdc = yes; then
4405 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4406 if test "$cross_compiling" = yes; then :
4407 :
4408else
4409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4410/* end confdefs.h. */
4411#include <ctype.h>
4412#include <stdlib.h>
4413#if ((' ' & 0x0FF) == 0x020)
4414# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4415# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4416#else
4417# define ISLOWER(c) \
4418 (('a' <= (c) && (c) <= 'i') \
4419 || ('j' <= (c) && (c) <= 'r') \
4420 || ('s' <= (c) && (c) <= 'z'))
4421# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4422#endif
4423
4424#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4425int
4426main ()
4427{
4428 int i;
4429 for (i = 0; i < 256; i++)
4430 if (XOR (islower (i), ISLOWER (i))
4431 || toupper (i) != TOUPPER (i))
4432 return 2;
4433 return 0;
4434}
4435_ACEOF
4436if ac_fn_c_try_run "$LINENO"; then :
4437
4438else
4439 ac_cv_header_stdc=no
4440fi
4441rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4442 conftest.$ac_objext conftest.beam conftest.$ac_ext
4443fi
4444
4445fi
4446fi
4447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4448$as_echo "$ac_cv_header_stdc" >&6; }
4449if test $ac_cv_header_stdc = yes; then
4450
4451$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4452
4453fi
4454
4455# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4456for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4457 inttypes.h stdint.h unistd.h
4458do :
4459 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4460ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4461"
4462if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4463 cat >>confdefs.h <<_ACEOF
4464#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4465_ACEOF
4466
4467fi
4468
4469done
4470
4471
4472
4473 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4474if test "x$ac_cv_header_minix_config_h" = xyes; then :
4475 MINIX=yes
4476else
4477 MINIX=
4478fi
4479
4480
4481 if test "$MINIX" = yes; then
4482
4483$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4484
4485
4486$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4487
4488
4489$as_echo "#define _MINIX 1" >>confdefs.h
4490
4491 fi
4492
4493
4494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4495$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4496if ${ac_cv_safe_to_define___extensions__+:} false; then :
4497 $as_echo_n "(cached) " >&6
4498else
4499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4500/* end confdefs.h. */
4501
4502# define __EXTENSIONS__ 1
4503 $ac_includes_default
4504int
4505main ()
4506{
4507
4508 ;
4509 return 0;
4510}
4511_ACEOF
4512if ac_fn_c_try_compile "$LINENO"; then :
4513 ac_cv_safe_to_define___extensions__=yes
4514else
4515 ac_cv_safe_to_define___extensions__=no
4516fi
4517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4518fi
4519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4520$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4521 test $ac_cv_safe_to_define___extensions__ = yes &&
4522 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4523
4524 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4525
4526 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4527
4528 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4529
4530 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4531
4532
4533ac_aux_dir=
4534for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4535 if test -f "$ac_dir/install-sh"; then
4536 ac_aux_dir=$ac_dir
4537 ac_install_sh="$ac_aux_dir/install-sh -c"
4538 break
4539 elif test -f "$ac_dir/install.sh"; then
4540 ac_aux_dir=$ac_dir
4541 ac_install_sh="$ac_aux_dir/install.sh -c"
4542 break
4543 elif test -f "$ac_dir/shtool"; then
4544 ac_aux_dir=$ac_dir
4545 ac_install_sh="$ac_aux_dir/shtool install -c"
4546 break
4547 fi
4548done
4549if test -z "$ac_aux_dir"; then
4550 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4551fi
4552
4553# These three variables are undocumented and unsupported,
4554# and are intended to be withdrawn in a future Autoconf release.
4555# They can cause serious problems if a builder's source tree is in a directory
4556# whose full name contains unusual characters.
4557ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4558ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4559ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4560
4561
4562# Make sure we can run config.sub.
4563$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4564 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4565
4566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4567$as_echo_n "checking build system type... " >&6; }
4568if ${ac_cv_build+:} false; then :
4569 $as_echo_n "(cached) " >&6
4570else
4571 ac_build_alias=$build_alias
4572test "x$ac_build_alias" = x &&
4573 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4574test "x$ac_build_alias" = x &&
4575 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4576ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4577 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4578
4579fi
4580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4581$as_echo "$ac_cv_build" >&6; }
4582case $ac_cv_build in
4583*-*-*) ;;
4584*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4585esac
4586build=$ac_cv_build
4587ac_save_IFS=$IFS; IFS='-'
4588set x $ac_cv_build
4589shift
4590build_cpu=$1
4591build_vendor=$2
4592shift; shift
4593# Remember, the first character of IFS is used to create $*,
4594# except with old shells:
4595build_os=$*
4596IFS=$ac_save_IFS
4597case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4598
4599
4600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4601$as_echo_n "checking host system type... " >&6; }
4602if ${ac_cv_host+:} false; then :
4603 $as_echo_n "(cached) " >&6
4604else
4605 if test "x$host_alias" = x; then
4606 ac_cv_host=$ac_cv_build
4607else
4608 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4609 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4610fi
4611
4612fi
4613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4614$as_echo "$ac_cv_host" >&6; }
4615case $ac_cv_host in
4616*-*-*) ;;
4617*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4618esac
4619host=$ac_cv_host
4620ac_save_IFS=$IFS; IFS='-'
4621set x $ac_cv_host
4622shift
4623host_cpu=$1
4624host_vendor=$2
4625shift; shift
4626# Remember, the first character of IFS is used to create $*,
4627# except with old shells:
4628host_os=$*
4629IFS=$ac_save_IFS
4630case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4631
4632
4633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4634$as_echo_n "checking target system type... " >&6; }
4635if ${ac_cv_target+:} false; then :
4636 $as_echo_n "(cached) " >&6
4637else
4638 if test "x$target_alias" = x; then
4639 ac_cv_target=$ac_cv_host
4640else
4641 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4642 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4643fi
4644
4645fi
4646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4647$as_echo "$ac_cv_target" >&6; }
4648case $ac_cv_target in
4649*-*-*) ;;
4650*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
4651esac
4652target=$ac_cv_target
4653ac_save_IFS=$IFS; IFS='-'
4654set x $ac_cv_target
4655shift
4656target_cpu=$1
4657target_vendor=$2
4658shift; shift
4659# Remember, the first character of IFS is used to create $*,
4660# except with old shells:
4661target_os=$*
4662IFS=$ac_save_IFS
4663case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4664
4665
4666# The aliases save the names the user supplied, while $host etc.
4667# will get canonicalized.
4668test -n "$target_alias" &&
4669 test "$program_prefix$program_suffix$program_transform_name" = \
4670 NONENONEs,x,x, &&
4671 program_prefix=${target_alias}-
4672
4673# The tests for host and target for $enable_largefile require
4674# canonical names.
4675
4676
4677
4678# As the $enable_largefile decision depends on --enable-plugins we must set it
4679# even in directories otherwise not depending on the $plugins option.
4680
4681
4682 maybe_plugins=no
4683 for ac_header in dlfcn.h
4684do :
4685 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4686"
4687if test "x$ac_cv_header_dlfcn_h" = xyes; then :
4688 cat >>confdefs.h <<_ACEOF
4689#define HAVE_DLFCN_H 1
4690_ACEOF
4691 maybe_plugins=yes
4692fi
4693
4694done
4695
4696 for ac_header in windows.h
4697do :
4698 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4699"
4700if test "x$ac_cv_header_windows_h" = xyes; then :
4701 cat >>confdefs.h <<_ACEOF
4702#define HAVE_WINDOWS_H 1
4703_ACEOF
4704 maybe_plugins=yes
4705fi
4706
4707done
4708
4709
4710 # Check whether --enable-plugins was given.
4711if test "${enable_plugins+set}" = set; then :
4712 enableval=$enable_plugins; case "${enableval}" in
4713 no) plugins=no ;;
4714 *) plugins=yes
4715 if test "$maybe_plugins" != "yes" ; then
4716 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4717 fi ;;
4718 esac
4719else
4720 plugins=$maybe_plugins
4721
4722fi
4723
4724 if test "$plugins" = "yes"; then
4725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4726$as_echo_n "checking for library containing dlsym... " >&6; }
4727if ${ac_cv_search_dlsym+:} false; then :
4728 $as_echo_n "(cached) " >&6
4729else
4730 ac_func_search_save_LIBS=$LIBS
4731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4732/* end confdefs.h. */
4733
4734/* Override any GCC internal prototype to avoid an error.
4735 Use char because int might match the return type of a GCC
4736 builtin and then its argument prototype would still apply. */
4737#ifdef __cplusplus
4738extern "C"
4739#endif
4740char dlsym ();
4741int
4742main ()
4743{
4744return dlsym ();
4745 ;
4746 return 0;
4747}
4748_ACEOF
4749for ac_lib in '' dl; do
4750 if test -z "$ac_lib"; then
4751 ac_res="none required"
4752 else
4753 ac_res=-l$ac_lib
4754 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4755 fi
4756 if ac_fn_c_try_link "$LINENO"; then :
4757 ac_cv_search_dlsym=$ac_res
4758fi
4759rm -f core conftest.err conftest.$ac_objext \
4760 conftest$ac_exeext
4761 if ${ac_cv_search_dlsym+:} false; then :
4762 break
4763fi
4764done
4765if ${ac_cv_search_dlsym+:} false; then :
4766
4767else
4768 ac_cv_search_dlsym=no
4769fi
4770rm conftest.$ac_ext
4771LIBS=$ac_func_search_save_LIBS
4772fi
4773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4774$as_echo "$ac_cv_search_dlsym" >&6; }
4775ac_res=$ac_cv_search_dlsym
4776if test "$ac_res" != no; then :
4777 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4778
4779fi
4780
4781 fi
4782
4783
4784case "${host}" in
4785 sparc-*-solaris*|i?86-*-solaris*)
4786 # On native 32-bit Solaris/SPARC and x86, large-file and procfs support
4787 # were mutually exclusive until Solaris 11.3. Without procfs support,
4788 # the bfd/ elf module cannot provide certain routines such as
4789 # elfcore_write_prpsinfo or elfcore_write_prstatus. So unless the user
4790 # explicitly requested large-file support through the
4791 # --enable-largefile switch, disable large-file support in favor of
4792 # procfs support.
4793 #
4794 # Check if <sys/procfs.h> is incompatible with large-file support.
4795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4796/* end confdefs.h. */
4797#define _FILE_OFFSET_BITS 64
4798#define _STRUCTURED_PROC 1
4799#include <sys/procfs.h>
4800int
4801main ()
4802{
4803
4804 ;
4805 return 0;
4806}
4807_ACEOF
4808if ac_fn_c_try_compile "$LINENO"; then :
4809 acx_cv_procfs_lfs=yes
4810else
4811 acx_cv_procfs_lfs=no
4812fi
4813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4814 #
4815 # Forcefully disable large-file support only if necessary, gdb is in
4816 # tree and enabled.
4817 if test "${target}" = "${host}" -a "$acx_cv_procfs_lfs" = no \
4818 -a -d $srcdir/../gdb -a "$enable_gdb" != no; then
4819 : ${enable_largefile="no"}
4820 if test "$plugins" = yes; then
4821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
4822plugin support disabled; require large-file support which is incompatible with GDB." >&5
4823$as_echo "$as_me: WARNING:
4824plugin support disabled; require large-file support which is incompatible with GDB." >&2;}
4825 plugins=no
4826 fi
4827 fi
4828 #
4829 # Explicitly undef _FILE_OFFSET_BITS if enable_largefile=no for the
4830 # benefit of g++ 9+ which predefines it on Solaris.
4831 if test "$enable_largefile" = no; then
4832 LARGEFILE_CPPFLAGS="-U_FILE_OFFSET_BITS"
4833
4834 fi
4835 ;;
4836esac
4837
4838# Check whether --enable-largefile was given.
4839if test "${enable_largefile+set}" = set; then :
4840 enableval=$enable_largefile;
4841fi
4842
4843if test "$enable_largefile" != no; then
4844
4845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4846$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4847if ${ac_cv_sys_largefile_CC+:} false; then :
4848 $as_echo_n "(cached) " >&6
4849else
4850 ac_cv_sys_largefile_CC=no
4851 if test "$GCC" != yes; then
4852 ac_save_CC=$CC
4853 while :; do
4854 # IRIX 6.2 and later do not support large files by default,
4855 # so use the C compiler's -n32 option if that helps.
4856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4857/* end confdefs.h. */
4858#include <sys/types.h>
4859 /* Check that off_t can represent 2**63 - 1 correctly.
4860 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4861 since some C++ compilers masquerading as C compilers
4862 incorrectly reject 9223372036854775807. */
4863#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4864 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4865 && LARGE_OFF_T % 2147483647 == 1)
4866 ? 1 : -1];
4867int
4868main ()
4869{
4870
4871 ;
4872 return 0;
4873}
4874_ACEOF
4875 if ac_fn_c_try_compile "$LINENO"; then :
4876 break
4877fi
4878rm -f core conftest.err conftest.$ac_objext
4879 CC="$CC -n32"
4880 if ac_fn_c_try_compile "$LINENO"; then :
4881 ac_cv_sys_largefile_CC=' -n32'; break
4882fi
4883rm -f core conftest.err conftest.$ac_objext
4884 break
4885 done
4886 CC=$ac_save_CC
4887 rm -f conftest.$ac_ext
4888 fi
4889fi
4890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4891$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4892 if test "$ac_cv_sys_largefile_CC" != no; then
4893 CC=$CC$ac_cv_sys_largefile_CC
4894 fi
4895
4896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4897$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4898if ${ac_cv_sys_file_offset_bits+:} false; then :
4899 $as_echo_n "(cached) " >&6
4900else
4901 while :; do
4902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4903/* end confdefs.h. */
4904#include <sys/types.h>
4905 /* Check that off_t can represent 2**63 - 1 correctly.
4906 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4907 since some C++ compilers masquerading as C compilers
4908 incorrectly reject 9223372036854775807. */
4909#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4910 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4911 && LARGE_OFF_T % 2147483647 == 1)
4912 ? 1 : -1];
4913int
4914main ()
4915{
4916
4917 ;
4918 return 0;
4919}
4920_ACEOF
4921if ac_fn_c_try_compile "$LINENO"; then :
4922 ac_cv_sys_file_offset_bits=no; break
4923fi
4924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4926/* end confdefs.h. */
4927#define _FILE_OFFSET_BITS 64
4928#include <sys/types.h>
4929 /* Check that off_t can represent 2**63 - 1 correctly.
4930 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4931 since some C++ compilers masquerading as C compilers
4932 incorrectly reject 9223372036854775807. */
4933#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4934 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4935 && LARGE_OFF_T % 2147483647 == 1)
4936 ? 1 : -1];
4937int
4938main ()
4939{
4940
4941 ;
4942 return 0;
4943}
4944_ACEOF
4945if ac_fn_c_try_compile "$LINENO"; then :
4946 ac_cv_sys_file_offset_bits=64; break
4947fi
4948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4949 ac_cv_sys_file_offset_bits=unknown
4950 break
4951done
4952fi
4953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4954$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4955case $ac_cv_sys_file_offset_bits in #(
4956 no | unknown) ;;
4957 *)
4958cat >>confdefs.h <<_ACEOF
4959#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4960_ACEOF
4961;;
4962esac
4963rm -rf conftest*
4964 if test $ac_cv_sys_file_offset_bits = unknown; then
4965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4966$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4967if ${ac_cv_sys_large_files+:} false; then :
4968 $as_echo_n "(cached) " >&6
4969else
4970 while :; do
4971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4972/* end confdefs.h. */
4973#include <sys/types.h>
4974 /* Check that off_t can represent 2**63 - 1 correctly.
4975 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4976 since some C++ compilers masquerading as C compilers
4977 incorrectly reject 9223372036854775807. */
4978#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4979 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4980 && LARGE_OFF_T % 2147483647 == 1)
4981 ? 1 : -1];
4982int
4983main ()
4984{
4985
4986 ;
4987 return 0;
4988}
4989_ACEOF
4990if ac_fn_c_try_compile "$LINENO"; then :
4991 ac_cv_sys_large_files=no; break
4992fi
4993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4995/* end confdefs.h. */
4996#define _LARGE_FILES 1
4997#include <sys/types.h>
4998 /* Check that off_t can represent 2**63 - 1 correctly.
4999 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5000 since some C++ compilers masquerading as C compilers
5001 incorrectly reject 9223372036854775807. */
5002#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5003 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5004 && LARGE_OFF_T % 2147483647 == 1)
5005 ? 1 : -1];
5006int
5007main ()
5008{
5009
5010 ;
5011 return 0;
5012}
5013_ACEOF
5014if ac_fn_c_try_compile "$LINENO"; then :
5015 ac_cv_sys_large_files=1; break
5016fi
5017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5018 ac_cv_sys_large_files=unknown
5019 break
5020done
5021fi
5022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5023$as_echo "$ac_cv_sys_large_files" >&6; }
5024case $ac_cv_sys_large_files in #(
5025 no | unknown) ;;
5026 *)
5027cat >>confdefs.h <<_ACEOF
5028#define _LARGE_FILES $ac_cv_sys_large_files
5029_ACEOF
5030;;
5031esac
5032rm -rf conftest*
5033 fi
5034
5035
5036fi
5037
5038
5039# Expand $ac_aux_dir to an absolute path.
5040am_aux_dir=`cd "$ac_aux_dir" && pwd`
5041
5042if test x"${install_sh+set}" != xset; then
5043 case $am_aux_dir in
5044 *\ * | *\ *)
5045 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5046 *)
5047 install_sh="\${SHELL} $am_aux_dir/install-sh"
5048 esac
5049fi
5050
5051# Installed binaries are usually stripped using 'strip' when the user
5052# run "make install-strip". However 'strip' might not be the right
5053# tool to use in cross-compilation environments, therefore Automake
5054# will honor the 'STRIP' environment variable to overrule this program.
5055if test "$cross_compiling" != no; then
5056 if test -n "$ac_tool_prefix"; then
5057 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5058set dummy ${ac_tool_prefix}strip; ac_word=$2
5059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5060$as_echo_n "checking for $ac_word... " >&6; }
5061if ${ac_cv_prog_STRIP+:} false; then :
5062 $as_echo_n "(cached) " >&6
5063else
5064 if test -n "$STRIP"; then
5065 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5066else
5067as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5068for as_dir in $PATH
5069do
5070 IFS=$as_save_IFS
5071 test -z "$as_dir" && as_dir=.
5072 for ac_exec_ext in '' $ac_executable_extensions; do
5073 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5074 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5075 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5076 break 2
5077 fi
5078done
5079 done
5080IFS=$as_save_IFS
5081
5082fi
5083fi
5084STRIP=$ac_cv_prog_STRIP
5085if test -n "$STRIP"; then
5086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5087$as_echo "$STRIP" >&6; }
5088else
5089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5090$as_echo "no" >&6; }
5091fi
5092
5093
5094fi
5095if test -z "$ac_cv_prog_STRIP"; then
5096 ac_ct_STRIP=$STRIP
5097 # Extract the first word of "strip", so it can be a program name with args.
5098set dummy strip; ac_word=$2
5099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5100$as_echo_n "checking for $ac_word... " >&6; }
5101if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
5102 $as_echo_n "(cached) " >&6
5103else
5104 if test -n "$ac_ct_STRIP"; then
5105 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5106else
5107as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5108for as_dir in $PATH
5109do
5110 IFS=$as_save_IFS
5111 test -z "$as_dir" && as_dir=.
5112 for ac_exec_ext in '' $ac_executable_extensions; do
5113 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5114 ac_cv_prog_ac_ct_STRIP="strip"
5115 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5116 break 2
5117 fi
5118done
5119 done
5120IFS=$as_save_IFS
5121
5122fi
5123fi
5124ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5125if test -n "$ac_ct_STRIP"; then
5126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5127$as_echo "$ac_ct_STRIP" >&6; }
5128else
5129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5130$as_echo "no" >&6; }
5131fi
5132
5133 if test "x$ac_ct_STRIP" = x; then
5134 STRIP=":"
5135 else
5136 case $cross_compiling:$ac_tool_warned in
5137yes:)
5138{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5139$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5140ac_tool_warned=yes ;;
5141esac
5142 STRIP=$ac_ct_STRIP
5143 fi
5144else
5145 STRIP="$ac_cv_prog_STRIP"
5146fi
5147
5148fi
5149INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5150
5151
5152ac_aux_dir=
5153for ac_dir in .. "$srcdir"/..; do
5154 if test -f "$ac_dir/install-sh"; then
5155 ac_aux_dir=$ac_dir
5156 ac_install_sh="$ac_aux_dir/install-sh -c"
5157 break
5158 elif test -f "$ac_dir/install.sh"; then
5159 ac_aux_dir=$ac_dir
5160 ac_install_sh="$ac_aux_dir/install.sh -c"
5161 break
5162 elif test -f "$ac_dir/shtool"; then
5163 ac_aux_dir=$ac_dir
5164 ac_install_sh="$ac_aux_dir/shtool install -c"
5165 break
5166 fi
5167done
5168if test -z "$ac_aux_dir"; then
5169 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
5170fi
5171
5172# These three variables are undocumented and unsupported,
5173# and are intended to be withdrawn in a future Autoconf release.
5174# They can cause serious problems if a builder's source tree is in a directory
5175# whose full name contains unusual characters.
5176ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5177ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5178ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5179
5180
5181
5182# Set build, build_cpu, build_vendor and build_os.
5183
5184
5185# Set host, host_cpu, host_vendor, and host_os.
5186
5187
5188# Set target, target_cpu, target_vendor, and target_os.
5189
5190
5191 case ${build_alias} in
5192 "") build_noncanonical=${build} ;;
5193 *) build_noncanonical=${build_alias} ;;
5194esac
5195
5196 case ${host_alias} in
5197 "") host_noncanonical=${build_noncanonical} ;;
5198 *) host_noncanonical=${host_alias} ;;
5199esac
5200
5201 case ${target_alias} in
5202 "") target_noncanonical=${host_noncanonical} ;;
5203 *) target_noncanonical=${target_alias} ;;
5204esac
5205
5206
5207
5208
5209test "$program_prefix" != NONE &&
5210 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5211# Use a double $ so make ignores it.
5212test "$program_suffix" != NONE &&
5213 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5214# Double any \ or $.
5215# By default was `s,x,x', remove it if useless.
5216ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5217program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5218
5219
5220# We require a C++11 compiler. Check if one is available, and if
5221# necessary, set CXX_DIALECT to some -std=xxx switch.
5222
5223 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
5224 ac_ext=cpp
5225ac_cpp='$CXXCPP $CPPFLAGS'
5226ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5227ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5228ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5229 CXX_DIALECT=""
5230 ac_success=no
5231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5232$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
5233if ${ax_cv_cxx_compile_cxx11+:} false; then :
5234 $as_echo_n "(cached) " >&6
5235else
5236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5237/* end confdefs.h. */
5238
5239
5240// If the compiler admits that it is not ready for C++11, why torture it?
5241// Hopefully, this will speed up the test.
5242
5243#ifndef __cplusplus
5244
5245#error "This is not a C++ compiler"
5246
5247#elif __cplusplus < 201103L
5248
5249#error "This is not a C++11 compiler"
5250
5251#else
5252
5253namespace cxx11
5254{
5255
5256 namespace test_static_assert
5257 {
5258
5259 template <typename T>
5260 struct check
5261 {
5262 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5263 };
5264
5265 }
5266
5267 namespace test_final_override
5268 {
5269
5270 struct Base
5271 {
5272 virtual void f() {}
5273 };
5274
5275 struct Derived : public Base
5276 {
5277 virtual void f() override {}
5278 };
5279
5280 }
5281
5282 namespace test_double_right_angle_brackets
5283 {
5284
5285 template < typename T >
5286 struct check {};
5287
5288 typedef check<void> single_type;
5289 typedef check<check<void>> double_type;
5290 typedef check<check<check<void>>> triple_type;
5291 typedef check<check<check<check<void>>>> quadruple_type;
5292
5293 }
5294
5295 namespace test_decltype
5296 {
5297
5298 int
5299 f()
5300 {
5301 int a = 1;
5302 decltype(a) b = 2;
5303 return a + b;
5304 }
5305
5306 }
5307
5308 namespace test_type_deduction
5309 {
5310
5311 template < typename T1, typename T2 >
5312 struct is_same
5313 {
5314 static const bool value = false;
5315 };
5316
5317 template < typename T >
5318 struct is_same<T, T>
5319 {
5320 static const bool value = true;
5321 };
5322
5323 template < typename T1, typename T2 >
5324 auto
5325 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5326 {
5327 return a1 + a2;
5328 }
5329
5330 int
5331 test(const int c, volatile int v)
5332 {
5333 static_assert(is_same<int, decltype(0)>::value == true, "");
5334 static_assert(is_same<int, decltype(c)>::value == false, "");
5335 static_assert(is_same<int, decltype(v)>::value == false, "");
5336 auto ac = c;
5337 auto av = v;
5338 auto sumi = ac + av + 'x';
5339 auto sumf = ac + av + 1.0;
5340 static_assert(is_same<int, decltype(ac)>::value == true, "");
5341 static_assert(is_same<int, decltype(av)>::value == true, "");
5342 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5343 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5344 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5345 return (sumf > 0.0) ? sumi : add(c, v);
5346 }
5347
5348 }
5349
5350 namespace test_noexcept
5351 {
5352
5353 int f() { return 0; }
5354 int g() noexcept { return 0; }
5355
5356 static_assert(noexcept(f()) == false, "");
5357 static_assert(noexcept(g()) == true, "");
5358
5359 }
5360
5361 namespace test_constexpr
5362 {
5363
5364 template < typename CharT >
5365 unsigned long constexpr
5366 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5367 {
5368 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5369 }
5370
5371 template < typename CharT >
5372 unsigned long constexpr
5373 strlen_c(const CharT *const s) noexcept
5374 {
5375 return strlen_c_r(s, 0UL);
5376 }
5377
5378 static_assert(strlen_c("") == 0UL, "");
5379 static_assert(strlen_c("1") == 1UL, "");
5380 static_assert(strlen_c("example") == 7UL, "");
5381 static_assert(strlen_c("another\0example") == 7UL, "");
5382
5383 }
5384
5385 namespace test_rvalue_references
5386 {
5387
5388 template < int N >
5389 struct answer
5390 {
5391 static constexpr int value = N;
5392 };
5393
5394 answer<1> f(int&) { return answer<1>(); }
5395 answer<2> f(const int&) { return answer<2>(); }
5396 answer<3> f(int&&) { return answer<3>(); }
5397
5398 void
5399 test()
5400 {
5401 int i = 0;
5402 const int c = 0;
5403 static_assert(decltype(f(i))::value == 1, "");
5404 static_assert(decltype(f(c))::value == 2, "");
5405 static_assert(decltype(f(0))::value == 3, "");
5406 }
5407
5408 }
5409
5410 namespace test_uniform_initialization
5411 {
5412
5413 struct test
5414 {
5415 static const int zero {};
5416 static const int one {1};
5417 };
5418
5419 static_assert(test::zero == 0, "");
5420 static_assert(test::one == 1, "");
5421
5422 }
5423
5424 namespace test_lambdas
5425 {
5426
5427 void
5428 test1()
5429 {
5430 auto lambda1 = [](){};
5431 auto lambda2 = lambda1;
5432 lambda1();
5433 lambda2();
5434 }
5435
5436 int
5437 test2()
5438 {
5439 auto a = [](int i, int j){ return i + j; }(1, 2);
5440 auto b = []() -> int { return '0'; }();
5441 auto c = [=](){ return a + b; }();
5442 auto d = [&](){ return c; }();
5443 auto e = [a, &b](int x) mutable {
5444 const auto identity = [](int y){ return y; };
5445 for (auto i = 0; i < a; ++i)
5446 a += b--;
5447 return x + identity(a + b);
5448 }(0);
5449 return a + b + c + d + e;
5450 }
5451
5452 int
5453 test3()
5454 {
5455 const auto nullary = [](){ return 0; };
5456 const auto unary = [](int x){ return x; };
5457 using nullary_t = decltype(nullary);
5458 using unary_t = decltype(unary);
5459 const auto higher1st = [](nullary_t f){ return f(); };
5460 const auto higher2nd = [unary](nullary_t f1){
5461 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5462 };
5463 return higher1st(nullary) + higher2nd(nullary)(unary);
5464 }
5465
5466 }
5467
5468 namespace test_variadic_templates
5469 {
5470
5471 template <int...>
5472 struct sum;
5473
5474 template <int N0, int... N1toN>
5475 struct sum<N0, N1toN...>
5476 {
5477 static constexpr auto value = N0 + sum<N1toN...>::value;
5478 };
5479
5480 template <>
5481 struct sum<>
5482 {
5483 static constexpr auto value = 0;
5484 };
5485
5486 static_assert(sum<>::value == 0, "");
5487 static_assert(sum<1>::value == 1, "");
5488 static_assert(sum<23>::value == 23, "");
5489 static_assert(sum<1, 2>::value == 3, "");
5490 static_assert(sum<5, 5, 11>::value == 21, "");
5491 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5492
5493 }
5494
5495 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5496 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5497 // because of this.
5498 namespace test_template_alias_sfinae
5499 {
5500
5501 struct foo {};
5502
5503 template<typename T>
5504 using member = typename T::member_type;
5505
5506 template<typename T>
5507 void func(...) {}
5508
5509 template<typename T>
5510 void func(member<T>*) {}
5511
5512 void test();
5513
5514 void test() { func<foo>(0); }
5515
5516 }
5517
5518} // namespace cxx11
5519
5520#endif // __cplusplus >= 201103L
5521
5522
5523
5524_ACEOF
5525if ac_fn_cxx_try_compile "$LINENO"; then :
5526 ax_cv_cxx_compile_cxx11=yes
5527else
5528 ax_cv_cxx_compile_cxx11=no
5529fi
5530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5531fi
5532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5533$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5534 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5535 ac_success=yes
5536 fi
5537
5538 if test x$ac_success = xno; then
5539 for alternative in ${ax_cxx_compile_alternatives}; do
5540 switch="-std=gnu++${alternative}"
5541 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5543$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5544if eval \${$cachevar+:} false; then :
5545 $as_echo_n "(cached) " >&6
5546else
5547 ac_save_CXX="$CXX"
5548 CXX="$CXX $switch"
5549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5550/* end confdefs.h. */
5551
5552
5553// If the compiler admits that it is not ready for C++11, why torture it?
5554// Hopefully, this will speed up the test.
5555
5556#ifndef __cplusplus
5557
5558#error "This is not a C++ compiler"
5559
5560#elif __cplusplus < 201103L
5561
5562#error "This is not a C++11 compiler"
5563
5564#else
5565
5566namespace cxx11
5567{
5568
5569 namespace test_static_assert
5570 {
5571
5572 template <typename T>
5573 struct check
5574 {
5575 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5576 };
5577
5578 }
5579
5580 namespace test_final_override
5581 {
5582
5583 struct Base
5584 {
5585 virtual void f() {}
5586 };
5587
5588 struct Derived : public Base
5589 {
5590 virtual void f() override {}
5591 };
5592
5593 }
5594
5595 namespace test_double_right_angle_brackets
5596 {
5597
5598 template < typename T >
5599 struct check {};
5600
5601 typedef check<void> single_type;
5602 typedef check<check<void>> double_type;
5603 typedef check<check<check<void>>> triple_type;
5604 typedef check<check<check<check<void>>>> quadruple_type;
5605
5606 }
5607
5608 namespace test_decltype
5609 {
5610
5611 int
5612 f()
5613 {
5614 int a = 1;
5615 decltype(a) b = 2;
5616 return a + b;
5617 }
5618
5619 }
5620
5621 namespace test_type_deduction
5622 {
5623
5624 template < typename T1, typename T2 >
5625 struct is_same
5626 {
5627 static const bool value = false;
5628 };
5629
5630 template < typename T >
5631 struct is_same<T, T>
5632 {
5633 static const bool value = true;
5634 };
5635
5636 template < typename T1, typename T2 >
5637 auto
5638 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5639 {
5640 return a1 + a2;
5641 }
5642
5643 int
5644 test(const int c, volatile int v)
5645 {
5646 static_assert(is_same<int, decltype(0)>::value == true, "");
5647 static_assert(is_same<int, decltype(c)>::value == false, "");
5648 static_assert(is_same<int, decltype(v)>::value == false, "");
5649 auto ac = c;
5650 auto av = v;
5651 auto sumi = ac + av + 'x';
5652 auto sumf = ac + av + 1.0;
5653 static_assert(is_same<int, decltype(ac)>::value == true, "");
5654 static_assert(is_same<int, decltype(av)>::value == true, "");
5655 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5656 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5657 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5658 return (sumf > 0.0) ? sumi : add(c, v);
5659 }
5660
5661 }
5662
5663 namespace test_noexcept
5664 {
5665
5666 int f() { return 0; }
5667 int g() noexcept { return 0; }
5668
5669 static_assert(noexcept(f()) == false, "");
5670 static_assert(noexcept(g()) == true, "");
5671
5672 }
5673
5674 namespace test_constexpr
5675 {
5676
5677 template < typename CharT >
5678 unsigned long constexpr
5679 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5680 {
5681 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5682 }
5683
5684 template < typename CharT >
5685 unsigned long constexpr
5686 strlen_c(const CharT *const s) noexcept
5687 {
5688 return strlen_c_r(s, 0UL);
5689 }
5690
5691 static_assert(strlen_c("") == 0UL, "");
5692 static_assert(strlen_c("1") == 1UL, "");
5693 static_assert(strlen_c("example") == 7UL, "");
5694 static_assert(strlen_c("another\0example") == 7UL, "");
5695
5696 }
5697
5698 namespace test_rvalue_references
5699 {
5700
5701 template < int N >
5702 struct answer
5703 {
5704 static constexpr int value = N;
5705 };
5706
5707 answer<1> f(int&) { return answer<1>(); }
5708 answer<2> f(const int&) { return answer<2>(); }
5709 answer<3> f(int&&) { return answer<3>(); }
5710
5711 void
5712 test()
5713 {
5714 int i = 0;
5715 const int c = 0;
5716 static_assert(decltype(f(i))::value == 1, "");
5717 static_assert(decltype(f(c))::value == 2, "");
5718 static_assert(decltype(f(0))::value == 3, "");
5719 }
5720
5721 }
5722
5723 namespace test_uniform_initialization
5724 {
5725
5726 struct test
5727 {
5728 static const int zero {};
5729 static const int one {1};
5730 };
5731
5732 static_assert(test::zero == 0, "");
5733 static_assert(test::one == 1, "");
5734
5735 }
5736
5737 namespace test_lambdas
5738 {
5739
5740 void
5741 test1()
5742 {
5743 auto lambda1 = [](){};
5744 auto lambda2 = lambda1;
5745 lambda1();
5746 lambda2();
5747 }
5748
5749 int
5750 test2()
5751 {
5752 auto a = [](int i, int j){ return i + j; }(1, 2);
5753 auto b = []() -> int { return '0'; }();
5754 auto c = [=](){ return a + b; }();
5755 auto d = [&](){ return c; }();
5756 auto e = [a, &b](int x) mutable {
5757 const auto identity = [](int y){ return y; };
5758 for (auto i = 0; i < a; ++i)
5759 a += b--;
5760 return x + identity(a + b);
5761 }(0);
5762 return a + b + c + d + e;
5763 }
5764
5765 int
5766 test3()
5767 {
5768 const auto nullary = [](){ return 0; };
5769 const auto unary = [](int x){ return x; };
5770 using nullary_t = decltype(nullary);
5771 using unary_t = decltype(unary);
5772 const auto higher1st = [](nullary_t f){ return f(); };
5773 const auto higher2nd = [unary](nullary_t f1){
5774 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5775 };
5776 return higher1st(nullary) + higher2nd(nullary)(unary);
5777 }
5778
5779 }
5780
5781 namespace test_variadic_templates
5782 {
5783
5784 template <int...>
5785 struct sum;
5786
5787 template <int N0, int... N1toN>
5788 struct sum<N0, N1toN...>
5789 {
5790 static constexpr auto value = N0 + sum<N1toN...>::value;
5791 };
5792
5793 template <>
5794 struct sum<>
5795 {
5796 static constexpr auto value = 0;
5797 };
5798
5799 static_assert(sum<>::value == 0, "");
5800 static_assert(sum<1>::value == 1, "");
5801 static_assert(sum<23>::value == 23, "");
5802 static_assert(sum<1, 2>::value == 3, "");
5803 static_assert(sum<5, 5, 11>::value == 21, "");
5804 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5805
5806 }
5807
5808 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5809 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5810 // because of this.
5811 namespace test_template_alias_sfinae
5812 {
5813
5814 struct foo {};
5815
5816 template<typename T>
5817 using member = typename T::member_type;
5818
5819 template<typename T>
5820 void func(...) {}
5821
5822 template<typename T>
5823 void func(member<T>*) {}
5824
5825 void test();
5826
5827 void test() { func<foo>(0); }
5828
5829 }
5830
5831} // namespace cxx11
5832
5833#endif // __cplusplus >= 201103L
5834
5835
5836
5837_ACEOF
5838if ac_fn_cxx_try_compile "$LINENO"; then :
5839 eval $cachevar=yes
5840else
5841 eval $cachevar=no
5842fi
5843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5844 CXX="$ac_save_CXX"
5845fi
5846eval ac_res=\$$cachevar
5847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5848$as_echo "$ac_res" >&6; }
5849 if eval test x\$$cachevar = xyes; then
5850 CXX_DIALECT="$switch"
5851 ac_success=yes
5852 break
5853 fi
5854 done
5855 fi
5856
5857 if test x$ac_success = xno; then
5858 for alternative in ${ax_cxx_compile_alternatives}; do
5859 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5860 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5862$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5863if eval \${$cachevar+:} false; then :
5864 $as_echo_n "(cached) " >&6
5865else
5866 ac_save_CXX="$CXX"
5867 CXX="$CXX $switch"
5868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5869/* end confdefs.h. */
5870
5871
5872// If the compiler admits that it is not ready for C++11, why torture it?
5873// Hopefully, this will speed up the test.
5874
5875#ifndef __cplusplus
5876
5877#error "This is not a C++ compiler"
5878
5879#elif __cplusplus < 201103L
5880
5881#error "This is not a C++11 compiler"
5882
5883#else
5884
5885namespace cxx11
5886{
5887
5888 namespace test_static_assert
5889 {
5890
5891 template <typename T>
5892 struct check
5893 {
5894 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5895 };
5896
5897 }
5898
5899 namespace test_final_override
5900 {
5901
5902 struct Base
5903 {
5904 virtual void f() {}
5905 };
5906
5907 struct Derived : public Base
5908 {
5909 virtual void f() override {}
5910 };
5911
5912 }
5913
5914 namespace test_double_right_angle_brackets
5915 {
5916
5917 template < typename T >
5918 struct check {};
5919
5920 typedef check<void> single_type;
5921 typedef check<check<void>> double_type;
5922 typedef check<check<check<void>>> triple_type;
5923 typedef check<check<check<check<void>>>> quadruple_type;
5924
5925 }
5926
5927 namespace test_decltype
5928 {
5929
5930 int
5931 f()
5932 {
5933 int a = 1;
5934 decltype(a) b = 2;
5935 return a + b;
5936 }
5937
5938 }
5939
5940 namespace test_type_deduction
5941 {
5942
5943 template < typename T1, typename T2 >
5944 struct is_same
5945 {
5946 static const bool value = false;
5947 };
5948
5949 template < typename T >
5950 struct is_same<T, T>
5951 {
5952 static const bool value = true;
5953 };
5954
5955 template < typename T1, typename T2 >
5956 auto
5957 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5958 {
5959 return a1 + a2;
5960 }
5961
5962 int
5963 test(const int c, volatile int v)
5964 {
5965 static_assert(is_same<int, decltype(0)>::value == true, "");
5966 static_assert(is_same<int, decltype(c)>::value == false, "");
5967 static_assert(is_same<int, decltype(v)>::value == false, "");
5968 auto ac = c;
5969 auto av = v;
5970 auto sumi = ac + av + 'x';
5971 auto sumf = ac + av + 1.0;
5972 static_assert(is_same<int, decltype(ac)>::value == true, "");
5973 static_assert(is_same<int, decltype(av)>::value == true, "");
5974 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5975 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5976 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5977 return (sumf > 0.0) ? sumi : add(c, v);
5978 }
5979
5980 }
5981
5982 namespace test_noexcept
5983 {
5984
5985 int f() { return 0; }
5986 int g() noexcept { return 0; }
5987
5988 static_assert(noexcept(f()) == false, "");
5989 static_assert(noexcept(g()) == true, "");
5990
5991 }
5992
5993 namespace test_constexpr
5994 {
5995
5996 template < typename CharT >
5997 unsigned long constexpr
5998 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5999 {
6000 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
6001 }
6002
6003 template < typename CharT >
6004 unsigned long constexpr
6005 strlen_c(const CharT *const s) noexcept
6006 {
6007 return strlen_c_r(s, 0UL);
6008 }
6009
6010 static_assert(strlen_c("") == 0UL, "");
6011 static_assert(strlen_c("1") == 1UL, "");
6012 static_assert(strlen_c("example") == 7UL, "");
6013 static_assert(strlen_c("another\0example") == 7UL, "");
6014
6015 }
6016
6017 namespace test_rvalue_references
6018 {
6019
6020 template < int N >
6021 struct answer
6022 {
6023 static constexpr int value = N;
6024 };
6025
6026 answer<1> f(int&) { return answer<1>(); }
6027 answer<2> f(const int&) { return answer<2>(); }
6028 answer<3> f(int&&) { return answer<3>(); }
6029
6030 void
6031 test()
6032 {
6033 int i = 0;
6034 const int c = 0;
6035 static_assert(decltype(f(i))::value == 1, "");
6036 static_assert(decltype(f(c))::value == 2, "");
6037 static_assert(decltype(f(0))::value == 3, "");
6038 }
6039
6040 }
6041
6042 namespace test_uniform_initialization
6043 {
6044
6045 struct test
6046 {
6047 static const int zero {};
6048 static const int one {1};
6049 };
6050
6051 static_assert(test::zero == 0, "");
6052 static_assert(test::one == 1, "");
6053
6054 }
6055
6056 namespace test_lambdas
6057 {
6058
6059 void
6060 test1()
6061 {
6062 auto lambda1 = [](){};
6063 auto lambda2 = lambda1;
6064 lambda1();
6065 lambda2();
6066 }
6067
6068 int
6069 test2()
6070 {
6071 auto a = [](int i, int j){ return i + j; }(1, 2);
6072 auto b = []() -> int { return '0'; }();
6073 auto c = [=](){ return a + b; }();
6074 auto d = [&](){ return c; }();
6075 auto e = [a, &b](int x) mutable {
6076 const auto identity = [](int y){ return y; };
6077 for (auto i = 0; i < a; ++i)
6078 a += b--;
6079 return x + identity(a + b);
6080 }(0);
6081 return a + b + c + d + e;
6082 }
6083
6084 int
6085 test3()
6086 {
6087 const auto nullary = [](){ return 0; };
6088 const auto unary = [](int x){ return x; };
6089 using nullary_t = decltype(nullary);
6090 using unary_t = decltype(unary);
6091 const auto higher1st = [](nullary_t f){ return f(); };
6092 const auto higher2nd = [unary](nullary_t f1){
6093 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6094 };
6095 return higher1st(nullary) + higher2nd(nullary)(unary);
6096 }
6097
6098 }
6099
6100 namespace test_variadic_templates
6101 {
6102
6103 template <int...>
6104 struct sum;
6105
6106 template <int N0, int... N1toN>
6107 struct sum<N0, N1toN...>
6108 {
6109 static constexpr auto value = N0 + sum<N1toN...>::value;
6110 };
6111
6112 template <>
6113 struct sum<>
6114 {
6115 static constexpr auto value = 0;
6116 };
6117
6118 static_assert(sum<>::value == 0, "");
6119 static_assert(sum<1>::value == 1, "");
6120 static_assert(sum<23>::value == 23, "");
6121 static_assert(sum<1, 2>::value == 3, "");
6122 static_assert(sum<5, 5, 11>::value == 21, "");
6123 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6124
6125 }
6126
6127 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6128 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6129 // because of this.
6130 namespace test_template_alias_sfinae
6131 {
6132
6133 struct foo {};
6134
6135 template<typename T>
6136 using member = typename T::member_type;
6137
6138 template<typename T>
6139 void func(...) {}
6140
6141 template<typename T>
6142 void func(member<T>*) {}
6143
6144 void test();
6145
6146 void test() { func<foo>(0); }
6147
6148 }
6149
6150} // namespace cxx11
6151
6152#endif // __cplusplus >= 201103L
6153
6154
6155
6156_ACEOF
6157if ac_fn_cxx_try_compile "$LINENO"; then :
6158 eval $cachevar=yes
6159else
6160 eval $cachevar=no
6161fi
6162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6163 CXX="$ac_save_CXX"
6164fi
6165eval ac_res=\$$cachevar
6166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6167$as_echo "$ac_res" >&6; }
6168 if eval test x\$$cachevar = xyes; then
6169 CXX_DIALECT="$switch"
6170 ac_success=yes
6171 break
6172 fi
6173 done
6174 if test x$ac_success = xyes; then
6175 break
6176 fi
6177 done
6178 fi
6179 ac_ext=c
6180ac_cpp='$CPP $CPPFLAGS'
6181ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6182ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6183ac_compiler_gnu=$ac_cv_c_compiler_gnu
6184
6185 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6186 if test x$ac_success = xno; then
6187 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
6188 fi
6189 fi
6190 if test x$ac_success = xno; then
6191 HAVE_CXX11=0
6192 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6193$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6194 else
6195 HAVE_CXX11=1
6196
6197$as_echo "#define HAVE_CXX11 1" >>confdefs.h
6198
6199 fi
6200
6201
6202
6203
6204# Dependency checking.
6205rm -rf .tst 2>/dev/null
6206mkdir .tst 2>/dev/null
6207if test -d .tst; then
6208 am__leading_dot=.
6209else
6210 am__leading_dot=_
6211fi
6212rmdir .tst 2>/dev/null
6213
6214DEPDIR="${am__leading_dot}deps"
6215
6216ac_config_commands="$ac_config_commands depdir"
6217
6218
6219depcc="$CC" am_compiler_list=
6220
6221am_depcomp=$ac_aux_dir/depcomp
6222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6223$as_echo_n "checking dependency style of $depcc... " >&6; }
6224if ${am_cv_CC_dependencies_compiler_type+:} false; then :
6225 $as_echo_n "(cached) " >&6
6226else
6227 if test -f "$am_depcomp"; then
6228 # We make a subdir and do the tests there. Otherwise we can end up
6229 # making bogus files that we don't know about and never remove. For
6230 # instance it was reported that on HP-UX the gcc test will end up
6231 # making a dummy file named `D' -- because `-MD' means `put the output
6232 # in D'.
6233 mkdir conftest.dir
6234 # Copy depcomp to subdir because otherwise we won't find it if we're
6235 # using a relative directory.
6236 cp "$am_depcomp" conftest.dir
6237 cd conftest.dir
6238 # We will build objects and dependencies in a subdirectory because
6239 # it helps to detect inapplicable dependency modes. For instance
6240 # both Tru64's cc and ICC support -MD to output dependencies as a
6241 # side effect of compilation, but ICC will put the dependencies in
6242 # the current directory while Tru64 will put them in the object
6243 # directory.
6244 mkdir sub
6245
6246 am_cv_CC_dependencies_compiler_type=none
6247 if test "$am_compiler_list" = ""; then
6248 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6249 fi
6250 for depmode in $am_compiler_list; do
6251 if test $depmode = none; then break; fi
6252
6253 $as_echo "$as_me:$LINENO: trying $depmode" >&5
6254 # Setup a source with many dependencies, because some compilers
6255 # like to wrap large dependency lists on column 80 (with \), and
6256 # we should not choose a depcomp mode which is confused by this.
6257 #
6258 # We need to recreate these files for each test, as the compiler may
6259 # overwrite some of them when testing with obscure command lines.
6260 # This happens at least with the AIX C compiler.
6261 : > sub/conftest.c
6262 for i in 1 2 3 4 5 6; do
6263 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6264 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6265 # Solaris 8's {/usr,}/bin/sh.
6266 touch sub/conftst$i.h
6267 done
6268 echo "include sub/conftest.Po" > confmf
6269
6270 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6271 # mode. It turns out that the SunPro C++ compiler does not properly
6272 # handle `-M -o', and we need to detect this.
6273 depcmd="depmode=$depmode \
6274 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6275 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6276 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6277 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6278 if env $depcmd > conftest.err 2>&1 &&
6279 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6280 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6281 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6282 # icc doesn't choke on unknown options, it will just issue warnings
6283 # or remarks (even with -Werror). So we grep stderr for any message
6284 # that says an option was ignored or not supported.
6285 # When given -MP, icc 7.0 and 7.1 complain thusly:
6286 # icc: Command line warning: ignoring option '-M'; no argument required
6287 # The diagnosis changed in icc 8.0:
6288 # icc: Command line remark: option '-MP' not supported
6289 if (grep 'ignoring option' conftest.err ||
6290 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6291 am_cv_CC_dependencies_compiler_type=$depmode
6292 $as_echo "$as_me:$LINENO: success" >&5
6293 break
6294 fi
6295 fi
6296 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
6297 sed -e 's/^/| /' < conftest.err >&5
6298 done
6299
6300 cd ..
6301 rm -rf conftest.dir
6302else
6303 am_cv_CC_dependencies_compiler_type=none
6304fi
6305
6306fi
6307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6308$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6309if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
6310then as_fn_error $? "no usable dependency style found" "$LINENO" 5
6311else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6312
6313fi
6314
6315
6316
6317CONFIG_OBS=
6318CONFIG_DEPS=
6319CONFIG_SRCS=
6320ENABLE_CFLAGS=
6321
6322CONFIG_ALL=
6323CONFIG_CLEAN=
6324CONFIG_INSTALL=
6325CONFIG_UNINSTALL=
6326
6327# If we haven't got the data from the intl directory,
6328# assume NLS is disabled.
6329USE_NLS=no
6330LIBINTL=
6331LIBINTL_DEP=
6332INCINTL=
6333XGETTEXT=
6334GMSGFMT=
6335POSUB=
6336
6337if test -f ../intl/config.intl; then
6338 . ../intl/config.intl
6339fi
6340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6341$as_echo_n "checking whether NLS is requested... " >&6; }
6342if test x"$USE_NLS" != xyes; then
6343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6344$as_echo "no" >&6; }
6345else
6346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6347$as_echo "yes" >&6; }
6348
6349$as_echo "#define ENABLE_NLS 1" >>confdefs.h
6350
6351
6352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6353$as_echo_n "checking for catalogs to be installed... " >&6; }
6354 # Look for .po and .gmo files in the source directory.
6355 CATALOGS=
6356 XLINGUAS=
6357 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6358 # If there aren't any .gmo files the shell will give us the
6359 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6360 # weeded out.
6361 case "$cat" in *\**)
6362 continue;;
6363 esac
6364 # The quadruple backslash is collapsed to a double backslash
6365 # by the backticks, then collapsed again by the double quotes,
6366 # leaving us with one backslash in the sed expression (right
6367 # before the dot that mustn't act as a wildcard).
6368 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6369 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6370 # The user is allowed to set LINGUAS to a list of languages to
6371 # install catalogs for. If it's empty that means "all of them."
6372 if test "x$LINGUAS" = x; then
6373 CATALOGS="$CATALOGS $cat"
6374 XLINGUAS="$XLINGUAS $lang"
6375 else
6376 case "$LINGUAS" in *$lang*)
6377 CATALOGS="$CATALOGS $cat"
6378 XLINGUAS="$XLINGUAS $lang"
6379 ;;
6380 esac
6381 fi
6382 done
6383 LINGUAS="$XLINGUAS"
6384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6385$as_echo "$LINGUAS" >&6; }
6386
6387
6388 DATADIRNAME=share
6389
6390 INSTOBJEXT=.mo
6391
6392 GENCAT=gencat
6393
6394 CATOBJEXT=.gmo
6395
6396fi
6397
6398localedir='${datadir}/locale'
6399
6400
6401if test x"$USE_NLS" = xyes; then
6402 CONFIG_ALL="$CONFIG_ALL all-po"
6403 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6404 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6405 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
6406fi
6407
6408PACKAGE=gdb
6409
6410cat >>confdefs.h <<_ACEOF
6411#define PACKAGE "$PACKAGE"
6412_ACEOF
6413
6414
6415
6416# We never need to detect it in this sub-configure.
6417# But preserve it for config.status --recheck.
6418
6419
6420
6421MAKEINFO_EXTRA_FLAGS=""
6422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6423$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
6424if ${gdb_cv_have_makeinfo_click+:} false; then :
6425 $as_echo_n "(cached) " >&6
6426else
6427 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6428 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6429 gdb_cv_have_makeinfo_click=yes
6430 else
6431 gdb_cv_have_makeinfo_click=no
6432 fi
6433fi
6434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6435$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6436if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6437 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6438fi
6439
6440
6441
6442
6443# Check whether --with-separate-debug-dir was given.
6444if test "${with_separate_debug_dir+set}" = set; then :
6445 withval=$with_separate_debug_dir;
6446 DEBUGDIR=$withval
6447else
6448 DEBUGDIR=${libdir}/debug
6449fi
6450
6451
6452 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6453 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6454 ac_define_dir=`eval echo $DEBUGDIR`
6455 ac_define_dir=`eval echo $ac_define_dir`
6456
6457cat >>confdefs.h <<_ACEOF
6458#define DEBUGDIR "$ac_define_dir"
6459_ACEOF
6460
6461
6462
6463
6464 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6465 if test "x$prefix" = xNONE; then
6466 test_prefix=/usr/local
6467 else
6468 test_prefix=$prefix
6469 fi
6470 else
6471 test_prefix=$exec_prefix
6472 fi
6473 value=0
6474 case ${ac_define_dir} in
6475 "${test_prefix}"|"${test_prefix}/"*|\
6476 '${exec_prefix}'|'${exec_prefix}/'*)
6477 value=1
6478 ;;
6479 esac
6480
6481cat >>confdefs.h <<_ACEOF
6482#define DEBUGDIR_RELOCATABLE $value
6483_ACEOF
6484
6485
6486
6487
6488# We can't pass paths as command line arguments.
6489# Mingw32 tries to be clever and will convert the paths for us.
6490# For example -DBINDIR="/usr/local/bin" passed on the command line may get
6491# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6492# This breaks GDB's relocatable path conversions since paths passed in
6493# config.h would not get so translated, the path prefixes no longer match.
6494
6495 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6496 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6497 ac_define_dir=`eval echo $bindir`
6498 ac_define_dir=`eval echo $ac_define_dir`
6499
6500cat >>confdefs.h <<_ACEOF
6501#define BINDIR "$ac_define_dir"
6502_ACEOF
6503
6504
6505
6506# GDB's datadir relocation
6507
6508
6509
6510# Check whether --with-gdb-datadir was given.
6511if test "${with_gdb_datadir+set}" = set; then :
6512 withval=$with_gdb_datadir;
6513 GDB_DATADIR=$withval
6514else
6515 GDB_DATADIR=${datadir}/gdb
6516fi
6517
6518
6519 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6520 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6521 ac_define_dir=`eval echo $GDB_DATADIR`
6522 ac_define_dir=`eval echo $ac_define_dir`
6523
6524cat >>confdefs.h <<_ACEOF
6525#define GDB_DATADIR "$ac_define_dir"
6526_ACEOF
6527
6528
6529
6530
6531 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6532 if test "x$prefix" = xNONE; then
6533 test_prefix=/usr/local
6534 else
6535 test_prefix=$prefix
6536 fi
6537 else
6538 test_prefix=$exec_prefix
6539 fi
6540 value=0
6541 case ${ac_define_dir} in
6542 "${test_prefix}"|"${test_prefix}/"*|\
6543 '${exec_prefix}'|'${exec_prefix}/'*)
6544 value=1
6545 ;;
6546 esac
6547
6548cat >>confdefs.h <<_ACEOF
6549#define GDB_DATADIR_RELOCATABLE $value
6550_ACEOF
6551
6552
6553
6554
6555
6556# Check whether --with-relocated-sources was given.
6557if test "${with_relocated_sources+set}" = set; then :
6558 withval=$with_relocated_sources; reloc_srcdir="${withval}"
6559
6560 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6561 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6562 ac_define_dir=`eval echo $reloc_srcdir`
6563 ac_define_dir=`eval echo $ac_define_dir`
6564
6565cat >>confdefs.h <<_ACEOF
6566#define RELOC_SRCDIR "$ac_define_dir"
6567_ACEOF
6568
6569
6570
6571fi
6572
6573
6574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6575$as_echo_n "checking for default auto-load directory... " >&6; }
6576
6577# Check whether --with-auto-load-dir was given.
6578if test "${with_auto_load_dir+set}" = set; then :
6579 withval=$with_auto_load_dir;
6580else
6581 with_auto_load_dir='$debugdir:$datadir/auto-load'
6582fi
6583
6584escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
6585
6586 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6587 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6588 ac_define_dir=`eval echo $escape_dir`
6589 ac_define_dir=`eval echo $ac_define_dir`
6590
6591cat >>confdefs.h <<_ACEOF
6592#define AUTO_LOAD_DIR "$ac_define_dir"
6593_ACEOF
6594
6595
6596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6597$as_echo "$with_auto_load_dir" >&6; }
6598
6599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6600$as_echo_n "checking for default auto-load safe-path... " >&6; }
6601
6602# Check whether --with-auto-load-safe-path was given.
6603if test "${with_auto_load_safe_path+set}" = set; then :
6604 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6605 with_auto_load_safe_path="/"
6606 fi
6607else
6608 with_auto_load_safe_path="$with_auto_load_dir"
6609fi
6610
6611escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
6612
6613 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6614 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6615 ac_define_dir=`eval echo $escape_dir`
6616 ac_define_dir=`eval echo $ac_define_dir`
6617
6618cat >>confdefs.h <<_ACEOF
6619#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
6620_ACEOF
6621
6622
6623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6624$as_echo "$with_auto_load_safe_path" >&6; }
6625
6626# Enable shared libraries.
6627# Check whether --enable-shared was given.
6628if test "${enable_shared+set}" = set; then :
6629 enableval=$enable_shared;
6630else
6631 enable_shared=yes
6632fi
6633
6634
6635# If we have shared libraries, try to set RPATH_ENVVAR reasonably,
6636# such that we can find the shared libraries in the build tree.
6637if test $enable_shared = no; then
6638 # The variable `RPATH_ENVVAR' itself is not likely to be used on any
6639 # platform.
6640 RPATH_ENVVAR=RPATH_ENVVAR
6641else
6642 # The variable `LD_LIBRARY_PATH' is used on most platforms.
6643 RPATH_ENVVAR=LD_LIBRARY_PATH
6644 # The following exceptions are taken from Libtool 1.4.3.
6645 case $host_os in
6646 aix*)
6647 if test $host_cpu != ia64; then
6648 RPATH_ENVVAR=LIBPATH
6649 fi ;;
6650 darwin* | rhapsody*)
6651 RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
6652 esac
6653fi
6654
6655
6656# Check whether to support alternative target configurations
6657# Check whether --enable-targets was given.
6658if test "${enable_targets+set}" = set; then :
6659 enableval=$enable_targets; case "${enableval}" in
6660 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
6661 ;;
6662 no) enable_targets= ;;
6663 *) enable_targets=$enableval ;;
6664esac
6665fi
6666
6667
6668# Check whether to enable 64-bit support on 32-bit hosts
6669# Check whether --enable-64-bit-bfd was given.
6670if test "${enable_64_bit_bfd+set}" = set; then :
6671 enableval=$enable_64_bit_bfd; case "${enableval}" in
6672 yes) want64=true ;;
6673 no) want64=false ;;
6674 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
6675esac
6676else
6677 want64=false
6678fi
6679
6680# Provide defaults for some variables set by the per-host and per-target
6681# configuration.
6682gdb_host_obs=posix-hdep.o
6683
6684if test "${target}" = "${host}"; then
6685 gdb_native=yes
6686else
6687 gdb_native=no
6688fi
6689
6690. $srcdir/configure.host
6691
6692# Accumulate some settings from configure.tgt over all enabled targets
6693
6694TARGET_OBS=
6695all_targets=
6696HAVE_NATIVE_GCORE_TARGET=
6697
6698for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
6699do
6700 if test "$targ_alias" = "all"; then
6701 all_targets=true
6702 else
6703 # Canonicalize the secondary target names.
6704 result=`$ac_config_sub $targ_alias 2>/dev/null`
6705 if test -n "$result"; then
6706 targ=$result
6707 else
6708 targ=$targ_alias
6709 fi
6710
6711 . ${srcdir}/configure.tgt
6712
6713 if test -z "${gdb_target_obs}"; then :
6714 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
6715fi
6716
6717 # Target-specific object files
6718 for i in ${gdb_target_obs}; do
6719 case " $TARGET_OBS " in
6720 *" ${i} "*) ;;
6721 *)
6722 TARGET_OBS="$TARGET_OBS ${i}"
6723 ;;
6724 esac
6725 done
6726
6727 # Check whether this target needs 64-bit CORE_ADDR
6728 if test x${want64} = xfalse; then
6729 . ${srcdir}/../bfd/config.bfd
6730 fi
6731
6732 # Check whether this target is native and supports gcore.
6733 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6734 && $gdb_have_gcore; then
6735 HAVE_NATIVE_GCORE_TARGET=1
6736 fi
6737 fi
6738done
6739
6740if test x${all_targets} = xtrue; then
6741
6742 # We want all 64-bit targets if we either:
6743 # - run on a 64-bit host or
6744 # - already require 64-bit support for some other target or
6745 # - the --enable-64-bit-bfd option was supplied
6746 # Otherwise we only support all 32-bit targets.
6747 #
6748 # NOTE: This test must be in sync with the corresponding
6749 # tests in BFD!
6750
6751 if test x${want64} = xfalse; then
6752 # The cast to long int works around a bug in the HP C Compiler
6753# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6754# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6755# This bug is HP SR number 8606223364.
6756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6757$as_echo_n "checking size of long... " >&6; }
6758if ${ac_cv_sizeof_long+:} false; then :
6759 $as_echo_n "(cached) " >&6
6760else
6761 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
6762
6763else
6764 if test "$ac_cv_type_long" = yes; then
6765 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6766$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6767as_fn_error 77 "cannot compute sizeof (long)
6768See \`config.log' for more details" "$LINENO" 5; }
6769 else
6770 ac_cv_sizeof_long=0
6771 fi
6772fi
6773
6774fi
6775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6776$as_echo "$ac_cv_sizeof_long" >&6; }
6777
6778
6779
6780cat >>confdefs.h <<_ACEOF
6781#define SIZEOF_LONG $ac_cv_sizeof_long
6782_ACEOF
6783
6784
6785 if test "x${ac_cv_sizeof_long}" = "x8"; then
6786 want64=true
6787 fi
6788 fi
6789 if test x${want64} = xtrue; then
6790 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6791 else
6792 TARGET_OBS='$(ALL_TARGET_OBS)'
6793 fi
6794fi
6795
6796
6797
6798
6799# For other settings, only the main target counts.
6800gdb_sim=
6801gdb_osabi=
6802targ=$target; . ${srcdir}/configure.tgt
6803
6804# Fetch the default architecture and default target vector from BFD.
6805targ=$target; . $srcdir/../bfd/config.bfd
6806
6807# We only want the first architecture, so strip off the others if
6808# there is more than one.
6809targ_archs=`echo $targ_archs | sed 's/ .*//'`
6810
6811if test "x$targ_archs" != x; then
6812
6813cat >>confdefs.h <<_ACEOF
6814#define DEFAULT_BFD_ARCH $targ_archs
6815_ACEOF
6816
6817fi
6818if test "x$targ_defvec" != x; then
6819
6820cat >>confdefs.h <<_ACEOF
6821#define DEFAULT_BFD_VEC $targ_defvec
6822_ACEOF
6823
6824fi
6825
6826# Enable MI.
6827# Check whether --enable-gdbmi was given.
6828if test "${enable_gdbmi+set}" = set; then :
6829 enableval=$enable_gdbmi; case $enableval in
6830 yes | no)
6831 ;;
6832 *)
6833 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
6834 esac
6835else
6836 enable_gdbmi=yes
6837fi
6838
6839if test x"$enable_gdbmi" = xyes; then
6840 if test -d "$srcdir/mi"; then
6841 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6842 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6843 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6844 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6845 fi
6846fi
6847
6848# Enable TUI.
6849# Check whether --enable-tui was given.
6850if test "${enable_tui+set}" = set; then :
6851 enableval=$enable_tui; case $enableval in
6852 yes | no | auto)
6853 ;;
6854 *)
6855 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
6856 esac
6857else
6858 enable_tui=auto
6859fi
6860
6861
6862# Enable gdbtk.
6863# Check whether --enable-gdbtk was given.
6864if test "${enable_gdbtk+set}" = set; then :
6865 enableval=$enable_gdbtk; case $enableval in
6866 yes | no)
6867 ;;
6868 *)
6869 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
6870 esac
6871else
6872 if test -d "$srcdir/gdbtk"; then
6873 enable_gdbtk=yes
6874 else
6875 enable_gdbtk=no
6876 fi
6877fi
6878
6879# We unconditionally disable gdbtk tests on selected platforms.
6880case $host_os in
6881 go32* | windows*)
6882 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6883$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
6884 enable_gdbtk=no ;;
6885esac
6886
6887# Handle optional debuginfod support
6888
6889
6890
6891
6892
6893
6894
6895if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6896 if test -n "$ac_tool_prefix"; then
6897 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
6898set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
6899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6900$as_echo_n "checking for $ac_word... " >&6; }
6901if ${ac_cv_path_PKG_CONFIG+:} false; then :
6902 $as_echo_n "(cached) " >&6
6903else
6904 case $PKG_CONFIG in
6905 [\\/]* | ?:[\\/]*)
6906 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6907 ;;
6908 *)
6909 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6910for as_dir in $PATH
6911do
6912 IFS=$as_save_IFS
6913 test -z "$as_dir" && as_dir=.
6914 for ac_exec_ext in '' $ac_executable_extensions; do
6915 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6916 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6917 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6918 break 2
6919 fi
6920done
6921 done
6922IFS=$as_save_IFS
6923
6924 ;;
6925esac
6926fi
6927PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6928if test -n "$PKG_CONFIG"; then
6929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
6930$as_echo "$PKG_CONFIG" >&6; }
6931else
6932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6933$as_echo "no" >&6; }
6934fi
6935
6936
6937fi
6938if test -z "$ac_cv_path_PKG_CONFIG"; then
6939 ac_pt_PKG_CONFIG=$PKG_CONFIG
6940 # Extract the first word of "pkg-config", so it can be a program name with args.
6941set dummy pkg-config; ac_word=$2
6942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6943$as_echo_n "checking for $ac_word... " >&6; }
6944if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
6945 $as_echo_n "(cached) " >&6
6946else
6947 case $ac_pt_PKG_CONFIG in
6948 [\\/]* | ?:[\\/]*)
6949 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
6950 ;;
6951 *)
6952 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6953for as_dir in $PATH
6954do
6955 IFS=$as_save_IFS
6956 test -z "$as_dir" && as_dir=.
6957 for ac_exec_ext in '' $ac_executable_extensions; do
6958 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6959 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6960 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6961 break 2
6962 fi
6963done
6964 done
6965IFS=$as_save_IFS
6966
6967 ;;
6968esac
6969fi
6970ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
6971if test -n "$ac_pt_PKG_CONFIG"; then
6972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
6973$as_echo "$ac_pt_PKG_CONFIG" >&6; }
6974else
6975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6976$as_echo "no" >&6; }
6977fi
6978
6979 if test "x$ac_pt_PKG_CONFIG" = x; then
6980 PKG_CONFIG=""
6981 else
6982 case $cross_compiling:$ac_tool_warned in
6983yes:)
6984{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6985$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6986ac_tool_warned=yes ;;
6987esac
6988 PKG_CONFIG=$ac_pt_PKG_CONFIG
6989 fi
6990else
6991 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
6992fi
6993
6994fi
6995if test -n "$PKG_CONFIG"; then
6996 _pkg_min_version=0.9.0
6997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
6998$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
6999 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7001$as_echo "yes" >&6; }
7002 else
7003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7004$as_echo "no" >&6; }
7005 PKG_CONFIG=""
7006 fi
7007fi
7008
7009# Handle optional debuginfod support
7010
7011# Check whether --with-debuginfod was given.
7012if test "${with_debuginfod+set}" = set; then :
7013 withval=$with_debuginfod;
7014else
7015 with_debuginfod=auto
7016fi
7017
7018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use debuginfod" >&5
7019$as_echo_n "checking whether to use debuginfod... " >&6; }
7020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_debuginfod" >&5
7021$as_echo "$with_debuginfod" >&6; }
7022
7023if test "x$with_debuginfod" != xno; then
7024
7025pkg_failed=no
7026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdebuginfod >= 0.179" >&5
7027$as_echo_n "checking for libdebuginfod >= 0.179... " >&6; }
7028
7029if test -n "$DEBUGINFOD_CFLAGS"; then
7030 pkg_cv_DEBUGINFOD_CFLAGS="$DEBUGINFOD_CFLAGS"
7031 elif test -n "$PKG_CONFIG"; then
7032 if test -n "$PKG_CONFIG" && \
7033 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5
7034 ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5
7035 ac_status=$?
7036 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7037 test $ac_status = 0; }; then
7038 pkg_cv_DEBUGINFOD_CFLAGS=`$PKG_CONFIG --cflags "libdebuginfod >= 0.179" 2>/dev/null`
7039 test "x$?" != "x0" && pkg_failed=yes
7040else
7041 pkg_failed=yes
7042fi
7043 else
7044 pkg_failed=untried
7045fi
7046if test -n "$DEBUGINFOD_LIBS"; then
7047 pkg_cv_DEBUGINFOD_LIBS="$DEBUGINFOD_LIBS"
7048 elif test -n "$PKG_CONFIG"; then
7049 if test -n "$PKG_CONFIG" && \
7050 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5
7051 ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5
7052 ac_status=$?
7053 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7054 test $ac_status = 0; }; then
7055 pkg_cv_DEBUGINFOD_LIBS=`$PKG_CONFIG --libs "libdebuginfod >= 0.179" 2>/dev/null`
7056 test "x$?" != "x0" && pkg_failed=yes
7057else
7058 pkg_failed=yes
7059fi
7060 else
7061 pkg_failed=untried
7062fi
7063
7064if test $pkg_failed = no; then
7065 pkg_save_LDFLAGS="$LDFLAGS"
7066 LDFLAGS="$LDFLAGS $pkg_cv_DEBUGINFOD_LIBS"
7067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7068/* end confdefs.h. */
7069
7070int
7071main ()
7072{
7073
7074 ;
7075 return 0;
7076}
7077_ACEOF
7078if ac_fn_c_try_link "$LINENO"; then :
7079
7080else
7081 pkg_failed=yes
7082fi
7083rm -f core conftest.err conftest.$ac_objext \
7084 conftest$ac_exeext conftest.$ac_ext
7085 LDFLAGS=$pkg_save_LDFLAGS
7086fi
7087
7088
7089
7090if test $pkg_failed = yes; then
7091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7092$as_echo "no" >&6; }
7093
7094if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7095 _pkg_short_errors_supported=yes
7096else
7097 _pkg_short_errors_supported=no
7098fi
7099 if test $_pkg_short_errors_supported = yes; then
7100 DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1`
7101 else
7102 DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1`
7103 fi
7104 # Put the nasty error message in config.log where it belongs
7105 echo "$DEBUGINFOD_PKG_ERRORS" >&5
7106
7107 if test "x$with_debuginfod" = xyes; then
7108 as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
7109 else
7110 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
7111$as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
7112 fi
7113elif test $pkg_failed = untried; then
7114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7115$as_echo "no" >&6; }
7116 if test "x$with_debuginfod" = xyes; then
7117 as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
7118 else
7119 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
7120$as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
7121 fi
7122else
7123 DEBUGINFOD_CFLAGS=$pkg_cv_DEBUGINFOD_CFLAGS
7124 DEBUGINFOD_LIBS=$pkg_cv_DEBUGINFOD_LIBS
7125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7126$as_echo "yes" >&6; }
7127
7128$as_echo "#define HAVE_LIBDEBUGINFOD 1" >>confdefs.h
7129
7130fi
7131else
7132 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: debuginfod support disabled; some features may be unavailable." >&5
7133$as_echo "$as_me: WARNING: debuginfod support disabled; some features may be unavailable." >&2;}
7134fi
7135
7136
7137# Libunwind support for ia64.
7138
7139# Check whether --with-libunwind-ia64 was given.
7140if test "${with_libunwind_ia64+set}" = set; then :
7141 withval=$with_libunwind_ia64;
7142else
7143 with_libunwind_ia64=auto
7144fi
7145
7146
7147# Backward compatibility option.
7148if test "${with_libunwind+set}" = set; then
7149 if test x"$with_libunwind_ia64" != xauto; then
7150 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
7151 fi
7152 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
7153$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
7154 with_libunwind_ia64="$with_libunwind"
7155fi
7156
7157case "$with_libunwind_ia64" in
7158 yes | no)
7159 ;;
7160 auto)
7161 for ac_header in libunwind-ia64.h
7162do :
7163 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
7164if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
7165 cat >>confdefs.h <<_ACEOF
7166#define HAVE_LIBUNWIND_IA64_H 1
7167_ACEOF
7168
7169fi
7170
7171done
7172
7173 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
7174 ;;
7175 *)
7176 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
7177 ;;
7178esac
7179
7180if test x"$with_libunwind_ia64" = xyes; then
7181 for ac_header in libunwind-ia64.h
7182do :
7183 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
7184if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
7185 cat >>confdefs.h <<_ACEOF
7186#define HAVE_LIBUNWIND_IA64_H 1
7187_ACEOF
7188
7189fi
7190
7191done
7192
7193 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
7194 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
7195 fi
7196 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
7197 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
7198 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
7199fi
7200
7201opt_curses=no
7202
7203# Check whether --with-curses was given.
7204if test "${with_curses+set}" = set; then :
7205 withval=$with_curses; opt_curses=$withval
7206fi
7207
7208
7209prefer_curses=no
7210if test "$opt_curses" = "yes"; then
7211 prefer_curses=yes
7212fi
7213
7214# Profiling support.
7215# Check whether --enable-profiling was given.
7216if test "${enable_profiling+set}" = set; then :
7217 enableval=$enable_profiling; case $enableval in
7218 yes | no)
7219 ;;
7220 *)
7221 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
7222 esac
7223else
7224 enable_profiling=no
7225fi
7226
7227
7228for ac_func in monstartup _mcleanup
7229do :
7230 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7231ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7232if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7233 cat >>confdefs.h <<_ACEOF
7234#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7235_ACEOF
7236
7237fi
7238done
7239
7240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
7241$as_echo_n "checking for _etext... " >&6; }
7242if ${ac_cv_var__etext+:} false; then :
7243 $as_echo_n "(cached) " >&6
7244else
7245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7246/* end confdefs.h. */
7247#include <stdlib.h>
7248 extern char _etext;
7249int
7250main ()
7251{
7252free (&_etext);
7253
7254 ;
7255 return 0;
7256}
7257_ACEOF
7258if ac_fn_c_try_link "$LINENO"; then :
7259 ac_cv_var__etext=yes
7260else
7261 ac_cv_var__etext=no
7262
7263fi
7264rm -f core conftest.err conftest.$ac_objext \
7265 conftest$ac_exeext conftest.$ac_ext
7266
7267fi
7268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
7269$as_echo "$ac_cv_var__etext" >&6; }
7270if test "$ac_cv_var__etext" = yes; then
7271
7272$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
7273
7274fi
7275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
7276$as_echo_n "checking for etext... " >&6; }
7277if ${ac_cv_var_etext+:} false; then :
7278 $as_echo_n "(cached) " >&6
7279else
7280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7281/* end confdefs.h. */
7282#include <stdlib.h>
7283 extern char etext;
7284int
7285main ()
7286{
7287free (&etext);
7288
7289 ;
7290 return 0;
7291}
7292_ACEOF
7293if ac_fn_c_try_link "$LINENO"; then :
7294 ac_cv_var_etext=yes
7295else
7296 ac_cv_var_etext=no
7297
7298fi
7299rm -f core conftest.err conftest.$ac_objext \
7300 conftest$ac_exeext conftest.$ac_ext
7301
7302fi
7303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7304$as_echo "$ac_cv_var_etext" >&6; }
7305if test "$ac_cv_var_etext" = yes; then
7306
7307$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
7308
7309fi
7310if test "$enable_profiling" = yes ; then
7311 if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then
7312 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
7313 fi
7314 PROFILE_CFLAGS=-pg
7315 OLD_CFLAGS="$CFLAGS"
7316 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
7317
7318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7319$as_echo_n "checking whether $CC supports -pg... " >&6; }
7320if ${ac_cv_cc_supports_pg+:} false; then :
7321 $as_echo_n "(cached) " >&6
7322else
7323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7324/* end confdefs.h. */
7325
7326int
7327main ()
7328{
7329int x;
7330 ;
7331 return 0;
7332}
7333_ACEOF
7334if ac_fn_c_try_compile "$LINENO"; then :
7335 ac_cv_cc_supports_pg=yes
7336else
7337 ac_cv_cc_supports_pg=no
7338
7339fi
7340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7341
7342fi
7343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7344$as_echo "$ac_cv_cc_supports_pg" >&6; }
7345
7346 if test "$ac_cv_cc_supports_pg" = no; then
7347 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
7348 fi
7349
7350 CFLAGS="$OLD_CFLAGS"
7351fi
7352
7353CODESIGN_CERT=
7354# Check whether --enable-codesign was given.
7355if test "${enable_codesign+set}" = set; then :
7356 enableval=$enable_codesign; CODESIGN_CERT=$enableval
7357fi
7358
7359
7360
7361
7362
7363# Check whether --with-pkgversion was given.
7364if test "${with_pkgversion+set}" = set; then :
7365 withval=$with_pkgversion; case "$withval" in
7366 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
7367 no) PKGVERSION= ;;
7368 *) PKGVERSION="($withval) " ;;
7369 esac
7370else
7371 PKGVERSION="(GDB) "
7372
7373fi
7374
7375
7376
7377
7378
7379# Check whether --with-bugurl was given.
7380if test "${with_bugurl+set}" = set; then :
7381 withval=$with_bugurl; case "$withval" in
7382 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
7383 no) BUGURL=
7384 ;;
7385 *) BUGURL="$withval"
7386 ;;
7387 esac
7388else
7389 BUGURL="https://www.gnu.org/software/gdb/bugs/"
7390
7391fi
7392
7393 case ${BUGURL} in
7394 "")
7395 REPORT_BUGS_TO=
7396 REPORT_BUGS_TEXI=
7397 ;;
7398 *)
7399 REPORT_BUGS_TO="<$BUGURL>"
7400 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7401 ;;
7402 esac;
7403
7404
7405
7406
7407cat >>confdefs.h <<_ACEOF
7408#define PKGVERSION "$PKGVERSION"
7409_ACEOF
7410
7411
7412cat >>confdefs.h <<_ACEOF
7413#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7414_ACEOF
7415
7416
7417# --------------------- #
7418# Checks for programs. #
7419# --------------------- #
7420
7421for ac_prog in gawk mawk nawk awk
7422do
7423 # Extract the first word of "$ac_prog", so it can be a program name with args.
7424set dummy $ac_prog; ac_word=$2
7425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7426$as_echo_n "checking for $ac_word... " >&6; }
7427if ${ac_cv_prog_AWK+:} false; then :
7428 $as_echo_n "(cached) " >&6
7429else
7430 if test -n "$AWK"; then
7431 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7432else
7433as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7434for as_dir in $PATH
7435do
7436 IFS=$as_save_IFS
7437 test -z "$as_dir" && as_dir=.
7438 for ac_exec_ext in '' $ac_executable_extensions; do
7439 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7440 ac_cv_prog_AWK="$ac_prog"
7441 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7442 break 2
7443 fi
7444done
7445 done
7446IFS=$as_save_IFS
7447
7448fi
7449fi
7450AWK=$ac_cv_prog_AWK
7451if test -n "$AWK"; then
7452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7453$as_echo "$AWK" >&6; }
7454else
7455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7456$as_echo "no" >&6; }
7457fi
7458
7459
7460 test -n "$AWK" && break
7461done
7462
7463# Find a good install program. We prefer a C program (faster),
7464# so one script is as good as another. But avoid the broken or
7465# incompatible versions:
7466# SysV /etc/install, /usr/sbin/install
7467# SunOS /usr/etc/install
7468# IRIX /sbin/install
7469# AIX /bin/install
7470# AmigaOS /C/install, which installs bootblocks on floppy discs
7471# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7472# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7473# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7474# OS/2's system install, which has a completely different semantic
7475# ./install, which can be erroneously created by make from ./install.sh.
7476# Reject install programs that cannot install multiple files.
7477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7478$as_echo_n "checking for a BSD-compatible install... " >&6; }
7479if test -z "$INSTALL"; then
7480if ${ac_cv_path_install+:} false; then :
7481 $as_echo_n "(cached) " >&6
7482else
7483 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7484for as_dir in $PATH
7485do
7486 IFS=$as_save_IFS
7487 test -z "$as_dir" && as_dir=.
7488 # Account for people who put trailing slashes in PATH elements.
7489case $as_dir/ in #((
7490 ./ | .// | /[cC]/* | \
7491 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7492 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7493 /usr/ucb/* ) ;;
7494 *)
7495 # OSF1 and SCO ODT 3.0 have their own names for install.
7496 # Don't use installbsd from OSF since it installs stuff as root
7497 # by default.
7498 for ac_prog in ginstall scoinst install; do
7499 for ac_exec_ext in '' $ac_executable_extensions; do
7500 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
7501 if test $ac_prog = install &&
7502 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7503 # AIX install. It has an incompatible calling convention.
7504 :
7505 elif test $ac_prog = install &&
7506 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7507 # program-specific install script used by HP pwplus--don't use.
7508 :
7509 else
7510 rm -rf conftest.one conftest.two conftest.dir
7511 echo one > conftest.one
7512 echo two > conftest.two
7513 mkdir conftest.dir
7514 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7515 test -s conftest.one && test -s conftest.two &&
7516 test -s conftest.dir/conftest.one &&
7517 test -s conftest.dir/conftest.two
7518 then
7519 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7520 break 3
7521 fi
7522 fi
7523 fi
7524 done
7525 done
7526 ;;
7527esac
7528
7529 done
7530IFS=$as_save_IFS
7531
7532rm -rf conftest.one conftest.two conftest.dir
7533
7534fi
7535 if test "${ac_cv_path_install+set}" = set; then
7536 INSTALL=$ac_cv_path_install
7537 else
7538 # As a last resort, use the slow shell script. Don't cache a
7539 # value for INSTALL within a source directory, because that will
7540 # break other packages using the cache if that directory is
7541 # removed, or if the value is a relative name.
7542 INSTALL=$ac_install_sh
7543 fi
7544fi
7545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7546$as_echo "$INSTALL" >&6; }
7547
7548# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7549# It thinks the first close brace ends the variable substitution.
7550test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7551
7552test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7553
7554test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7555
7556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7557$as_echo_n "checking whether ln -s works... " >&6; }
7558LN_S=$as_ln_s
7559if test "$LN_S" = "ln -s"; then
7560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7561$as_echo "yes" >&6; }
7562else
7563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7564$as_echo "no, using $LN_S" >&6; }
7565fi
7566
7567if test -n "$ac_tool_prefix"; then
7568 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7569set dummy ${ac_tool_prefix}ranlib; 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; }
7572if ${ac_cv_prog_RANLIB+:} false; then :
7573 $as_echo_n "(cached) " >&6
7574else
7575 if test -n "$RANLIB"; then
7576 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7577else
7578as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7579for as_dir in $PATH
7580do
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_RANLIB="${ac_tool_prefix}ranlib"
7586 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7587 break 2
7588 fi
7589done
7590 done
7591IFS=$as_save_IFS
7592
7593fi
7594fi
7595RANLIB=$ac_cv_prog_RANLIB
7596if test -n "$RANLIB"; then
7597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7598$as_echo "$RANLIB" >&6; }
7599else
7600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7601$as_echo "no" >&6; }
7602fi
7603
7604
7605fi
7606if test -z "$ac_cv_prog_RANLIB"; then
7607 ac_ct_RANLIB=$RANLIB
7608 # Extract the first word of "ranlib", so it can be a program name with args.
7609set dummy ranlib; 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; }
7612if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
7613 $as_echo_n "(cached) " >&6
7614else
7615 if test -n "$ac_ct_RANLIB"; then
7616 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7617else
7618as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7619for as_dir in $PATH
7620do
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_RANLIB="ranlib"
7626 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7627 break 2
7628 fi
7629done
7630 done
7631IFS=$as_save_IFS
7632
7633fi
7634fi
7635ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7636if test -n "$ac_ct_RANLIB"; then
7637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7638$as_echo "$ac_ct_RANLIB" >&6; }
7639else
7640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7641$as_echo "no" >&6; }
7642fi
7643
7644 if test "x$ac_ct_RANLIB" = x; then
7645 RANLIB=":"
7646 else
7647 case $cross_compiling:$ac_tool_warned in
7648yes:)
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;}
7651ac_tool_warned=yes ;;
7652esac
7653 RANLIB=$ac_ct_RANLIB
7654 fi
7655else
7656 RANLIB="$ac_cv_prog_RANLIB"
7657fi
7658
7659for ac_prog in 'bison -y' byacc
7660do
7661 # Extract the first word of "$ac_prog", so it can be a program name with args.
7662set dummy $ac_prog; ac_word=$2
7663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7664$as_echo_n "checking for $ac_word... " >&6; }
7665if ${ac_cv_prog_YACC+:} false; then :
7666 $as_echo_n "(cached) " >&6
7667else
7668 if test -n "$YACC"; then
7669 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7670else
7671as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7672for as_dir in $PATH
7673do
7674 IFS=$as_save_IFS
7675 test -z "$as_dir" && as_dir=.
7676 for ac_exec_ext in '' $ac_executable_extensions; do
7677 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7678 ac_cv_prog_YACC="$ac_prog"
7679 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7680 break 2
7681 fi
7682done
7683 done
7684IFS=$as_save_IFS
7685
7686fi
7687fi
7688YACC=$ac_cv_prog_YACC
7689if test -n "$YACC"; then
7690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7691$as_echo "$YACC" >&6; }
7692else
7693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7694$as_echo "no" >&6; }
7695fi
7696
7697
7698 test -n "$YACC" && break
7699done
7700test -n "$YACC" || YACC="yacc"
7701
7702
7703if test -n "$ac_tool_prefix"; then
7704 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7705set dummy ${ac_tool_prefix}ar; 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; }
7708if ${ac_cv_prog_AR+:} false; then :
7709 $as_echo_n "(cached) " >&6
7710else
7711 if test -n "$AR"; then
7712 ac_cv_prog_AR="$AR" # Let the user override the test.
7713else
7714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7715for as_dir in $PATH
7716do
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_AR="${ac_tool_prefix}ar"
7722 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7723 break 2
7724 fi
7725done
7726 done
7727IFS=$as_save_IFS
7728
7729fi
7730fi
7731AR=$ac_cv_prog_AR
7732if test -n "$AR"; then
7733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7734$as_echo "$AR" >&6; }
7735else
7736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7737$as_echo "no" >&6; }
7738fi
7739
7740
7741fi
7742if test -z "$ac_cv_prog_AR"; then
7743 ac_ct_AR=$AR
7744 # Extract the first word of "ar", so it can be a program name with args.
7745set dummy ar; ac_word=$2
7746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7747$as_echo_n "checking for $ac_word... " >&6; }
7748if ${ac_cv_prog_ac_ct_AR+:} false; then :
7749 $as_echo_n "(cached) " >&6
7750else
7751 if test -n "$ac_ct_AR"; then
7752 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7753else
7754as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7755for as_dir in $PATH
7756do
7757 IFS=$as_save_IFS
7758 test -z "$as_dir" && as_dir=.
7759 for ac_exec_ext in '' $ac_executable_extensions; do
7760 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7761 ac_cv_prog_ac_ct_AR="ar"
7762 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7763 break 2
7764 fi
7765done
7766 done
7767IFS=$as_save_IFS
7768
7769fi
7770fi
7771ac_ct_AR=$ac_cv_prog_ac_ct_AR
7772if test -n "$ac_ct_AR"; then
7773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7774$as_echo "$ac_ct_AR" >&6; }
7775else
7776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7777$as_echo "no" >&6; }
7778fi
7779
7780 if test "x$ac_ct_AR" = x; then
7781 AR=""
7782 else
7783 case $cross_compiling:$ac_tool_warned in
7784yes:)
7785{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7786$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7787ac_tool_warned=yes ;;
7788esac
7789 AR=$ac_ct_AR
7790 fi
7791else
7792 AR="$ac_cv_prog_AR"
7793fi
7794
7795if test -n "$ac_tool_prefix"; then
7796 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7797set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7799$as_echo_n "checking for $ac_word... " >&6; }
7800if ${ac_cv_prog_DLLTOOL+:} false; then :
7801 $as_echo_n "(cached) " >&6
7802else
7803 if test -n "$DLLTOOL"; then
7804 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7805else
7806as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7807for as_dir in $PATH
7808do
7809 IFS=$as_save_IFS
7810 test -z "$as_dir" && as_dir=.
7811 for ac_exec_ext in '' $ac_executable_extensions; do
7812 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7813 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7814 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7815 break 2
7816 fi
7817done
7818 done
7819IFS=$as_save_IFS
7820
7821fi
7822fi
7823DLLTOOL=$ac_cv_prog_DLLTOOL
7824if test -n "$DLLTOOL"; then
7825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7826$as_echo "$DLLTOOL" >&6; }
7827else
7828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7829$as_echo "no" >&6; }
7830fi
7831
7832
7833fi
7834if test -z "$ac_cv_prog_DLLTOOL"; then
7835 ac_ct_DLLTOOL=$DLLTOOL
7836 # Extract the first word of "dlltool", so it can be a program name with args.
7837set dummy dlltool; ac_word=$2
7838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7839$as_echo_n "checking for $ac_word... " >&6; }
7840if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
7841 $as_echo_n "(cached) " >&6
7842else
7843 if test -n "$ac_ct_DLLTOOL"; then
7844 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7845else
7846as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7847for as_dir in $PATH
7848do
7849 IFS=$as_save_IFS
7850 test -z "$as_dir" && as_dir=.
7851 for ac_exec_ext in '' $ac_executable_extensions; do
7852 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7853 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7854 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7855 break 2
7856 fi
7857done
7858 done
7859IFS=$as_save_IFS
7860
7861fi
7862fi
7863ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7864if test -n "$ac_ct_DLLTOOL"; then
7865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7866$as_echo "$ac_ct_DLLTOOL" >&6; }
7867else
7868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7869$as_echo "no" >&6; }
7870fi
7871
7872 if test "x$ac_ct_DLLTOOL" = x; then
7873 DLLTOOL=""
7874 else
7875 case $cross_compiling:$ac_tool_warned in
7876yes:)
7877{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7878$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7879ac_tool_warned=yes ;;
7880esac
7881 DLLTOOL=$ac_ct_DLLTOOL
7882 fi
7883else
7884 DLLTOOL="$ac_cv_prog_DLLTOOL"
7885fi
7886
7887if test -n "$ac_tool_prefix"; then
7888 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7889set dummy ${ac_tool_prefix}windres; ac_word=$2
7890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7891$as_echo_n "checking for $ac_word... " >&6; }
7892if ${ac_cv_prog_WINDRES+:} false; then :
7893 $as_echo_n "(cached) " >&6
7894else
7895 if test -n "$WINDRES"; then
7896 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7897else
7898as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7899for as_dir in $PATH
7900do
7901 IFS=$as_save_IFS
7902 test -z "$as_dir" && as_dir=.
7903 for ac_exec_ext in '' $ac_executable_extensions; do
7904 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7905 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
7906 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7907 break 2
7908 fi
7909done
7910 done
7911IFS=$as_save_IFS
7912
7913fi
7914fi
7915WINDRES=$ac_cv_prog_WINDRES
7916if test -n "$WINDRES"; then
7917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7918$as_echo "$WINDRES" >&6; }
7919else
7920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7921$as_echo "no" >&6; }
7922fi
7923
7924
7925fi
7926if test -z "$ac_cv_prog_WINDRES"; then
7927 ac_ct_WINDRES=$WINDRES
7928 # Extract the first word of "windres", so it can be a program name with args.
7929set dummy windres; ac_word=$2
7930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7931$as_echo_n "checking for $ac_word... " >&6; }
7932if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
7933 $as_echo_n "(cached) " >&6
7934else
7935 if test -n "$ac_ct_WINDRES"; then
7936 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7937else
7938as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7939for as_dir in $PATH
7940do
7941 IFS=$as_save_IFS
7942 test -z "$as_dir" && as_dir=.
7943 for ac_exec_ext in '' $ac_executable_extensions; do
7944 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7945 ac_cv_prog_ac_ct_WINDRES="windres"
7946 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7947 break 2
7948 fi
7949done
7950 done
7951IFS=$as_save_IFS
7952
7953fi
7954fi
7955ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7956if test -n "$ac_ct_WINDRES"; then
7957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7958$as_echo "$ac_ct_WINDRES" >&6; }
7959else
7960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7961$as_echo "no" >&6; }
7962fi
7963
7964 if test "x$ac_ct_WINDRES" = x; then
7965 WINDRES=""
7966 else
7967 case $cross_compiling:$ac_tool_warned in
7968yes:)
7969{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7970$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7971ac_tool_warned=yes ;;
7972esac
7973 WINDRES=$ac_ct_WINDRES
7974 fi
7975else
7976 WINDRES="$ac_cv_prog_WINDRES"
7977fi
7978
7979
7980case $host_os in
7981 gnu*)
7982 # Needed for GNU Hurd hosts.
7983 if test -n "$ac_tool_prefix"; then
7984 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7985set dummy ${ac_tool_prefix}mig; ac_word=$2
7986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7987$as_echo_n "checking for $ac_word... " >&6; }
7988if ${ac_cv_prog_MIG+:} false; then :
7989 $as_echo_n "(cached) " >&6
7990else
7991 if test -n "$MIG"; then
7992 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7993else
7994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7995for as_dir in $PATH
7996do
7997 IFS=$as_save_IFS
7998 test -z "$as_dir" && as_dir=.
7999 for ac_exec_ext in '' $ac_executable_extensions; do
8000 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8001 ac_cv_prog_MIG="${ac_tool_prefix}mig"
8002 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8003 break 2
8004 fi
8005done
8006 done
8007IFS=$as_save_IFS
8008
8009fi
8010fi
8011MIG=$ac_cv_prog_MIG
8012if test -n "$MIG"; then
8013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
8014$as_echo "$MIG" >&6; }
8015else
8016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8017$as_echo "no" >&6; }
8018fi
8019
8020
8021fi
8022if test -z "$ac_cv_prog_MIG"; then
8023 ac_ct_MIG=$MIG
8024 # Extract the first word of "mig", so it can be a program name with args.
8025set dummy mig; ac_word=$2
8026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8027$as_echo_n "checking for $ac_word... " >&6; }
8028if ${ac_cv_prog_ac_ct_MIG+:} false; then :
8029 $as_echo_n "(cached) " >&6
8030else
8031 if test -n "$ac_ct_MIG"; then
8032 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
8033else
8034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8035for as_dir in $PATH
8036do
8037 IFS=$as_save_IFS
8038 test -z "$as_dir" && as_dir=.
8039 for ac_exec_ext in '' $ac_executable_extensions; do
8040 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8041 ac_cv_prog_ac_ct_MIG="mig"
8042 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8043 break 2
8044 fi
8045done
8046 done
8047IFS=$as_save_IFS
8048
8049fi
8050fi
8051ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
8052if test -n "$ac_ct_MIG"; then
8053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
8054$as_echo "$ac_ct_MIG" >&6; }
8055else
8056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8057$as_echo "no" >&6; }
8058fi
8059
8060 if test "x$ac_ct_MIG" = x; then
8061 MIG=""
8062 else
8063 case $cross_compiling:$ac_tool_warned in
8064yes:)
8065{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8066$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8067ac_tool_warned=yes ;;
8068esac
8069 MIG=$ac_ct_MIG
8070 fi
8071else
8072 MIG="$ac_cv_prog_MIG"
8073fi
8074
8075 if test x"$MIG" = x; then
8076 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
8077 fi
8078 ;;
8079esac
8080
8081# ---------------------- #
8082# Checks for libraries. #
8083# ---------------------- #
8084
8085# We might need to link with -lm; most simulators need it.
8086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8087$as_echo_n "checking for main in -lm... " >&6; }
8088if ${ac_cv_lib_m_main+:} false; then :
8089 $as_echo_n "(cached) " >&6
8090else
8091 ac_check_lib_save_LIBS=$LIBS
8092LIBS="-lm $LIBS"
8093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8094/* end confdefs.h. */
8095
8096
8097int
8098main ()
8099{
8100return main ();
8101 ;
8102 return 0;
8103}
8104_ACEOF
8105if ac_fn_c_try_link "$LINENO"; then :
8106 ac_cv_lib_m_main=yes
8107else
8108 ac_cv_lib_m_main=no
8109fi
8110rm -f core conftest.err conftest.$ac_objext \
8111 conftest$ac_exeext conftest.$ac_ext
8112LIBS=$ac_check_lib_save_LIBS
8113fi
8114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
8115$as_echo "$ac_cv_lib_m_main" >&6; }
8116if test "x$ac_cv_lib_m_main" = xyes; then :
8117 cat >>confdefs.h <<_ACEOF
8118#define HAVE_LIBM 1
8119_ACEOF
8120
8121 LIBS="-lm $LIBS"
8122
8123fi
8124
8125
8126# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
8127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
8128$as_echo_n "checking for library containing gethostbyname... " >&6; }
8129if ${ac_cv_search_gethostbyname+:} false; then :
8130 $as_echo_n "(cached) " >&6
8131else
8132 ac_func_search_save_LIBS=$LIBS
8133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8134/* end confdefs.h. */
8135
8136/* Override any GCC internal prototype to avoid an error.
8137 Use char because int might match the return type of a GCC
8138 builtin and then its argument prototype would still apply. */
8139#ifdef __cplusplus
8140extern "C"
8141#endif
8142char gethostbyname ();
8143int
8144main ()
8145{
8146return gethostbyname ();
8147 ;
8148 return 0;
8149}
8150_ACEOF
8151for ac_lib in '' nsl; do
8152 if test -z "$ac_lib"; then
8153 ac_res="none required"
8154 else
8155 ac_res=-l$ac_lib
8156 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8157 fi
8158 if ac_fn_c_try_link "$LINENO"; then :
8159 ac_cv_search_gethostbyname=$ac_res
8160fi
8161rm -f core conftest.err conftest.$ac_objext \
8162 conftest$ac_exeext
8163 if ${ac_cv_search_gethostbyname+:} false; then :
8164 break
8165fi
8166done
8167if ${ac_cv_search_gethostbyname+:} false; then :
8168
8169else
8170 ac_cv_search_gethostbyname=no
8171fi
8172rm conftest.$ac_ext
8173LIBS=$ac_func_search_save_LIBS
8174fi
8175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
8176$as_echo "$ac_cv_search_gethostbyname" >&6; }
8177ac_res=$ac_cv_search_gethostbyname
8178if test "$ac_res" != no; then :
8179 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8180
8181fi
8182
8183
8184# Some systems (e.g. Solaris) have `socketpair' in libsocket.
8185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
8186$as_echo_n "checking for library containing socketpair... " >&6; }
8187if ${ac_cv_search_socketpair+:} false; then :
8188 $as_echo_n "(cached) " >&6
8189else
8190 ac_func_search_save_LIBS=$LIBS
8191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8192/* end confdefs.h. */
8193
8194/* Override any GCC internal prototype to avoid an error.
8195 Use char because int might match the return type of a GCC
8196 builtin and then its argument prototype would still apply. */
8197#ifdef __cplusplus
8198extern "C"
8199#endif
8200char socketpair ();
8201int
8202main ()
8203{
8204return socketpair ();
8205 ;
8206 return 0;
8207}
8208_ACEOF
8209for ac_lib in '' socket; do
8210 if test -z "$ac_lib"; then
8211 ac_res="none required"
8212 else
8213 ac_res=-l$ac_lib
8214 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8215 fi
8216 if ac_fn_c_try_link "$LINENO"; then :
8217 ac_cv_search_socketpair=$ac_res
8218fi
8219rm -f core conftest.err conftest.$ac_objext \
8220 conftest$ac_exeext
8221 if ${ac_cv_search_socketpair+:} false; then :
8222 break
8223fi
8224done
8225if ${ac_cv_search_socketpair+:} false; then :
8226
8227else
8228 ac_cv_search_socketpair=no
8229fi
8230rm conftest.$ac_ext
8231LIBS=$ac_func_search_save_LIBS
8232fi
8233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
8234$as_echo "$ac_cv_search_socketpair" >&6; }
8235ac_res=$ac_cv_search_socketpair
8236if test "$ac_res" != no; then :
8237 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8238
8239fi
8240
8241
8242# Link in zlib if we can. This allows us to read compressed debug sections.
8243
8244 # Use the system's zlib library.
8245 zlibdir="-L\$(top_builddir)/../zlib"
8246 zlibinc="-I\$(top_srcdir)/../zlib"
8247
8248# Check whether --with-system-zlib was given.
8249if test "${with_system_zlib+set}" = set; then :
8250 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
8251 zlibdir=
8252 zlibinc=
8253 fi
8254
8255fi
8256
8257
8258
8259
8260
8261
8262 if test "X$prefix" = "XNONE"; then
8263 acl_final_prefix="$ac_default_prefix"
8264 else
8265 acl_final_prefix="$prefix"
8266 fi
8267 if test "X$exec_prefix" = "XNONE"; then
8268 acl_final_exec_prefix='${prefix}'
8269 else
8270 acl_final_exec_prefix="$exec_prefix"
8271 fi
8272 acl_save_prefix="$prefix"
8273 prefix="$acl_final_prefix"
8274 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8275 prefix="$acl_save_prefix"
8276
8277
8278# Check whether --with-gnu-ld was given.
8279if test "${with_gnu_ld+set}" = set; then :
8280 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8281else
8282 with_gnu_ld=no
8283fi
8284
8285# Prepare PATH_SEPARATOR.
8286# The user is always right.
8287if test "${PATH_SEPARATOR+set}" != set; then
8288 echo "#! /bin/sh" >conf$$.sh
8289 echo "exit 0" >>conf$$.sh
8290 chmod +x conf$$.sh
8291 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8292 PATH_SEPARATOR=';'
8293 else
8294 PATH_SEPARATOR=:
8295 fi
8296 rm -f conf$$.sh
8297fi
8298ac_prog=ld
8299if test "$GCC" = yes; then
8300 # Check if gcc -print-prog-name=ld gives a path.
8301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8302$as_echo_n "checking for ld used by GCC... " >&6; }
8303 case $host in
8304 *-*-mingw*)
8305 # gcc leaves a trailing carriage return which upsets mingw
8306 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8307 *)
8308 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8309 esac
8310 case $ac_prog in
8311 # Accept absolute paths.
8312 [\\/]* | [A-Za-z]:[\\/]*)
8313 re_direlt='/[^/][^/]*/\.\./'
8314 # Canonicalize the path of ld
8315 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8316 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8317 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8318 done
8319 test -z "$LD" && LD="$ac_prog"
8320 ;;
8321 "")
8322 # If it fails, then pretend we aren't using GCC.
8323 ac_prog=ld
8324 ;;
8325 *)
8326 # If it is relative, then search for the first ld in PATH.
8327 with_gnu_ld=unknown
8328 ;;
8329 esac
8330elif test "$with_gnu_ld" = yes; then
8331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8332$as_echo_n "checking for GNU ld... " >&6; }
8333else
8334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8335$as_echo_n "checking for non-GNU ld... " >&6; }
8336fi
8337if ${acl_cv_path_LD+:} false; then :
8338 $as_echo_n "(cached) " >&6
8339else
8340 if test -z "$LD"; then
8341 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8342 for ac_dir in $PATH; do
8343 test -z "$ac_dir" && ac_dir=.
8344 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8345 acl_cv_path_LD="$ac_dir/$ac_prog"
8346 # Check to see if the program is GNU ld. I'd rather use --version,
8347 # but apparently some GNU ld's only accept -v.
8348 # Break only if it was the GNU/non-GNU ld that we prefer.
8349 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8350 test "$with_gnu_ld" != no && break
8351 else
8352 test "$with_gnu_ld" != yes && break
8353 fi
8354 fi
8355 done
8356 IFS="$ac_save_ifs"
8357else
8358 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8359fi
8360fi
8361
8362LD="$acl_cv_path_LD"
8363if test -n "$LD"; then
8364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8365$as_echo "$LD" >&6; }
8366else
8367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8368$as_echo "no" >&6; }
8369fi
8370test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8372$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8373if ${acl_cv_prog_gnu_ld+:} false; then :
8374 $as_echo_n "(cached) " >&6
8375else
8376 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8377if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8378 acl_cv_prog_gnu_ld=yes
8379else
8380 acl_cv_prog_gnu_ld=no
8381fi
8382fi
8383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8384$as_echo "$acl_cv_prog_gnu_ld" >&6; }
8385with_gnu_ld=$acl_cv_prog_gnu_ld
8386
8387
8388
8389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8390$as_echo_n "checking for shared library run path origin... " >&6; }
8391if ${acl_cv_rpath+:} false; then :
8392 $as_echo_n "(cached) " >&6
8393else
8394
8395 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8396 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8397 . ./conftest.sh
8398 rm -f ./conftest.sh
8399 acl_cv_rpath=done
8400
8401fi
8402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8403$as_echo "$acl_cv_rpath" >&6; }
8404 wl="$acl_cv_wl"
8405 libext="$acl_cv_libext"
8406 shlibext="$acl_cv_shlibext"
8407 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8408 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8409 hardcode_direct="$acl_cv_hardcode_direct"
8410 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8411 # Check whether --enable-rpath was given.
8412if test "${enable_rpath+set}" = set; then :
8413 enableval=$enable_rpath; :
8414else
8415 enable_rpath=yes
8416fi
8417
8418
8419
8420
8421
8422
8423
8424
8425 use_additional=yes
8426
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
8432 eval additional_includedir=\"$includedir\"
8433 eval additional_libdir=\"$libdir\"
8434
8435 exec_prefix="$acl_save_exec_prefix"
8436 prefix="$acl_save_prefix"
8437
8438
8439# Check whether --with-libiconv-prefix was given.
8440if test "${with_libiconv_prefix+set}" = set; then :
8441 withval=$with_libiconv_prefix;
8442 if test "X$withval" = "Xno"; then
8443 use_additional=no
8444 else
8445 if test "X$withval" = "X"; then
8446
8447 acl_save_prefix="$prefix"
8448 prefix="$acl_final_prefix"
8449 acl_save_exec_prefix="$exec_prefix"
8450 exec_prefix="$acl_final_exec_prefix"
8451
8452 eval additional_includedir=\"$includedir\"
8453 eval additional_libdir=\"$libdir\"
8454
8455 exec_prefix="$acl_save_exec_prefix"
8456 prefix="$acl_save_prefix"
8457
8458 else
8459 additional_includedir="$withval/include"
8460 additional_libdir="$withval/lib"
8461 fi
8462 fi
8463
8464fi
8465
8466
8467# Check whether --with-libiconv-type was given.
8468if test "${with_libiconv_type+set}" = set; then :
8469 withval=$with_libiconv_type; with_libiconv_type=$withval
8470else
8471 with_libiconv_type=auto
8472fi
8473
8474 lib_type=`eval echo \$with_libiconv_type`
8475
8476 LIBICONV=
8477 LTLIBICONV=
8478 INCICONV=
8479 rpathdirs=
8480 ltrpathdirs=
8481 names_already_handled=
8482 names_next_round='iconv '
8483 while test -n "$names_next_round"; do
8484 names_this_round="$names_next_round"
8485 names_next_round=
8486 for name in $names_this_round; do
8487 already_handled=
8488 for n in $names_already_handled; do
8489 if test "$n" = "$name"; then
8490 already_handled=yes
8491 break
8492 fi
8493 done
8494 if test -z "$already_handled"; then
8495 names_already_handled="$names_already_handled $name"
8496 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8497 eval value=\"\$HAVE_LIB$uppername\"
8498 if test -n "$value"; then
8499 if test "$value" = yes; then
8500 eval value=\"\$LIB$uppername\"
8501 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8502 eval value=\"\$LTLIB$uppername\"
8503 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8504 else
8505 :
8506 fi
8507 else
8508 found_dir=
8509 found_la=
8510 found_so=
8511 found_a=
8512 if test $use_additional = yes; then
8513 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
8514 found_dir="$additional_libdir"
8515 found_so="$additional_libdir/lib$name.$shlibext"
8516 if test -f "$additional_libdir/lib$name.la"; then
8517 found_la="$additional_libdir/lib$name.la"
8518 fi
8519 elif test x$lib_type != xshared; then
8520 if test -f "$additional_libdir/lib$name.$libext"; then
8521 found_dir="$additional_libdir"
8522 found_a="$additional_libdir/lib$name.$libext"
8523 if test -f "$additional_libdir/lib$name.la"; then
8524 found_la="$additional_libdir/lib$name.la"
8525 fi
8526 fi
8527 fi
8528 fi
8529 if test "X$found_dir" = "X"; then
8530 for x in $LDFLAGS $LTLIBICONV; do
8531
8532 acl_save_prefix="$prefix"
8533 prefix="$acl_final_prefix"
8534 acl_save_exec_prefix="$exec_prefix"
8535 exec_prefix="$acl_final_exec_prefix"
8536 eval x=\"$x\"
8537 exec_prefix="$acl_save_exec_prefix"
8538 prefix="$acl_save_prefix"
8539
8540 case "$x" in
8541 -L*)
8542 dir=`echo "X$x" | sed -e 's/^X-L//'`
8543 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
8544 found_dir="$dir"
8545 found_so="$dir/lib$name.$shlibext"
8546 if test -f "$dir/lib$name.la"; then
8547 found_la="$dir/lib$name.la"
8548 fi
8549 elif test x$lib_type != xshared; then
8550 if test -f "$dir/lib$name.$libext"; then
8551 found_dir="$dir"
8552 found_a="$dir/lib$name.$libext"
8553 if test -f "$dir/lib$name.la"; then
8554 found_la="$dir/lib$name.la"
8555 fi
8556 fi
8557 fi
8558 ;;
8559 esac
8560 if test "X$found_dir" != "X"; then
8561 break
8562 fi
8563 done
8564 fi
8565 if test "X$found_dir" != "X"; then
8566 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8567 if test "X$found_so" != "X"; then
8568 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8569 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8570 else
8571 haveit=
8572 for x in $ltrpathdirs; do
8573 if test "X$x" = "X$found_dir"; then
8574 haveit=yes
8575 break
8576 fi
8577 done
8578 if test -z "$haveit"; then
8579 ltrpathdirs="$ltrpathdirs $found_dir"
8580 fi
8581 if test "$hardcode_direct" = yes; then
8582 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8583 else
8584 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8585 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8586 haveit=
8587 for x in $rpathdirs; do
8588 if test "X$x" = "X$found_dir"; then
8589 haveit=yes
8590 break
8591 fi
8592 done
8593 if test -z "$haveit"; then
8594 rpathdirs="$rpathdirs $found_dir"
8595 fi
8596 else
8597 haveit=
8598 for x in $LDFLAGS $LIBICONV; do
8599
8600 acl_save_prefix="$prefix"
8601 prefix="$acl_final_prefix"
8602 acl_save_exec_prefix="$exec_prefix"
8603 exec_prefix="$acl_final_exec_prefix"
8604 eval x=\"$x\"
8605 exec_prefix="$acl_save_exec_prefix"
8606 prefix="$acl_save_prefix"
8607
8608 if test "X$x" = "X-L$found_dir"; then
8609 haveit=yes
8610 break
8611 fi
8612 done
8613 if test -z "$haveit"; then
8614 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8615 fi
8616 if test "$hardcode_minus_L" != no; then
8617 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8618 else
8619 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8620 fi
8621 fi
8622 fi
8623 fi
8624 else
8625 if test "X$found_a" != "X"; then
8626 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8627 else
8628 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8629 fi
8630 fi
8631 additional_includedir=
8632 case "$found_dir" in
8633 */lib | */lib/)
8634 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8635 additional_includedir="$basedir/include"
8636 ;;
8637 esac
8638 if test "X$additional_includedir" != "X"; then
8639 if test "X$additional_includedir" != "X/usr/include"; then
8640 haveit=
8641 if test "X$additional_includedir" = "X/usr/local/include"; then
8642 if test -n "$GCC"; then
8643 case $host_os in
8644 linux*) haveit=yes;;
8645 esac
8646 fi
8647 fi
8648 if test -z "$haveit"; then
8649 for x in $CPPFLAGS $INCICONV; do
8650
8651 acl_save_prefix="$prefix"
8652 prefix="$acl_final_prefix"
8653 acl_save_exec_prefix="$exec_prefix"
8654 exec_prefix="$acl_final_exec_prefix"
8655 eval x=\"$x\"
8656 exec_prefix="$acl_save_exec_prefix"
8657 prefix="$acl_save_prefix"
8658
8659 if test "X$x" = "X-I$additional_includedir"; then
8660 haveit=yes
8661 break
8662 fi
8663 done
8664 if test -z "$haveit"; then
8665 if test -d "$additional_includedir"; then
8666 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8667 fi
8668 fi
8669 fi
8670 fi
8671 fi
8672 if test -n "$found_la"; then
8673 save_libdir="$libdir"
8674 case "$found_la" in
8675 */* | *\\*) . "$found_la" ;;
8676 *) . "./$found_la" ;;
8677 esac
8678 libdir="$save_libdir"
8679 for dep in $dependency_libs; do
8680 case "$dep" in
8681 -L*)
8682 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8683 if test "X$additional_libdir" != "X/usr/lib"; then
8684 haveit=
8685 if test "X$additional_libdir" = "X/usr/local/lib"; then
8686 if test -n "$GCC"; then
8687 case $host_os in
8688 linux*) haveit=yes;;
8689 esac
8690 fi
8691 fi
8692 if test -z "$haveit"; then
8693 haveit=
8694 for x in $LDFLAGS $LIBICONV; do
8695
8696 acl_save_prefix="$prefix"
8697 prefix="$acl_final_prefix"
8698 acl_save_exec_prefix="$exec_prefix"
8699 exec_prefix="$acl_final_exec_prefix"
8700 eval x=\"$x\"
8701 exec_prefix="$acl_save_exec_prefix"
8702 prefix="$acl_save_prefix"
8703
8704 if test "X$x" = "X-L$additional_libdir"; then
8705 haveit=yes
8706 break
8707 fi
8708 done
8709 if test -z "$haveit"; then
8710 if test -d "$additional_libdir"; then
8711 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8712 fi
8713 fi
8714 haveit=
8715 for x in $LDFLAGS $LTLIBICONV; do
8716
8717 acl_save_prefix="$prefix"
8718 prefix="$acl_final_prefix"
8719 acl_save_exec_prefix="$exec_prefix"
8720 exec_prefix="$acl_final_exec_prefix"
8721 eval x=\"$x\"
8722 exec_prefix="$acl_save_exec_prefix"
8723 prefix="$acl_save_prefix"
8724
8725 if test "X$x" = "X-L$additional_libdir"; then
8726 haveit=yes
8727 break
8728 fi
8729 done
8730 if test -z "$haveit"; then
8731 if test -d "$additional_libdir"; then
8732 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8733 fi
8734 fi
8735 fi
8736 fi
8737 ;;
8738 -R*)
8739 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8740 if test "$enable_rpath" != no; then
8741 haveit=
8742 for x in $rpathdirs; do
8743 if test "X$x" = "X$dir"; then
8744 haveit=yes
8745 break
8746 fi
8747 done
8748 if test -z "$haveit"; then
8749 rpathdirs="$rpathdirs $dir"
8750 fi
8751 haveit=
8752 for x in $ltrpathdirs; do
8753 if test "X$x" = "X$dir"; then
8754 haveit=yes
8755 break
8756 fi
8757 done
8758 if test -z "$haveit"; then
8759 ltrpathdirs="$ltrpathdirs $dir"
8760 fi
8761 fi
8762 ;;
8763 -l*)
8764 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8765 ;;
8766 *.la)
8767 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8768 ;;
8769 *)
8770 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8771 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8772 ;;
8773 esac
8774 done
8775 fi
8776 else
8777 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
8778 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8779 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8780 else
8781 LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext"
8782 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext"
8783 fi
8784 fi
8785 fi
8786 fi
8787 done
8788 done
8789 if test "X$rpathdirs" != "X"; then
8790 if test -n "$hardcode_libdir_separator"; then
8791 alldirs=
8792 for found_dir in $rpathdirs; do
8793 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8794 done
8795 acl_save_libdir="$libdir"
8796 libdir="$alldirs"
8797 eval flag=\"$hardcode_libdir_flag_spec\"
8798 libdir="$acl_save_libdir"
8799 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8800 else
8801 for found_dir in $rpathdirs; do
8802 acl_save_libdir="$libdir"
8803 libdir="$found_dir"
8804 eval flag=\"$hardcode_libdir_flag_spec\"
8805 libdir="$acl_save_libdir"
8806 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8807 done
8808 fi
8809 fi
8810 if test "X$ltrpathdirs" != "X"; then
8811 for found_dir in $ltrpathdirs; do
8812 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8813 done
8814 fi
8815
8816
8817
8818
8819
8820
8821
8822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8823$as_echo_n "checking for iconv... " >&6; }
8824if ${am_cv_func_iconv+:} false; then :
8825 $as_echo_n "(cached) " >&6
8826else
8827
8828 am_cv_func_iconv="no, consider installing GNU libiconv"
8829 am_cv_lib_iconv=no
8830 am_save_CPPFLAGS="$CPPFLAGS"
8831 CPPFLAGS="$CPPFLAGS $INCICONV"
8832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8833/* end confdefs.h. */
8834#include <stdlib.h>
8835#include <iconv.h>
8836int
8837main ()
8838{
8839iconv_t cd = iconv_open("","");
8840 iconv(cd,NULL,NULL,NULL,NULL);
8841 iconv_close(cd);
8842 ;
8843 return 0;
8844}
8845_ACEOF
8846if ac_fn_c_try_link "$LINENO"; then :
8847 am_cv_func_iconv=yes
8848fi
8849rm -f core conftest.err conftest.$ac_objext \
8850 conftest$ac_exeext conftest.$ac_ext
8851 CPPFLAGS="$am_save_CPPFLAGS"
8852
8853 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8854 for _libs in .libs _libs; do
8855 am_save_CPPFLAGS="$CPPFLAGS"
8856 am_save_LIBS="$LIBS"
8857 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8858 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8860/* end confdefs.h. */
8861#include <stdlib.h>
8862#include <iconv.h>
8863int
8864main ()
8865{
8866iconv_t cd = iconv_open("","");
8867 iconv(cd,NULL,NULL,NULL,NULL);
8868 iconv_close(cd);
8869 ;
8870 return 0;
8871}
8872_ACEOF
8873if ac_fn_c_try_link "$LINENO"; then :
8874 INCICONV="-I../libiconv/include"
8875 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8876 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8877 am_cv_lib_iconv=yes
8878 am_cv_func_iconv=yes
8879fi
8880rm -f core conftest.err conftest.$ac_objext \
8881 conftest$ac_exeext conftest.$ac_ext
8882 CPPFLAGS="$am_save_CPPFLAGS"
8883 LIBS="$am_save_LIBS"
8884 if test "$am_cv_func_iconv" = "yes"; then
8885 break
8886 fi
8887 done
8888 fi
8889
8890 if test "$am_cv_func_iconv" != yes; then
8891 am_save_CPPFLAGS="$CPPFLAGS"
8892 am_save_LIBS="$LIBS"
8893 CPPFLAGS="$CPPFLAGS $INCICONV"
8894 LIBS="$LIBS $LIBICONV"
8895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8896/* end confdefs.h. */
8897#include <stdlib.h>
8898#include <iconv.h>
8899int
8900main ()
8901{
8902iconv_t cd = iconv_open("","");
8903 iconv(cd,NULL,NULL,NULL,NULL);
8904 iconv_close(cd);
8905 ;
8906 return 0;
8907}
8908_ACEOF
8909if ac_fn_c_try_link "$LINENO"; then :
8910 am_cv_lib_iconv=yes
8911 am_cv_func_iconv=yes
8912fi
8913rm -f core conftest.err conftest.$ac_objext \
8914 conftest$ac_exeext conftest.$ac_ext
8915 CPPFLAGS="$am_save_CPPFLAGS"
8916 LIBS="$am_save_LIBS"
8917 fi
8918
8919fi
8920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8921$as_echo "$am_cv_func_iconv" >&6; }
8922 if test "$am_cv_func_iconv" = yes; then
8923
8924$as_echo "#define HAVE_ICONV 1" >>confdefs.h
8925
8926 fi
8927 if test "$am_cv_lib_iconv" = yes; then
8928
8929 for element in $INCICONV; do
8930 haveit=
8931 for x in $CPPFLAGS; do
8932
8933 acl_save_prefix="$prefix"
8934 prefix="$acl_final_prefix"
8935 acl_save_exec_prefix="$exec_prefix"
8936 exec_prefix="$acl_final_exec_prefix"
8937 eval x=\"$x\"
8938 exec_prefix="$acl_save_exec_prefix"
8939 prefix="$acl_save_prefix"
8940
8941 if test "X$x" = "X$element"; then
8942 haveit=yes
8943 break
8944 fi
8945 done
8946 if test -z "$haveit"; then
8947 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8948 fi
8949 done
8950
8951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8952$as_echo_n "checking how to link with libiconv... " >&6; }
8953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8954$as_echo "$LIBICONV" >&6; }
8955 else
8956 LIBICONV=
8957 LTLIBICONV=
8958 fi
8959
8960
8961
8962 if test "$am_cv_func_iconv" = yes; then
8963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8964$as_echo_n "checking for iconv declaration... " >&6; }
8965 if ${am_cv_proto_iconv+:} false; then :
8966 $as_echo_n "(cached) " >&6
8967else
8968
8969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8970/* end confdefs.h. */
8971
8972#include <stdlib.h>
8973#include <iconv.h>
8974extern
8975#ifdef __cplusplus
8976"C"
8977#endif
8978#if defined(__STDC__) || defined(__cplusplus)
8979size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8980#else
8981size_t iconv();
8982#endif
8983
8984int
8985main ()
8986{
8987
8988 ;
8989 return 0;
8990}
8991_ACEOF
8992if ac_fn_c_try_compile "$LINENO"; then :
8993 am_cv_proto_iconv_arg1=""
8994else
8995 am_cv_proto_iconv_arg1="const"
8996fi
8997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8998 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);"
8999fi
9000
9001 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
9002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
9003 }$am_cv_proto_iconv" >&5
9004$as_echo "${ac_t:-
9005 }$am_cv_proto_iconv" >&6; }
9006
9007cat >>confdefs.h <<_ACEOF
9008#define ICONV_CONST $am_cv_proto_iconv_arg1
9009_ACEOF
9010
9011 fi
9012
9013
9014# GDB may fork/exec the iconv program to get the list of supported character
9015# sets. Allow the user to specify where to find it.
9016# There are several factors affecting the choice of option name:
9017# - There is already --with-libiconv-prefix but we can't use it, it specifies
9018# the build-time location of libiconv files.
9019# - The program we need to find is iconv, which comes with glibc. The user
9020# doesn't necessarily have libiconv installed. Therefore naming this
9021# --with-libiconv-foo feels wrong.
9022# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
9023# defined to work on directories not files (though it really doesn't know
9024# the difference).
9025# - Calling this --with-iconv-prefix is perceived to cause too much confusion
9026# with --with-libiconv-prefix.
9027# Putting these together is why the option name is --with-iconv-bin.
9028
9029
9030# Check whether --with-iconv-bin was given.
9031if test "${with_iconv_bin+set}" = set; then :
9032 withval=$with_iconv_bin; iconv_bin="${withval}"
9033
9034cat >>confdefs.h <<_ACEOF
9035#define ICONV_BIN "${iconv_bin}"
9036_ACEOF
9037
9038
9039 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9040 if test "x$prefix" = xNONE; then
9041 test_prefix=/usr/local
9042 else
9043 test_prefix=$prefix
9044 fi
9045 else
9046 test_prefix=$exec_prefix
9047 fi
9048 value=0
9049 case ${iconv_bin} in
9050 "${test_prefix}"|"${test_prefix}/"*|\
9051 '${exec_prefix}'|'${exec_prefix}/'*)
9052 value=1
9053 ;;
9054 esac
9055
9056cat >>confdefs.h <<_ACEOF
9057#define ICONV_BIN_RELOCATABLE $value
9058_ACEOF
9059
9060
9061
9062fi
9063
9064
9065# For the TUI, we need enhanced curses functionality.
9066if test x"$enable_tui" != xno; then
9067 prefer_curses=yes
9068fi
9069
9070curses_found=no
9071if test x"$prefer_curses" = xyes; then
9072 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
9073 # curses library because the latter might not provide all the
9074 # functionality we need. However, this leads to problems on systems
9075 # where the linker searches /usr/local/lib, but the compiler doesn't
9076 # search /usr/local/include, if ncurses is installed in /usr/local. A
9077 # default installation of ncurses on alpha*-dec-osf* will lead to such
9078 # a situation.
9079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
9080$as_echo_n "checking for library containing waddstr... " >&6; }
9081if ${ac_cv_search_waddstr+:} false; then :
9082 $as_echo_n "(cached) " >&6
9083else
9084 ac_func_search_save_LIBS=$LIBS
9085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9086/* end confdefs.h. */
9087
9088/* Override any GCC internal prototype to avoid an error.
9089 Use char because int might match the return type of a GCC
9090 builtin and then its argument prototype would still apply. */
9091#ifdef __cplusplus
9092extern "C"
9093#endif
9094char waddstr ();
9095int
9096main ()
9097{
9098return waddstr ();
9099 ;
9100 return 0;
9101}
9102_ACEOF
9103for ac_lib in '' ncursesw ncurses cursesX curses; do
9104 if test -z "$ac_lib"; then
9105 ac_res="none required"
9106 else
9107 ac_res=-l$ac_lib
9108 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9109 fi
9110 if ac_fn_c_try_link "$LINENO"; then :
9111 ac_cv_search_waddstr=$ac_res
9112fi
9113rm -f core conftest.err conftest.$ac_objext \
9114 conftest$ac_exeext
9115 if ${ac_cv_search_waddstr+:} false; then :
9116 break
9117fi
9118done
9119if ${ac_cv_search_waddstr+:} false; then :
9120
9121else
9122 ac_cv_search_waddstr=no
9123fi
9124rm conftest.$ac_ext
9125LIBS=$ac_func_search_save_LIBS
9126fi
9127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
9128$as_echo "$ac_cv_search_waddstr" >&6; }
9129ac_res=$ac_cv_search_waddstr
9130if test "$ac_res" != no; then :
9131 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9132
9133fi
9134
9135
9136 if test "$ac_cv_search_waddstr" != no; then
9137 curses_found=yes
9138 fi
9139fi
9140
9141# Check whether we should enable the TUI, but only do so if we really
9142# can.
9143if test x"$enable_tui" != xno; then
9144 if test -d "$srcdir/tui"; then
9145 if test "$curses_found" != no; then
9146 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
9147 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
9148 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
9149 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
9150 else
9151 if test x"$enable_tui" = xyes; then
9152 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
9153 else
9154 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
9155$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
9156 fi
9157 fi
9158 fi
9159fi
9160
9161# Since GDB uses Readline, we need termcap functionality. In many
9162# cases this will be provided by the curses library, but some systems
9163# have a separate termcap library, or no curses library at all.
9164
9165case $host_os in
9166 cygwin*)
9167 if test -d "$srcdir/libtermcap"; then
9168 LIBS="../libtermcap/libtermcap.a $LIBS"
9169 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
9170 fi ;;
9171 go32* | *djgpp*)
9172 ac_cv_search_tgetent="none required"
9173 ;;
9174esac
9175
9176# These are the libraries checked by Readline.
9177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9178$as_echo_n "checking for library containing tgetent... " >&6; }
9179if ${ac_cv_search_tgetent+:} false; then :
9180 $as_echo_n "(cached) " >&6
9181else
9182 ac_func_search_save_LIBS=$LIBS
9183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9184/* end confdefs.h. */
9185
9186/* Override any GCC internal prototype to avoid an error.
9187 Use char because int might match the return type of a GCC
9188 builtin and then its argument prototype would still apply. */
9189#ifdef __cplusplus
9190extern "C"
9191#endif
9192char tgetent ();
9193int
9194main ()
9195{
9196return tgetent ();
9197 ;
9198 return 0;
9199}
9200_ACEOF
9201for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
9202 if test -z "$ac_lib"; then
9203 ac_res="none required"
9204 else
9205 ac_res=-l$ac_lib
9206 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9207 fi
9208 if ac_fn_c_try_link "$LINENO"; then :
9209 ac_cv_search_tgetent=$ac_res
9210fi
9211rm -f core conftest.err conftest.$ac_objext \
9212 conftest$ac_exeext
9213 if ${ac_cv_search_tgetent+:} false; then :
9214 break
9215fi
9216done
9217if ${ac_cv_search_tgetent+:} false; then :
9218
9219else
9220 ac_cv_search_tgetent=no
9221fi
9222rm conftest.$ac_ext
9223LIBS=$ac_func_search_save_LIBS
9224fi
9225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9226$as_echo "$ac_cv_search_tgetent" >&6; }
9227ac_res=$ac_cv_search_tgetent
9228if test "$ac_res" != no; then :
9229 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9230
9231fi
9232
9233
9234if test "$ac_cv_search_tgetent" = no; then
9235 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
9236fi
9237
9238
9239# Check whether --with-system-readline was given.
9240if test "${with_system_readline+set}" = set; then :
9241 withval=$with_system_readline;
9242fi
9243
9244
9245if test "$with_system_readline" = yes; then
9246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
9247$as_echo_n "checking whether system readline is new enough... " >&6; }
9248if ${gdb_cv_readline_ok+:} false; then :
9249 $as_echo_n "(cached) " >&6
9250else
9251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9252/* end confdefs.h. */
9253#include <stdio.h>
9254 #include <readline/readline.h>
9255int
9256main ()
9257{
9258#if RL_VERSION_MAJOR < 7
9259 # error "readline version 7 required"
9260 #endif
9261
9262 ;
9263 return 0;
9264}
9265_ACEOF
9266if ac_fn_c_try_compile "$LINENO"; then :
9267 gdb_cv_readline_ok=yes
9268else
9269 gdb_cv_readline_ok=no
9270
9271fi
9272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9273
9274fi
9275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
9276$as_echo "$gdb_cv_readline_ok" >&6; }
9277 if test "$gdb_cv_readline_ok" != yes; then
9278 as_fn_error $? "system readline is not new enough" "$LINENO" 5
9279 fi
9280
9281 READLINE=-lreadline
9282 READLINE_DEPS=
9283 READLINE_CFLAGS=
9284 READLINE_TEXI_INCFLAG=
9285else
9286 READLINE='$(READLINE_DIR)/libreadline.a'
9287 READLINE_DEPS='$(READLINE)'
9288 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
9289 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
9290fi
9291
9292
9293
9294
9295
9296# Generate jit-reader.h
9297
9298# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9299TARGET_PTR=
9300
9301# The cast to long int works around a bug in the HP C Compiler
9302# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9303# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9304# This bug is HP SR number 8606223364.
9305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9306$as_echo_n "checking size of unsigned long long... " >&6; }
9307if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
9308 $as_echo_n "(cached) " >&6
9309else
9310 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9311
9312else
9313 if test "$ac_cv_type_unsigned_long_long" = yes; then
9314 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9315$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9316as_fn_error 77 "cannot compute sizeof (unsigned long long)
9317See \`config.log' for more details" "$LINENO" 5; }
9318 else
9319 ac_cv_sizeof_unsigned_long_long=0
9320 fi
9321fi
9322
9323fi
9324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9325$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9326
9327
9328
9329cat >>confdefs.h <<_ACEOF
9330#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9331_ACEOF
9332
9333
9334# The cast to long int works around a bug in the HP C Compiler
9335# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9336# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9337# This bug is HP SR number 8606223364.
9338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9339$as_echo_n "checking size of unsigned long... " >&6; }
9340if ${ac_cv_sizeof_unsigned_long+:} false; then :
9341 $as_echo_n "(cached) " >&6
9342else
9343 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9344
9345else
9346 if test "$ac_cv_type_unsigned_long" = yes; then
9347 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9348$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9349as_fn_error 77 "cannot compute sizeof (unsigned long)
9350See \`config.log' for more details" "$LINENO" 5; }
9351 else
9352 ac_cv_sizeof_unsigned_long=0
9353 fi
9354fi
9355
9356fi
9357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9358$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9359
9360
9361
9362cat >>confdefs.h <<_ACEOF
9363#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9364_ACEOF
9365
9366
9367# The cast to long int works around a bug in the HP C Compiler
9368# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9369# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9370# This bug is HP SR number 8606223364.
9371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9372$as_echo_n "checking size of unsigned __int128... " >&6; }
9373if ${ac_cv_sizeof_unsigned___int128+:} false; then :
9374 $as_echo_n "(cached) " >&6
9375else
9376 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9377
9378else
9379 if test "$ac_cv_type_unsigned___int128" = yes; then
9380 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9381$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9382as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9383See \`config.log' for more details" "$LINENO" 5; }
9384 else
9385 ac_cv_sizeof_unsigned___int128=0
9386 fi
9387fi
9388
9389fi
9390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9391$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9392
9393
9394
9395cat >>confdefs.h <<_ACEOF
9396#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9397_ACEOF
9398
9399
9400
9401if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9402 TARGET_PTR="unsigned long"
9403elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9404 TARGET_PTR="unsigned long long"
9405elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9406 TARGET_PTR="unsigned __int128"
9407else
9408 TARGET_PTR="unsigned long"
9409fi
9410
9411
9412ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9413
9414
9415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9416$as_echo_n "checking for library containing dlopen... " >&6; }
9417if ${ac_cv_search_dlopen+:} false; then :
9418 $as_echo_n "(cached) " >&6
9419else
9420 ac_func_search_save_LIBS=$LIBS
9421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9422/* end confdefs.h. */
9423
9424/* Override any GCC internal prototype to avoid an error.
9425 Use char because int might match the return type of a GCC
9426 builtin and then its argument prototype would still apply. */
9427#ifdef __cplusplus
9428extern "C"
9429#endif
9430char dlopen ();
9431int
9432main ()
9433{
9434return dlopen ();
9435 ;
9436 return 0;
9437}
9438_ACEOF
9439for ac_lib in '' dl; do
9440 if test -z "$ac_lib"; then
9441 ac_res="none required"
9442 else
9443 ac_res=-l$ac_lib
9444 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9445 fi
9446 if ac_fn_c_try_link "$LINENO"; then :
9447 ac_cv_search_dlopen=$ac_res
9448fi
9449rm -f core conftest.err conftest.$ac_objext \
9450 conftest$ac_exeext
9451 if ${ac_cv_search_dlopen+:} false; then :
9452 break
9453fi
9454done
9455if ${ac_cv_search_dlopen+:} false; then :
9456
9457else
9458 ac_cv_search_dlopen=no
9459fi
9460rm conftest.$ac_ext
9461LIBS=$ac_func_search_save_LIBS
9462fi
9463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9464$as_echo "$ac_cv_search_dlopen" >&6; }
9465ac_res=$ac_cv_search_dlopen
9466if test "$ac_res" != no; then :
9467 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9468
9469fi
9470
9471
9472
9473
9474# Check whether --with-jit-reader-dir was given.
9475if test "${with_jit_reader_dir+set}" = set; then :
9476 withval=$with_jit_reader_dir;
9477 JIT_READER_DIR=$withval
9478else
9479 JIT_READER_DIR=${libdir}/gdb
9480fi
9481
9482
9483 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9484 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9485 ac_define_dir=`eval echo $JIT_READER_DIR`
9486 ac_define_dir=`eval echo $ac_define_dir`
9487
9488cat >>confdefs.h <<_ACEOF
9489#define JIT_READER_DIR "$ac_define_dir"
9490_ACEOF
9491
9492
9493
9494
9495 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9496 if test "x$prefix" = xNONE; then
9497 test_prefix=/usr/local
9498 else
9499 test_prefix=$prefix
9500 fi
9501 else
9502 test_prefix=$exec_prefix
9503 fi
9504 value=0
9505 case ${ac_define_dir} in
9506 "${test_prefix}"|"${test_prefix}/"*|\
9507 '${exec_prefix}'|'${exec_prefix}/'*)
9508 value=1
9509 ;;
9510 esac
9511
9512cat >>confdefs.h <<_ACEOF
9513#define JIT_READER_DIR_RELOCATABLE $value
9514_ACEOF
9515
9516
9517
9518
9519
9520# Check whether --with-expat was given.
9521if test "${with_expat+set}" = set; then :
9522 withval=$with_expat;
9523else
9524 with_expat=auto
9525fi
9526
9527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9528$as_echo_n "checking whether to use expat... " >&6; }
9529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9530$as_echo "$with_expat" >&6; }
9531
9532if test "${with_expat}" = no; then
9533 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9534$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
9535 HAVE_LIBEXPAT=no
9536else
9537
9538
9539
9540
9541
9542
9543
9544
9545 use_additional=yes
9546
9547 acl_save_prefix="$prefix"
9548 prefix="$acl_final_prefix"
9549 acl_save_exec_prefix="$exec_prefix"
9550 exec_prefix="$acl_final_exec_prefix"
9551
9552 eval additional_includedir=\"$includedir\"
9553 eval additional_libdir=\"$libdir\"
9554
9555 exec_prefix="$acl_save_exec_prefix"
9556 prefix="$acl_save_prefix"
9557
9558
9559# Check whether --with-libexpat-prefix was given.
9560if test "${with_libexpat_prefix+set}" = set; then :
9561 withval=$with_libexpat_prefix;
9562 if test "X$withval" = "Xno"; then
9563 use_additional=no
9564 else
9565 if test "X$withval" = "X"; then
9566
9567 acl_save_prefix="$prefix"
9568 prefix="$acl_final_prefix"
9569 acl_save_exec_prefix="$exec_prefix"
9570 exec_prefix="$acl_final_exec_prefix"
9571
9572 eval additional_includedir=\"$includedir\"
9573 eval additional_libdir=\"$libdir\"
9574
9575 exec_prefix="$acl_save_exec_prefix"
9576 prefix="$acl_save_prefix"
9577
9578 else
9579 additional_includedir="$withval/include"
9580 additional_libdir="$withval/lib"
9581 fi
9582 fi
9583
9584fi
9585
9586
9587# Check whether --with-libexpat-type was given.
9588if test "${with_libexpat_type+set}" = set; then :
9589 withval=$with_libexpat_type; with_libexpat_type=$withval
9590else
9591 with_libexpat_type=auto
9592fi
9593
9594 lib_type=`eval echo \$with_libexpat_type`
9595
9596 LIBEXPAT=
9597 LTLIBEXPAT=
9598 INCEXPAT=
9599 rpathdirs=
9600 ltrpathdirs=
9601 names_already_handled=
9602 names_next_round='expat '
9603 while test -n "$names_next_round"; do
9604 names_this_round="$names_next_round"
9605 names_next_round=
9606 for name in $names_this_round; do
9607 already_handled=
9608 for n in $names_already_handled; do
9609 if test "$n" = "$name"; then
9610 already_handled=yes
9611 break
9612 fi
9613 done
9614 if test -z "$already_handled"; then
9615 names_already_handled="$names_already_handled $name"
9616 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9617 eval value=\"\$HAVE_LIB$uppername\"
9618 if test -n "$value"; then
9619 if test "$value" = yes; then
9620 eval value=\"\$LIB$uppername\"
9621 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9622 eval value=\"\$LTLIB$uppername\"
9623 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9624 else
9625 :
9626 fi
9627 else
9628 found_dir=
9629 found_la=
9630 found_so=
9631 found_a=
9632 if test $use_additional = yes; then
9633 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9634 found_dir="$additional_libdir"
9635 found_so="$additional_libdir/lib$name.$shlibext"
9636 if test -f "$additional_libdir/lib$name.la"; then
9637 found_la="$additional_libdir/lib$name.la"
9638 fi
9639 elif test x$lib_type != xshared; then
9640 if test -f "$additional_libdir/lib$name.$libext"; then
9641 found_dir="$additional_libdir"
9642 found_a="$additional_libdir/lib$name.$libext"
9643 if test -f "$additional_libdir/lib$name.la"; then
9644 found_la="$additional_libdir/lib$name.la"
9645 fi
9646 fi
9647 fi
9648 fi
9649 if test "X$found_dir" = "X"; then
9650 for x in $LDFLAGS $LTLIBEXPAT; do
9651
9652 acl_save_prefix="$prefix"
9653 prefix="$acl_final_prefix"
9654 acl_save_exec_prefix="$exec_prefix"
9655 exec_prefix="$acl_final_exec_prefix"
9656 eval x=\"$x\"
9657 exec_prefix="$acl_save_exec_prefix"
9658 prefix="$acl_save_prefix"
9659
9660 case "$x" in
9661 -L*)
9662 dir=`echo "X$x" | sed -e 's/^X-L//'`
9663 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9664 found_dir="$dir"
9665 found_so="$dir/lib$name.$shlibext"
9666 if test -f "$dir/lib$name.la"; then
9667 found_la="$dir/lib$name.la"
9668 fi
9669 elif test x$lib_type != xshared; then
9670 if test -f "$dir/lib$name.$libext"; then
9671 found_dir="$dir"
9672 found_a="$dir/lib$name.$libext"
9673 if test -f "$dir/lib$name.la"; then
9674 found_la="$dir/lib$name.la"
9675 fi
9676 fi
9677 fi
9678 ;;
9679 esac
9680 if test "X$found_dir" != "X"; then
9681 break
9682 fi
9683 done
9684 fi
9685 if test "X$found_dir" != "X"; then
9686 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9687 if test "X$found_so" != "X"; then
9688 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9689 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9690 else
9691 haveit=
9692 for x in $ltrpathdirs; do
9693 if test "X$x" = "X$found_dir"; then
9694 haveit=yes
9695 break
9696 fi
9697 done
9698 if test -z "$haveit"; then
9699 ltrpathdirs="$ltrpathdirs $found_dir"
9700 fi
9701 if test "$hardcode_direct" = yes; then
9702 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9703 else
9704 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9705 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9706 haveit=
9707 for x in $rpathdirs; do
9708 if test "X$x" = "X$found_dir"; then
9709 haveit=yes
9710 break
9711 fi
9712 done
9713 if test -z "$haveit"; then
9714 rpathdirs="$rpathdirs $found_dir"
9715 fi
9716 else
9717 haveit=
9718 for x in $LDFLAGS $LIBEXPAT; do
9719
9720 acl_save_prefix="$prefix"
9721 prefix="$acl_final_prefix"
9722 acl_save_exec_prefix="$exec_prefix"
9723 exec_prefix="$acl_final_exec_prefix"
9724 eval x=\"$x\"
9725 exec_prefix="$acl_save_exec_prefix"
9726 prefix="$acl_save_prefix"
9727
9728 if test "X$x" = "X-L$found_dir"; then
9729 haveit=yes
9730 break
9731 fi
9732 done
9733 if test -z "$haveit"; then
9734 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9735 fi
9736 if test "$hardcode_minus_L" != no; then
9737 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9738 else
9739 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9740 fi
9741 fi
9742 fi
9743 fi
9744 else
9745 if test "X$found_a" != "X"; then
9746 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9747 else
9748 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9749 fi
9750 fi
9751 additional_includedir=
9752 case "$found_dir" in
9753 */lib | */lib/)
9754 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9755 additional_includedir="$basedir/include"
9756 ;;
9757 esac
9758 if test "X$additional_includedir" != "X"; then
9759 if test "X$additional_includedir" != "X/usr/include"; then
9760 haveit=
9761 if test "X$additional_includedir" = "X/usr/local/include"; then
9762 if test -n "$GCC"; then
9763 case $host_os in
9764 linux*) haveit=yes;;
9765 esac
9766 fi
9767 fi
9768 if test -z "$haveit"; then
9769 for x in $CPPFLAGS $INCEXPAT; do
9770
9771 acl_save_prefix="$prefix"
9772 prefix="$acl_final_prefix"
9773 acl_save_exec_prefix="$exec_prefix"
9774 exec_prefix="$acl_final_exec_prefix"
9775 eval x=\"$x\"
9776 exec_prefix="$acl_save_exec_prefix"
9777 prefix="$acl_save_prefix"
9778
9779 if test "X$x" = "X-I$additional_includedir"; then
9780 haveit=yes
9781 break
9782 fi
9783 done
9784 if test -z "$haveit"; then
9785 if test -d "$additional_includedir"; then
9786 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9787 fi
9788 fi
9789 fi
9790 fi
9791 fi
9792 if test -n "$found_la"; then
9793 save_libdir="$libdir"
9794 case "$found_la" in
9795 */* | *\\*) . "$found_la" ;;
9796 *) . "./$found_la" ;;
9797 esac
9798 libdir="$save_libdir"
9799 for dep in $dependency_libs; do
9800 case "$dep" in
9801 -L*)
9802 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9803 if test "X$additional_libdir" != "X/usr/lib"; then
9804 haveit=
9805 if test "X$additional_libdir" = "X/usr/local/lib"; then
9806 if test -n "$GCC"; then
9807 case $host_os in
9808 linux*) haveit=yes;;
9809 esac
9810 fi
9811 fi
9812 if test -z "$haveit"; then
9813 haveit=
9814 for x in $LDFLAGS $LIBEXPAT; do
9815
9816 acl_save_prefix="$prefix"
9817 prefix="$acl_final_prefix"
9818 acl_save_exec_prefix="$exec_prefix"
9819 exec_prefix="$acl_final_exec_prefix"
9820 eval x=\"$x\"
9821 exec_prefix="$acl_save_exec_prefix"
9822 prefix="$acl_save_prefix"
9823
9824 if test "X$x" = "X-L$additional_libdir"; then
9825 haveit=yes
9826 break
9827 fi
9828 done
9829 if test -z "$haveit"; then
9830 if test -d "$additional_libdir"; then
9831 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9832 fi
9833 fi
9834 haveit=
9835 for x in $LDFLAGS $LTLIBEXPAT; do
9836
9837 acl_save_prefix="$prefix"
9838 prefix="$acl_final_prefix"
9839 acl_save_exec_prefix="$exec_prefix"
9840 exec_prefix="$acl_final_exec_prefix"
9841 eval x=\"$x\"
9842 exec_prefix="$acl_save_exec_prefix"
9843 prefix="$acl_save_prefix"
9844
9845 if test "X$x" = "X-L$additional_libdir"; then
9846 haveit=yes
9847 break
9848 fi
9849 done
9850 if test -z "$haveit"; then
9851 if test -d "$additional_libdir"; then
9852 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9853 fi
9854 fi
9855 fi
9856 fi
9857 ;;
9858 -R*)
9859 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9860 if test "$enable_rpath" != no; then
9861 haveit=
9862 for x in $rpathdirs; do
9863 if test "X$x" = "X$dir"; then
9864 haveit=yes
9865 break
9866 fi
9867 done
9868 if test -z "$haveit"; then
9869 rpathdirs="$rpathdirs $dir"
9870 fi
9871 haveit=
9872 for x in $ltrpathdirs; do
9873 if test "X$x" = "X$dir"; then
9874 haveit=yes
9875 break
9876 fi
9877 done
9878 if test -z "$haveit"; then
9879 ltrpathdirs="$ltrpathdirs $dir"
9880 fi
9881 fi
9882 ;;
9883 -l*)
9884 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9885 ;;
9886 *.la)
9887 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9888 ;;
9889 *)
9890 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9891 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9892 ;;
9893 esac
9894 done
9895 fi
9896 else
9897 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
9898 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9899 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9900 else
9901 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l:lib$name.$libext"
9902 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l:lib$name.$libext"
9903 fi
9904 fi
9905 fi
9906 fi
9907 done
9908 done
9909 if test "X$rpathdirs" != "X"; then
9910 if test -n "$hardcode_libdir_separator"; then
9911 alldirs=
9912 for found_dir in $rpathdirs; do
9913 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9914 done
9915 acl_save_libdir="$libdir"
9916 libdir="$alldirs"
9917 eval flag=\"$hardcode_libdir_flag_spec\"
9918 libdir="$acl_save_libdir"
9919 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9920 else
9921 for found_dir in $rpathdirs; do
9922 acl_save_libdir="$libdir"
9923 libdir="$found_dir"
9924 eval flag=\"$hardcode_libdir_flag_spec\"
9925 libdir="$acl_save_libdir"
9926 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9927 done
9928 fi
9929 fi
9930 if test "X$ltrpathdirs" != "X"; then
9931 for found_dir in $ltrpathdirs; do
9932 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9933 done
9934 fi
9935
9936
9937 ac_save_CPPFLAGS="$CPPFLAGS"
9938
9939 for element in $INCEXPAT; do
9940 haveit=
9941 for x in $CPPFLAGS; do
9942
9943 acl_save_prefix="$prefix"
9944 prefix="$acl_final_prefix"
9945 acl_save_exec_prefix="$exec_prefix"
9946 exec_prefix="$acl_final_exec_prefix"
9947 eval x=\"$x\"
9948 exec_prefix="$acl_save_exec_prefix"
9949 prefix="$acl_save_prefix"
9950
9951 if test "X$x" = "X$element"; then
9952 haveit=yes
9953 break
9954 fi
9955 done
9956 if test -z "$haveit"; then
9957 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9958 fi
9959 done
9960
9961
9962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9963$as_echo_n "checking for libexpat... " >&6; }
9964if ${ac_cv_libexpat+:} false; then :
9965 $as_echo_n "(cached) " >&6
9966else
9967
9968 ac_save_LIBS="$LIBS"
9969 LIBS="$LIBS $LIBEXPAT"
9970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9971/* end confdefs.h. */
9972#include "expat.h"
9973int
9974main ()
9975{
9976XML_Parser p = XML_ParserCreate (0);
9977 ;
9978 return 0;
9979}
9980_ACEOF
9981if ac_fn_c_try_link "$LINENO"; then :
9982 ac_cv_libexpat=yes
9983else
9984 ac_cv_libexpat=no
9985fi
9986rm -f core conftest.err conftest.$ac_objext \
9987 conftest$ac_exeext conftest.$ac_ext
9988 LIBS="$ac_save_LIBS"
9989
9990fi
9991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9992$as_echo "$ac_cv_libexpat" >&6; }
9993 if test "$ac_cv_libexpat" = yes; then
9994 HAVE_LIBEXPAT=yes
9995
9996$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
9997
9998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9999$as_echo_n "checking how to link with libexpat... " >&6; }
10000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
10001$as_echo "$LIBEXPAT" >&6; }
10002 else
10003 HAVE_LIBEXPAT=no
10004 CPPFLAGS="$ac_save_CPPFLAGS"
10005 LIBEXPAT=
10006 LTLIBEXPAT=
10007 fi
10008
10009
10010
10011
10012
10013
10014 if test "$HAVE_LIBEXPAT" != yes; then
10015 if test "$with_expat" = yes; then
10016 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
10017 else
10018 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
10019$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
10020 fi
10021 else
10022 save_LIBS=$LIBS
10023 LIBS="$LIBS $LIBEXPAT"
10024 for ac_func in XML_StopParser
10025do :
10026 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
10027if test "x$ac_cv_func_XML_StopParser" = xyes; then :
10028 cat >>confdefs.h <<_ACEOF
10029#define HAVE_XML_STOPPARSER 1
10030_ACEOF
10031
10032fi
10033done
10034
10035 LIBS=$save_LIBS
10036 fi
10037fi
10038
10039# Verify that we have a usable GMP library.
10040
10041
10042
10043
10044
10045
10046
10047
10048 use_additional=yes
10049
10050 acl_save_prefix="$prefix"
10051 prefix="$acl_final_prefix"
10052 acl_save_exec_prefix="$exec_prefix"
10053 exec_prefix="$acl_final_exec_prefix"
10054
10055 eval additional_includedir=\"$includedir\"
10056 eval additional_libdir=\"$libdir\"
10057
10058 exec_prefix="$acl_save_exec_prefix"
10059 prefix="$acl_save_prefix"
10060
10061
10062# Check whether --with-libgmp-prefix was given.
10063if test "${with_libgmp_prefix+set}" = set; then :
10064 withval=$with_libgmp_prefix;
10065 if test "X$withval" = "Xno"; then
10066 use_additional=no
10067 else
10068 if test "X$withval" = "X"; then
10069
10070 acl_save_prefix="$prefix"
10071 prefix="$acl_final_prefix"
10072 acl_save_exec_prefix="$exec_prefix"
10073 exec_prefix="$acl_final_exec_prefix"
10074
10075 eval additional_includedir=\"$includedir\"
10076 eval additional_libdir=\"$libdir\"
10077
10078 exec_prefix="$acl_save_exec_prefix"
10079 prefix="$acl_save_prefix"
10080
10081 else
10082 additional_includedir="$withval/include"
10083 additional_libdir="$withval/lib"
10084 fi
10085 fi
10086
10087fi
10088
10089
10090# Check whether --with-libgmp-type was given.
10091if test "${with_libgmp_type+set}" = set; then :
10092 withval=$with_libgmp_type; with_libgmp_type=$withval
10093else
10094 with_libgmp_type=auto
10095fi
10096
10097 lib_type=`eval echo \$with_libgmp_type`
10098
10099 LIBGMP=
10100 LTLIBGMP=
10101 INCGMP=
10102 rpathdirs=
10103 ltrpathdirs=
10104 names_already_handled=
10105 names_next_round='gmp '
10106 while test -n "$names_next_round"; do
10107 names_this_round="$names_next_round"
10108 names_next_round=
10109 for name in $names_this_round; do
10110 already_handled=
10111 for n in $names_already_handled; do
10112 if test "$n" = "$name"; then
10113 already_handled=yes
10114 break
10115 fi
10116 done
10117 if test -z "$already_handled"; then
10118 names_already_handled="$names_already_handled $name"
10119 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10120 eval value=\"\$HAVE_LIB$uppername\"
10121 if test -n "$value"; then
10122 if test "$value" = yes; then
10123 eval value=\"\$LIB$uppername\"
10124 test -z "$value" || LIBGMP="${LIBGMP}${LIBGMP:+ }$value"
10125 eval value=\"\$LTLIB$uppername\"
10126 test -z "$value" || LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }$value"
10127 else
10128 :
10129 fi
10130 else
10131 found_dir=
10132 found_la=
10133 found_so=
10134 found_a=
10135 if test $use_additional = yes; then
10136 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10137 found_dir="$additional_libdir"
10138 found_so="$additional_libdir/lib$name.$shlibext"
10139 if test -f "$additional_libdir/lib$name.la"; then
10140 found_la="$additional_libdir/lib$name.la"
10141 fi
10142 elif test x$lib_type != xshared; then
10143 if test -f "$additional_libdir/lib$name.$libext"; then
10144 found_dir="$additional_libdir"
10145 found_a="$additional_libdir/lib$name.$libext"
10146 if test -f "$additional_libdir/lib$name.la"; then
10147 found_la="$additional_libdir/lib$name.la"
10148 fi
10149 fi
10150 fi
10151 fi
10152 if test "X$found_dir" = "X"; then
10153 for x in $LDFLAGS $LTLIBGMP; do
10154
10155 acl_save_prefix="$prefix"
10156 prefix="$acl_final_prefix"
10157 acl_save_exec_prefix="$exec_prefix"
10158 exec_prefix="$acl_final_exec_prefix"
10159 eval x=\"$x\"
10160 exec_prefix="$acl_save_exec_prefix"
10161 prefix="$acl_save_prefix"
10162
10163 case "$x" in
10164 -L*)
10165 dir=`echo "X$x" | sed -e 's/^X-L//'`
10166 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10167 found_dir="$dir"
10168 found_so="$dir/lib$name.$shlibext"
10169 if test -f "$dir/lib$name.la"; then
10170 found_la="$dir/lib$name.la"
10171 fi
10172 elif test x$lib_type != xshared; then
10173 if test -f "$dir/lib$name.$libext"; then
10174 found_dir="$dir"
10175 found_a="$dir/lib$name.$libext"
10176 if test -f "$dir/lib$name.la"; then
10177 found_la="$dir/lib$name.la"
10178 fi
10179 fi
10180 fi
10181 ;;
10182 esac
10183 if test "X$found_dir" != "X"; then
10184 break
10185 fi
10186 done
10187 fi
10188 if test "X$found_dir" != "X"; then
10189 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-L$found_dir -l$name"
10190 if test "X$found_so" != "X"; then
10191 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10192 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so"
10193 else
10194 haveit=
10195 for x in $ltrpathdirs; do
10196 if test "X$x" = "X$found_dir"; then
10197 haveit=yes
10198 break
10199 fi
10200 done
10201 if test -z "$haveit"; then
10202 ltrpathdirs="$ltrpathdirs $found_dir"
10203 fi
10204 if test "$hardcode_direct" = yes; then
10205 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so"
10206 else
10207 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10208 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so"
10209 haveit=
10210 for x in $rpathdirs; do
10211 if test "X$x" = "X$found_dir"; then
10212 haveit=yes
10213 break
10214 fi
10215 done
10216 if test -z "$haveit"; then
10217 rpathdirs="$rpathdirs $found_dir"
10218 fi
10219 else
10220 haveit=
10221 for x in $LDFLAGS $LIBGMP; do
10222
10223 acl_save_prefix="$prefix"
10224 prefix="$acl_final_prefix"
10225 acl_save_exec_prefix="$exec_prefix"
10226 exec_prefix="$acl_final_exec_prefix"
10227 eval x=\"$x\"
10228 exec_prefix="$acl_save_exec_prefix"
10229 prefix="$acl_save_prefix"
10230
10231 if test "X$x" = "X-L$found_dir"; then
10232 haveit=yes
10233 break
10234 fi
10235 done
10236 if test -z "$haveit"; then
10237 LIBGMP="${LIBGMP}${LIBGMP:+ }-L$found_dir"
10238 fi
10239 if test "$hardcode_minus_L" != no; then
10240 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so"
10241 else
10242 LIBGMP="${LIBGMP}${LIBGMP:+ }-l$name"
10243 fi
10244 fi
10245 fi
10246 fi
10247 else
10248 if test "X$found_a" != "X"; then
10249 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_a"
10250 else
10251 LIBGMP="${LIBGMP}${LIBGMP:+ }-L$found_dir -l$name"
10252 fi
10253 fi
10254 additional_includedir=
10255 case "$found_dir" in
10256 */lib | */lib/)
10257 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10258 additional_includedir="$basedir/include"
10259 ;;
10260 esac
10261 if test "X$additional_includedir" != "X"; then
10262 if test "X$additional_includedir" != "X/usr/include"; then
10263 haveit=
10264 if test "X$additional_includedir" = "X/usr/local/include"; then
10265 if test -n "$GCC"; then
10266 case $host_os in
10267 linux*) haveit=yes;;
10268 esac
10269 fi
10270 fi
10271 if test -z "$haveit"; then
10272 for x in $CPPFLAGS $INCGMP; do
10273
10274 acl_save_prefix="$prefix"
10275 prefix="$acl_final_prefix"
10276 acl_save_exec_prefix="$exec_prefix"
10277 exec_prefix="$acl_final_exec_prefix"
10278 eval x=\"$x\"
10279 exec_prefix="$acl_save_exec_prefix"
10280 prefix="$acl_save_prefix"
10281
10282 if test "X$x" = "X-I$additional_includedir"; then
10283 haveit=yes
10284 break
10285 fi
10286 done
10287 if test -z "$haveit"; then
10288 if test -d "$additional_includedir"; then
10289 INCGMP="${INCGMP}${INCGMP:+ }-I$additional_includedir"
10290 fi
10291 fi
10292 fi
10293 fi
10294 fi
10295 if test -n "$found_la"; then
10296 save_libdir="$libdir"
10297 case "$found_la" in
10298 */* | *\\*) . "$found_la" ;;
10299 *) . "./$found_la" ;;
10300 esac
10301 libdir="$save_libdir"
10302 for dep in $dependency_libs; do
10303 case "$dep" in
10304 -L*)
10305 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10306 if test "X$additional_libdir" != "X/usr/lib"; then
10307 haveit=
10308 if test "X$additional_libdir" = "X/usr/local/lib"; then
10309 if test -n "$GCC"; then
10310 case $host_os in
10311 linux*) haveit=yes;;
10312 esac
10313 fi
10314 fi
10315 if test -z "$haveit"; then
10316 haveit=
10317 for x in $LDFLAGS $LIBGMP; do
10318
10319 acl_save_prefix="$prefix"
10320 prefix="$acl_final_prefix"
10321 acl_save_exec_prefix="$exec_prefix"
10322 exec_prefix="$acl_final_exec_prefix"
10323 eval x=\"$x\"
10324 exec_prefix="$acl_save_exec_prefix"
10325 prefix="$acl_save_prefix"
10326
10327 if test "X$x" = "X-L$additional_libdir"; then
10328 haveit=yes
10329 break
10330 fi
10331 done
10332 if test -z "$haveit"; then
10333 if test -d "$additional_libdir"; then
10334 LIBGMP="${LIBGMP}${LIBGMP:+ }-L$additional_libdir"
10335 fi
10336 fi
10337 haveit=
10338 for x in $LDFLAGS $LTLIBGMP; do
10339
10340 acl_save_prefix="$prefix"
10341 prefix="$acl_final_prefix"
10342 acl_save_exec_prefix="$exec_prefix"
10343 exec_prefix="$acl_final_exec_prefix"
10344 eval x=\"$x\"
10345 exec_prefix="$acl_save_exec_prefix"
10346 prefix="$acl_save_prefix"
10347
10348 if test "X$x" = "X-L$additional_libdir"; then
10349 haveit=yes
10350 break
10351 fi
10352 done
10353 if test -z "$haveit"; then
10354 if test -d "$additional_libdir"; then
10355 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-L$additional_libdir"
10356 fi
10357 fi
10358 fi
10359 fi
10360 ;;
10361 -R*)
10362 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10363 if test "$enable_rpath" != no; then
10364 haveit=
10365 for x in $rpathdirs; do
10366 if test "X$x" = "X$dir"; then
10367 haveit=yes
10368 break
10369 fi
10370 done
10371 if test -z "$haveit"; then
10372 rpathdirs="$rpathdirs $dir"
10373 fi
10374 haveit=
10375 for x in $ltrpathdirs; do
10376 if test "X$x" = "X$dir"; then
10377 haveit=yes
10378 break
10379 fi
10380 done
10381 if test -z "$haveit"; then
10382 ltrpathdirs="$ltrpathdirs $dir"
10383 fi
10384 fi
10385 ;;
10386 -l*)
10387 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10388 ;;
10389 *.la)
10390 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10391 ;;
10392 *)
10393 LIBGMP="${LIBGMP}${LIBGMP:+ }$dep"
10394 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }$dep"
10395 ;;
10396 esac
10397 done
10398 fi
10399 else
10400 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10401 LIBGMP="${LIBGMP}${LIBGMP:+ }-l$name"
10402 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-l$name"
10403 else
10404 LIBGMP="${LIBGMP}${LIBGMP:+ }-l:lib$name.$libext"
10405 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-l:lib$name.$libext"
10406 fi
10407 fi
10408 fi
10409 fi
10410 done
10411 done
10412 if test "X$rpathdirs" != "X"; then
10413 if test -n "$hardcode_libdir_separator"; then
10414 alldirs=
10415 for found_dir in $rpathdirs; do
10416 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10417 done
10418 acl_save_libdir="$libdir"
10419 libdir="$alldirs"
10420 eval flag=\"$hardcode_libdir_flag_spec\"
10421 libdir="$acl_save_libdir"
10422 LIBGMP="${LIBGMP}${LIBGMP:+ }$flag"
10423 else
10424 for found_dir in $rpathdirs; do
10425 acl_save_libdir="$libdir"
10426 libdir="$found_dir"
10427 eval flag=\"$hardcode_libdir_flag_spec\"
10428 libdir="$acl_save_libdir"
10429 LIBGMP="${LIBGMP}${LIBGMP:+ }$flag"
10430 done
10431 fi
10432 fi
10433 if test "X$ltrpathdirs" != "X"; then
10434 for found_dir in $ltrpathdirs; do
10435 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-R$found_dir"
10436 done
10437 fi
10438
10439
10440 ac_save_CPPFLAGS="$CPPFLAGS"
10441
10442 for element in $INCGMP; do
10443 haveit=
10444 for x in $CPPFLAGS; do
10445
10446 acl_save_prefix="$prefix"
10447 prefix="$acl_final_prefix"
10448 acl_save_exec_prefix="$exec_prefix"
10449 exec_prefix="$acl_final_exec_prefix"
10450 eval x=\"$x\"
10451 exec_prefix="$acl_save_exec_prefix"
10452 prefix="$acl_save_prefix"
10453
10454 if test "X$x" = "X$element"; then
10455 haveit=yes
10456 break
10457 fi
10458 done
10459 if test -z "$haveit"; then
10460 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10461 fi
10462 done
10463
10464
10465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgmp" >&5
10466$as_echo_n "checking for libgmp... " >&6; }
10467if ${ac_cv_libgmp+:} false; then :
10468 $as_echo_n "(cached) " >&6
10469else
10470
10471 ac_save_LIBS="$LIBS"
10472 LIBS="$LIBS $LIBGMP"
10473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10474/* end confdefs.h. */
10475#include <gmp.h>
10476int
10477main ()
10478{
10479mpz_t n;
10480 mpz_init (n);
10481 ;
10482 return 0;
10483}
10484_ACEOF
10485if ac_fn_c_try_link "$LINENO"; then :
10486 ac_cv_libgmp=yes
10487else
10488 ac_cv_libgmp=no
10489fi
10490rm -f core conftest.err conftest.$ac_objext \
10491 conftest$ac_exeext conftest.$ac_ext
10492 LIBS="$ac_save_LIBS"
10493
10494fi
10495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libgmp" >&5
10496$as_echo "$ac_cv_libgmp" >&6; }
10497 if test "$ac_cv_libgmp" = yes; then
10498 HAVE_LIBGMP=yes
10499
10500$as_echo "#define HAVE_LIBGMP 1" >>confdefs.h
10501
10502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libgmp" >&5
10503$as_echo_n "checking how to link with libgmp... " >&6; }
10504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGMP" >&5
10505$as_echo "$LIBGMP" >&6; }
10506 else
10507 HAVE_LIBGMP=no
10508 CPPFLAGS="$ac_save_CPPFLAGS"
10509 LIBGMP=
10510 LTLIBGMP=
10511 fi
10512
10513
10514
10515
10516
10517
10518if test "$HAVE_LIBGMP" != yes; then
10519 as_fn_error $? "GMP is missing or unusable" "$LINENO" 5
10520fi
10521
10522
10523# Check whether --with-mpfr was given.
10524if test "${with_mpfr+set}" = set; then :
10525 withval=$with_mpfr;
10526else
10527 with_mpfr=auto
10528fi
10529
10530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
10531$as_echo_n "checking whether to use MPFR... " >&6; }
10532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
10533$as_echo "$with_mpfr" >&6; }
10534
10535if test "${with_mpfr}" = no; then
10536 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
10537$as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
10538 HAVE_LIBMPFR=no
10539else
10540
10541
10542
10543
10544
10545
10546
10547
10548 use_additional=yes
10549
10550 acl_save_prefix="$prefix"
10551 prefix="$acl_final_prefix"
10552 acl_save_exec_prefix="$exec_prefix"
10553 exec_prefix="$acl_final_exec_prefix"
10554
10555 eval additional_includedir=\"$includedir\"
10556 eval additional_libdir=\"$libdir\"
10557
10558 exec_prefix="$acl_save_exec_prefix"
10559 prefix="$acl_save_prefix"
10560
10561
10562# Check whether --with-libmpfr-prefix was given.
10563if test "${with_libmpfr_prefix+set}" = set; then :
10564 withval=$with_libmpfr_prefix;
10565 if test "X$withval" = "Xno"; then
10566 use_additional=no
10567 else
10568 if test "X$withval" = "X"; then
10569
10570 acl_save_prefix="$prefix"
10571 prefix="$acl_final_prefix"
10572 acl_save_exec_prefix="$exec_prefix"
10573 exec_prefix="$acl_final_exec_prefix"
10574
10575 eval additional_includedir=\"$includedir\"
10576 eval additional_libdir=\"$libdir\"
10577
10578 exec_prefix="$acl_save_exec_prefix"
10579 prefix="$acl_save_prefix"
10580
10581 else
10582 additional_includedir="$withval/include"
10583 additional_libdir="$withval/lib"
10584 fi
10585 fi
10586
10587fi
10588
10589
10590# Check whether --with-libmpfr-type was given.
10591if test "${with_libmpfr_type+set}" = set; then :
10592 withval=$with_libmpfr_type; with_libmpfr_type=$withval
10593else
10594 with_libmpfr_type=auto
10595fi
10596
10597 lib_type=`eval echo \$with_libmpfr_type`
10598
10599 LIBMPFR=
10600 LTLIBMPFR=
10601 INCMPFR=
10602 rpathdirs=
10603 ltrpathdirs=
10604 names_already_handled=
10605 names_next_round='mpfr gmp'
10606 while test -n "$names_next_round"; do
10607 names_this_round="$names_next_round"
10608 names_next_round=
10609 for name in $names_this_round; do
10610 already_handled=
10611 for n in $names_already_handled; do
10612 if test "$n" = "$name"; then
10613 already_handled=yes
10614 break
10615 fi
10616 done
10617 if test -z "$already_handled"; then
10618 names_already_handled="$names_already_handled $name"
10619 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10620 eval value=\"\$HAVE_LIB$uppername\"
10621 if test -n "$value"; then
10622 if test "$value" = yes; then
10623 eval value=\"\$LIB$uppername\"
10624 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
10625 eval value=\"\$LTLIB$uppername\"
10626 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
10627 else
10628 :
10629 fi
10630 else
10631 found_dir=
10632 found_la=
10633 found_so=
10634 found_a=
10635 if test $use_additional = yes; then
10636 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10637 found_dir="$additional_libdir"
10638 found_so="$additional_libdir/lib$name.$shlibext"
10639 if test -f "$additional_libdir/lib$name.la"; then
10640 found_la="$additional_libdir/lib$name.la"
10641 fi
10642 elif test x$lib_type != xshared; then
10643 if test -f "$additional_libdir/lib$name.$libext"; then
10644 found_dir="$additional_libdir"
10645 found_a="$additional_libdir/lib$name.$libext"
10646 if test -f "$additional_libdir/lib$name.la"; then
10647 found_la="$additional_libdir/lib$name.la"
10648 fi
10649 fi
10650 fi
10651 fi
10652 if test "X$found_dir" = "X"; then
10653 for x in $LDFLAGS $LTLIBMPFR; do
10654
10655 acl_save_prefix="$prefix"
10656 prefix="$acl_final_prefix"
10657 acl_save_exec_prefix="$exec_prefix"
10658 exec_prefix="$acl_final_exec_prefix"
10659 eval x=\"$x\"
10660 exec_prefix="$acl_save_exec_prefix"
10661 prefix="$acl_save_prefix"
10662
10663 case "$x" in
10664 -L*)
10665 dir=`echo "X$x" | sed -e 's/^X-L//'`
10666 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10667 found_dir="$dir"
10668 found_so="$dir/lib$name.$shlibext"
10669 if test -f "$dir/lib$name.la"; then
10670 found_la="$dir/lib$name.la"
10671 fi
10672 elif test x$lib_type != xshared; then
10673 if test -f "$dir/lib$name.$libext"; then
10674 found_dir="$dir"
10675 found_a="$dir/lib$name.$libext"
10676 if test -f "$dir/lib$name.la"; then
10677 found_la="$dir/lib$name.la"
10678 fi
10679 fi
10680 fi
10681 ;;
10682 esac
10683 if test "X$found_dir" != "X"; then
10684 break
10685 fi
10686 done
10687 fi
10688 if test "X$found_dir" != "X"; then
10689 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
10690 if test "X$found_so" != "X"; then
10691 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10692 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10693 else
10694 haveit=
10695 for x in $ltrpathdirs; do
10696 if test "X$x" = "X$found_dir"; then
10697 haveit=yes
10698 break
10699 fi
10700 done
10701 if test -z "$haveit"; then
10702 ltrpathdirs="$ltrpathdirs $found_dir"
10703 fi
10704 if test "$hardcode_direct" = yes; then
10705 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10706 else
10707 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10708 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10709 haveit=
10710 for x in $rpathdirs; do
10711 if test "X$x" = "X$found_dir"; then
10712 haveit=yes
10713 break
10714 fi
10715 done
10716 if test -z "$haveit"; then
10717 rpathdirs="$rpathdirs $found_dir"
10718 fi
10719 else
10720 haveit=
10721 for x in $LDFLAGS $LIBMPFR; do
10722
10723 acl_save_prefix="$prefix"
10724 prefix="$acl_final_prefix"
10725 acl_save_exec_prefix="$exec_prefix"
10726 exec_prefix="$acl_final_exec_prefix"
10727 eval x=\"$x\"
10728 exec_prefix="$acl_save_exec_prefix"
10729 prefix="$acl_save_prefix"
10730
10731 if test "X$x" = "X-L$found_dir"; then
10732 haveit=yes
10733 break
10734 fi
10735 done
10736 if test -z "$haveit"; then
10737 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
10738 fi
10739 if test "$hardcode_minus_L" != no; then
10740 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10741 else
10742 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10743 fi
10744 fi
10745 fi
10746 fi
10747 else
10748 if test "X$found_a" != "X"; then
10749 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
10750 else
10751 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
10752 fi
10753 fi
10754 additional_includedir=
10755 case "$found_dir" in
10756 */lib | */lib/)
10757 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10758 additional_includedir="$basedir/include"
10759 ;;
10760 esac
10761 if test "X$additional_includedir" != "X"; then
10762 if test "X$additional_includedir" != "X/usr/include"; then
10763 haveit=
10764 if test "X$additional_includedir" = "X/usr/local/include"; then
10765 if test -n "$GCC"; then
10766 case $host_os in
10767 linux*) haveit=yes;;
10768 esac
10769 fi
10770 fi
10771 if test -z "$haveit"; then
10772 for x in $CPPFLAGS $INCMPFR; do
10773
10774 acl_save_prefix="$prefix"
10775 prefix="$acl_final_prefix"
10776 acl_save_exec_prefix="$exec_prefix"
10777 exec_prefix="$acl_final_exec_prefix"
10778 eval x=\"$x\"
10779 exec_prefix="$acl_save_exec_prefix"
10780 prefix="$acl_save_prefix"
10781
10782 if test "X$x" = "X-I$additional_includedir"; then
10783 haveit=yes
10784 break
10785 fi
10786 done
10787 if test -z "$haveit"; then
10788 if test -d "$additional_includedir"; then
10789 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10790 fi
10791 fi
10792 fi
10793 fi
10794 fi
10795 if test -n "$found_la"; then
10796 save_libdir="$libdir"
10797 case "$found_la" in
10798 */* | *\\*) . "$found_la" ;;
10799 *) . "./$found_la" ;;
10800 esac
10801 libdir="$save_libdir"
10802 for dep in $dependency_libs; do
10803 case "$dep" in
10804 -L*)
10805 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10806 if test "X$additional_libdir" != "X/usr/lib"; then
10807 haveit=
10808 if test "X$additional_libdir" = "X/usr/local/lib"; then
10809 if test -n "$GCC"; then
10810 case $host_os in
10811 linux*) haveit=yes;;
10812 esac
10813 fi
10814 fi
10815 if test -z "$haveit"; then
10816 haveit=
10817 for x in $LDFLAGS $LIBMPFR; do
10818
10819 acl_save_prefix="$prefix"
10820 prefix="$acl_final_prefix"
10821 acl_save_exec_prefix="$exec_prefix"
10822 exec_prefix="$acl_final_exec_prefix"
10823 eval x=\"$x\"
10824 exec_prefix="$acl_save_exec_prefix"
10825 prefix="$acl_save_prefix"
10826
10827 if test "X$x" = "X-L$additional_libdir"; then
10828 haveit=yes
10829 break
10830 fi
10831 done
10832 if test -z "$haveit"; then
10833 if test -d "$additional_libdir"; then
10834 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10835 fi
10836 fi
10837 haveit=
10838 for x in $LDFLAGS $LTLIBMPFR; do
10839
10840 acl_save_prefix="$prefix"
10841 prefix="$acl_final_prefix"
10842 acl_save_exec_prefix="$exec_prefix"
10843 exec_prefix="$acl_final_exec_prefix"
10844 eval x=\"$x\"
10845 exec_prefix="$acl_save_exec_prefix"
10846 prefix="$acl_save_prefix"
10847
10848 if test "X$x" = "X-L$additional_libdir"; then
10849 haveit=yes
10850 break
10851 fi
10852 done
10853 if test -z "$haveit"; then
10854 if test -d "$additional_libdir"; then
10855 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10856 fi
10857 fi
10858 fi
10859 fi
10860 ;;
10861 -R*)
10862 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10863 if test "$enable_rpath" != no; then
10864 haveit=
10865 for x in $rpathdirs; do
10866 if test "X$x" = "X$dir"; then
10867 haveit=yes
10868 break
10869 fi
10870 done
10871 if test -z "$haveit"; then
10872 rpathdirs="$rpathdirs $dir"
10873 fi
10874 haveit=
10875 for x in $ltrpathdirs; do
10876 if test "X$x" = "X$dir"; then
10877 haveit=yes
10878 break
10879 fi
10880 done
10881 if test -z "$haveit"; then
10882 ltrpathdirs="$ltrpathdirs $dir"
10883 fi
10884 fi
10885 ;;
10886 -l*)
10887 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10888 ;;
10889 *.la)
10890 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10891 ;;
10892 *)
10893 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10894 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10895 ;;
10896 esac
10897 done
10898 fi
10899 else
10900 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10901 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10902 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10903 else
10904 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l:lib$name.$libext"
10905 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l:lib$name.$libext"
10906 fi
10907 fi
10908 fi
10909 fi
10910 done
10911 done
10912 if test "X$rpathdirs" != "X"; then
10913 if test -n "$hardcode_libdir_separator"; then
10914 alldirs=
10915 for found_dir in $rpathdirs; do
10916 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10917 done
10918 acl_save_libdir="$libdir"
10919 libdir="$alldirs"
10920 eval flag=\"$hardcode_libdir_flag_spec\"
10921 libdir="$acl_save_libdir"
10922 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10923 else
10924 for found_dir in $rpathdirs; do
10925 acl_save_libdir="$libdir"
10926 libdir="$found_dir"
10927 eval flag=\"$hardcode_libdir_flag_spec\"
10928 libdir="$acl_save_libdir"
10929 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10930 done
10931 fi
10932 fi
10933 if test "X$ltrpathdirs" != "X"; then
10934 for found_dir in $ltrpathdirs; do
10935 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10936 done
10937 fi
10938
10939
10940 ac_save_CPPFLAGS="$CPPFLAGS"
10941
10942 for element in $INCMPFR; do
10943 haveit=
10944 for x in $CPPFLAGS; do
10945
10946 acl_save_prefix="$prefix"
10947 prefix="$acl_final_prefix"
10948 acl_save_exec_prefix="$exec_prefix"
10949 exec_prefix="$acl_final_exec_prefix"
10950 eval x=\"$x\"
10951 exec_prefix="$acl_save_exec_prefix"
10952 prefix="$acl_save_prefix"
10953
10954 if test "X$x" = "X$element"; then
10955 haveit=yes
10956 break
10957 fi
10958 done
10959 if test -z "$haveit"; then
10960 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10961 fi
10962 done
10963
10964
10965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10966$as_echo_n "checking for libmpfr... " >&6; }
10967if ${ac_cv_libmpfr+:} false; then :
10968 $as_echo_n "(cached) " >&6
10969else
10970
10971 ac_save_LIBS="$LIBS"
10972 LIBS="$LIBS $LIBMPFR"
10973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10974/* end confdefs.h. */
10975#include <mpfr.h>
10976int
10977main ()
10978{
10979mpfr_exp_t exp; mpfr_t x;
10980 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10981 ;
10982 return 0;
10983}
10984_ACEOF
10985if ac_fn_c_try_link "$LINENO"; then :
10986 ac_cv_libmpfr=yes
10987else
10988 ac_cv_libmpfr=no
10989fi
10990rm -f core conftest.err conftest.$ac_objext \
10991 conftest$ac_exeext conftest.$ac_ext
10992 LIBS="$ac_save_LIBS"
10993
10994fi
10995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10996$as_echo "$ac_cv_libmpfr" >&6; }
10997 if test "$ac_cv_libmpfr" = yes; then
10998 HAVE_LIBMPFR=yes
10999
11000$as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
11001
11002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
11003$as_echo_n "checking how to link with libmpfr... " >&6; }
11004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
11005$as_echo "$LIBMPFR" >&6; }
11006 else
11007 HAVE_LIBMPFR=no
11008 CPPFLAGS="$ac_save_CPPFLAGS"
11009 LIBMPFR=
11010 LTLIBMPFR=
11011 fi
11012
11013
11014
11015
11016
11017
11018 if test "$HAVE_LIBMPFR" != yes; then
11019 if test "$with_mpfr" = yes; then
11020 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
11021 else
11022 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
11023$as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
11024 fi
11025 fi
11026fi
11027
11028# --------------------- #
11029# Check for libpython. #
11030# --------------------- #
11031
11032
11033
11034
11035
11036
11037# Check whether --with-python was given.
11038if test "${with_python+set}" = set; then :
11039 withval=$with_python;
11040else
11041 with_python=auto
11042fi
11043
11044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
11045$as_echo_n "checking whether to use python... " >&6; }
11046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
11047$as_echo "$with_python" >&6; }
11048
11049if test "${with_python}" = no; then
11050 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
11051$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
11052 have_libpython=no
11053else
11054 case "${with_python}" in
11055 [\\/]* | ?:[\\/]*)
11056 if test -d "${with_python}"; then
11057 # Assume the python binary is ${with_python}/bin/python.
11058 python_prog="${with_python}/bin/python"
11059 python_prefix=
11060 # If python does not exit ${with_python}/bin, then try in
11061 # ${with_python}. On Windows/MinGW, this is where the Python
11062 # executable is.
11063 if test ! -x "${python_prog}"; then
11064 python_prog="${with_python}/python"
11065 python_prefix=
11066 fi
11067 if test ! -x "${python_prog}"; then
11068 # Fall back to gdb 7.0/7.1 behaviour.
11069 python_prog=missing
11070 python_prefix=${with_python}
11071 fi
11072 elif test -x "${with_python}"; then
11073 # While we can't run python compiled for $host (unless host == build),
11074 # the user could write a script that provides the needed information,
11075 # so we support that.
11076 python_prog=${with_python}
11077 python_prefix=
11078 else
11079 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
11080 fi
11081 ;;
11082 */*)
11083 # Disallow --with-python=foo/bar.
11084 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
11085 ;;
11086 *)
11087 # The user has either specified auto, yes, or the name of the python
11088 # program assumed to be in $PATH.
11089 python_prefix=
11090 case "${with_python}" in
11091 yes | auto)
11092 if test "${build}" = "${host}"; then
11093 # Extract the first word of "python", so it can be a program name with args.
11094set dummy python; ac_word=$2
11095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11096$as_echo_n "checking for $ac_word... " >&6; }
11097if ${ac_cv_path_python_prog_path+:} false; then :
11098 $as_echo_n "(cached) " >&6
11099else
11100 case $python_prog_path in
11101 [\\/]* | ?:[\\/]*)
11102 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
11103 ;;
11104 *)
11105 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11106for as_dir in $PATH
11107do
11108 IFS=$as_save_IFS
11109 test -z "$as_dir" && as_dir=.
11110 for ac_exec_ext in '' $ac_executable_extensions; do
11111 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11112 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
11113 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11114 break 2
11115 fi
11116done
11117 done
11118IFS=$as_save_IFS
11119
11120 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
11121 ;;
11122esac
11123fi
11124python_prog_path=$ac_cv_path_python_prog_path
11125if test -n "$python_prog_path"; then
11126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
11127$as_echo "$python_prog_path" >&6; }
11128else
11129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11130$as_echo "no" >&6; }
11131fi
11132
11133
11134 if test "${python_prog_path}" = missing; then
11135 python_prog=missing
11136 else
11137 python_prog=${python_prog_path}
11138 fi
11139 else
11140 # Not much we can do except assume the cross-compiler will find the
11141 # right files.
11142 python_prog=missing
11143 fi
11144 ;;
11145 *)
11146 # While we can't run python compiled for $host (unless host == build),
11147 # the user could write a script that provides the needed information,
11148 # so we support that.
11149 python_prog="${with_python}"
11150 # Extract the first word of "${python_prog}", so it can be a program name with args.
11151set dummy ${python_prog}; ac_word=$2
11152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11153$as_echo_n "checking for $ac_word... " >&6; }
11154if ${ac_cv_path_python_prog_path+:} false; then :
11155 $as_echo_n "(cached) " >&6
11156else
11157 case $python_prog_path in
11158 [\\/]* | ?:[\\/]*)
11159 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
11160 ;;
11161 *)
11162 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11163for as_dir in $PATH
11164do
11165 IFS=$as_save_IFS
11166 test -z "$as_dir" && as_dir=.
11167 for ac_exec_ext in '' $ac_executable_extensions; do
11168 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11169 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
11170 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11171 break 2
11172 fi
11173done
11174 done
11175IFS=$as_save_IFS
11176
11177 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
11178 ;;
11179esac
11180fi
11181python_prog_path=$ac_cv_path_python_prog_path
11182if test -n "$python_prog_path"; then
11183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
11184$as_echo "$python_prog_path" >&6; }
11185else
11186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11187$as_echo "no" >&6; }
11188fi
11189
11190
11191 if test "${python_prog_path}" = missing; then
11192 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
11193 fi
11194 ;;
11195 esac
11196 esac
11197
11198 if test "${python_prog}" != missing; then
11199 # We have a python program to use, but it may be too old.
11200 # Don't flag an error for --with-python=auto (the default).
11201 have_python_config=yes
11202 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
11203 if test $? != 0; then
11204 have_python_config=failed
11205 if test "${with_python}" != auto; then
11206 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
11207 fi
11208 fi
11209 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
11210 if test $? != 0; then
11211 have_python_config=failed
11212 if test "${with_python}" != auto; then
11213 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
11214 fi
11215 fi
11216 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
11217 if test $? != 0; then
11218 have_python_config=failed
11219 if test "${with_python}" != auto; then
11220 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
11221 fi
11222 fi
11223 else
11224 # We do not have a python executable we can use to determine where
11225 # to find the Python headers and libs. We cannot guess the include
11226 # path from the python_prefix either, because that include path
11227 # depends on the Python version. So, there is nothing much we can
11228 # do except assume that the compiler will be able to find those files.
11229 python_includes=
11230 python_libs=
11231 have_python_config=no
11232 fi
11233
11234 # If we have python-config, only try the configuration it provides.
11235 # Otherwise fallback on the old way of trying different versions of
11236 # python in turn.
11237
11238 have_libpython=no
11239 if test "${have_python_config}" = yes; then
11240
11241
11242 new_CPPFLAGS=${python_includes}
11243 new_LIBS=${python_libs}
11244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
11245$as_echo_n "checking for python... " >&6; }
11246 save_CPPFLAGS=$CPPFLAGS
11247 save_LIBS=$LIBS
11248 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11249 LIBS="$new_LIBS $LIBS"
11250 found_usable_python=no
11251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11252/* end confdefs.h. */
11253#include "Python.h"
11254int
11255main ()
11256{
11257Py_Initialize ();
11258 ;
11259 return 0;
11260}
11261_ACEOF
11262if ac_fn_c_try_link "$LINENO"; then :
11263 have_libpython=yes
11264 found_usable_python=yes
11265 PYTHON_CPPFLAGS=$new_CPPFLAGS
11266 PYTHON_LIBS=$new_LIBS
11267fi
11268rm -f core conftest.err conftest.$ac_objext \
11269 conftest$ac_exeext conftest.$ac_ext
11270 CPPFLAGS=$save_CPPFLAGS
11271 LIBS=$save_LIBS
11272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11273$as_echo "${found_usable_python}" >&6; }
11274
11275 elif test "${have_python_config}" != failed; then
11276 if test "${have_libpython}" = no; then
11277
11278
11279 new_CPPFLAGS=${python_includes}
11280 new_LIBS="-lpython2.7 ${python_libs}"
11281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
11282$as_echo_n "checking for python... " >&6; }
11283 save_CPPFLAGS=$CPPFLAGS
11284 save_LIBS=$LIBS
11285 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11286 LIBS="$new_LIBS $LIBS"
11287 found_usable_python=no
11288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11289/* end confdefs.h. */
11290#include "Python.h"
11291int
11292main ()
11293{
11294Py_Initialize ();
11295 ;
11296 return 0;
11297}
11298_ACEOF
11299if ac_fn_c_try_link "$LINENO"; then :
11300 have_libpython=yes
11301 found_usable_python=yes
11302 PYTHON_CPPFLAGS=$new_CPPFLAGS
11303 PYTHON_LIBS=$new_LIBS
11304fi
11305rm -f core conftest.err conftest.$ac_objext \
11306 conftest$ac_exeext conftest.$ac_ext
11307 CPPFLAGS=$save_CPPFLAGS
11308 LIBS=$save_LIBS
11309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11310$as_echo "${found_usable_python}" >&6; }
11311
11312 fi
11313 if test "${have_libpython}" = no; then
11314
11315
11316 new_CPPFLAGS=${python_includes}
11317 new_LIBS="-lpython2.6 ${python_libs}"
11318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
11319$as_echo_n "checking for python... " >&6; }
11320 save_CPPFLAGS=$CPPFLAGS
11321 save_LIBS=$LIBS
11322 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11323 LIBS="$new_LIBS $LIBS"
11324 found_usable_python=no
11325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11326/* end confdefs.h. */
11327#include "Python.h"
11328int
11329main ()
11330{
11331Py_Initialize ();
11332 ;
11333 return 0;
11334}
11335_ACEOF
11336if ac_fn_c_try_link "$LINENO"; then :
11337 have_libpython=yes
11338 found_usable_python=yes
11339 PYTHON_CPPFLAGS=$new_CPPFLAGS
11340 PYTHON_LIBS=$new_LIBS
11341fi
11342rm -f core conftest.err conftest.$ac_objext \
11343 conftest$ac_exeext conftest.$ac_ext
11344 CPPFLAGS=$save_CPPFLAGS
11345 LIBS=$save_LIBS
11346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11347$as_echo "${found_usable_python}" >&6; }
11348
11349 fi
11350 fi
11351
11352 if test "${have_libpython}" = no; then
11353 case "${with_python}" in
11354 yes)
11355 as_fn_error $? "python is missing or unusable" "$LINENO" 5
11356 ;;
11357 auto)
11358 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
11359$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
11360 ;;
11361 *)
11362 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
11363 ;;
11364 esac
11365 else
11366 if test -n "${python_prefix}"; then
11367
11368cat >>confdefs.h <<_ACEOF
11369#define WITH_PYTHON_PATH "${python_prefix}"
11370_ACEOF
11371
11372
11373 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
11374 if test "x$prefix" = xNONE; then
11375 test_prefix=/usr/local
11376 else
11377 test_prefix=$prefix
11378 fi
11379 else
11380 test_prefix=$exec_prefix
11381 fi
11382 value=0
11383 case ${python_prefix} in
11384 "${test_prefix}"|"${test_prefix}/"*|\
11385 '${exec_prefix}'|'${exec_prefix}/'*)
11386 value=1
11387 ;;
11388 esac
11389
11390cat >>confdefs.h <<_ACEOF
11391#define PYTHON_PATH_RELOCATABLE $value
11392_ACEOF
11393
11394
11395 fi
11396 fi
11397fi
11398
11399
11400# Check whether --with-python-libdir was given.
11401if test "${with_python_libdir+set}" = set; then :
11402 withval=$with_python_libdir;
11403else
11404
11405 # If no python libdir is specified then select one based on
11406 # python's prefix path.
11407 if test -n "${python_prefix}"; then
11408 with_python_libdir=${python_prefix}/lib
11409 fi
11410
11411fi
11412
11413
11414if test "${have_libpython}" != no; then
11415
11416$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
11417
11418 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
11419 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
11420 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
11421 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
11422 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
11423
11424 if test -n "${with_python_libdir}"; then
11425
11426cat >>confdefs.h <<_ACEOF
11427#define WITH_PYTHON_LIBDIR "${with_python_libdir}"
11428_ACEOF
11429
11430
11431 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
11432 if test "x$prefix" = xNONE; then
11433 test_prefix=/usr/local
11434 else
11435 test_prefix=$prefix
11436 fi
11437 else
11438 test_prefix=$exec_prefix
11439 fi
11440 value=0
11441 case ${with_python_libdir} in
11442 "${test_prefix}"|"${test_prefix}/"*|\
11443 '${exec_prefix}'|'${exec_prefix}/'*)
11444 value=1
11445 ;;
11446 esac
11447
11448cat >>confdefs.h <<_ACEOF
11449#define PYTHON_LIBDIR_RELOCATABLE $value
11450_ACEOF
11451
11452
11453 fi
11454
11455 # Flags needed to compile Python code (taken from python-config --cflags).
11456 # We cannot call python-config directly because it will output whatever was
11457 # used when compiling the Python interpreter itself, including flags which
11458 # would make the python-related objects be compiled differently from the
11459 # rest of GDB (e.g., -O2 and -fPIC).
11460 if test "${GCC}" = yes; then
11461 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
11462 # Python headers recommend -DNDEBUG, but it's unclear if that just
11463 # refers to building Python itself. In release mode, though, it
11464 # doesn't hurt for the Python code in gdb to follow.
11465 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
11466 fi
11467
11468 if test "x${tentative_python_cflags}" != x; then
11469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
11470$as_echo_n "checking compiler flags for python code... " >&6; }
11471 for flag in ${tentative_python_cflags}; do
11472 # Check that the compiler accepts it
11473 saved_CFLAGS="$CFLAGS"
11474 CFLAGS="$CFLAGS $flag"
11475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11476/* end confdefs.h. */
11477
11478int
11479main ()
11480{
11481
11482 ;
11483 return 0;
11484}
11485_ACEOF
11486if ac_fn_c_try_compile "$LINENO"; then :
11487 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
11488fi
11489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11490 CFLAGS="$saved_CFLAGS"
11491 done
11492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
11493$as_echo "${PYTHON_CFLAGS}" >&6; }
11494 fi
11495
11496 # On x64 Windows, Python's include headers, and pyconfig.h in
11497 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
11498 # version of Windows. Unfortunately, MS_WIN64 is only defined if
11499 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
11500 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
11501 # The issue was reported to the Python community, but still isn't
11502 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
11503
11504 case "$gdb_host" in
11505 mingw64)
11506 if test "${GCC}" = yes; then
11507 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
11508 fi
11509 ;;
11510 esac
11511else
11512 # Even if Python support is not compiled in, we need to have this file
11513 # included so that the "python" command, et.al., still exists.
11514 CONFIG_OBS="$CONFIG_OBS python/python.o"
11515 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
11516fi
11517
11518# Work around Python http://bugs.python.org/issue10112. See also
11519# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
11520# no effect. Note that the only test after this that uses Python is
11521# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
11522# run without -export-dynamic too.
11523PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
11524
11525
11526
11527
11528 if test "${have_libpython}" != no; then
11529 HAVE_PYTHON_TRUE=
11530 HAVE_PYTHON_FALSE='#'
11531else
11532 HAVE_PYTHON_TRUE='#'
11533 HAVE_PYTHON_FALSE=
11534fi
11535
11536
11537# -------------------- #
11538# Check for libguile. #
11539# -------------------- #
11540
11541
11542
11543
11544
11545
11546# Check whether --with-guile was given.
11547if test "${with_guile+set}" = set; then :
11548 withval=$with_guile;
11549else
11550 with_guile=auto
11551fi
11552
11553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
11554$as_echo_n "checking whether to use guile... " >&6; }
11555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
11556$as_echo "$with_guile" >&6; }
11557
11558# Extract the first word of "pkg-config", so it can be a program name with args.
11559set dummy pkg-config; ac_word=$2
11560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11561$as_echo_n "checking for $ac_word... " >&6; }
11562if ${ac_cv_path_pkg_config_prog_path+:} false; then :
11563 $as_echo_n "(cached) " >&6
11564else
11565 case $pkg_config_prog_path in
11566 [\\/]* | ?:[\\/]*)
11567 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
11568 ;;
11569 *)
11570 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11571for as_dir in $PATH
11572do
11573 IFS=$as_save_IFS
11574 test -z "$as_dir" && as_dir=.
11575 for ac_exec_ext in '' $ac_executable_extensions; do
11576 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11577 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
11578 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11579 break 2
11580 fi
11581done
11582 done
11583IFS=$as_save_IFS
11584
11585 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
11586 ;;
11587esac
11588fi
11589pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
11590if test -n "$pkg_config_prog_path"; then
11591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
11592$as_echo "$pkg_config_prog_path" >&6; }
11593else
11594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11595$as_echo "no" >&6; }
11596fi
11597
11598
11599
11600try_guile_versions="guile-3.0 guile-2.2 guile-2.0"
11601have_libguile=no
11602case "${with_guile}" in
11603no)
11604 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
11605$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
11606 ;;
11607auto)
11608 if test "${pkg_config_prog_path}" = "missing"; then
11609 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
11610$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
11611 else
11612
11613 pkg_config=${pkg_config_prog_path}
11614 guile_version_list=${try_guile_versions}
11615 flag_errors=no
11616
11617 found_usable_guile=checking
11618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11619$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11620 for guile_version in ${guile_version_list}; do
11621 ${pkg_config} --exists ${guile_version} 2>/dev/null
11622 if test $? != 0; then
11623 continue
11624 fi
11625 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11626 if test $? != 0; then
11627 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11628 fi
11629 new_LIBS=`${pkg_config} --libs ${guile_version}`
11630 if test $? != 0; then
11631 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11632 fi
11633 found_usable_guile=${guile_version}
11634 break
11635 done
11636 if test "${found_usable_guile}" = "checking"; then
11637 if test "${flag_errors}" = "yes"; then
11638 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11639 else
11640 found_usable_guile=no
11641 fi
11642 fi
11643 if test "${found_usable_guile}" != no; then
11644 save_CPPFLAGS=$CPPFLAGS
11645 save_LIBS=$LIBS
11646 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11647 LIBS="$LIBS $new_LIBS"
11648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11649/* end confdefs.h. */
11650#include "libguile.h"
11651int
11652main ()
11653{
11654scm_init_guile ();
11655 ;
11656 return 0;
11657}
11658_ACEOF
11659if ac_fn_c_try_link "$LINENO"; then :
11660 have_libguile=yes
11661 GUILE_CPPFLAGS=$new_CPPFLAGS
11662 GUILE_LIBS=$new_LIBS
11663else
11664 found_usable_guile=no
11665fi
11666rm -f core conftest.err conftest.$ac_objext \
11667 conftest$ac_exeext conftest.$ac_ext
11668 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11669if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11670
11671$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11672
11673
11674fi
11675
11676 CPPFLAGS=$save_CPPFLAGS
11677 LIBS=$save_LIBS
11678 if test "${found_usable_guile}" = no; then
11679 if test "${flag_errors}" = yes; then
11680 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11681$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11682as_fn_error $? "linking guile version ${guile_version} test program failed
11683See \`config.log' for more details" "$LINENO" 5; }
11684 fi
11685 fi
11686 fi
11687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11688$as_echo "${found_usable_guile}" >&6; }
11689
11690 fi
11691 ;;
11692yes)
11693 if test "${pkg_config_prog_path}" = "missing"; then
11694 as_fn_error $? "pkg-config not found" "$LINENO" 5
11695 fi
11696
11697 pkg_config=${pkg_config_prog_path}
11698 guile_version_list=${try_guile_versions}
11699 flag_errors=yes
11700
11701 found_usable_guile=checking
11702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11703$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11704 for guile_version in ${guile_version_list}; do
11705 ${pkg_config} --exists ${guile_version} 2>/dev/null
11706 if test $? != 0; then
11707 continue
11708 fi
11709 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11710 if test $? != 0; then
11711 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11712 fi
11713 new_LIBS=`${pkg_config} --libs ${guile_version}`
11714 if test $? != 0; then
11715 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11716 fi
11717 found_usable_guile=${guile_version}
11718 break
11719 done
11720 if test "${found_usable_guile}" = "checking"; then
11721 if test "${flag_errors}" = "yes"; then
11722 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11723 else
11724 found_usable_guile=no
11725 fi
11726 fi
11727 if test "${found_usable_guile}" != no; then
11728 save_CPPFLAGS=$CPPFLAGS
11729 save_LIBS=$LIBS
11730 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11731 LIBS="$LIBS $new_LIBS"
11732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11733/* end confdefs.h. */
11734#include "libguile.h"
11735int
11736main ()
11737{
11738scm_init_guile ();
11739 ;
11740 return 0;
11741}
11742_ACEOF
11743if ac_fn_c_try_link "$LINENO"; then :
11744 have_libguile=yes
11745 GUILE_CPPFLAGS=$new_CPPFLAGS
11746 GUILE_LIBS=$new_LIBS
11747else
11748 found_usable_guile=no
11749fi
11750rm -f core conftest.err conftest.$ac_objext \
11751 conftest$ac_exeext conftest.$ac_ext
11752 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11753if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11754
11755$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11756
11757
11758fi
11759
11760 CPPFLAGS=$save_CPPFLAGS
11761 LIBS=$save_LIBS
11762 if test "${found_usable_guile}" = no; then
11763 if test "${flag_errors}" = yes; then
11764 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11765$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11766as_fn_error $? "linking guile version ${guile_version} test program failed
11767See \`config.log' for more details" "$LINENO" 5; }
11768 fi
11769 fi
11770 fi
11771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11772$as_echo "${found_usable_guile}" >&6; }
11773
11774 ;;
11775[\\/]* | ?:[\\/]*)
11776 if test -x "${with_guile}"; then
11777
11778 pkg_config=${with_guile}
11779 guile_version_list=${try_guile_versions}
11780 flag_errors=yes
11781
11782 found_usable_guile=checking
11783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11784$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11785 for guile_version in ${guile_version_list}; do
11786 ${pkg_config} --exists ${guile_version} 2>/dev/null
11787 if test $? != 0; then
11788 continue
11789 fi
11790 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11791 if test $? != 0; then
11792 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11793 fi
11794 new_LIBS=`${pkg_config} --libs ${guile_version}`
11795 if test $? != 0; then
11796 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11797 fi
11798 found_usable_guile=${guile_version}
11799 break
11800 done
11801 if test "${found_usable_guile}" = "checking"; then
11802 if test "${flag_errors}" = "yes"; then
11803 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11804 else
11805 found_usable_guile=no
11806 fi
11807 fi
11808 if test "${found_usable_guile}" != no; then
11809 save_CPPFLAGS=$CPPFLAGS
11810 save_LIBS=$LIBS
11811 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11812 LIBS="$LIBS $new_LIBS"
11813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11814/* end confdefs.h. */
11815#include "libguile.h"
11816int
11817main ()
11818{
11819scm_init_guile ();
11820 ;
11821 return 0;
11822}
11823_ACEOF
11824if ac_fn_c_try_link "$LINENO"; then :
11825 have_libguile=yes
11826 GUILE_CPPFLAGS=$new_CPPFLAGS
11827 GUILE_LIBS=$new_LIBS
11828else
11829 found_usable_guile=no
11830fi
11831rm -f core conftest.err conftest.$ac_objext \
11832 conftest$ac_exeext conftest.$ac_ext
11833 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11834if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11835
11836$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11837
11838
11839fi
11840
11841 CPPFLAGS=$save_CPPFLAGS
11842 LIBS=$save_LIBS
11843 if test "${found_usable_guile}" = no; then
11844 if test "${flag_errors}" = yes; then
11845 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11846$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11847as_fn_error $? "linking guile version ${guile_version} test program failed
11848See \`config.log' for more details" "$LINENO" 5; }
11849 fi
11850 fi
11851 fi
11852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11853$as_echo "${found_usable_guile}" >&6; }
11854
11855 else
11856 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
11857 fi
11858 ;;
11859"" | */*)
11860 # Disallow --with=guile="" and --with-guile=foo/bar.
11861 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
11862 ;;
11863*)
11864 # A space separate list of guile versions to try, in order.
11865 if test "${pkg_config_prog_path}" = "missing"; then
11866 as_fn_error $? "pkg-config not found" "$LINENO" 5
11867 fi
11868
11869 pkg_config=${pkg_config_prog_path}
11870 guile_version_list=${with_guile}
11871 flag_errors=yes
11872
11873 found_usable_guile=checking
11874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11875$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11876 for guile_version in ${guile_version_list}; do
11877 ${pkg_config} --exists ${guile_version} 2>/dev/null
11878 if test $? != 0; then
11879 continue
11880 fi
11881 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11882 if test $? != 0; then
11883 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11884 fi
11885 new_LIBS=`${pkg_config} --libs ${guile_version}`
11886 if test $? != 0; then
11887 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11888 fi
11889 found_usable_guile=${guile_version}
11890 break
11891 done
11892 if test "${found_usable_guile}" = "checking"; then
11893 if test "${flag_errors}" = "yes"; then
11894 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11895 else
11896 found_usable_guile=no
11897 fi
11898 fi
11899 if test "${found_usable_guile}" != no; then
11900 save_CPPFLAGS=$CPPFLAGS
11901 save_LIBS=$LIBS
11902 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11903 LIBS="$LIBS $new_LIBS"
11904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11905/* end confdefs.h. */
11906#include "libguile.h"
11907int
11908main ()
11909{
11910scm_init_guile ();
11911 ;
11912 return 0;
11913}
11914_ACEOF
11915if ac_fn_c_try_link "$LINENO"; then :
11916 have_libguile=yes
11917 GUILE_CPPFLAGS=$new_CPPFLAGS
11918 GUILE_LIBS=$new_LIBS
11919else
11920 found_usable_guile=no
11921fi
11922rm -f core conftest.err conftest.$ac_objext \
11923 conftest$ac_exeext conftest.$ac_ext
11924 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11925if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11926
11927$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11928
11929
11930fi
11931
11932 CPPFLAGS=$save_CPPFLAGS
11933 LIBS=$save_LIBS
11934 if test "${found_usable_guile}" = no; then
11935 if test "${flag_errors}" = yes; then
11936 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11937$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11938as_fn_error $? "linking guile version ${guile_version} test program failed
11939See \`config.log' for more details" "$LINENO" 5; }
11940 fi
11941 fi
11942 fi
11943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11944$as_echo "${found_usable_guile}" >&6; }
11945
11946 ;;
11947esac
11948
11949if test "${have_libguile}" != no; then
11950 case "${with_guile}" in
11951 [\\/]* | ?:[\\/]*)
11952
11953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11954$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11955if ${ac_cv_guild_program_name+:} false; then :
11956 $as_echo_n "(cached) " >&6
11957else
11958 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
11959
11960 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11961 # the 'guild' and 'bindir' variables. In that case, try to guess
11962 # what the program name is, at the risk of getting it wrong if
11963 # Guile was configured with '--program-suffix' or similar.
11964 if test "x$ac_cv_guild_program_name" = "x"; then
11965 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
11966 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11967 fi
11968
11969fi
11970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11971$as_echo "$ac_cv_guild_program_name" >&6; }
11972
11973 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11974 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11975 fi
11976
11977 GUILD="$ac_cv_guild_program_name"
11978
11979
11980 ;;
11981 *)
11982
11983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11984$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11985if ${ac_cv_guild_program_name+:} false; then :
11986 $as_echo_n "(cached) " >&6
11987else
11988 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11989
11990 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11991 # the 'guild' and 'bindir' variables. In that case, try to guess
11992 # what the program name is, at the risk of getting it wrong if
11993 # Guile was configured with '--program-suffix' or similar.
11994 if test "x$ac_cv_guild_program_name" = "x"; then
11995 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11996 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11997 fi
11998
11999fi
12000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
12001$as_echo "$ac_cv_guild_program_name" >&6; }
12002
12003 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
12004 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
12005 fi
12006
12007 GUILD="$ac_cv_guild_program_name"
12008
12009
12010 ;;
12011 esac
12012
12013
12014 if test "$cross_compiling" = no; then
12015 GUILD_TARGET_FLAG=
12016 else
12017 GUILD_TARGET_FLAG="--target=$host"
12018 fi
12019
12020
12021
12022
12023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
12024$as_echo_n "checking whether guild supports this host... " >&6; }
12025if ${ac_cv_guild_ok+:} false; then :
12026 $as_echo_n "(cached) " >&6
12027else
12028 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
12029 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
12030 ac_cv_guild_ok=yes
12031 else
12032 ac_cv_guild_ok=no
12033 fi
12034fi
12035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
12036$as_echo "$ac_cv_guild_ok" >&6; }
12037
12038 if test "$ac_cv_guild_ok" = no; then
12039 have_libguile=no
12040 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
12041$as_echo "$as_me: WARNING: disabling guile support" >&2;}
12042 fi
12043fi
12044
12045if test "${have_libguile}" != no; then
12046
12047$as_echo "#define HAVE_GUILE 1" >>confdefs.h
12048
12049 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
12050 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
12051 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
12052 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
12053 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
12054
12055 save_LIBS="$LIBS"
12056 save_CPPFLAGS="$CPPFLAGS"
12057 LIBS="$GUILE_LIBS"
12058 CPPFLAGS="$GUILE_CPPFLAGS"
12059 for ac_func in scm_new_smob
12060do :
12061 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
12062if test "x$ac_cv_func_scm_new_smob" = xyes; then :
12063 cat >>confdefs.h <<_ACEOF
12064#define HAVE_SCM_NEW_SMOB 1
12065_ACEOF
12066
12067fi
12068done
12069
12070 LIBS="$save_LIBS"
12071 CPPFLAGS="$save_CPPFLAGS"
12072else
12073 # Even if Guile support is not compiled in, we need to have these files
12074 # included.
12075 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
12076 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
12077fi
12078
12079
12080 if test "${have_libguile}" != no; then
12081 HAVE_GUILE_TRUE=
12082 HAVE_GUILE_FALSE='#'
12083else
12084 HAVE_GUILE_TRUE='#'
12085 HAVE_GUILE_FALSE=
12086fi
12087
12088
12089# ---------------------------- #
12090# Check for source highlight. #
12091# ---------------------------- #
12092
12093SRCHIGH_LIBS=
12094SRCHIGH_CFLAGS=
12095
12096# Check whether --enable-source-highlight was given.
12097if test "${enable_source_highlight+set}" = set; then :
12098 enableval=$enable_source_highlight; case "${enableval}" in
12099 yes) enable_source_highlight=yes ;;
12100 no) enable_source_highlight=no ;;
12101 *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;;
12102esac
12103else
12104 enable_source_highlight=auto
12105fi
12106
12107
12108if test "${enable_source_highlight}" != "no"; then
12109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
12110$as_echo_n "checking for the source-highlight library... " >&6; }
12111 if test "${pkg_config_prog_path}" = "missing"; then
12112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
12113$as_echo "no - pkg-config not found" >&6; }
12114 if test "${enable_source_highlight}" = "yes"; then
12115 as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
12116 fi
12117 else
12118 if ${pkg_config_prog_path} --exists source-highlight; then
12119 case "$LDFLAGS" in
12120 *static-libstdc*)
12121 as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
12122 ;;
12123 esac
12124
12125 SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
12126 SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
12127
12128$as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
12129
12130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12131$as_echo "yes" >&6; }
12132 else
12133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12134$as_echo "no" >&6; }
12135 if test "${enable_source_highlight}" = "yes"; then
12136 as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
12137 fi
12138 fi
12139 fi
12140fi
12141
12142
12143
12144# ------------------------- #
12145# Checks for header files. #
12146# ------------------------- #
12147
12148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12149$as_echo_n "checking for ANSI C header files... " >&6; }
12150if ${ac_cv_header_stdc+:} false; then :
12151 $as_echo_n "(cached) " >&6
12152else
12153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12154/* end confdefs.h. */
12155#include <stdlib.h>
12156#include <stdarg.h>
12157#include <string.h>
12158#include <float.h>
12159
12160int
12161main ()
12162{
12163
12164 ;
12165 return 0;
12166}
12167_ACEOF
12168if ac_fn_c_try_compile "$LINENO"; then :
12169 ac_cv_header_stdc=yes
12170else
12171 ac_cv_header_stdc=no
12172fi
12173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12174
12175if test $ac_cv_header_stdc = yes; then
12176 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12178/* end confdefs.h. */
12179#include <string.h>
12180
12181_ACEOF
12182if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12183 $EGREP "memchr" >/dev/null 2>&1; then :
12184
12185else
12186 ac_cv_header_stdc=no
12187fi
12188rm -f conftest*
12189
12190fi
12191
12192if test $ac_cv_header_stdc = yes; then
12193 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12195/* end confdefs.h. */
12196#include <stdlib.h>
12197
12198_ACEOF
12199if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12200 $EGREP "free" >/dev/null 2>&1; then :
12201
12202else
12203 ac_cv_header_stdc=no
12204fi
12205rm -f conftest*
12206
12207fi
12208
12209if test $ac_cv_header_stdc = yes; then
12210 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12211 if test "$cross_compiling" = yes; then :
12212 :
12213else
12214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12215/* end confdefs.h. */
12216#include <ctype.h>
12217#include <stdlib.h>
12218#if ((' ' & 0x0FF) == 0x020)
12219# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12220# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12221#else
12222# define ISLOWER(c) \
12223 (('a' <= (c) && (c) <= 'i') \
12224 || ('j' <= (c) && (c) <= 'r') \
12225 || ('s' <= (c) && (c) <= 'z'))
12226# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12227#endif
12228
12229#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12230int
12231main ()
12232{
12233 int i;
12234 for (i = 0; i < 256; i++)
12235 if (XOR (islower (i), ISLOWER (i))
12236 || toupper (i) != TOUPPER (i))
12237 return 2;
12238 return 0;
12239}
12240_ACEOF
12241if ac_fn_c_try_run "$LINENO"; then :
12242
12243else
12244 ac_cv_header_stdc=no
12245fi
12246rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12247 conftest.$ac_objext conftest.beam conftest.$ac_ext
12248fi
12249
12250fi
12251fi
12252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12253$as_echo "$ac_cv_header_stdc" >&6; }
12254if test $ac_cv_header_stdc = yes; then
12255
12256$as_echo "#define STDC_HEADERS 1" >>confdefs.h
12257
12258fi
12259
12260# elf_hp.h is for HP/UX 64-bit shared library support.
12261for ac_header in nlist.h machine/reg.h \
12262 thread_db.h \
12263 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12264 sys/procctl.h sys/resource.h sys/ptrace.h ptrace.h \
12265 sys/reg.h sys/debugreg.h \
12266 termios.h elf_hp.h
12267do :
12268 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12269ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12270if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12271 cat >>confdefs.h <<_ACEOF
12272#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12273_ACEOF
12274
12275fi
12276
12277done
12278
12279for ac_header in sys/user.h
12280do :
12281 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
12282# include <sys/param.h>
12283#endif
12284
12285"
12286if test "x$ac_cv_header_sys_user_h" = xyes; then :
12287 cat >>confdefs.h <<_ACEOF
12288#define HAVE_SYS_USER_H 1
12289_ACEOF
12290
12291fi
12292
12293done
12294
12295
12296for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
12297do :
12298 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12299ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12300if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12301 cat >>confdefs.h <<_ACEOF
12302#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12303_ACEOF
12304
12305fi
12306
12307done
12308
12309for ac_header in term.h
12310do :
12311 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
12312# include <curses.h>
12313#endif
12314
12315"
12316if test "x$ac_cv_header_term_h" = xyes; then :
12317 cat >>confdefs.h <<_ACEOF
12318#define HAVE_TERM_H 1
12319_ACEOF
12320
12321fi
12322
12323done
12324
12325
12326for ac_header in sys/socket.h
12327do :
12328 ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
12329if test "x$ac_cv_header_sys_socket_h" = xyes; then :
12330 cat >>confdefs.h <<_ACEOF
12331#define HAVE_SYS_SOCKET_H 1
12332_ACEOF
12333
12334fi
12335
12336done
12337
12338for ac_header in ws2tcpip.h
12339do :
12340 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
12341if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
12342 cat >>confdefs.h <<_ACEOF
12343#define HAVE_WS2TCPIP_H 1
12344_ACEOF
12345
12346fi
12347
12348done
12349
12350
12351# ------------------------- #
12352# Checks for declarations. #
12353# ------------------------- #
12354
12355
12356 # Check for presence and size of long long.
12357 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
12358if test "x$ac_cv_type_long_long" = xyes; then :
12359
12360cat >>confdefs.h <<_ACEOF
12361#define HAVE_LONG_LONG 1
12362_ACEOF
12363
12364# The cast to long int works around a bug in the HP C Compiler
12365# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12366# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12367# This bug is HP SR number 8606223364.
12368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
12369$as_echo_n "checking size of long long... " >&6; }
12370if ${ac_cv_sizeof_long_long+:} false; then :
12371 $as_echo_n "(cached) " >&6
12372else
12373 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
12374
12375else
12376 if test "$ac_cv_type_long_long" = yes; then
12377 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12378$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12379as_fn_error 77 "cannot compute sizeof (long long)
12380See \`config.log' for more details" "$LINENO" 5; }
12381 else
12382 ac_cv_sizeof_long_long=0
12383 fi
12384fi
12385
12386fi
12387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
12388$as_echo "$ac_cv_sizeof_long_long" >&6; }
12389
12390
12391
12392cat >>confdefs.h <<_ACEOF
12393#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12394_ACEOF
12395
12396
12397fi
12398
12399
12400 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
12401ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
12402if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
12403 ac_have_decl=1
12404else
12405 ac_have_decl=0
12406fi
12407
12408cat >>confdefs.h <<_ACEOF
12409#define HAVE_DECL_BASENAME $ac_have_decl
12410_ACEOF
12411ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
12412if test "x$ac_cv_have_decl_ffs" = xyes; then :
12413 ac_have_decl=1
12414else
12415 ac_have_decl=0
12416fi
12417
12418cat >>confdefs.h <<_ACEOF
12419#define HAVE_DECL_FFS $ac_have_decl
12420_ACEOF
12421ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
12422if test "x$ac_cv_have_decl_asprintf" = xyes; then :
12423 ac_have_decl=1
12424else
12425 ac_have_decl=0
12426fi
12427
12428cat >>confdefs.h <<_ACEOF
12429#define HAVE_DECL_ASPRINTF $ac_have_decl
12430_ACEOF
12431ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
12432if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
12433 ac_have_decl=1
12434else
12435 ac_have_decl=0
12436fi
12437
12438cat >>confdefs.h <<_ACEOF
12439#define HAVE_DECL_VASPRINTF $ac_have_decl
12440_ACEOF
12441ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12442if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12443 ac_have_decl=1
12444else
12445 ac_have_decl=0
12446fi
12447
12448cat >>confdefs.h <<_ACEOF
12449#define HAVE_DECL_SNPRINTF $ac_have_decl
12450_ACEOF
12451ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
12452if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
12453 ac_have_decl=1
12454else
12455 ac_have_decl=0
12456fi
12457
12458cat >>confdefs.h <<_ACEOF
12459#define HAVE_DECL_VSNPRINTF $ac_have_decl
12460_ACEOF
12461
12462 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
12463if test "x$ac_cv_have_decl_strtol" = xyes; then :
12464 ac_have_decl=1
12465else
12466 ac_have_decl=0
12467fi
12468
12469cat >>confdefs.h <<_ACEOF
12470#define HAVE_DECL_STRTOL $ac_have_decl
12471_ACEOF
12472ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
12473if test "x$ac_cv_have_decl_strtoul" = xyes; then :
12474 ac_have_decl=1
12475else
12476 ac_have_decl=0
12477fi
12478
12479cat >>confdefs.h <<_ACEOF
12480#define HAVE_DECL_STRTOUL $ac_have_decl
12481_ACEOF
12482ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
12483if test "x$ac_cv_have_decl_strtoll" = xyes; then :
12484 ac_have_decl=1
12485else
12486 ac_have_decl=0
12487fi
12488
12489cat >>confdefs.h <<_ACEOF
12490#define HAVE_DECL_STRTOLL $ac_have_decl
12491_ACEOF
12492ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
12493if test "x$ac_cv_have_decl_strtoull" = xyes; then :
12494 ac_have_decl=1
12495else
12496 ac_have_decl=0
12497fi
12498
12499cat >>confdefs.h <<_ACEOF
12500#define HAVE_DECL_STRTOULL $ac_have_decl
12501_ACEOF
12502
12503 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
12504if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
12505 ac_have_decl=1
12506else
12507 ac_have_decl=0
12508fi
12509
12510cat >>confdefs.h <<_ACEOF
12511#define HAVE_DECL_STRVERSCMP $ac_have_decl
12512_ACEOF
12513
12514
12515
12516ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12517if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12518 ac_have_decl=1
12519else
12520 ac_have_decl=0
12521fi
12522
12523cat >>confdefs.h <<_ACEOF
12524#define HAVE_DECL_SNPRINTF $ac_have_decl
12525_ACEOF
12526
12527
12528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12529$as_echo_n "checking for LC_MESSAGES... " >&6; }
12530if ${am_cv_val_LC_MESSAGES+:} false; then :
12531 $as_echo_n "(cached) " >&6
12532else
12533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12534/* end confdefs.h. */
12535#include <locale.h>
12536int
12537main ()
12538{
12539return LC_MESSAGES
12540 ;
12541 return 0;
12542}
12543_ACEOF
12544if ac_fn_c_try_link "$LINENO"; then :
12545 am_cv_val_LC_MESSAGES=yes
12546else
12547 am_cv_val_LC_MESSAGES=no
12548fi
12549rm -f core conftest.err conftest.$ac_objext \
12550 conftest$ac_exeext conftest.$ac_ext
12551fi
12552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12553$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12554 if test $am_cv_val_LC_MESSAGES = yes; then
12555
12556$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
12557
12558 fi
12559
12560
12561# ------------------ #
12562# Checks for types. #
12563# ------------------ #
12564
12565ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
12566#if HAVE_SYS_SOCKET_H
12567# include <sys/socket.h>
12568#elif HAVE_WS2TCPIP_H
12569# include <ws2tcpip.h>
12570#endif
12571
12572"
12573if test "x$ac_cv_type_socklen_t" = xyes; then :
12574
12575cat >>confdefs.h <<_ACEOF
12576#define HAVE_SOCKLEN_T 1
12577_ACEOF
12578
12579
12580fi
12581
12582
12583# ------------------------------------- #
12584# Checks for compiler characteristics. #
12585# ------------------------------------- #
12586
12587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12588$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
12589if ${ac_cv_c_const+:} false; then :
12590 $as_echo_n "(cached) " >&6
12591else
12592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12593/* end confdefs.h. */
12594
12595int
12596main ()
12597{
12598
12599#ifndef __cplusplus
12600 /* Ultrix mips cc rejects this sort of thing. */
12601 typedef int charset[2];
12602 const charset cs = { 0, 0 };
12603 /* SunOS 4.1.1 cc rejects this. */
12604 char const *const *pcpcc;
12605 char **ppc;
12606 /* NEC SVR4.0.2 mips cc rejects this. */
12607 struct point {int x, y;};
12608 static struct point const zero = {0,0};
12609 /* AIX XL C 1.02.0.0 rejects this.
12610 It does not let you subtract one const X* pointer from another in
12611 an arm of an if-expression whose if-part is not a constant
12612 expression */
12613 const char *g = "string";
12614 pcpcc = &g + (g ? g-g : 0);
12615 /* HPUX 7.0 cc rejects these. */
12616 ++pcpcc;
12617 ppc = (char**) pcpcc;
12618 pcpcc = (char const *const *) ppc;
12619 { /* SCO 3.2v4 cc rejects this sort of thing. */
12620 char tx;
12621 char *t = &tx;
12622 char const *s = 0 ? (char *) 0 : (char const *) 0;
12623
12624 *t++ = 0;
12625 if (s) return 0;
12626 }
12627 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12628 int x[] = {25, 17};
12629 const int *foo = &x[0];
12630 ++foo;
12631 }
12632 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12633 typedef const int *iptr;
12634 iptr p = 0;
12635 ++p;
12636 }
12637 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
12638 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12639 struct s { int j; const int *ap[3]; } bx;
12640 struct s *b = &bx; b->j = 5;
12641 }
12642 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12643 const int foo = 10;
12644 if (!foo) return 0;
12645 }
12646 return !cs[0] && !zero.x;
12647#endif
12648
12649 ;
12650 return 0;
12651}
12652_ACEOF
12653if ac_fn_c_try_compile "$LINENO"; then :
12654 ac_cv_c_const=yes
12655else
12656 ac_cv_c_const=no
12657fi
12658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12659fi
12660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12661$as_echo "$ac_cv_c_const" >&6; }
12662if test $ac_cv_c_const = no; then
12663
12664$as_echo "#define const /**/" >>confdefs.h
12665
12666fi
12667
12668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12669$as_echo_n "checking for inline... " >&6; }
12670if ${ac_cv_c_inline+:} false; then :
12671 $as_echo_n "(cached) " >&6
12672else
12673 ac_cv_c_inline=no
12674for ac_kw in inline __inline__ __inline; do
12675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12676/* end confdefs.h. */
12677#ifndef __cplusplus
12678typedef int foo_t;
12679static $ac_kw foo_t static_foo () {return 0; }
12680$ac_kw foo_t foo () {return 0; }
12681#endif
12682
12683_ACEOF
12684if ac_fn_c_try_compile "$LINENO"; then :
12685 ac_cv_c_inline=$ac_kw
12686fi
12687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12688 test "$ac_cv_c_inline" != no && break
12689done
12690
12691fi
12692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12693$as_echo "$ac_cv_c_inline" >&6; }
12694
12695case $ac_cv_c_inline in
12696 inline | yes) ;;
12697 *)
12698 case $ac_cv_c_inline in
12699 no) ac_val=;;
12700 *) ac_val=$ac_cv_c_inline;;
12701 esac
12702 cat >>confdefs.h <<_ACEOF
12703#ifndef __cplusplus
12704#define inline $ac_val
12705#endif
12706_ACEOF
12707 ;;
12708esac
12709
12710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12711$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12712if ${ac_cv_c_bigendian+:} false; then :
12713 $as_echo_n "(cached) " >&6
12714else
12715 ac_cv_c_bigendian=unknown
12716 # See if we're dealing with a universal compiler.
12717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12718/* end confdefs.h. */
12719#ifndef __APPLE_CC__
12720 not a universal capable compiler
12721 #endif
12722 typedef int dummy;
12723
12724_ACEOF
12725if ac_fn_c_try_compile "$LINENO"; then :
12726
12727 # Check for potential -arch flags. It is not universal unless
12728 # there are at least two -arch flags with different values.
12729 ac_arch=
12730 ac_prev=
12731 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12732 if test -n "$ac_prev"; then
12733 case $ac_word in
12734 i?86 | x86_64 | ppc | ppc64)
12735 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12736 ac_arch=$ac_word
12737 else
12738 ac_cv_c_bigendian=universal
12739 break
12740 fi
12741 ;;
12742 esac
12743 ac_prev=
12744 elif test "x$ac_word" = "x-arch"; then
12745 ac_prev=arch
12746 fi
12747 done
12748fi
12749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12750 if test $ac_cv_c_bigendian = unknown; then
12751 # See if sys/param.h defines the BYTE_ORDER macro.
12752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12753/* end confdefs.h. */
12754#include <sys/types.h>
12755 #include <sys/param.h>
12756
12757int
12758main ()
12759{
12760#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12761 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12762 && LITTLE_ENDIAN)
12763 bogus endian macros
12764 #endif
12765
12766 ;
12767 return 0;
12768}
12769_ACEOF
12770if ac_fn_c_try_compile "$LINENO"; then :
12771 # It does; now see whether it defined to BIG_ENDIAN or not.
12772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12773/* end confdefs.h. */
12774#include <sys/types.h>
12775 #include <sys/param.h>
12776
12777int
12778main ()
12779{
12780#if BYTE_ORDER != BIG_ENDIAN
12781 not big endian
12782 #endif
12783
12784 ;
12785 return 0;
12786}
12787_ACEOF
12788if ac_fn_c_try_compile "$LINENO"; then :
12789 ac_cv_c_bigendian=yes
12790else
12791 ac_cv_c_bigendian=no
12792fi
12793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12794fi
12795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12796 fi
12797 if test $ac_cv_c_bigendian = unknown; then
12798 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12800/* end confdefs.h. */
12801#include <limits.h>
12802
12803int
12804main ()
12805{
12806#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12807 bogus endian macros
12808 #endif
12809
12810 ;
12811 return 0;
12812}
12813_ACEOF
12814if ac_fn_c_try_compile "$LINENO"; then :
12815 # It does; now see whether it defined to _BIG_ENDIAN or not.
12816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12817/* end confdefs.h. */
12818#include <limits.h>
12819
12820int
12821main ()
12822{
12823#ifndef _BIG_ENDIAN
12824 not big endian
12825 #endif
12826
12827 ;
12828 return 0;
12829}
12830_ACEOF
12831if ac_fn_c_try_compile "$LINENO"; then :
12832 ac_cv_c_bigendian=yes
12833else
12834 ac_cv_c_bigendian=no
12835fi
12836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12837fi
12838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12839 fi
12840 if test $ac_cv_c_bigendian = unknown; then
12841 # Compile a test program.
12842 if test "$cross_compiling" = yes; then :
12843 # Try to guess by grepping values from an object file.
12844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12845/* end confdefs.h. */
12846short int ascii_mm[] =
12847 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12848 short int ascii_ii[] =
12849 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12850 int use_ascii (int i) {
12851 return ascii_mm[i] + ascii_ii[i];
12852 }
12853 short int ebcdic_ii[] =
12854 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12855 short int ebcdic_mm[] =
12856 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12857 int use_ebcdic (int i) {
12858 return ebcdic_mm[i] + ebcdic_ii[i];
12859 }
12860 extern int foo;
12861
12862int
12863main ()
12864{
12865return use_ascii (foo) == use_ebcdic (foo);
12866 ;
12867 return 0;
12868}
12869_ACEOF
12870if ac_fn_c_try_compile "$LINENO"; then :
12871 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12872 ac_cv_c_bigendian=yes
12873 fi
12874 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12875 if test "$ac_cv_c_bigendian" = unknown; then
12876 ac_cv_c_bigendian=no
12877 else
12878 # finding both strings is unlikely to happen, but who knows?
12879 ac_cv_c_bigendian=unknown
12880 fi
12881 fi
12882fi
12883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12884else
12885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12886/* end confdefs.h. */
12887$ac_includes_default
12888int
12889main ()
12890{
12891
12892 /* Are we little or big endian? From Harbison&Steele. */
12893 union
12894 {
12895 long int l;
12896 char c[sizeof (long int)];
12897 } u;
12898 u.l = 1;
12899 return u.c[sizeof (long int) - 1] == 1;
12900
12901 ;
12902 return 0;
12903}
12904_ACEOF
12905if ac_fn_c_try_run "$LINENO"; then :
12906 ac_cv_c_bigendian=no
12907else
12908 ac_cv_c_bigendian=yes
12909fi
12910rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12911 conftest.$ac_objext conftest.beam conftest.$ac_ext
12912fi
12913
12914 fi
12915fi
12916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12917$as_echo "$ac_cv_c_bigendian" >&6; }
12918 case $ac_cv_c_bigendian in #(
12919 yes)
12920 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12921;; #(
12922 no)
12923 ;; #(
12924 universal)
12925
12926$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12927
12928 ;; #(
12929 *)
12930 as_fn_error $? "unknown endianness
12931 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12932 esac
12933
12934
12935# ------------------------------ #
12936# Checks for library functions. #
12937# ------------------------------ #
12938
12939for ac_func in getuid getgid \
12940 pipe pread pread64 pwrite resize_term \
12941 getpgid setsid \
12942 sigaction sigsetmask socketpair \
12943 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
12944 setrlimit getrlimit posix_madvise waitpid \
12945 use_default_colors
12946do :
12947 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12948ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12949if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12950 cat >>confdefs.h <<_ACEOF
12951#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12952_ACEOF
12953
12954fi
12955done
12956
12957
12958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12959$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12960if ${am_cv_langinfo_codeset+:} false; then :
12961 $as_echo_n "(cached) " >&6
12962else
12963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12964/* end confdefs.h. */
12965#include <langinfo.h>
12966int
12967main ()
12968{
12969char* cs = nl_langinfo(CODESET);
12970 ;
12971 return 0;
12972}
12973_ACEOF
12974if ac_fn_c_try_link "$LINENO"; then :
12975 am_cv_langinfo_codeset=yes
12976else
12977 am_cv_langinfo_codeset=no
12978fi
12979rm -f core conftest.err conftest.$ac_objext \
12980 conftest$ac_exeext conftest.$ac_ext
12981
12982fi
12983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12984$as_echo "$am_cv_langinfo_codeset" >&6; }
12985 if test $am_cv_langinfo_codeset = yes; then
12986
12987$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12988
12989 fi
12990
12991ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
12992if test "x$ac_cv_type_size_t" = xyes; then :
12993
12994else
12995
12996cat >>confdefs.h <<_ACEOF
12997#define size_t unsigned int
12998_ACEOF
12999
13000fi
13001
13002
13003
13004
13005 for ac_header in $ac_header_list
13006do :
13007 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13008ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
13009"
13010if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13011 cat >>confdefs.h <<_ACEOF
13012#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13013_ACEOF
13014
13015fi
13016
13017done
13018
13019
13020
13021
13022
13023
13024
13025ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
13026if test "x$ac_cv_type_pid_t" = xyes; then :
13027
13028else
13029
13030cat >>confdefs.h <<_ACEOF
13031#define pid_t int
13032_ACEOF
13033
13034fi
13035
13036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13037$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13038if ${ac_cv_path_SED+:} false; then :
13039 $as_echo_n "(cached) " >&6
13040else
13041 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13042 for ac_i in 1 2 3 4 5 6 7; do
13043 ac_script="$ac_script$as_nl$ac_script"
13044 done
13045 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13046 { ac_script=; unset ac_script;}
13047 if test -z "$SED"; then
13048 ac_path_SED_found=false
13049 # Loop through the user's path and test for each of PROGNAME-LIST
13050 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13051for as_dir in $PATH
13052do
13053 IFS=$as_save_IFS
13054 test -z "$as_dir" && as_dir=.
13055 for ac_prog in sed gsed; do
13056 for ac_exec_ext in '' $ac_executable_extensions; do
13057 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13058 as_fn_executable_p "$ac_path_SED" || continue
13059# Check for GNU ac_path_SED and select it if it is found.
13060 # Check for GNU $ac_path_SED
13061case `"$ac_path_SED" --version 2>&1` in
13062*GNU*)
13063 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13064*)
13065 ac_count=0
13066 $as_echo_n 0123456789 >"conftest.in"
13067 while :
13068 do
13069 cat "conftest.in" "conftest.in" >"conftest.tmp"
13070 mv "conftest.tmp" "conftest.in"
13071 cp "conftest.in" "conftest.nl"
13072 $as_echo '' >> "conftest.nl"
13073 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13074 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13075 as_fn_arith $ac_count + 1 && ac_count=$as_val
13076 if test $ac_count -gt ${ac_path_SED_max-0}; then
13077 # Best one so far, save it but keep looking for a better one
13078 ac_cv_path_SED="$ac_path_SED"
13079 ac_path_SED_max=$ac_count
13080 fi
13081 # 10*(2^10) chars as input seems more than enough
13082 test $ac_count -gt 10 && break
13083 done
13084 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13085esac
13086
13087 $ac_path_SED_found && break 3
13088 done
13089 done
13090 done
13091IFS=$as_save_IFS
13092 if test -z "$ac_cv_path_SED"; then
13093 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13094 fi
13095else
13096 ac_cv_path_SED=$SED
13097fi
13098
13099fi
13100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13101$as_echo "$ac_cv_path_SED" >&6; }
13102 SED="$ac_cv_path_SED"
13103 rm -f conftest.sed
13104
13105
13106 # Set the 'development' global.
13107 . $srcdir/../bfd/development.sh
13108
13109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13110$as_echo_n "checking for ANSI C header files... " >&6; }
13111if ${ac_cv_header_stdc+:} false; then :
13112 $as_echo_n "(cached) " >&6
13113else
13114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13115/* end confdefs.h. */
13116#include <stdlib.h>
13117#include <stdarg.h>
13118#include <string.h>
13119#include <float.h>
13120
13121int
13122main ()
13123{
13124
13125 ;
13126 return 0;
13127}
13128_ACEOF
13129if ac_fn_c_try_compile "$LINENO"; then :
13130 ac_cv_header_stdc=yes
13131else
13132 ac_cv_header_stdc=no
13133fi
13134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13135
13136if test $ac_cv_header_stdc = yes; then
13137 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13139/* end confdefs.h. */
13140#include <string.h>
13141
13142_ACEOF
13143if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13144 $EGREP "memchr" >/dev/null 2>&1; then :
13145
13146else
13147 ac_cv_header_stdc=no
13148fi
13149rm -f conftest*
13150
13151fi
13152
13153if test $ac_cv_header_stdc = yes; then
13154 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13156/* end confdefs.h. */
13157#include <stdlib.h>
13158
13159_ACEOF
13160if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13161 $EGREP "free" >/dev/null 2>&1; then :
13162
13163else
13164 ac_cv_header_stdc=no
13165fi
13166rm -f conftest*
13167
13168fi
13169
13170if test $ac_cv_header_stdc = yes; then
13171 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13172 if test "$cross_compiling" = yes; then :
13173 :
13174else
13175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13176/* end confdefs.h. */
13177#include <ctype.h>
13178#include <stdlib.h>
13179#if ((' ' & 0x0FF) == 0x020)
13180# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13181# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13182#else
13183# define ISLOWER(c) \
13184 (('a' <= (c) && (c) <= 'i') \
13185 || ('j' <= (c) && (c) <= 'r') \
13186 || ('s' <= (c) && (c) <= 'z'))
13187# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13188#endif
13189
13190#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13191int
13192main ()
13193{
13194 int i;
13195 for (i = 0; i < 256; i++)
13196 if (XOR (islower (i), ISLOWER (i))
13197 || toupper (i) != TOUPPER (i))
13198 return 2;
13199 return 0;
13200}
13201_ACEOF
13202if ac_fn_c_try_run "$LINENO"; then :
13203
13204else
13205 ac_cv_header_stdc=no
13206fi
13207rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13208 conftest.$ac_objext conftest.beam conftest.$ac_ext
13209fi
13210
13211fi
13212fi
13213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
13214$as_echo "$ac_cv_header_stdc" >&6; }
13215if test $ac_cv_header_stdc = yes; then
13216
13217$as_echo "#define STDC_HEADERS 1" >>confdefs.h
13218
13219fi
13220
13221 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13222# for constant arguments. Useless!
13223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13224$as_echo_n "checking for working alloca.h... " >&6; }
13225if ${ac_cv_working_alloca_h+:} false; then :
13226 $as_echo_n "(cached) " >&6
13227else
13228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13229/* end confdefs.h. */
13230#include <alloca.h>
13231int
13232main ()
13233{
13234char *p = (char *) alloca (2 * sizeof (int));
13235 if (p) return 0;
13236 ;
13237 return 0;
13238}
13239_ACEOF
13240if ac_fn_c_try_link "$LINENO"; then :
13241 ac_cv_working_alloca_h=yes
13242else
13243 ac_cv_working_alloca_h=no
13244fi
13245rm -f core conftest.err conftest.$ac_objext \
13246 conftest$ac_exeext conftest.$ac_ext
13247fi
13248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13249$as_echo "$ac_cv_working_alloca_h" >&6; }
13250if test $ac_cv_working_alloca_h = yes; then
13251
13252$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
13253
13254fi
13255
13256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13257$as_echo_n "checking for alloca... " >&6; }
13258if ${ac_cv_func_alloca_works+:} false; then :
13259 $as_echo_n "(cached) " >&6
13260else
13261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13262/* end confdefs.h. */
13263#ifdef __GNUC__
13264# define alloca __builtin_alloca
13265#else
13266# ifdef _MSC_VER
13267# include <malloc.h>
13268# define alloca _alloca
13269# else
13270# ifdef HAVE_ALLOCA_H
13271# include <alloca.h>
13272# else
13273# ifdef _AIX
13274 #pragma alloca
13275# else
13276# ifndef alloca /* predefined by HP cc +Olibcalls */
13277void *alloca (size_t);
13278# endif
13279# endif
13280# endif
13281# endif
13282#endif
13283
13284int
13285main ()
13286{
13287char *p = (char *) alloca (1);
13288 if (p) return 0;
13289 ;
13290 return 0;
13291}
13292_ACEOF
13293if ac_fn_c_try_link "$LINENO"; then :
13294 ac_cv_func_alloca_works=yes
13295else
13296 ac_cv_func_alloca_works=no
13297fi
13298rm -f core conftest.err conftest.$ac_objext \
13299 conftest$ac_exeext conftest.$ac_ext
13300fi
13301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13302$as_echo "$ac_cv_func_alloca_works" >&6; }
13303
13304if test $ac_cv_func_alloca_works = yes; then
13305
13306$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13307
13308else
13309 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13310# that cause trouble. Some versions do not even contain alloca or
13311# contain a buggy version. If you still want to use their alloca,
13312# use ar to extract alloca.o from them instead of compiling alloca.c.
13313
13314ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
13315
13316$as_echo "#define C_ALLOCA 1" >>confdefs.h
13317
13318
13319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13320$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
13321if ${ac_cv_os_cray+:} false; then :
13322 $as_echo_n "(cached) " >&6
13323else
13324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13325/* end confdefs.h. */
13326#if defined CRAY && ! defined CRAY2
13327webecray
13328#else
13329wenotbecray
13330#endif
13331
13332_ACEOF
13333if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13334 $EGREP "webecray" >/dev/null 2>&1; then :
13335 ac_cv_os_cray=yes
13336else
13337 ac_cv_os_cray=no
13338fi
13339rm -f conftest*
13340
13341fi
13342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13343$as_echo "$ac_cv_os_cray" >&6; }
13344if test $ac_cv_os_cray = yes; then
13345 for ac_func in _getb67 GETB67 getb67; do
13346 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13347ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13348if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13349
13350cat >>confdefs.h <<_ACEOF
13351#define CRAY_STACKSEG_END $ac_func
13352_ACEOF
13353
13354 break
13355fi
13356
13357 done
13358fi
13359
13360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13361$as_echo_n "checking stack direction for C alloca... " >&6; }
13362if ${ac_cv_c_stack_direction+:} false; then :
13363 $as_echo_n "(cached) " >&6
13364else
13365 if test "$cross_compiling" = yes; then :
13366 ac_cv_c_stack_direction=0
13367else
13368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13369/* end confdefs.h. */
13370$ac_includes_default
13371int
13372find_stack_direction (int *addr, int depth)
13373{
13374 int dir, dummy = 0;
13375 if (! addr)
13376 addr = &dummy;
13377 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
13378 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
13379 return dir + dummy;
13380}
13381
13382int
13383main (int argc, char **argv)
13384{
13385 return find_stack_direction (0, argc + !argv + 20) < 0;
13386}
13387_ACEOF
13388if ac_fn_c_try_run "$LINENO"; then :
13389 ac_cv_c_stack_direction=1
13390else
13391 ac_cv_c_stack_direction=-1
13392fi
13393rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13394 conftest.$ac_objext conftest.beam conftest.$ac_ext
13395fi
13396
13397fi
13398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13399$as_echo "$ac_cv_c_stack_direction" >&6; }
13400cat >>confdefs.h <<_ACEOF
13401#define STACK_DIRECTION $ac_cv_c_stack_direction
13402_ACEOF
13403
13404
13405fi
13406
13407
13408 WIN32APILIBS=
13409 case ${host} in
13410 *mingw32*)
13411
13412$as_echo "#define USE_WIN32API 1" >>confdefs.h
13413
13414 WIN32APILIBS="-lws2_32"
13415 ;;
13416 esac
13417
13418
13419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13420$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13421if ${am_cv_langinfo_codeset+:} false; then :
13422 $as_echo_n "(cached) " >&6
13423else
13424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13425/* end confdefs.h. */
13426#include <langinfo.h>
13427int
13428main ()
13429{
13430char* cs = nl_langinfo(CODESET);
13431 ;
13432 return 0;
13433}
13434_ACEOF
13435if ac_fn_c_try_link "$LINENO"; then :
13436 am_cv_langinfo_codeset=yes
13437else
13438 am_cv_langinfo_codeset=no
13439fi
13440rm -f core conftest.err conftest.$ac_objext \
13441 conftest$ac_exeext conftest.$ac_ext
13442
13443fi
13444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13445$as_echo "$am_cv_langinfo_codeset" >&6; }
13446 if test $am_cv_langinfo_codeset = yes; then
13447
13448$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13449
13450 fi
13451
13452
13453 for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/un.h sys/wait.h thread_db.h wait.h termios.h dlfcn.h linux/elf.h proc_service.h poll.h sys/poll.h sys/select.h
13454do :
13455 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13456ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13457if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13458 cat >>confdefs.h <<_ACEOF
13459#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13460_ACEOF
13461
13462fi
13463
13464done
13465
13466
13467
13468for ac_func in getpagesize
13469do :
13470 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
13471if test "x$ac_cv_func_getpagesize" = xyes; then :
13472 cat >>confdefs.h <<_ACEOF
13473#define HAVE_GETPAGESIZE 1
13474_ACEOF
13475
13476fi
13477done
13478
13479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
13480$as_echo_n "checking for working mmap... " >&6; }
13481if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
13482 $as_echo_n "(cached) " >&6
13483else
13484 if test "$cross_compiling" = yes; then :
13485 ac_cv_func_mmap_fixed_mapped=no
13486else
13487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13488/* end confdefs.h. */
13489$ac_includes_default
13490/* malloc might have been renamed as rpl_malloc. */
13491#undef malloc
13492
13493/* Thanks to Mike Haertel and Jim Avera for this test.
13494 Here is a matrix of mmap possibilities:
13495 mmap private not fixed
13496 mmap private fixed at somewhere currently unmapped
13497 mmap private fixed at somewhere already mapped
13498 mmap shared not fixed
13499 mmap shared fixed at somewhere currently unmapped
13500 mmap shared fixed at somewhere already mapped
13501 For private mappings, we should verify that changes cannot be read()
13502 back from the file, nor mmap's back from the file at a different
13503 address. (There have been systems where private was not correctly
13504 implemented like the infamous i386 svr4.0, and systems where the
13505 VM page cache was not coherent with the file system buffer cache
13506 like early versions of FreeBSD and possibly contemporary NetBSD.)
13507 For shared mappings, we should conversely verify that changes get
13508 propagated back to all the places they're supposed to be.
13509
13510 Grep wants private fixed already mapped.
13511 The main things grep needs to know about mmap are:
13512 * does it exist and is it safe to write into the mmap'd area
13513 * how to use it (BSD variants) */
13514
13515#include <fcntl.h>
13516#include <sys/mman.h>
13517
13518#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
13519char *malloc ();
13520#endif
13521
13522/* This mess was copied from the GNU getpagesize.h. */
13523#ifndef HAVE_GETPAGESIZE
13524# ifdef _SC_PAGESIZE
13525# define getpagesize() sysconf(_SC_PAGESIZE)
13526# else /* no _SC_PAGESIZE */
13527# ifdef HAVE_SYS_PARAM_H
13528# include <sys/param.h>
13529# ifdef EXEC_PAGESIZE
13530# define getpagesize() EXEC_PAGESIZE
13531# else /* no EXEC_PAGESIZE */
13532# ifdef NBPG
13533# define getpagesize() NBPG * CLSIZE
13534# ifndef CLSIZE
13535# define CLSIZE 1
13536# endif /* no CLSIZE */
13537# else /* no NBPG */
13538# ifdef NBPC
13539# define getpagesize() NBPC
13540# else /* no NBPC */
13541# ifdef PAGESIZE
13542# define getpagesize() PAGESIZE
13543# endif /* PAGESIZE */
13544# endif /* no NBPC */
13545# endif /* no NBPG */
13546# endif /* no EXEC_PAGESIZE */
13547# else /* no HAVE_SYS_PARAM_H */
13548# define getpagesize() 8192 /* punt totally */
13549# endif /* no HAVE_SYS_PARAM_H */
13550# endif /* no _SC_PAGESIZE */
13551
13552#endif /* no HAVE_GETPAGESIZE */
13553
13554int
13555main ()
13556{
13557 char *data, *data2, *data3;
13558 const char *cdata2;
13559 int i, pagesize;
13560 int fd, fd2;
13561
13562 pagesize = getpagesize ();
13563
13564 /* First, make a file with some known garbage in it. */
13565 data = (char *) malloc (pagesize);
13566 if (!data)
13567 return 1;
13568 for (i = 0; i < pagesize; ++i)
13569 *(data + i) = rand ();
13570 umask (0);
13571 fd = creat ("conftest.mmap", 0600);
13572 if (fd < 0)
13573 return 2;
13574 if (write (fd, data, pagesize) != pagesize)
13575 return 3;
13576 close (fd);
13577
13578 /* Next, check that the tail of a page is zero-filled. File must have
13579 non-zero length, otherwise we risk SIGBUS for entire page. */
13580 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
13581 if (fd2 < 0)
13582 return 4;
13583 cdata2 = "";
13584 if (write (fd2, cdata2, 1) != 1)
13585 return 5;
13586 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
13587 if (data2 == MAP_FAILED)
13588 return 6;
13589 for (i = 0; i < pagesize; ++i)
13590 if (*(data2 + i))
13591 return 7;
13592 close (fd2);
13593 if (munmap (data2, pagesize))
13594 return 8;
13595
13596 /* Next, try to mmap the file at a fixed address which already has
13597 something else allocated at it. If we can, also make sure that
13598 we see the same garbage. */
13599 fd = open ("conftest.mmap", O_RDWR);
13600 if (fd < 0)
13601 return 9;
13602 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
13603 MAP_PRIVATE | MAP_FIXED, fd, 0L))
13604 return 10;
13605 for (i = 0; i < pagesize; ++i)
13606 if (*(data + i) != *(data2 + i))
13607 return 11;
13608
13609 /* Finally, make sure that changes to the mapped area do not
13610 percolate back to the file as seen by read(). (This is a bug on
13611 some variants of i386 svr4.0.) */
13612 for (i = 0; i < pagesize; ++i)
13613 *(data2 + i) = *(data2 + i) + 1;
13614 data3 = (char *) malloc (pagesize);
13615 if (!data3)
13616 return 12;
13617 if (read (fd, data3, pagesize) != pagesize)
13618 return 13;
13619 for (i = 0; i < pagesize; ++i)
13620 if (*(data + i) != *(data3 + i))
13621 return 14;
13622 close (fd);
13623 return 0;
13624}
13625_ACEOF
13626if ac_fn_c_try_run "$LINENO"; then :
13627 ac_cv_func_mmap_fixed_mapped=yes
13628else
13629 ac_cv_func_mmap_fixed_mapped=no
13630fi
13631rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13632 conftest.$ac_objext conftest.beam conftest.$ac_ext
13633fi
13634
13635fi
13636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
13637$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
13638if test $ac_cv_func_mmap_fixed_mapped = yes; then
13639
13640$as_echo "#define HAVE_MMAP 1" >>confdefs.h
13641
13642fi
13643rm -f conftest.mmap conftest.txt
13644
13645 for ac_header in vfork.h
13646do :
13647 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
13648if test "x$ac_cv_header_vfork_h" = xyes; then :
13649 cat >>confdefs.h <<_ACEOF
13650#define HAVE_VFORK_H 1
13651_ACEOF
13652
13653fi
13654
13655done
13656
13657for ac_func in fork vfork
13658do :
13659 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13660ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13661if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13662 cat >>confdefs.h <<_ACEOF
13663#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13664_ACEOF
13665
13666fi
13667done
13668
13669if test "x$ac_cv_func_fork" = xyes; then
13670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13671$as_echo_n "checking for working fork... " >&6; }
13672if ${ac_cv_func_fork_works+:} false; then :
13673 $as_echo_n "(cached) " >&6
13674else
13675 if test "$cross_compiling" = yes; then :
13676 ac_cv_func_fork_works=cross
13677else
13678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13679/* end confdefs.h. */
13680$ac_includes_default
13681int
13682main ()
13683{
13684
13685 /* By Ruediger Kuhlmann. */
13686 return fork () < 0;
13687
13688 ;
13689 return 0;
13690}
13691_ACEOF
13692if ac_fn_c_try_run "$LINENO"; then :
13693 ac_cv_func_fork_works=yes
13694else
13695 ac_cv_func_fork_works=no
13696fi
13697rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13698 conftest.$ac_objext conftest.beam conftest.$ac_ext
13699fi
13700
13701fi
13702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13703$as_echo "$ac_cv_func_fork_works" >&6; }
13704
13705else
13706 ac_cv_func_fork_works=$ac_cv_func_fork
13707fi
13708if test "x$ac_cv_func_fork_works" = xcross; then
13709 case $host in
13710 *-*-amigaos* | *-*-msdosdjgpp*)
13711 # Override, as these systems have only a dummy fork() stub
13712 ac_cv_func_fork_works=no
13713 ;;
13714 *)
13715 ac_cv_func_fork_works=yes
13716 ;;
13717 esac
13718 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13719$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
13720fi
13721ac_cv_func_vfork_works=$ac_cv_func_vfork
13722if test "x$ac_cv_func_vfork" = xyes; then
13723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13724$as_echo_n "checking for working vfork... " >&6; }
13725if ${ac_cv_func_vfork_works+:} false; then :
13726 $as_echo_n "(cached) " >&6
13727else
13728 if test "$cross_compiling" = yes; then :
13729 ac_cv_func_vfork_works=cross
13730else
13731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13732/* end confdefs.h. */
13733/* Thanks to Paul Eggert for this test. */
13734$ac_includes_default
13735#include <sys/wait.h>
13736#ifdef HAVE_VFORK_H
13737# include <vfork.h>
13738#endif
13739/* On some sparc systems, changes by the child to local and incoming
13740 argument registers are propagated back to the parent. The compiler
13741 is told about this with #include <vfork.h>, but some compilers
13742 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13743 static variable whose address is put into a register that is
13744 clobbered by the vfork. */
13745static void
13746#ifdef __cplusplus
13747sparc_address_test (int arg)
13748# else
13749sparc_address_test (arg) int arg;
13750#endif
13751{
13752 static pid_t child;
13753 if (!child) {
13754 child = vfork ();
13755 if (child < 0) {
13756 perror ("vfork");
13757 _exit(2);
13758 }
13759 if (!child) {
13760 arg = getpid();
13761 write(-1, "", 0);
13762 _exit (arg);
13763 }
13764 }
13765}
13766
13767int
13768main ()
13769{
13770 pid_t parent = getpid ();
13771 pid_t child;
13772
13773 sparc_address_test (0);
13774
13775 child = vfork ();
13776
13777 if (child == 0) {
13778 /* Here is another test for sparc vfork register problems. This
13779 test uses lots of local variables, at least as many local
13780 variables as main has allocated so far including compiler
13781 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13782 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13783 reuse the register of parent for one of the local variables,
13784 since it will think that parent can't possibly be used any more
13785 in this routine. Assigning to the local variable will thus
13786 munge parent in the parent process. */
13787 pid_t
13788 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13789 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13790 /* Convince the compiler that p..p7 are live; otherwise, it might
13791 use the same hardware register for all 8 local variables. */
13792 if (p != p1 || p != p2 || p != p3 || p != p4
13793 || p != p5 || p != p6 || p != p7)
13794 _exit(1);
13795
13796 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13797 from child file descriptors. If the child closes a descriptor
13798 before it execs or exits, this munges the parent's descriptor
13799 as well. Test for this by closing stdout in the child. */
13800 _exit(close(fileno(stdout)) != 0);
13801 } else {
13802 int status;
13803 struct stat st;
13804
13805 while (wait(&status) != child)
13806 ;
13807 return (
13808 /* Was there some problem with vforking? */
13809 child < 0
13810
13811 /* Did the child fail? (This shouldn't happen.) */
13812 || status
13813
13814 /* Did the vfork/compiler bug occur? */
13815 || parent != getpid()
13816
13817 /* Did the file descriptor bug occur? */
13818 || fstat(fileno(stdout), &st) != 0
13819 );
13820 }
13821}
13822_ACEOF
13823if ac_fn_c_try_run "$LINENO"; then :
13824 ac_cv_func_vfork_works=yes
13825else
13826 ac_cv_func_vfork_works=no
13827fi
13828rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13829 conftest.$ac_objext conftest.beam conftest.$ac_ext
13830fi
13831
13832fi
13833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13834$as_echo "$ac_cv_func_vfork_works" >&6; }
13835
13836fi;
13837if test "x$ac_cv_func_fork_works" = xcross; then
13838 ac_cv_func_vfork_works=$ac_cv_func_vfork
13839 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13840$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
13841fi
13842
13843if test "x$ac_cv_func_vfork_works" = xyes; then
13844
13845$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
13846
13847else
13848
13849$as_echo "#define vfork fork" >>confdefs.h
13850
13851fi
13852if test "x$ac_cv_func_fork_works" = xyes; then
13853
13854$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
13855
13856fi
13857
13858 for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \
13859 ptrace64 sbrk setns sigaltstack sigprocmask \
13860 setpgid setpgrp getrusage getauxval
13861do :
13862 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13863ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13864if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13865 cat >>confdefs.h <<_ACEOF
13866#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13867_ACEOF
13868
13869fi
13870done
13871
13872
13873 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13874if test "x$ac_cv_have_decl_strstr" = xyes; then :
13875 ac_have_decl=1
13876else
13877 ac_have_decl=0
13878fi
13879
13880cat >>confdefs.h <<_ACEOF
13881#define HAVE_DECL_STRSTR $ac_have_decl
13882_ACEOF
13883
13884
13885 # ----------------------- #
13886 # Checks for structures. #
13887 # ----------------------- #
13888
13889 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
13890if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
13891
13892cat >>confdefs.h <<_ACEOF
13893#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13894_ACEOF
13895
13896
13897fi
13898ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
13899if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
13900
13901cat >>confdefs.h <<_ACEOF
13902#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13903_ACEOF
13904
13905
13906fi
13907
13908
13909 # On FreeBSD we need libutil for the kinfo_get* functions. On
13910 # GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
13911 # Figure out which one to use.
13912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
13913$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
13914if ${ac_cv_search_kinfo_getfile+:} false; then :
13915 $as_echo_n "(cached) " >&6
13916else
13917 ac_func_search_save_LIBS=$LIBS
13918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13919/* end confdefs.h. */
13920
13921/* Override any GCC internal prototype to avoid an error.
13922 Use char because int might match the return type of a GCC
13923 builtin and then its argument prototype would still apply. */
13924#ifdef __cplusplus
13925extern "C"
13926#endif
13927char kinfo_getfile ();
13928int
13929main ()
13930{
13931return kinfo_getfile ();
13932 ;
13933 return 0;
13934}
13935_ACEOF
13936for ac_lib in '' util util-freebsd; do
13937 if test -z "$ac_lib"; then
13938 ac_res="none required"
13939 else
13940 ac_res=-l$ac_lib
13941 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13942 fi
13943 if ac_fn_c_try_link "$LINENO"; then :
13944 ac_cv_search_kinfo_getfile=$ac_res
13945fi
13946rm -f core conftest.err conftest.$ac_objext \
13947 conftest$ac_exeext
13948 if ${ac_cv_search_kinfo_getfile+:} false; then :
13949 break
13950fi
13951done
13952if ${ac_cv_search_kinfo_getfile+:} false; then :
13953
13954else
13955 ac_cv_search_kinfo_getfile=no
13956fi
13957rm conftest.$ac_ext
13958LIBS=$ac_func_search_save_LIBS
13959fi
13960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
13961$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
13962ac_res=$ac_cv_search_kinfo_getfile
13963if test "$ac_res" != no; then :
13964 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13965
13966fi
13967
13968
13969 # Define HAVE_KINFO_GETFILE if kinfo_getfile is available.
13970 for ac_func in kinfo_getfile
13971do :
13972 ac_fn_c_check_func "$LINENO" "kinfo_getfile" "ac_cv_func_kinfo_getfile"
13973if test "x$ac_cv_func_kinfo_getfile" = xyes; then :
13974 cat >>confdefs.h <<_ACEOF
13975#define HAVE_KINFO_GETFILE 1
13976_ACEOF
13977
13978fi
13979done
13980
13981
13982 # Check for std::thread. This does not work on some platforms, like
13983 # mingw and DJGPP.
13984 ac_ext=cpp
13985ac_cpp='$CXXCPP $CPPFLAGS'
13986ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13987ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13988ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13989
13990
13991
13992
13993
13994ac_ext=c
13995ac_cpp='$CPP $CPPFLAGS'
13996ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13997ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13998ac_compiler_gnu=$ac_cv_c_compiler_gnu
13999
14000ax_pthread_ok=no
14001
14002# We used to check for pthread.h first, but this fails if pthread.h
14003# requires special compiler flags (e.g. on Tru64 or Sequent).
14004# It gets checked for in the link test anyway.
14005
14006# First of all, check if the user has set any of the PTHREAD_LIBS,
14007# etcetera environment variables, and if threads linking works using
14008# them:
14009if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
14010 ax_pthread_save_CC="$CC"
14011 ax_pthread_save_CFLAGS="$CFLAGS"
14012 ax_pthread_save_LIBS="$LIBS"
14013 if test "x$PTHREAD_CC" != "x"; then :
14014 CC="$PTHREAD_CC"
14015fi
14016 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14017 LIBS="$PTHREAD_LIBS $LIBS"
14018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
14019$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
14020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14021/* end confdefs.h. */
14022
14023/* Override any GCC internal prototype to avoid an error.
14024 Use char because int might match the return type of a GCC
14025 builtin and then its argument prototype would still apply. */
14026#ifdef __cplusplus
14027extern "C"
14028#endif
14029char pthread_join ();
14030int
14031main ()
14032{
14033return pthread_join ();
14034 ;
14035 return 0;
14036}
14037_ACEOF
14038if ac_fn_c_try_link "$LINENO"; then :
14039 ax_pthread_ok=yes
14040fi
14041rm -f core conftest.err conftest.$ac_objext \
14042 conftest$ac_exeext conftest.$ac_ext
14043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
14044$as_echo "$ax_pthread_ok" >&6; }
14045 if test "x$ax_pthread_ok" = "xno"; then
14046 PTHREAD_LIBS=""
14047 PTHREAD_CFLAGS=""
14048 fi
14049 CC="$ax_pthread_save_CC"
14050 CFLAGS="$ax_pthread_save_CFLAGS"
14051 LIBS="$ax_pthread_save_LIBS"
14052fi
14053
14054# We must check for the threads library under a number of different
14055# names; the ordering is very important because some systems
14056# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
14057# libraries is broken (non-POSIX).
14058
14059# Create a list of thread flags to try. Items starting with a "-" are
14060# C compiler flags, and other items are library names, except for "none"
14061# which indicates that we try without any flags at all, and "pthread-config"
14062# which is a program returning the flags for the Pth emulation library.
14063
14064ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
14065
14066# The ordering *is* (sometimes) important. Some notes on the
14067# individual items follow:
14068
14069# pthreads: AIX (must check this before -lpthread)
14070# none: in case threads are in libc; should be tried before -Kthread and
14071# other compiler flags to prevent continual compiler warnings
14072# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
14073# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
14074# (Note: HP C rejects this with "bad form for `-t' option")
14075# -pthreads: Solaris/gcc (Note: HP C also rejects)
14076# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
14077# doesn't hurt to check since this sometimes defines pthreads and
14078# -D_REENTRANT too), HP C (must be checked before -lpthread, which
14079# is present but should not be used directly; and before -mthreads,
14080# because the compiler interprets this as "-mt" + "-hreads")
14081# -mthreads: Mingw32/gcc, Lynx/gcc
14082# pthread: Linux, etcetera
14083# --thread-safe: KAI C++
14084# pthread-config: use pthread-config program (for GNU Pth library)
14085
14086case $host_os in
14087
14088 freebsd*)
14089
14090 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
14091 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
14092
14093 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
14094 ;;
14095
14096 hpux*)
14097
14098 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
14099 # multi-threading and also sets -lpthread."
14100
14101 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
14102 ;;
14103
14104 openedition*)
14105
14106 # IBM z/OS requires a feature-test macro to be defined in order to
14107 # enable POSIX threads at all, so give the user a hint if this is
14108 # not set. (We don't define these ourselves, as they can affect
14109 # other portions of the system API in unpredictable ways.)
14110
14111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14112/* end confdefs.h. */
14113
14114# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
14115 AX_PTHREAD_ZOS_MISSING
14116# endif
14117
14118_ACEOF
14119if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14120 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
14121 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
14122$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
14123fi
14124rm -f conftest*
14125
14126 ;;
14127
14128 solaris*)
14129
14130 # On Solaris (at least, for some versions), libc contains stubbed
14131 # (non-functional) versions of the pthreads routines, so link-based
14132 # tests will erroneously succeed. (N.B.: The stubs are missing
14133 # pthread_cleanup_push, or rather a function called by this macro,
14134 # so we could check for that, but who knows whether they'll stub
14135 # that too in a future libc.) So we'll check first for the
14136 # standard Solaris way of linking pthreads (-mt -lpthread).
14137
14138 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
14139 ;;
14140esac
14141
14142# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
14143
14144if test "x$GCC" = "xyes"; then :
14145 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
14146fi
14147
14148# The presence of a feature test macro requesting re-entrant function
14149# definitions is, on some systems, a strong hint that pthreads support is
14150# correctly enabled
14151
14152case $host_os in
14153 darwin* | hpux* | linux* | osf* | solaris*)
14154 ax_pthread_check_macro="_REENTRANT"
14155 ;;
14156
14157 aix*)
14158 ax_pthread_check_macro="_THREAD_SAFE"
14159 ;;
14160
14161 *)
14162 ax_pthread_check_macro="--"
14163 ;;
14164esac
14165if test "x$ax_pthread_check_macro" = "x--"; then :
14166 ax_pthread_check_cond=0
14167else
14168 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
14169fi
14170
14171# Are we compiling with Clang?
14172
14173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
14174$as_echo_n "checking whether $CC is Clang... " >&6; }
14175if ${ax_cv_PTHREAD_CLANG+:} false; then :
14176 $as_echo_n "(cached) " >&6
14177else
14178 ax_cv_PTHREAD_CLANG=no
14179 # Note that Autoconf sets GCC=yes for Clang as well as GCC
14180 if test "x$GCC" = "xyes"; then
14181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14182/* end confdefs.h. */
14183/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
14184# if defined(__clang__) && defined(__llvm__)
14185 AX_PTHREAD_CC_IS_CLANG
14186# endif
14187
14188_ACEOF
14189if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14190 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
14191 ax_cv_PTHREAD_CLANG=yes
14192fi
14193rm -f conftest*
14194
14195 fi
14196
14197fi
14198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
14199$as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
14200ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
14201
14202ax_pthread_clang_warning=no
14203
14204# Clang needs special handling, because older versions handle the -pthread
14205# option in a rather... idiosyncratic way
14206
14207if test "x$ax_pthread_clang" = "xyes"; then
14208
14209 # Clang takes -pthread; it has never supported any other flag
14210
14211 # (Note 1: This will need to be revisited if a system that Clang
14212 # supports has POSIX threads in a separate library. This tends not
14213 # to be the way of modern systems, but it's conceivable.)
14214
14215 # (Note 2: On some systems, notably Darwin, -pthread is not needed
14216 # to get POSIX threads support; the API is always present and
14217 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
14218 # -pthread does define _REENTRANT, and while the Darwin headers
14219 # ignore this macro, third-party headers might not.)
14220
14221 PTHREAD_CFLAGS="-pthread"
14222 PTHREAD_LIBS=
14223
14224 ax_pthread_ok=yes
14225
14226 # However, older versions of Clang make a point of warning the user
14227 # that, in an invocation where only linking and no compilation is
14228 # taking place, the -pthread option has no effect ("argument unused
14229 # during compilation"). They expect -pthread to be passed in only
14230 # when source code is being compiled.
14231 #
14232 # Problem is, this is at odds with the way Automake and most other
14233 # C build frameworks function, which is that the same flags used in
14234 # compilation (CFLAGS) are also used in linking. Many systems
14235 # supported by AX_PTHREAD require exactly this for POSIX threads
14236 # support, and in fact it is often not straightforward to specify a
14237 # flag that is used only in the compilation phase and not in
14238 # linking. Such a scenario is extremely rare in practice.
14239 #
14240 # Even though use of the -pthread flag in linking would only print
14241 # a warning, this can be a nuisance for well-run software projects
14242 # that build with -Werror. So if the active version of Clang has
14243 # this misfeature, we search for an option to squash it.
14244
14245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
14246$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
14247if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
14248 $as_echo_n "(cached) " >&6
14249else
14250 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
14251 # Create an alternate version of $ac_link that compiles and
14252 # links in two steps (.c -> .o, .o -> exe) instead of one
14253 # (.c -> exe), because the warning occurs only in the second
14254 # step
14255 ax_pthread_save_ac_link="$ac_link"
14256 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
14257 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
14258 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
14259 ax_pthread_save_CFLAGS="$CFLAGS"
14260 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
14261 if test "x$ax_pthread_try" = "xunknown"; then :
14262 break
14263fi
14264 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
14265 ac_link="$ax_pthread_save_ac_link"
14266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14267/* end confdefs.h. */
14268int main(void){return 0;}
14269_ACEOF
14270if ac_fn_c_try_link "$LINENO"; then :
14271 ac_link="$ax_pthread_2step_ac_link"
14272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14273/* end confdefs.h. */
14274int main(void){return 0;}
14275_ACEOF
14276if ac_fn_c_try_link "$LINENO"; then :
14277 break
14278fi
14279rm -f core conftest.err conftest.$ac_objext \
14280 conftest$ac_exeext conftest.$ac_ext
14281
14282fi
14283rm -f core conftest.err conftest.$ac_objext \
14284 conftest$ac_exeext conftest.$ac_ext
14285 done
14286 ac_link="$ax_pthread_save_ac_link"
14287 CFLAGS="$ax_pthread_save_CFLAGS"
14288 if test "x$ax_pthread_try" = "x"; then :
14289 ax_pthread_try=no
14290fi
14291 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
14292
14293fi
14294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
14295$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
14296
14297 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
14298 no | unknown) ;;
14299 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
14300 esac
14301
14302fi # $ax_pthread_clang = yes
14303
14304if test "x$ax_pthread_ok" = "xno"; then
14305for ax_pthread_try_flag in $ax_pthread_flags; do
14306
14307 case $ax_pthread_try_flag in
14308 none)
14309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
14310$as_echo_n "checking whether pthreads work without any flags... " >&6; }
14311 ;;
14312
14313 -mt,pthread)
14314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
14315$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
14316 PTHREAD_CFLAGS="-mt"
14317 PTHREAD_LIBS="-lpthread"
14318 ;;
14319
14320 -*)
14321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
14322$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
14323 PTHREAD_CFLAGS="$ax_pthread_try_flag"
14324 ;;
14325
14326 pthread-config)
14327 # Extract the first word of "pthread-config", so it can be a program name with args.
14328set dummy pthread-config; ac_word=$2
14329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14330$as_echo_n "checking for $ac_word... " >&6; }
14331if ${ac_cv_prog_ax_pthread_config+:} false; then :
14332 $as_echo_n "(cached) " >&6
14333else
14334 if test -n "$ax_pthread_config"; then
14335 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
14336else
14337as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14338for as_dir in $PATH
14339do
14340 IFS=$as_save_IFS
14341 test -z "$as_dir" && as_dir=.
14342 for ac_exec_ext in '' $ac_executable_extensions; do
14343 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14344 ac_cv_prog_ax_pthread_config="yes"
14345 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14346 break 2
14347 fi
14348done
14349 done
14350IFS=$as_save_IFS
14351
14352 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
14353fi
14354fi
14355ax_pthread_config=$ac_cv_prog_ax_pthread_config
14356if test -n "$ax_pthread_config"; then
14357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
14358$as_echo "$ax_pthread_config" >&6; }
14359else
14360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14361$as_echo "no" >&6; }
14362fi
14363
14364
14365 if test "x$ax_pthread_config" = "xno"; then :
14366 continue
14367fi
14368 PTHREAD_CFLAGS="`pthread-config --cflags`"
14369 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
14370 ;;
14371
14372 *)
14373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
14374$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
14375 PTHREAD_LIBS="-l$ax_pthread_try_flag"
14376 ;;
14377 esac
14378
14379 ax_pthread_save_CFLAGS="$CFLAGS"
14380 ax_pthread_save_LIBS="$LIBS"
14381 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14382 LIBS="$PTHREAD_LIBS $LIBS"
14383
14384 # Check for various functions. We must include pthread.h,
14385 # since some functions may be macros. (On the Sequent, we
14386 # need a special flag -Kthread to make this header compile.)
14387 # We check for pthread_join because it is in -lpthread on IRIX
14388 # while pthread_create is in libc. We check for pthread_attr_init
14389 # due to DEC craziness with -lpthreads. We check for
14390 # pthread_cleanup_push because it is one of the few pthread
14391 # functions on Solaris that doesn't have a non-functional libc stub.
14392 # We try pthread_create on general principles.
14393
14394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14395/* end confdefs.h. */
14396#include <pthread.h>
14397# if $ax_pthread_check_cond
14398# error "$ax_pthread_check_macro must be defined"
14399# endif
14400 static void routine(void *a) { a = 0; }
14401 static void *start_routine(void *a) { return a; }
14402int
14403main ()
14404{
14405pthread_t th; pthread_attr_t attr;
14406 pthread_create(&th, 0, start_routine, 0);
14407 pthread_join(th, 0);
14408 pthread_attr_init(&attr);
14409 pthread_cleanup_push(routine, 0);
14410 pthread_cleanup_pop(0) /* ; */
14411 ;
14412 return 0;
14413}
14414_ACEOF
14415if ac_fn_c_try_link "$LINENO"; then :
14416 ax_pthread_ok=yes
14417fi
14418rm -f core conftest.err conftest.$ac_objext \
14419 conftest$ac_exeext conftest.$ac_ext
14420
14421 CFLAGS="$ax_pthread_save_CFLAGS"
14422 LIBS="$ax_pthread_save_LIBS"
14423
14424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
14425$as_echo "$ax_pthread_ok" >&6; }
14426 if test "x$ax_pthread_ok" = "xyes"; then :
14427 break
14428fi
14429
14430 PTHREAD_LIBS=""
14431 PTHREAD_CFLAGS=""
14432done
14433fi
14434
14435# Various other checks:
14436if test "x$ax_pthread_ok" = "xyes"; then
14437 ax_pthread_save_CFLAGS="$CFLAGS"
14438 ax_pthread_save_LIBS="$LIBS"
14439 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14440 LIBS="$PTHREAD_LIBS $LIBS"
14441
14442 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
14443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
14444$as_echo_n "checking for joinable pthread attribute... " >&6; }
14445if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
14446 $as_echo_n "(cached) " >&6
14447else
14448 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
14449 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
14450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14451/* end confdefs.h. */
14452#include <pthread.h>
14453int
14454main ()
14455{
14456int attr = $ax_pthread_attr; return attr /* ; */
14457 ;
14458 return 0;
14459}
14460_ACEOF
14461if ac_fn_c_try_link "$LINENO"; then :
14462 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
14463fi
14464rm -f core conftest.err conftest.$ac_objext \
14465 conftest$ac_exeext conftest.$ac_ext
14466 done
14467
14468fi
14469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
14470$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
14471 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
14472 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
14473 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
14474
14475cat >>confdefs.h <<_ACEOF
14476#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
14477_ACEOF
14478
14479 ax_pthread_joinable_attr_defined=yes
14480
14481fi
14482
14483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
14484$as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
14485if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
14486 $as_echo_n "(cached) " >&6
14487else
14488 ax_cv_PTHREAD_SPECIAL_FLAGS=no
14489 case $host_os in
14490 solaris*)
14491 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
14492 ;;
14493 esac
14494
14495fi
14496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
14497$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
14498 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
14499 test "x$ax_pthread_special_flags_added" != "xyes"; then :
14500 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
14501 ax_pthread_special_flags_added=yes
14502fi
14503
14504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
14505$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
14506if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
14507 $as_echo_n "(cached) " >&6
14508else
14509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14510/* end confdefs.h. */
14511#include <pthread.h>
14512int
14513main ()
14514{
14515int i = PTHREAD_PRIO_INHERIT;
14516 ;
14517 return 0;
14518}
14519_ACEOF
14520if ac_fn_c_try_link "$LINENO"; then :
14521 ax_cv_PTHREAD_PRIO_INHERIT=yes
14522else
14523 ax_cv_PTHREAD_PRIO_INHERIT=no
14524fi
14525rm -f core conftest.err conftest.$ac_objext \
14526 conftest$ac_exeext conftest.$ac_ext
14527
14528fi
14529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
14530$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
14531 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
14532 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
14533
14534$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
14535
14536 ax_pthread_prio_inherit_defined=yes
14537
14538fi
14539
14540 CFLAGS="$ax_pthread_save_CFLAGS"
14541 LIBS="$ax_pthread_save_LIBS"
14542
14543 # More AIX lossage: compile with *_r variant
14544 if test "x$GCC" != "xyes"; then
14545 case $host_os in
14546 aix*)
14547 case "x/$CC" in #(
14548 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
14549 #handle absolute path differently from PATH based program lookup
14550 case "x$CC" in #(
14551 x/*) :
14552 if as_fn_executable_p ${CC}_r; then :
14553 PTHREAD_CC="${CC}_r"
14554fi ;; #(
14555 *) :
14556 for ac_prog in ${CC}_r
14557do
14558 # Extract the first word of "$ac_prog", so it can be a program name with args.
14559set dummy $ac_prog; ac_word=$2
14560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14561$as_echo_n "checking for $ac_word... " >&6; }
14562if ${ac_cv_prog_PTHREAD_CC+:} false; then :
14563 $as_echo_n "(cached) " >&6
14564else
14565 if test -n "$PTHREAD_CC"; then
14566 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
14567else
14568as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14569for as_dir in $PATH
14570do
14571 IFS=$as_save_IFS
14572 test -z "$as_dir" && as_dir=.
14573 for ac_exec_ext in '' $ac_executable_extensions; do
14574 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14575 ac_cv_prog_PTHREAD_CC="$ac_prog"
14576 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14577 break 2
14578 fi
14579done
14580 done
14581IFS=$as_save_IFS
14582
14583fi
14584fi
14585PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
14586if test -n "$PTHREAD_CC"; then
14587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
14588$as_echo "$PTHREAD_CC" >&6; }
14589else
14590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14591$as_echo "no" >&6; }
14592fi
14593
14594
14595 test -n "$PTHREAD_CC" && break
14596done
14597test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
14598 ;;
14599esac ;; #(
14600 *) :
14601 ;;
14602esac
14603 ;;
14604 esac
14605 fi
14606fi
14607
14608test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
14609
14610
14611
14612
14613
14614# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
14615if test "x$ax_pthread_ok" = "xyes"; then
14616 threads=yes
14617 :
14618else
14619 ax_pthread_ok=no
14620 threads=no
14621fi
14622ac_ext=cpp
14623ac_cpp='$CXXCPP $CPPFLAGS'
14624ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14625ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14626ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14627
14628
14629 if test "$threads" = "yes"; then
14630 save_LIBS="$LIBS"
14631 LIBS="$PTHREAD_LIBS $LIBS"
14632 save_CXXFLAGS="$CXXFLAGS"
14633 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
14634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
14635$as_echo_n "checking for std::thread... " >&6; }
14636if ${gdb_cv_cxx_std_thread+:} false; then :
14637 $as_echo_n "(cached) " >&6
14638else
14639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14640/* end confdefs.h. */
14641#include <thread>
14642 void callback() { }
14643int
14644main ()
14645{
14646std::thread t(callback);
14647 ;
14648 return 0;
14649}
14650_ACEOF
14651if ac_fn_cxx_try_compile "$LINENO"; then :
14652 gdb_cv_cxx_std_thread=yes
14653else
14654 gdb_cv_cxx_std_thread=no
14655fi
14656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14657fi
14658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
14659$as_echo "$gdb_cv_cxx_std_thread" >&6; }
14660
14661 # This check must be here, while LIBS includes any necessary
14662 # threading library.
14663 for ac_func in pthread_sigmask pthread_setname_np
14664do :
14665 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14666ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
14667if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14668 cat >>confdefs.h <<_ACEOF
14669#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14670_ACEOF
14671
14672fi
14673done
14674
14675
14676 LIBS="$save_LIBS"
14677 CXXFLAGS="$save_CXXFLAGS"
14678 fi
14679 if test "$gdb_cv_cxx_std_thread" = "yes"; then
14680
14681$as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
14682
14683 fi
14684 ac_ext=c
14685ac_cpp='$CPP $CPPFLAGS'
14686ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14687ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14688ac_compiler_gnu=$ac_cv_c_compiler_gnu
14689
14690
14691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
14692$as_echo_n "checking for sigsetjmp... " >&6; }
14693if ${gdb_cv_func_sigsetjmp+:} false; then :
14694 $as_echo_n "(cached) " >&6
14695else
14696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14697/* end confdefs.h. */
14698#include <setjmp.h>
14699int
14700main ()
14701{
14702sigjmp_buf env;
14703 while (! sigsetjmp (env, 1))
14704 siglongjmp (env, 1);
14705
14706 ;
14707 return 0;
14708}
14709_ACEOF
14710if ac_fn_c_try_compile "$LINENO"; then :
14711 gdb_cv_func_sigsetjmp=yes
14712else
14713 gdb_cv_func_sigsetjmp=no
14714
14715fi
14716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14717
14718fi
14719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
14720$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
14721 if test "$gdb_cv_func_sigsetjmp" = "yes"; then
14722
14723$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
14724
14725 fi
14726
14727
14728# Check whether --with-intel_pt was given.
14729if test "${with_intel_pt+set}" = set; then :
14730 withval=$with_intel_pt;
14731else
14732 with_intel_pt=auto
14733fi
14734
14735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
14736$as_echo_n "checking whether to use intel pt... " >&6; }
14737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
14738$as_echo "$with_intel_pt" >&6; }
14739
14740 if test "${with_intel_pt}" = no; then
14741 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
14742$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
14743 HAVE_LIBIPT=no
14744 else
14745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14746/* end confdefs.h. */
14747
14748 #include <linux/perf_event.h>
14749 #ifndef PERF_ATTR_SIZE_VER5
14750 # error
14751 #endif
14752
14753_ACEOF
14754if ac_fn_c_try_cpp "$LINENO"; then :
14755 perf_event=yes
14756else
14757 perf_event=no
14758fi
14759rm -f conftest.err conftest.i conftest.$ac_ext
14760 if test "$perf_event" != yes; then
14761 if test "$with_intel_pt" = yes; then
14762 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
14763 else
14764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
14765$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
14766 fi
14767 fi
14768
14769
14770
14771
14772
14773
14774
14775
14776
14777 use_additional=yes
14778
14779 acl_save_prefix="$prefix"
14780 prefix="$acl_final_prefix"
14781 acl_save_exec_prefix="$exec_prefix"
14782 exec_prefix="$acl_final_exec_prefix"
14783
14784 eval additional_includedir=\"$includedir\"
14785 eval additional_libdir=\"$libdir\"
14786
14787 exec_prefix="$acl_save_exec_prefix"
14788 prefix="$acl_save_prefix"
14789
14790
14791# Check whether --with-libipt-prefix was given.
14792if test "${with_libipt_prefix+set}" = set; then :
14793 withval=$with_libipt_prefix;
14794 if test "X$withval" = "Xno"; then
14795 use_additional=no
14796 else
14797 if test "X$withval" = "X"; then
14798
14799 acl_save_prefix="$prefix"
14800 prefix="$acl_final_prefix"
14801 acl_save_exec_prefix="$exec_prefix"
14802 exec_prefix="$acl_final_exec_prefix"
14803
14804 eval additional_includedir=\"$includedir\"
14805 eval additional_libdir=\"$libdir\"
14806
14807 exec_prefix="$acl_save_exec_prefix"
14808 prefix="$acl_save_prefix"
14809
14810 else
14811 additional_includedir="$withval/include"
14812 additional_libdir="$withval/lib"
14813 fi
14814 fi
14815
14816fi
14817
14818
14819# Check whether --with-libipt-type was given.
14820if test "${with_libipt_type+set}" = set; then :
14821 withval=$with_libipt_type; with_libipt_type=$withval
14822else
14823 with_libipt_type=auto
14824fi
14825
14826 lib_type=`eval echo \$with_libipt_type`
14827
14828 LIBIPT=
14829 LTLIBIPT=
14830 INCIPT=
14831 rpathdirs=
14832 ltrpathdirs=
14833 names_already_handled=
14834 names_next_round='ipt '
14835 while test -n "$names_next_round"; do
14836 names_this_round="$names_next_round"
14837 names_next_round=
14838 for name in $names_this_round; do
14839 already_handled=
14840 for n in $names_already_handled; do
14841 if test "$n" = "$name"; then
14842 already_handled=yes
14843 break
14844 fi
14845 done
14846 if test -z "$already_handled"; then
14847 names_already_handled="$names_already_handled $name"
14848 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14849 eval value=\"\$HAVE_LIB$uppername\"
14850 if test -n "$value"; then
14851 if test "$value" = yes; then
14852 eval value=\"\$LIB$uppername\"
14853 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
14854 eval value=\"\$LTLIB$uppername\"
14855 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
14856 else
14857 :
14858 fi
14859 else
14860 found_dir=
14861 found_la=
14862 found_so=
14863 found_a=
14864 if test $use_additional = yes; then
14865 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
14866 found_dir="$additional_libdir"
14867 found_so="$additional_libdir/lib$name.$shlibext"
14868 if test -f "$additional_libdir/lib$name.la"; then
14869 found_la="$additional_libdir/lib$name.la"
14870 fi
14871 elif test x$lib_type != xshared; then
14872 if test -f "$additional_libdir/lib$name.$libext"; then
14873 found_dir="$additional_libdir"
14874 found_a="$additional_libdir/lib$name.$libext"
14875 if test -f "$additional_libdir/lib$name.la"; then
14876 found_la="$additional_libdir/lib$name.la"
14877 fi
14878 fi
14879 fi
14880 fi
14881 if test "X$found_dir" = "X"; then
14882 for x in $LDFLAGS $LTLIBIPT; do
14883
14884 acl_save_prefix="$prefix"
14885 prefix="$acl_final_prefix"
14886 acl_save_exec_prefix="$exec_prefix"
14887 exec_prefix="$acl_final_exec_prefix"
14888 eval x=\"$x\"
14889 exec_prefix="$acl_save_exec_prefix"
14890 prefix="$acl_save_prefix"
14891
14892 case "$x" in
14893 -L*)
14894 dir=`echo "X$x" | sed -e 's/^X-L//'`
14895 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
14896 found_dir="$dir"
14897 found_so="$dir/lib$name.$shlibext"
14898 if test -f "$dir/lib$name.la"; then
14899 found_la="$dir/lib$name.la"
14900 fi
14901 elif test x$lib_type != xshared; then
14902 if test -f "$dir/lib$name.$libext"; then
14903 found_dir="$dir"
14904 found_a="$dir/lib$name.$libext"
14905 if test -f "$dir/lib$name.la"; then
14906 found_la="$dir/lib$name.la"
14907 fi
14908 fi
14909 fi
14910 ;;
14911 esac
14912 if test "X$found_dir" != "X"; then
14913 break
14914 fi
14915 done
14916 fi
14917 if test "X$found_dir" != "X"; then
14918 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
14919 if test "X$found_so" != "X"; then
14920 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14921 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14922 else
14923 haveit=
14924 for x in $ltrpathdirs; do
14925 if test "X$x" = "X$found_dir"; then
14926 haveit=yes
14927 break
14928 fi
14929 done
14930 if test -z "$haveit"; then
14931 ltrpathdirs="$ltrpathdirs $found_dir"
14932 fi
14933 if test "$hardcode_direct" = yes; then
14934 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14935 else
14936 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14937 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14938 haveit=
14939 for x in $rpathdirs; do
14940 if test "X$x" = "X$found_dir"; then
14941 haveit=yes
14942 break
14943 fi
14944 done
14945 if test -z "$haveit"; then
14946 rpathdirs="$rpathdirs $found_dir"
14947 fi
14948 else
14949 haveit=
14950 for x in $LDFLAGS $LIBIPT; do
14951
14952 acl_save_prefix="$prefix"
14953 prefix="$acl_final_prefix"
14954 acl_save_exec_prefix="$exec_prefix"
14955 exec_prefix="$acl_final_exec_prefix"
14956 eval x=\"$x\"
14957 exec_prefix="$acl_save_exec_prefix"
14958 prefix="$acl_save_prefix"
14959
14960 if test "X$x" = "X-L$found_dir"; then
14961 haveit=yes
14962 break
14963 fi
14964 done
14965 if test -z "$haveit"; then
14966 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
14967 fi
14968 if test "$hardcode_minus_L" != no; then
14969 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14970 else
14971 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14972 fi
14973 fi
14974 fi
14975 fi
14976 else
14977 if test "X$found_a" != "X"; then
14978 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
14979 else
14980 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
14981 fi
14982 fi
14983 additional_includedir=
14984 case "$found_dir" in
14985 */lib | */lib/)
14986 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14987 additional_includedir="$basedir/include"
14988 ;;
14989 esac
14990 if test "X$additional_includedir" != "X"; then
14991 if test "X$additional_includedir" != "X/usr/include"; then
14992 haveit=
14993 if test "X$additional_includedir" = "X/usr/local/include"; then
14994 if test -n "$GCC"; then
14995 case $host_os in
14996 linux*) haveit=yes;;
14997 esac
14998 fi
14999 fi
15000 if test -z "$haveit"; then
15001 for x in $CPPFLAGS $INCIPT; do
15002
15003 acl_save_prefix="$prefix"
15004 prefix="$acl_final_prefix"
15005 acl_save_exec_prefix="$exec_prefix"
15006 exec_prefix="$acl_final_exec_prefix"
15007 eval x=\"$x\"
15008 exec_prefix="$acl_save_exec_prefix"
15009 prefix="$acl_save_prefix"
15010
15011 if test "X$x" = "X-I$additional_includedir"; then
15012 haveit=yes
15013 break
15014 fi
15015 done
15016 if test -z "$haveit"; then
15017 if test -d "$additional_includedir"; then
15018 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
15019 fi
15020 fi
15021 fi
15022 fi
15023 fi
15024 if test -n "$found_la"; then
15025 save_libdir="$libdir"
15026 case "$found_la" in
15027 */* | *\\*) . "$found_la" ;;
15028 *) . "./$found_la" ;;
15029 esac
15030 libdir="$save_libdir"
15031 for dep in $dependency_libs; do
15032 case "$dep" in
15033 -L*)
15034 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15035 if test "X$additional_libdir" != "X/usr/lib"; then
15036 haveit=
15037 if test "X$additional_libdir" = "X/usr/local/lib"; then
15038 if test -n "$GCC"; then
15039 case $host_os in
15040 linux*) haveit=yes;;
15041 esac
15042 fi
15043 fi
15044 if test -z "$haveit"; then
15045 haveit=
15046 for x in $LDFLAGS $LIBIPT; do
15047
15048 acl_save_prefix="$prefix"
15049 prefix="$acl_final_prefix"
15050 acl_save_exec_prefix="$exec_prefix"
15051 exec_prefix="$acl_final_exec_prefix"
15052 eval x=\"$x\"
15053 exec_prefix="$acl_save_exec_prefix"
15054 prefix="$acl_save_prefix"
15055
15056 if test "X$x" = "X-L$additional_libdir"; then
15057 haveit=yes
15058 break
15059 fi
15060 done
15061 if test -z "$haveit"; then
15062 if test -d "$additional_libdir"; then
15063 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
15064 fi
15065 fi
15066 haveit=
15067 for x in $LDFLAGS $LTLIBIPT; do
15068
15069 acl_save_prefix="$prefix"
15070 prefix="$acl_final_prefix"
15071 acl_save_exec_prefix="$exec_prefix"
15072 exec_prefix="$acl_final_exec_prefix"
15073 eval x=\"$x\"
15074 exec_prefix="$acl_save_exec_prefix"
15075 prefix="$acl_save_prefix"
15076
15077 if test "X$x" = "X-L$additional_libdir"; then
15078 haveit=yes
15079 break
15080 fi
15081 done
15082 if test -z "$haveit"; then
15083 if test -d "$additional_libdir"; then
15084 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
15085 fi
15086 fi
15087 fi
15088 fi
15089 ;;
15090 -R*)
15091 dir=`echo "X$dep" | sed -e 's/^X-R//'`
15092 if test "$enable_rpath" != no; then
15093 haveit=
15094 for x in $rpathdirs; do
15095 if test "X$x" = "X$dir"; then
15096 haveit=yes
15097 break
15098 fi
15099 done
15100 if test -z "$haveit"; then
15101 rpathdirs="$rpathdirs $dir"
15102 fi
15103 haveit=
15104 for x in $ltrpathdirs; do
15105 if test "X$x" = "X$dir"; then
15106 haveit=yes
15107 break
15108 fi
15109 done
15110 if test -z "$haveit"; then
15111 ltrpathdirs="$ltrpathdirs $dir"
15112 fi
15113 fi
15114 ;;
15115 -l*)
15116 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
15117 ;;
15118 *.la)
15119 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
15120 ;;
15121 *)
15122 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
15123 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
15124 ;;
15125 esac
15126 done
15127 fi
15128 else
15129 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
15130 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
15131 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
15132 else
15133 LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext"
15134 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext"
15135 fi
15136 fi
15137 fi
15138 fi
15139 done
15140 done
15141 if test "X$rpathdirs" != "X"; then
15142 if test -n "$hardcode_libdir_separator"; then
15143 alldirs=
15144 for found_dir in $rpathdirs; do
15145 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
15146 done
15147 acl_save_libdir="$libdir"
15148 libdir="$alldirs"
15149 eval flag=\"$hardcode_libdir_flag_spec\"
15150 libdir="$acl_save_libdir"
15151 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
15152 else
15153 for found_dir in $rpathdirs; do
15154 acl_save_libdir="$libdir"
15155 libdir="$found_dir"
15156 eval flag=\"$hardcode_libdir_flag_spec\"
15157 libdir="$acl_save_libdir"
15158 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
15159 done
15160 fi
15161 fi
15162 if test "X$ltrpathdirs" != "X"; then
15163 for found_dir in $ltrpathdirs; do
15164 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
15165 done
15166 fi
15167
15168
15169 ac_save_CPPFLAGS="$CPPFLAGS"
15170
15171 for element in $INCIPT; do
15172 haveit=
15173 for x in $CPPFLAGS; do
15174
15175 acl_save_prefix="$prefix"
15176 prefix="$acl_final_prefix"
15177 acl_save_exec_prefix="$exec_prefix"
15178 exec_prefix="$acl_final_exec_prefix"
15179 eval x=\"$x\"
15180 exec_prefix="$acl_save_exec_prefix"
15181 prefix="$acl_save_prefix"
15182
15183 if test "X$x" = "X$element"; then
15184 haveit=yes
15185 break
15186 fi
15187 done
15188 if test -z "$haveit"; then
15189 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15190 fi
15191 done
15192
15193
15194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
15195$as_echo_n "checking for libipt... " >&6; }
15196if ${ac_cv_libipt+:} false; then :
15197 $as_echo_n "(cached) " >&6
15198else
15199
15200 ac_save_LIBS="$LIBS"
15201 LIBS="$LIBS $LIBIPT"
15202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15203/* end confdefs.h. */
15204#include "intel-pt.h"
15205int
15206main ()
15207{
15208pt_insn_alloc_decoder (0);
15209 ;
15210 return 0;
15211}
15212_ACEOF
15213if ac_fn_c_try_link "$LINENO"; then :
15214 ac_cv_libipt=yes
15215else
15216 ac_cv_libipt=no
15217fi
15218rm -f core conftest.err conftest.$ac_objext \
15219 conftest$ac_exeext conftest.$ac_ext
15220 LIBS="$ac_save_LIBS"
15221
15222fi
15223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
15224$as_echo "$ac_cv_libipt" >&6; }
15225 if test "$ac_cv_libipt" = yes; then
15226 HAVE_LIBIPT=yes
15227
15228$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
15229
15230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
15231$as_echo_n "checking how to link with libipt... " >&6; }
15232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
15233$as_echo "$LIBIPT" >&6; }
15234 else
15235 HAVE_LIBIPT=no
15236 CPPFLAGS="$ac_save_CPPFLAGS"
15237 LIBIPT=
15238 LTLIBIPT=
15239 fi
15240
15241
15242
15243
15244
15245
15246 if test "$HAVE_LIBIPT" != yes; then
15247 if test "$with_intel_pt" = yes; then
15248 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
15249 else
15250 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
15251$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
15252 fi
15253 else
15254 save_LIBS=$LIBS
15255 LIBS="$LIBS $LIBIPT"
15256 for ac_func in pt_insn_event
15257do :
15258 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
15259if test "x$ac_cv_func_pt_insn_event" = xyes; then :
15260 cat >>confdefs.h <<_ACEOF
15261#define HAVE_PT_INSN_EVENT 1
15262_ACEOF
15263
15264fi
15265done
15266
15267 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
15268"
15269if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
15270
15271cat >>confdefs.h <<_ACEOF
15272#define HAVE_STRUCT_PT_INSN_ENABLED 1
15273_ACEOF
15274
15275
15276fi
15277ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
15278"
15279if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
15280
15281cat >>confdefs.h <<_ACEOF
15282#define HAVE_STRUCT_PT_INSN_RESYNCED 1
15283_ACEOF
15284
15285
15286fi
15287
15288 LIBS=$save_LIBS
15289 fi
15290 fi
15291
15292
15293$as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
15294
15295 for ac_header in sys/procfs.h
15296do :
15297 ac_fn_c_check_header_mongrel "$LINENO" "sys/procfs.h" "ac_cv_header_sys_procfs_h" "$ac_includes_default"
15298if test "x$ac_cv_header_sys_procfs_h" = xyes; then :
15299 cat >>confdefs.h <<_ACEOF
15300#define HAVE_SYS_PROCFS_H 1
15301_ACEOF
15302
15303fi
15304
15305done
15306
15307 if test "$ac_cv_header_sys_procfs_h" = yes; then
15308
15309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
15310$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
15311 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
15312 $as_echo_n "(cached) " >&6
15313else
15314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15315/* end confdefs.h. */
15316
15317#define _SYSCALL32
15318#include <sys/procfs.h>
15319int
15320main ()
15321{
15322gregset_t avar
15323 ;
15324 return 0;
15325}
15326_ACEOF
15327if ac_fn_c_try_compile "$LINENO"; then :
15328 bfd_cv_have_sys_procfs_type_gregset_t=yes
15329else
15330 bfd_cv_have_sys_procfs_type_gregset_t=no
15331
15332fi
15333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15334fi
15335
15336 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
15337
15338$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
15339
15340 fi
15341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
15342$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
15343
15344
15345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
15346$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
15347 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
15348 $as_echo_n "(cached) " >&6
15349else
15350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15351/* end confdefs.h. */
15352
15353#define _SYSCALL32
15354#include <sys/procfs.h>
15355int
15356main ()
15357{
15358fpregset_t avar
15359 ;
15360 return 0;
15361}
15362_ACEOF
15363if ac_fn_c_try_compile "$LINENO"; then :
15364 bfd_cv_have_sys_procfs_type_fpregset_t=yes
15365else
15366 bfd_cv_have_sys_procfs_type_fpregset_t=no
15367
15368fi
15369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15370fi
15371
15372 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
15373
15374$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
15375
15376 fi
15377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
15378$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
15379
15380
15381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
15382$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
15383 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
15384 $as_echo_n "(cached) " >&6
15385else
15386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15387/* end confdefs.h. */
15388
15389#define _SYSCALL32
15390#include <sys/procfs.h>
15391int
15392main ()
15393{
15394prgregset_t avar
15395 ;
15396 return 0;
15397}
15398_ACEOF
15399if ac_fn_c_try_compile "$LINENO"; then :
15400 bfd_cv_have_sys_procfs_type_prgregset_t=yes
15401else
15402 bfd_cv_have_sys_procfs_type_prgregset_t=no
15403
15404fi
15405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15406fi
15407
15408 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
15409
15410$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
15411
15412 fi
15413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
15414$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
15415
15416
15417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
15418$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
15419 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
15420 $as_echo_n "(cached) " >&6
15421else
15422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15423/* end confdefs.h. */
15424
15425#define _SYSCALL32
15426#include <sys/procfs.h>
15427int
15428main ()
15429{
15430prfpregset_t avar
15431 ;
15432 return 0;
15433}
15434_ACEOF
15435if ac_fn_c_try_compile "$LINENO"; then :
15436 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
15437else
15438 bfd_cv_have_sys_procfs_type_prfpregset_t=no
15439
15440fi
15441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15442fi
15443
15444 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
15445
15446$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
15447
15448 fi
15449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
15450$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
15451
15452
15453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
15454$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
15455 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
15456 $as_echo_n "(cached) " >&6
15457else
15458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15459/* end confdefs.h. */
15460
15461#define _SYSCALL32
15462#include <sys/procfs.h>
15463int
15464main ()
15465{
15466prgregset32_t avar
15467 ;
15468 return 0;
15469}
15470_ACEOF
15471if ac_fn_c_try_compile "$LINENO"; then :
15472 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
15473else
15474 bfd_cv_have_sys_procfs_type_prgregset32_t=no
15475
15476fi
15477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15478fi
15479
15480 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
15481
15482$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
15483
15484 fi
15485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
15486$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
15487
15488
15489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
15490$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
15491 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
15492 $as_echo_n "(cached) " >&6
15493else
15494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15495/* end confdefs.h. */
15496
15497#define _SYSCALL32
15498#include <sys/procfs.h>
15499int
15500main ()
15501{
15502lwpid_t avar
15503 ;
15504 return 0;
15505}
15506_ACEOF
15507if ac_fn_c_try_compile "$LINENO"; then :
15508 bfd_cv_have_sys_procfs_type_lwpid_t=yes
15509else
15510 bfd_cv_have_sys_procfs_type_lwpid_t=no
15511
15512fi
15513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15514fi
15515
15516 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
15517
15518$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
15519
15520 fi
15521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
15522$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
15523
15524
15525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
15526$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
15527 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
15528 $as_echo_n "(cached) " >&6
15529else
15530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15531/* end confdefs.h. */
15532
15533#define _SYSCALL32
15534#include <sys/procfs.h>
15535int
15536main ()
15537{
15538psaddr_t avar
15539 ;
15540 return 0;
15541}
15542_ACEOF
15543if ac_fn_c_try_compile "$LINENO"; then :
15544 bfd_cv_have_sys_procfs_type_psaddr_t=yes
15545else
15546 bfd_cv_have_sys_procfs_type_psaddr_t=no
15547
15548fi
15549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15550fi
15551
15552 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
15553
15554$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
15555
15556 fi
15557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
15558$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
15559
15560
15561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
15562$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
15563 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
15564 $as_echo_n "(cached) " >&6
15565else
15566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15567/* end confdefs.h. */
15568
15569#define _SYSCALL32
15570#include <sys/procfs.h>
15571int
15572main ()
15573{
15574elf_fpregset_t avar
15575 ;
15576 return 0;
15577}
15578_ACEOF
15579if ac_fn_c_try_compile "$LINENO"; then :
15580 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
15581else
15582 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
15583
15584fi
15585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15586fi
15587
15588 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
15589
15590$as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
15591
15592 fi
15593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
15594$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
15595
15596 fi
15597
15598
15599# Check the return and argument types of ptrace.
15600
15601
15602for ac_header in sys/ptrace.h ptrace.h
15603do :
15604 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15605ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15606if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15607 cat >>confdefs.h <<_ACEOF
15608#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15609_ACEOF
15610
15611fi
15612
15613done
15614
15615
15616gdb_ptrace_headers='
15617#include <sys/types.h>
15618#if HAVE_SYS_PTRACE_H
15619# include <sys/ptrace.h>
15620#endif
15621#if HAVE_UNISTD_H
15622# include <unistd.h>
15623#endif
15624'
15625
15626# Check return type. Varargs (used on GNU/Linux) conflict with the
15627# empty argument list, so check for that explicitly.
15628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
15629$as_echo_n "checking return type of ptrace... " >&6; }
15630if ${gdb_cv_func_ptrace_ret+:} false; then :
15631 $as_echo_n "(cached) " >&6
15632else
15633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15634/* end confdefs.h. */
15635 $gdb_ptrace_headers
15636int
15637main ()
15638{
15639extern long ptrace (enum __ptrace_request, ...);
15640
15641 ;
15642 return 0;
15643}
15644_ACEOF
15645if ac_fn_c_try_compile "$LINENO"; then :
15646 gdb_cv_func_ptrace_ret='long'
15647else
15648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15649/* end confdefs.h. */
15650$gdb_ptrace_headers
15651int
15652main ()
15653{
15654extern int ptrace ();
15655
15656 ;
15657 return 0;
15658}
15659_ACEOF
15660if ac_fn_c_try_compile "$LINENO"; then :
15661 gdb_cv_func_ptrace_ret='int'
15662else
15663 gdb_cv_func_ptrace_ret='long'
15664
15665fi
15666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15667
15668fi
15669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15670
15671fi
15672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
15673$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
15674
15675
15676cat >>confdefs.h <<_ACEOF
15677#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
15678_ACEOF
15679
15680
15681# Check argument types.
15682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
15683$as_echo_n "checking types of arguments for ptrace... " >&6; }
15684if ${gdb_cv_func_ptrace_args+:} false; then :
15685 $as_echo_n "(cached) " >&6
15686else
15687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15688/* end confdefs.h. */
15689$gdb_ptrace_headers
15690int
15691main ()
15692{
15693extern long ptrace (enum __ptrace_request, ...);
15694
15695 ;
15696 return 0;
15697}
15698_ACEOF
15699if ac_fn_c_try_compile "$LINENO"; then :
15700 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
15701else
15702 for gdb_arg1 in 'int' 'long'; do
15703 for gdb_arg2 in 'pid_t' 'int' 'long'; do
15704 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
15705 for gdb_arg4 in 'int' 'long' 'void *'; do
15706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15707/* end confdefs.h. */
15708$gdb_ptrace_headers
15709int
15710main ()
15711{
15712extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
15713
15714 ;
15715 return 0;
15716}
15717_ACEOF
15718if ac_fn_c_try_compile "$LINENO"; then :
15719 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
15720 break 4;
15721
15722fi
15723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15724
15725 for gdb_arg5 in 'int *' 'int' 'long'; do
15726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15727/* end confdefs.h. */
15728$gdb_ptrace_headers
15729int
15730main ()
15731{
15732extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
15733
15734 ;
15735 return 0;
15736}
15737_ACEOF
15738if ac_fn_c_try_compile "$LINENO"; then :
15739 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
15740 break 5;
15741
15742fi
15743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15744 done
15745 done
15746 done
15747 done
15748 done
15749 # Provide a safe default value.
15750 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
15751
15752fi
15753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15754
15755fi
15756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
15757$as_echo "$gdb_cv_func_ptrace_args" >&6; }
15758
15759ac_save_IFS=$IFS; IFS=','
15760set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
15761IFS=$ac_save_IFS
15762shift
15763
15764cat >>confdefs.h <<_ACEOF
15765#define PTRACE_TYPE_ARG1 $1
15766_ACEOF
15767
15768
15769cat >>confdefs.h <<_ACEOF
15770#define PTRACE_TYPE_ARG3 $3
15771_ACEOF
15772
15773
15774cat >>confdefs.h <<_ACEOF
15775#define PTRACE_TYPE_ARG4 $4
15776_ACEOF
15777
15778if test -n "$5"; then
15779
15780cat >>confdefs.h <<_ACEOF
15781#define PTRACE_TYPE_ARG5 $5
15782_ACEOF
15783
15784fi
15785
15786
15787if test "$cross_compiling" = no; then
15788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15789$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15790if ${ac_cv_func_setpgrp_void+:} false; then :
15791 $as_echo_n "(cached) " >&6
15792else
15793 if test "$cross_compiling" = yes; then :
15794 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
15795else
15796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15797/* end confdefs.h. */
15798$ac_includes_default
15799int
15800main ()
15801{
15802/* If this system has a BSD-style setpgrp which takes arguments,
15803 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
15804 exit successfully. */
15805 return setpgrp (1,1) != -1;
15806 ;
15807 return 0;
15808}
15809_ACEOF
15810if ac_fn_c_try_run "$LINENO"; then :
15811 ac_cv_func_setpgrp_void=no
15812else
15813 ac_cv_func_setpgrp_void=yes
15814fi
15815rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15816 conftest.$ac_objext conftest.beam conftest.$ac_ext
15817fi
15818
15819fi
15820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15821$as_echo "$ac_cv_func_setpgrp_void" >&6; }
15822if test $ac_cv_func_setpgrp_void = yes; then
15823
15824$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
15825
15826fi
15827
15828else
15829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15830$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15831if ${ac_cv_func_setpgrp_void+:} false; then :
15832 $as_echo_n "(cached) " >&6
15833else
15834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15835/* end confdefs.h. */
15836#include <unistd.h>
15837int
15838main ()
15839{
15840if (setpgrp(1,1) == -1)
15841 exit (0);
15842 else
15843 exit (1);
15844
15845 ;
15846 return 0;
15847}
15848_ACEOF
15849if ac_fn_c_try_compile "$LINENO"; then :
15850 ac_cv_func_setpgrp_void=no
15851else
15852 ac_cv_func_setpgrp_void=yes
15853
15854fi
15855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15856
15857fi
15858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15859$as_echo "$ac_cv_func_setpgrp_void" >&6; }
15860if test "$ac_cv_func_setpgrp_void" = yes; then
15861 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
15862
15863fi
15864fi
15865
15866# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
15867ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
15868#include <sys/proc.h>
15869
15870"
15871if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
15872
15873cat >>confdefs.h <<_ACEOF
15874#define HAVE_STRUCT_THREAD_TD_PCB 1
15875_ACEOF
15876
15877
15878fi
15879
15880
15881# See if <sys/lwp.h> defines `struct lwp`.
15882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
15883$as_echo_n "checking for struct lwp... " >&6; }
15884if ${gdb_cv_struct_lwp+:} false; then :
15885 $as_echo_n "(cached) " >&6
15886else
15887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15888/* end confdefs.h. */
15889#include <sys/param.h>
15890 #define _KMEMUSER
15891 #include <sys/lwp.h>
15892int
15893main ()
15894{
15895struct lwp l;
15896
15897 ;
15898 return 0;
15899}
15900_ACEOF
15901if ac_fn_c_try_compile "$LINENO"; then :
15902 gdb_cv_struct_lwp=yes
15903else
15904 gdb_cv_struct_lwp=no
15905
15906fi
15907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15908
15909fi
15910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
15911$as_echo "$gdb_cv_struct_lwp" >&6; }
15912if test "$gdb_cv_struct_lwp" = yes; then
15913
15914$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
15915
15916fi
15917
15918# See if <machine/reg.h> degines `struct reg'.
15919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
15920$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
15921if ${gdb_cv_struct_reg+:} false; then :
15922 $as_echo_n "(cached) " >&6
15923else
15924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15925/* end confdefs.h. */
15926#include <sys/types.h>
15927 #include <machine/reg.h>
15928int
15929main ()
15930{
15931struct reg r;
15932
15933 ;
15934 return 0;
15935}
15936_ACEOF
15937if ac_fn_c_try_compile "$LINENO"; then :
15938 gdb_cv_struct_reg=yes
15939else
15940 gdb_cv_struct_reg=no
15941
15942fi
15943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15944
15945fi
15946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
15947$as_echo "$gdb_cv_struct_reg" >&6; }
15948if test "$gdb_cv_struct_reg" = yes; then
15949
15950$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
15951
15952fi
15953
15954# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
15955# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
15956ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
15957#include <machine/reg.h>
15958"
15959if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
15960
15961cat >>confdefs.h <<_ACEOF
15962#define HAVE_STRUCT_REG_R_FS 1
15963_ACEOF
15964
15965
15966fi
15967ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
15968#include <machine/reg.h>
15969"
15970if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
15971
15972cat >>confdefs.h <<_ACEOF
15973#define HAVE_STRUCT_REG_R_GS 1
15974_ACEOF
15975
15976
15977fi
15978
15979
15980# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
15981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
15982$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
15983if ${gdb_cv_have_ptrace_getregs+:} false; then :
15984 $as_echo_n "(cached) " >&6
15985else
15986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15987/* end confdefs.h. */
15988#include <sys/ptrace.h>
15989int
15990main ()
15991{
15992PTRACE_GETREGS;
15993 ;
15994 return 0;
15995}
15996_ACEOF
15997if ac_fn_c_try_compile "$LINENO"; then :
15998 gdb_cv_have_ptrace_getregs=yes
15999else
16000 gdb_cv_have_ptrace_getregs=no
16001
16002fi
16003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16004
16005fi
16006
16007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
16008$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
16009if test "$gdb_cv_have_ptrace_getregs" = yes; then
16010
16011$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
16012
16013fi
16014
16015# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
16016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
16017$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
16018if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
16019 $as_echo_n "(cached) " >&6
16020else
16021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16022/* end confdefs.h. */
16023#include <sys/ptrace.h>
16024int
16025main ()
16026{
16027PTRACE_GETFPXREGS;
16028 ;
16029 return 0;
16030}
16031_ACEOF
16032if ac_fn_c_try_compile "$LINENO"; then :
16033 gdb_cv_have_ptrace_getfpxregs=yes
16034else
16035 gdb_cv_have_ptrace_getfpxregs=no
16036
16037fi
16038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16039
16040fi
16041
16042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
16043$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
16044if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then
16045
16046$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
16047
16048fi
16049
16050# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
16051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
16052$as_echo_n "checking for PT_GETDBREGS... " >&6; }
16053if ${gdb_cv_have_pt_getdbregs+:} false; then :
16054 $as_echo_n "(cached) " >&6
16055else
16056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16057/* end confdefs.h. */
16058#include <sys/types.h>
16059 #include <sys/ptrace.h>
16060int
16061main ()
16062{
16063PT_GETDBREGS;
16064
16065 ;
16066 return 0;
16067}
16068_ACEOF
16069if ac_fn_c_try_compile "$LINENO"; then :
16070 gdb_cv_have_pt_getdbregs=yes
16071else
16072 gdb_cv_have_pt_getdbregs=no
16073
16074fi
16075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16076
16077fi
16078
16079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
16080$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
16081if test "$gdb_cv_have_pt_getdbregs" = yes; then
16082
16083$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
16084
16085fi
16086
16087# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
16088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
16089$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
16090if ${gdb_cv_have_pt_getxmmregs+:} false; then :
16091 $as_echo_n "(cached) " >&6
16092else
16093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16094/* end confdefs.h. */
16095#include <sys/types.h>
16096 #include <sys/ptrace.h>
16097int
16098main ()
16099{
16100PT_GETXMMREGS;
16101
16102 ;
16103 return 0;
16104}
16105_ACEOF
16106if ac_fn_c_try_compile "$LINENO"; then :
16107 gdb_cv_have_pt_getxmmregs=yes
16108else
16109 gdb_cv_have_pt_getxmmregs=no
16110
16111fi
16112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16113
16114fi
16115
16116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
16117$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
16118if test "$gdb_cv_have_pt_getxmmregs" = yes; then
16119
16120$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
16121
16122fi
16123
16124# See if <sys/ptrace.h> supports LWP names on FreeBSD
16125# Older FreeBSD versions don't have the pl_tdname member of
16126# `struct ptrace_lwpinfo'.
16127ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
16128"
16129if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
16130
16131cat >>confdefs.h <<_ACEOF
16132#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
16133_ACEOF
16134
16135
16136fi
16137
16138
16139# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
16140# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
16141# FreeBSD 10.3.
16142ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
16143"
16144if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
16145
16146cat >>confdefs.h <<_ACEOF
16147#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
16148_ACEOF
16149
16150
16151fi
16152
16153
16154# Check if the compiler supports the `long long' type.
16155
16156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
16157$as_echo_n "checking for long long support in compiler... " >&6; }
16158if ${gdb_cv_c_long_long+:} false; then :
16159 $as_echo_n "(cached) " >&6
16160else
16161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16162/* end confdefs.h. */
16163extern long long foo;
16164int
16165main ()
16166{
16167switch (foo & 2) { case 0: return 1; }
16168 ;
16169 return 0;
16170}
16171_ACEOF
16172if ac_fn_c_try_compile "$LINENO"; then :
16173 gdb_cv_c_long_long=yes
16174else
16175 gdb_cv_c_long_long=no
16176fi
16177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16178fi
16179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
16180$as_echo "$gdb_cv_c_long_long" >&6; }
16181if test "$gdb_cv_c_long_long" != yes; then
16182 # libdecnumber requires long long.
16183 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
16184fi
16185
16186# Check if the compiler and runtime support printing long longs.
16187
16188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
16189$as_echo_n "checking for long long support in printf... " >&6; }
16190if ${gdb_cv_printf_has_long_long+:} false; then :
16191 $as_echo_n "(cached) " >&6
16192else
16193 if test "$cross_compiling" = yes; then :
16194 gdb_cv_printf_has_long_long=no
16195else
16196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16197/* end confdefs.h. */
16198$ac_includes_default
16199int
16200main ()
16201{
16202char buf[32];
16203 long long l = 0;
16204 l = (l << 16) + 0x0123;
16205 l = (l << 16) + 0x4567;
16206 l = (l << 16) + 0x89ab;
16207 l = (l << 16) + 0xcdef;
16208 sprintf (buf, "0x%016llx", l);
16209 return (strcmp ("0x0123456789abcdef", buf));
16210 ;
16211 return 0;
16212}
16213_ACEOF
16214if ac_fn_c_try_run "$LINENO"; then :
16215 gdb_cv_printf_has_long_long=yes
16216else
16217 gdb_cv_printf_has_long_long=no
16218fi
16219rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16220 conftest.$ac_objext conftest.beam conftest.$ac_ext
16221fi
16222
16223fi
16224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
16225$as_echo "$gdb_cv_printf_has_long_long" >&6; }
16226if test "$gdb_cv_printf_has_long_long" = yes; then
16227
16228$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
16229
16230fi
16231
16232# Check if the compiler and runtime support printing decfloats.
16233
16234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
16235$as_echo_n "checking for decfloat support in printf... " >&6; }
16236if ${gdb_cv_printf_has_decfloat+:} false; then :
16237 $as_echo_n "(cached) " >&6
16238else
16239 if test "$cross_compiling" = yes; then :
16240 gdb_cv_printf_has_decfloat=no
16241else
16242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16243/* end confdefs.h. */
16244$ac_includes_default
16245int
16246main ()
16247{
16248char buf[64];
16249 _Decimal32 d32 = 1.2345df;
16250 _Decimal64 d64 = 1.2345dd;
16251 _Decimal128 d128 = 1.2345dl;
16252 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
16253 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
16254 ;
16255 return 0;
16256}
16257_ACEOF
16258if ac_fn_c_try_run "$LINENO"; then :
16259 gdb_cv_printf_has_decfloat=yes
16260else
16261 gdb_cv_printf_has_decfloat=no
16262fi
16263rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16264 conftest.$ac_objext conftest.beam conftest.$ac_ext
16265fi
16266
16267fi
16268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
16269$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
16270if test "$gdb_cv_printf_has_decfloat" = yes; then
16271
16272$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
16273
16274fi
16275
16276# Check if the compiler supports the `long double' type. We can't use
16277# AC_C_LONG_DOUBLE because that one does additional checks on the
16278# constants defined in <float.h> that fail on some systems,
16279# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
16280
16281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
16282$as_echo_n "checking for long double support in compiler... " >&6; }
16283if ${gdb_cv_c_long_double+:} false; then :
16284 $as_echo_n "(cached) " >&6
16285else
16286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16287/* end confdefs.h. */
16288long double foo;
16289_ACEOF
16290if ac_fn_c_try_compile "$LINENO"; then :
16291 gdb_cv_c_long_double=yes
16292else
16293 gdb_cv_c_long_double=no
16294fi
16295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16296fi
16297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
16298$as_echo "$gdb_cv_c_long_double" >&6; }
16299if test "$gdb_cv_c_long_double" = yes; then
16300
16301$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
16302
16303fi
16304
16305# Check if the compiler and runtime support printing long doubles.
16306
16307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
16308$as_echo_n "checking for long double support in printf... " >&6; }
16309if ${gdb_cv_printf_has_long_double+:} false; then :
16310 $as_echo_n "(cached) " >&6
16311else
16312 if test "$cross_compiling" = yes; then :
16313 gdb_cv_printf_has_long_double=no
16314else
16315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16316/* end confdefs.h. */
16317$ac_includes_default
16318int
16319main ()
16320{
16321char buf[16];
16322 long double f = 3.141592653;
16323 sprintf (buf, "%Lg", f);
16324 return (strncmp ("3.14159", buf, 7));
16325 ;
16326 return 0;
16327}
16328_ACEOF
16329if ac_fn_c_try_run "$LINENO"; then :
16330 gdb_cv_printf_has_long_double=yes
16331else
16332 gdb_cv_printf_has_long_double=no
16333fi
16334rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16335 conftest.$ac_objext conftest.beam conftest.$ac_ext
16336fi
16337
16338fi
16339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
16340$as_echo "$gdb_cv_printf_has_long_double" >&6; }
16341if test "$gdb_cv_printf_has_long_double" = yes; then
16342
16343$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
16344
16345fi
16346
16347# Check if the compiler and runtime support scanning long doubles.
16348
16349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
16350$as_echo_n "checking for long double support in scanf... " >&6; }
16351if ${gdb_cv_scanf_has_long_double+:} false; then :
16352 $as_echo_n "(cached) " >&6
16353else
16354 if test "$cross_compiling" = yes; then :
16355 gdb_cv_scanf_has_long_double=no
16356else
16357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16358/* end confdefs.h. */
16359#include <stdio.h>
16360int
16361main ()
16362{
16363char *buf = "3.141592653";
16364 long double f = 0;
16365 sscanf (buf, "%Lg", &f);
16366 return !(f > 3.14159 && f < 3.14160);
16367 ;
16368 return 0;
16369}
16370_ACEOF
16371if ac_fn_c_try_run "$LINENO"; then :
16372 gdb_cv_scanf_has_long_double=yes
16373else
16374 gdb_cv_scanf_has_long_double=no
16375fi
16376rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16377 conftest.$ac_objext conftest.beam conftest.$ac_ext
16378fi
16379
16380fi
16381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
16382$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
16383if test "$gdb_cv_scanf_has_long_double" = yes; then
16384
16385$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
16386
16387fi
16388
16389case ${host_os} in
16390aix*)
16391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
16392$as_echo_n "checking for -bbigtoc option... " >&6; }
16393if ${gdb_cv_bigtoc+:} false; then :
16394 $as_echo_n "(cached) " >&6
16395else
16396 SAVE_LDFLAGS=$LDFLAGS
16397
16398 case $GCC in
16399 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
16400 *) gdb_cv_bigtoc=-bbigtoc ;;
16401 esac
16402
16403 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
16404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16405/* end confdefs.h. */
16406
16407int
16408main ()
16409{
16410int i;
16411 ;
16412 return 0;
16413}
16414_ACEOF
16415if ac_fn_c_try_link "$LINENO"; then :
16416
16417else
16418 gdb_cv_bigtoc=
16419
16420fi
16421rm -f core conftest.err conftest.$ac_objext \
16422 conftest$ac_exeext conftest.$ac_ext
16423 LDFLAGS="${SAVE_LDFLAGS}"
16424
16425fi
16426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
16427$as_echo "$gdb_cv_bigtoc" >&6; }
16428 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
16429 ;;
16430esac
16431
16432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
16433$as_echo_n "checking for the dynamic export flag... " >&6; }
16434dynamic_list=false
16435if test "${gdb_native}" = yes; then
16436 # The dynamically loaded libthread_db needs access to symbols in the gdb
16437 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
16438 # may not be supported there.
16439 old_LDFLAGS="$LDFLAGS"
16440 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
16441 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
16442 LDFLAGS="$LDFLAGS $RDYNAMIC"
16443 if test "${have_libpython}" = no; then
16444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16445/* end confdefs.h. */
16446
16447int
16448main ()
16449{
16450
16451 ;
16452 return 0;
16453}
16454_ACEOF
16455if ac_fn_c_try_link "$LINENO"; then :
16456 dynamic_list=true
16457fi
16458rm -f core conftest.err conftest.$ac_objext \
16459 conftest$ac_exeext conftest.$ac_ext
16460 else
16461 # Workaround http://bugs.python.org/issue4434 where static
16462 # libpythonX.Y.a would get its symbols required for
16463 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
16464 # Problem does not happen for the recommended libpythonX.Y.so linkage.
16465
16466 # Note the workaround for Python
16467 # http://bugs.python.org/issue10112 earlier has removed
16468 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
16469 # here too, as otherwise it'd make this -Wl,--dynamic-list test
16470 # always pass.
16471 old_CFLAGS="$CFLAGS"
16472 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
16473 old_LIBS="$LIBS"
16474 LIBS="$LIBS $PYTHON_LIBS"
16475 old_CPPFLAGS="$CPPFLAGS"
16476 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
16477 if test "$cross_compiling" = yes; then :
16478 true
16479else
16480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16481/* end confdefs.h. */
16482#include "Python.h"
16483int
16484main ()
16485{
16486int err;
16487 Py_Initialize ();
16488 err = PyRun_SimpleString ("import ctypes\n");
16489 Py_Finalize ();
16490 return err == 0 ? 0 : 1;
16491 ;
16492 return 0;
16493}
16494_ACEOF
16495if ac_fn_c_try_run "$LINENO"; then :
16496 dynamic_list=true
16497fi
16498rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16499 conftest.$ac_objext conftest.beam conftest.$ac_ext
16500fi
16501
16502 LIBS="$old_LIBS"
16503 CFLAGS="$old_CFLAGS"
16504 CPPFLAGS="$old_CPPFLAGS"
16505 fi
16506 LDFLAGS="$old_LDFLAGS"
16507fi
16508if $dynamic_list; then
16509 found="-Wl,--dynamic-list"
16510 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
16511else
16512 found="-rdynamic"
16513 RDYNAMIC="-rdynamic"
16514fi
16515
16516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
16517$as_echo "$found" >&6; }
16518
16519
16520if test "${build}" = "${host}" -a "${host}" = "${target}" ; then
16521 case ${host_os} in
16522 aix*)
16523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
16524$as_echo_n "checking for AiX thread debugging library... " >&6; }
16525 if ${gdb_cv_have_aix_thread_debug+:} false; then :
16526 $as_echo_n "(cached) " >&6
16527else
16528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16529/* end confdefs.h. */
16530#include <sys/pthdebug.h>
16531int
16532main ()
16533{
16534#ifndef PTHDB_VERSION_3
16535 #error
16536 #endif
16537
16538 ;
16539 return 0;
16540}
16541_ACEOF
16542if ac_fn_c_try_compile "$LINENO"; then :
16543 gdb_cv_have_aix_thread_debug=yes
16544else
16545 gdb_cv_have_aix_thread_debug=no
16546
16547fi
16548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16549
16550fi
16551
16552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
16553$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
16554 if test "$gdb_cv_have_aix_thread_debug" = yes; then
16555 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
16556 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
16557 LIBS="$LIBS -lpthdebug"
16558
16559 # Older versions of AIX do not provide the declaration for
16560 # the getthrds function (it appears that it was introduced
16561 # with AIX 6.x).
16562 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
16563"
16564if test "x$ac_cv_have_decl_getthrds" = xyes; then :
16565 ac_have_decl=1
16566else
16567 ac_have_decl=0
16568fi
16569
16570cat >>confdefs.h <<_ACEOF
16571#define HAVE_DECL_GETTHRDS $ac_have_decl
16572_ACEOF
16573
16574 fi
16575 ;;
16576 esac
16577
16578fi
16579
16580if test "x$ac_cv_header_thread_db_h" = "xyes"; then
16581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
16582$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
16583if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
16584 $as_echo_n "(cached) " >&6
16585else
16586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16587/* end confdefs.h. */
16588#include <thread_db.h>
16589int
16590main ()
16591{
16592int i = TD_NOTALLOC;
16593
16594 ;
16595 return 0;
16596}
16597_ACEOF
16598if ac_fn_c_try_compile "$LINENO"; then :
16599 gdb_cv_thread_db_h_has_td_notalloc=yes
16600else
16601 gdb_cv_thread_db_h_has_td_notalloc=no
16602
16603fi
16604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16605
16606fi
16607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
16608$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
16609
16610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
16611$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
16612if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
16613 $as_echo_n "(cached) " >&6
16614else
16615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16616/* end confdefs.h. */
16617#include <thread_db.h>
16618int
16619main ()
16620{
16621int i = TD_VERSION;
16622
16623 ;
16624 return 0;
16625}
16626_ACEOF
16627if ac_fn_c_try_compile "$LINENO"; then :
16628 gdb_cv_thread_db_h_has_td_version=yes
16629else
16630 gdb_cv_thread_db_h_has_td_version=no
16631
16632fi
16633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16634
16635fi
16636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
16637$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
16638
16639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
16640$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
16641if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
16642 $as_echo_n "(cached) " >&6
16643else
16644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16645/* end confdefs.h. */
16646#include <thread_db.h>
16647int
16648main ()
16649{
16650int i = TD_NOTLS;
16651
16652 ;
16653 return 0;
16654}
16655_ACEOF
16656if ac_fn_c_try_compile "$LINENO"; then :
16657 gdb_cv_thread_db_h_has_td_notls=yes
16658else
16659 gdb_cv_thread_db_h_has_td_notls=no
16660
16661fi
16662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16663
16664fi
16665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
16666$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
16667fi
16668if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
16669
16670$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
16671
16672fi
16673if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
16674
16675$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
16676
16677fi
16678if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
16679
16680$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
16681
16682fi
16683
16684case $host_os in
16685 go32* | *djgpp*)
16686 gdbinit=gdb.ini
16687 ;;
16688 *)
16689 gdbinit=.gdbinit
16690 ;;
16691esac
16692
16693cat >>confdefs.h <<_ACEOF
16694#define GDBINIT "$gdbinit"
16695_ACEOF
16696
16697
16698
16699cat >>confdefs.h <<_ACEOF
16700#define GDBEARLYINIT ".gdbearlyinit"
16701_ACEOF
16702
16703
16704
16705# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
16706# except that the argument to --with-sysroot is optional.
16707# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
16708if test "x$with_sysroot" = xyes; then
16709 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
16710fi
16711
16712# Check whether --with-sysroot was given.
16713if test "${with_sysroot+set}" = set; then :
16714 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
16715else
16716 TARGET_SYSTEM_ROOT=
16717fi
16718
16719
16720 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16721 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16722 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
16723 ac_define_dir=`eval echo $ac_define_dir`
16724
16725cat >>confdefs.h <<_ACEOF
16726#define TARGET_SYSTEM_ROOT "$ac_define_dir"
16727_ACEOF
16728
16729
16730
16731
16732 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16733 if test "x$prefix" = xNONE; then
16734 test_prefix=/usr/local
16735 else
16736 test_prefix=$prefix
16737 fi
16738 else
16739 test_prefix=$exec_prefix
16740 fi
16741 value=0
16742 case ${ac_define_dir} in
16743 "${test_prefix}"|"${test_prefix}/"*|\
16744 '${exec_prefix}'|'${exec_prefix}/'*)
16745 value=1
16746 ;;
16747 esac
16748
16749cat >>confdefs.h <<_ACEOF
16750#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
16751_ACEOF
16752
16753
16754
16755
16756
16757# Check whether --with-system-gdbinit was given.
16758if test "${with_system_gdbinit+set}" = set; then :
16759 withval=$with_system_gdbinit;
16760 SYSTEM_GDBINIT=$withval
16761else
16762 SYSTEM_GDBINIT=
16763fi
16764
16765
16766 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16767 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16768 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16769 ac_define_dir=`eval echo $ac_define_dir`
16770
16771cat >>confdefs.h <<_ACEOF
16772#define SYSTEM_GDBINIT "$ac_define_dir"
16773_ACEOF
16774
16775
16776
16777
16778 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16779 if test "x$prefix" = xNONE; then
16780 test_prefix=/usr/local
16781 else
16782 test_prefix=$prefix
16783 fi
16784 else
16785 test_prefix=$exec_prefix
16786 fi
16787 value=0
16788 case ${ac_define_dir} in
16789 "${test_prefix}"|"${test_prefix}/"*|\
16790 '${exec_prefix}'|'${exec_prefix}/'*)
16791 value=1
16792 ;;
16793 esac
16794
16795cat >>confdefs.h <<_ACEOF
16796#define SYSTEM_GDBINIT_RELOCATABLE $value
16797_ACEOF
16798
16799
16800
16801
16802
16803# Check whether --with-system-gdbinit-dir was given.
16804if test "${with_system_gdbinit_dir+set}" = set; then :
16805 withval=$with_system_gdbinit_dir;
16806 SYSTEM_GDBINIT_DIR=$withval
16807else
16808 SYSTEM_GDBINIT_DIR=
16809fi
16810
16811
16812 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16813 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16814 ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR`
16815 ac_define_dir=`eval echo $ac_define_dir`
16816
16817cat >>confdefs.h <<_ACEOF
16818#define SYSTEM_GDBINIT_DIR "$ac_define_dir"
16819_ACEOF
16820
16821
16822
16823
16824 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16825 if test "x$prefix" = xNONE; then
16826 test_prefix=/usr/local
16827 else
16828 test_prefix=$prefix
16829 fi
16830 else
16831 test_prefix=$exec_prefix
16832 fi
16833 value=0
16834 case ${ac_define_dir} in
16835 "${test_prefix}"|"${test_prefix}/"*|\
16836 '${exec_prefix}'|'${exec_prefix}/'*)
16837 value=1
16838 ;;
16839 esac
16840
16841cat >>confdefs.h <<_ACEOF
16842#define SYSTEM_GDBINIT_DIR_RELOCATABLE $value
16843_ACEOF
16844
16845
16846
16847
16848
16849# Check whether --enable-werror was given.
16850if test "${enable_werror+set}" = set; then :
16851 enableval=$enable_werror; case "${enableval}" in
16852 yes | y) ERROR_ON_WARNING="yes" ;;
16853 no | n) ERROR_ON_WARNING="no" ;;
16854 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
16855 esac
16856fi
16857
16858
16859# Enable -Werror by default when using gcc. Turn it off for releases.
16860if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
16861 ERROR_ON_WARNING=yes
16862fi
16863
16864WERROR_CFLAGS=""
16865if test "${ERROR_ON_WARNING}" = yes ; then
16866 WERROR_CFLAGS="-Werror"
16867fi
16868
16869# The options we'll try to enable.
16870build_warnings="-Wall -Wpointer-arith \
16871-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
16872-Wno-switch -Wno-char-subscripts \
16873-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
16874-Wno-sign-compare -Wno-error=maybe-uninitialized \
16875-Wno-mismatched-tags \
16876-Wno-error=deprecated-register \
16877-Wsuggest-override \
16878-Wimplicit-fallthrough=3 \
16879-Wduplicated-cond \
16880-Wshadow=local \
16881-Wdeprecated-copy \
16882-Wdeprecated-copy-dtor \
16883-Wredundant-move \
16884-Wmissing-declarations \
16885-Wmissing-prototypes \
16886-Wstrict-null-sentinel \
16887"
16888
16889case "${host}" in
16890 *-*-mingw32*)
16891 # Enable -Wno-format by default when using gcc on mingw since many
16892 # GCC versions complain about %I64.
16893 build_warnings="$build_warnings -Wno-format" ;;
16894 *-*-solaris*)
16895 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
16896 # doesn't understand.
16897 build_warnings="$build_warnings -Wno-unknown-pragmas"
16898 # Solaris 11 <unistd.h> marks vfork deprecated.
16899 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
16900 *)
16901 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
16902 # but there's a special case for this below.
16903 build_warnings="$build_warnings -Wformat-nonliteral" ;;
16904esac
16905
16906# Check whether --enable-build-warnings was given.
16907if test "${enable_build_warnings+set}" = set; then :
16908 enableval=$enable_build_warnings; case "${enableval}" in
16909 yes) ;;
16910 no) build_warnings="-w";;
16911 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16912 build_warnings="${build_warnings} ${t}";;
16913 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16914 build_warnings="${t} ${build_warnings}";;
16915 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16916esac
16917if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
16918 echo "Setting compiler warning flags = $build_warnings" 6>&1
16919fi
16920fi
16921# Check whether --enable-gdb-build-warnings was given.
16922if test "${enable_gdb_build_warnings+set}" = set; then :
16923 enableval=$enable_gdb_build_warnings; case "${enableval}" in
16924 yes) ;;
16925 no) build_warnings="-w";;
16926 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16927 build_warnings="${build_warnings} ${t}";;
16928 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16929 build_warnings="${t} ${build_warnings}";;
16930 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16931esac
16932if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
16933 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
16934fi
16935fi
16936
16937# The set of warnings supported by a C++ compiler is not the same as
16938# of the C compiler.
16939ac_ext=cpp
16940ac_cpp='$CXXCPP $CPPFLAGS'
16941ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16942ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16943ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16944
16945
16946WARN_CFLAGS=""
16947if test "x${build_warnings}" != x -a "x$GCC" = xyes
16948then
16949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
16950$as_echo_n "checking compiler warning flags... " >&6; }
16951 # Separate out the -Werror flag as some files just cannot be
16952 # compiled with it enabled.
16953 for w in ${build_warnings}; do
16954 # GCC does not complain about -Wno-unknown-warning. Invert
16955 # and test -Wunknown-warning instead.
16956 case $w in
16957 -Wno-*)
16958 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
16959 -Wformat-nonliteral)
16960 # gcc requires -Wformat before -Wformat-nonliteral
16961 # will work, so stick them together.
16962 w="-Wformat $w"
16963 wtest="$w"
16964 ;;
16965 *)
16966 wtest=$w ;;
16967 esac
16968
16969 case $w in
16970 -Werr*) WERROR_CFLAGS=-Werror ;;
16971 *)
16972 # Check whether GCC accepts it.
16973 saved_CFLAGS="$CFLAGS"
16974 CFLAGS="$CFLAGS -Werror $wtest"
16975 saved_CXXFLAGS="$CXXFLAGS"
16976 CXXFLAGS="$CXXFLAGS -Werror $wtest"
16977 if test "x$w" = "x-Wunused-variable"; then
16978 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
16979 # fixed in GCC 4.9. This test is derived from the gdb
16980 # source code that triggered this bug in GCC.
16981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16982/* end confdefs.h. */
16983struct scoped_restore_base {};
16984 struct scoped_restore_tmpl : public scoped_restore_base {
16985 ~scoped_restore_tmpl() {}
16986 };
16987int
16988main ()
16989{
16990const scoped_restore_base &b = scoped_restore_tmpl();
16991
16992 ;
16993 return 0;
16994}
16995_ACEOF
16996if ac_fn_cxx_try_compile "$LINENO"; then :
16997 WARN_CFLAGS="${WARN_CFLAGS} $w"
16998fi
16999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17000 else
17001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17002/* end confdefs.h. */
17003
17004int
17005main ()
17006{
17007
17008 ;
17009 return 0;
17010}
17011_ACEOF
17012if ac_fn_cxx_try_compile "$LINENO"; then :
17013 WARN_CFLAGS="${WARN_CFLAGS} $w"
17014fi
17015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17016 fi
17017 CFLAGS="$saved_CFLAGS"
17018 CXXFLAGS="$saved_CXXFLAGS"
17019 esac
17020 done
17021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
17022$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
17023fi
17024
17025
17026
17027ac_ext=c
17028ac_cpp='$CPP $CPPFLAGS'
17029ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17030ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17031ac_compiler_gnu=$ac_cv_c_compiler_gnu
17032
17033
17034
17035# Check whether --enable-ubsan was given.
17036if test "${enable_ubsan+set}" = set; then :
17037 enableval=$enable_ubsan;
17038else
17039 enable_ubsan=no
17040fi
17041
17042if test "x$enable_ubsan" = xauto; then
17043 if $development; then
17044 enable_ubsan=yes
17045 fi
17046fi
17047ac_ext=cpp
17048ac_cpp='$CXXCPP $CPPFLAGS'
17049ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17050ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17051ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17052
17053if test "x$enable_ubsan" = xyes; then
17054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
17055$as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
17056 saved_CXXFLAGS="$CXXFLAGS"
17057 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
17058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17059/* end confdefs.h. */
17060
17061int
17062main ()
17063{
17064
17065 ;
17066 return 0;
17067}
17068_ACEOF
17069if ac_fn_cxx_try_link "$LINENO"; then :
17070 enable_ubsan=yes
17071else
17072 enable_ubsan=no
17073
17074fi
17075rm -f core conftest.err conftest.$ac_objext \
17076 conftest$ac_exeext conftest.$ac_ext
17077 CXXFLAGS="$saved_CXXFLAGS"
17078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
17079$as_echo "$enable_ubsan" >&6; }
17080 if test "x$enable_ubsan" = xyes; then
17081 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
17082 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
17083 fi
17084fi
17085ac_ext=c
17086ac_cpp='$CPP $CPPFLAGS'
17087ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17088ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17089ac_compiler_gnu=$ac_cv_c_compiler_gnu
17090
17091
17092
17093# In the Cygwin environment, we need some additional flags.
17094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
17095$as_echo_n "checking for cygwin... " >&6; }
17096if ${gdb_cv_os_cygwin+:} false; then :
17097 $as_echo_n "(cached) " >&6
17098else
17099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17100/* end confdefs.h. */
17101
17102#if defined (__CYGWIN__) || defined (__CYGWIN32__)
17103lose
17104#endif
17105_ACEOF
17106if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17107 $EGREP "^lose$" >/dev/null 2>&1; then :
17108 gdb_cv_os_cygwin=yes
17109else
17110 gdb_cv_os_cygwin=no
17111fi
17112rm -f conftest*
17113
17114fi
17115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
17116$as_echo "$gdb_cv_os_cygwin" >&6; }
17117
17118
17119SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
17120case ${host} in
17121 *go32* ) SER_HARDWIRE=ser-go32.o ;;
17122 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
17123 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
17124 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
17125esac
17126
17127
17128# libreadline needs libuser32.a in a cygwin environment
17129WIN32LIBS=
17130if test x"$gdb_cv_os_cygwin" = xyes; then
17131 WIN32LIBS="-luser32"
17132 case "${target}" in
17133 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
17134 ;;
17135 esac
17136fi
17137
17138# The ser-tcp.c module requires sockets.
17139# Note that WIN32APILIBS is set by GDB_AC_COMMON.
17140WIN32LIBS="$WIN32LIBS $WIN32APILIBS"
17141
17142# Add ELF support to GDB, but only if BFD includes ELF support.
17143
17144 OLD_CFLAGS=$CFLAGS
17145 OLD_LDFLAGS=$LDFLAGS
17146 OLD_LIBS=$LIBS
17147 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
17148 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
17149 # always want our bfd.
17150 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
17151 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
17152 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
17153 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
17154 LIBS="-lbfd -liberty -lz $intl $LIBS"
17155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
17156$as_echo_n "checking for ELF support in BFD... " >&6; }
17157if ${gdb_cv_var_elf+:} false; then :
17158 $as_echo_n "(cached) " >&6
17159else
17160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17161/* end confdefs.h. */
17162#include <stdlib.h>
17163 #include <string.h>
17164 #include "bfd.h"
17165 #include "elf-bfd.h"
17166int
17167main ()
17168{
17169return bfd_get_elf_phdr_upper_bound (NULL);
17170
17171 ;
17172 return 0;
17173}
17174_ACEOF
17175if ac_fn_c_try_link "$LINENO"; then :
17176 gdb_cv_var_elf=yes
17177else
17178 gdb_cv_var_elf=no
17179
17180fi
17181rm -f core conftest.err conftest.$ac_objext \
17182 conftest$ac_exeext conftest.$ac_ext
17183
17184fi
17185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
17186$as_echo "$gdb_cv_var_elf" >&6; }
17187 CFLAGS=$OLD_CFLAGS
17188 LDFLAGS=$OLD_LDFLAGS
17189 LIBS=$OLD_LIBS
17190if test "$gdb_cv_var_elf" = yes; then
17191 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o \
17192 gcore-elf.o elf-none-tdep.o"
17193
17194$as_echo "#define HAVE_ELF 1" >>confdefs.h
17195
17196 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
17197 if test "$plugins" = "yes"; then
17198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
17199$as_echo_n "checking for library containing dlopen... " >&6; }
17200if ${ac_cv_search_dlopen+:} false; then :
17201 $as_echo_n "(cached) " >&6
17202else
17203 ac_func_search_save_LIBS=$LIBS
17204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17205/* end confdefs.h. */
17206
17207/* Override any GCC internal prototype to avoid an error.
17208 Use char because int might match the return type of a GCC
17209 builtin and then its argument prototype would still apply. */
17210#ifdef __cplusplus
17211extern "C"
17212#endif
17213char dlopen ();
17214int
17215main ()
17216{
17217return dlopen ();
17218 ;
17219 return 0;
17220}
17221_ACEOF
17222for ac_lib in '' dl; do
17223 if test -z "$ac_lib"; then
17224 ac_res="none required"
17225 else
17226 ac_res=-l$ac_lib
17227 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17228 fi
17229 if ac_fn_c_try_link "$LINENO"; then :
17230 ac_cv_search_dlopen=$ac_res
17231fi
17232rm -f core conftest.err conftest.$ac_objext \
17233 conftest$ac_exeext
17234 if ${ac_cv_search_dlopen+:} false; then :
17235 break
17236fi
17237done
17238if ${ac_cv_search_dlopen+:} false; then :
17239
17240else
17241 ac_cv_search_dlopen=no
17242fi
17243rm conftest.$ac_ext
17244LIBS=$ac_func_search_save_LIBS
17245fi
17246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
17247$as_echo "$ac_cv_search_dlopen" >&6; }
17248ac_res=$ac_cv_search_dlopen
17249if test "$ac_res" != no; then :
17250 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17251
17252fi
17253
17254 fi
17255fi
17256
17257# Add macho support to GDB, but only if BFD includes it.
17258
17259 OLD_CFLAGS=$CFLAGS
17260 OLD_LDFLAGS=$LDFLAGS
17261 OLD_LIBS=$LIBS
17262 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
17263 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
17264 # always want our bfd.
17265 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
17266 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
17267 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
17268 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
17269 LIBS="-lbfd -liberty -lz $intl $LIBS"
17270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
17271$as_echo_n "checking for Mach-O support in BFD... " >&6; }
17272if ${gdb_cv_var_macho+:} false; then :
17273 $as_echo_n "(cached) " >&6
17274else
17275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17276/* end confdefs.h. */
17277#include <stdlib.h>
17278 #include <string.h>
17279 #include "bfd.h"
17280 #include "mach-o.h"
17281int
17282main ()
17283{
17284return bfd_mach_o_lookup_command (NULL, 0, NULL);
17285
17286 ;
17287 return 0;
17288}
17289_ACEOF
17290if ac_fn_c_try_link "$LINENO"; then :
17291 gdb_cv_var_macho=yes
17292else
17293 gdb_cv_var_macho=no
17294
17295fi
17296rm -f core conftest.err conftest.$ac_objext \
17297 conftest$ac_exeext conftest.$ac_ext
17298
17299fi
17300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
17301$as_echo "$gdb_cv_var_macho" >&6; }
17302 CFLAGS=$OLD_CFLAGS
17303 LDFLAGS=$OLD_LDFLAGS
17304 LIBS=$OLD_LIBS
17305if test "$gdb_cv_var_macho" = yes; then
17306 CONFIG_OBS="$CONFIG_OBS machoread.o"
17307fi
17308
17309# Add any host-specific objects to GDB.
17310CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
17311
17312# If building on ELF, look for lzma support for embedded compressed debug info.
17313if test "$gdb_cv_var_elf" = yes; then
17314
17315# Check whether --with-lzma was given.
17316if test "${with_lzma+set}" = set; then :
17317 withval=$with_lzma;
17318else
17319 with_lzma=auto
17320fi
17321
17322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
17323$as_echo_n "checking whether to use lzma... " >&6; }
17324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
17325$as_echo "$with_lzma" >&6; }
17326
17327 if test "${with_lzma}" != no; then
17328
17329
17330
17331
17332
17333
17334
17335
17336 use_additional=yes
17337
17338 acl_save_prefix="$prefix"
17339 prefix="$acl_final_prefix"
17340 acl_save_exec_prefix="$exec_prefix"
17341 exec_prefix="$acl_final_exec_prefix"
17342
17343 eval additional_includedir=\"$includedir\"
17344 eval additional_libdir=\"$libdir\"
17345
17346 exec_prefix="$acl_save_exec_prefix"
17347 prefix="$acl_save_prefix"
17348
17349
17350# Check whether --with-liblzma-prefix was given.
17351if test "${with_liblzma_prefix+set}" = set; then :
17352 withval=$with_liblzma_prefix;
17353 if test "X$withval" = "Xno"; then
17354 use_additional=no
17355 else
17356 if test "X$withval" = "X"; then
17357
17358 acl_save_prefix="$prefix"
17359 prefix="$acl_final_prefix"
17360 acl_save_exec_prefix="$exec_prefix"
17361 exec_prefix="$acl_final_exec_prefix"
17362
17363 eval additional_includedir=\"$includedir\"
17364 eval additional_libdir=\"$libdir\"
17365
17366 exec_prefix="$acl_save_exec_prefix"
17367 prefix="$acl_save_prefix"
17368
17369 else
17370 additional_includedir="$withval/include"
17371 additional_libdir="$withval/lib"
17372 fi
17373 fi
17374
17375fi
17376
17377
17378# Check whether --with-liblzma-type was given.
17379if test "${with_liblzma_type+set}" = set; then :
17380 withval=$with_liblzma_type; with_liblzma_type=$withval
17381else
17382 with_liblzma_type=auto
17383fi
17384
17385 lib_type=`eval echo \$with_liblzma_type`
17386
17387 LIBLZMA=
17388 LTLIBLZMA=
17389 INCLZMA=
17390 rpathdirs=
17391 ltrpathdirs=
17392 names_already_handled=
17393 names_next_round='lzma '
17394 while test -n "$names_next_round"; do
17395 names_this_round="$names_next_round"
17396 names_next_round=
17397 for name in $names_this_round; do
17398 already_handled=
17399 for n in $names_already_handled; do
17400 if test "$n" = "$name"; then
17401 already_handled=yes
17402 break
17403 fi
17404 done
17405 if test -z "$already_handled"; then
17406 names_already_handled="$names_already_handled $name"
17407 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17408 eval value=\"\$HAVE_LIB$uppername\"
17409 if test -n "$value"; then
17410 if test "$value" = yes; then
17411 eval value=\"\$LIB$uppername\"
17412 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
17413 eval value=\"\$LTLIB$uppername\"
17414 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
17415 else
17416 :
17417 fi
17418 else
17419 found_dir=
17420 found_la=
17421 found_so=
17422 found_a=
17423 if test $use_additional = yes; then
17424 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
17425 found_dir="$additional_libdir"
17426 found_so="$additional_libdir/lib$name.$shlibext"
17427 if test -f "$additional_libdir/lib$name.la"; then
17428 found_la="$additional_libdir/lib$name.la"
17429 fi
17430 elif test x$lib_type != xshared; then
17431 if test -f "$additional_libdir/lib$name.$libext"; then
17432 found_dir="$additional_libdir"
17433 found_a="$additional_libdir/lib$name.$libext"
17434 if test -f "$additional_libdir/lib$name.la"; then
17435 found_la="$additional_libdir/lib$name.la"
17436 fi
17437 fi
17438 fi
17439 fi
17440 if test "X$found_dir" = "X"; then
17441 for x in $LDFLAGS $LTLIBLZMA; do
17442
17443 acl_save_prefix="$prefix"
17444 prefix="$acl_final_prefix"
17445 acl_save_exec_prefix="$exec_prefix"
17446 exec_prefix="$acl_final_exec_prefix"
17447 eval x=\"$x\"
17448 exec_prefix="$acl_save_exec_prefix"
17449 prefix="$acl_save_prefix"
17450
17451 case "$x" in
17452 -L*)
17453 dir=`echo "X$x" | sed -e 's/^X-L//'`
17454 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
17455 found_dir="$dir"
17456 found_so="$dir/lib$name.$shlibext"
17457 if test -f "$dir/lib$name.la"; then
17458 found_la="$dir/lib$name.la"
17459 fi
17460 elif test x$lib_type != xshared; then
17461 if test -f "$dir/lib$name.$libext"; then
17462 found_dir="$dir"
17463 found_a="$dir/lib$name.$libext"
17464 if test -f "$dir/lib$name.la"; then
17465 found_la="$dir/lib$name.la"
17466 fi
17467 fi
17468 fi
17469 ;;
17470 esac
17471 if test "X$found_dir" != "X"; then
17472 break
17473 fi
17474 done
17475 fi
17476 if test "X$found_dir" != "X"; then
17477 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
17478 if test "X$found_so" != "X"; then
17479 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17480 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17481 else
17482 haveit=
17483 for x in $ltrpathdirs; do
17484 if test "X$x" = "X$found_dir"; then
17485 haveit=yes
17486 break
17487 fi
17488 done
17489 if test -z "$haveit"; then
17490 ltrpathdirs="$ltrpathdirs $found_dir"
17491 fi
17492 if test "$hardcode_direct" = yes; then
17493 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17494 else
17495 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17496 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17497 haveit=
17498 for x in $rpathdirs; do
17499 if test "X$x" = "X$found_dir"; then
17500 haveit=yes
17501 break
17502 fi
17503 done
17504 if test -z "$haveit"; then
17505 rpathdirs="$rpathdirs $found_dir"
17506 fi
17507 else
17508 haveit=
17509 for x in $LDFLAGS $LIBLZMA; do
17510
17511 acl_save_prefix="$prefix"
17512 prefix="$acl_final_prefix"
17513 acl_save_exec_prefix="$exec_prefix"
17514 exec_prefix="$acl_final_exec_prefix"
17515 eval x=\"$x\"
17516 exec_prefix="$acl_save_exec_prefix"
17517 prefix="$acl_save_prefix"
17518
17519 if test "X$x" = "X-L$found_dir"; then
17520 haveit=yes
17521 break
17522 fi
17523 done
17524 if test -z "$haveit"; then
17525 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
17526 fi
17527 if test "$hardcode_minus_L" != no; then
17528 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17529 else
17530 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17531 fi
17532 fi
17533 fi
17534 fi
17535 else
17536 if test "X$found_a" != "X"; then
17537 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
17538 else
17539 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
17540 fi
17541 fi
17542 additional_includedir=
17543 case "$found_dir" in
17544 */lib | */lib/)
17545 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17546 additional_includedir="$basedir/include"
17547 ;;
17548 esac
17549 if test "X$additional_includedir" != "X"; then
17550 if test "X$additional_includedir" != "X/usr/include"; then
17551 haveit=
17552 if test "X$additional_includedir" = "X/usr/local/include"; then
17553 if test -n "$GCC"; then
17554 case $host_os in
17555 linux*) haveit=yes;;
17556 esac
17557 fi
17558 fi
17559 if test -z "$haveit"; then
17560 for x in $CPPFLAGS $INCLZMA; do
17561
17562 acl_save_prefix="$prefix"
17563 prefix="$acl_final_prefix"
17564 acl_save_exec_prefix="$exec_prefix"
17565 exec_prefix="$acl_final_exec_prefix"
17566 eval x=\"$x\"
17567 exec_prefix="$acl_save_exec_prefix"
17568 prefix="$acl_save_prefix"
17569
17570 if test "X$x" = "X-I$additional_includedir"; then
17571 haveit=yes
17572 break
17573 fi
17574 done
17575 if test -z "$haveit"; then
17576 if test -d "$additional_includedir"; then
17577 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
17578 fi
17579 fi
17580 fi
17581 fi
17582 fi
17583 if test -n "$found_la"; then
17584 save_libdir="$libdir"
17585 case "$found_la" in
17586 */* | *\\*) . "$found_la" ;;
17587 *) . "./$found_la" ;;
17588 esac
17589 libdir="$save_libdir"
17590 for dep in $dependency_libs; do
17591 case "$dep" in
17592 -L*)
17593 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17594 if test "X$additional_libdir" != "X/usr/lib"; then
17595 haveit=
17596 if test "X$additional_libdir" = "X/usr/local/lib"; then
17597 if test -n "$GCC"; then
17598 case $host_os in
17599 linux*) haveit=yes;;
17600 esac
17601 fi
17602 fi
17603 if test -z "$haveit"; then
17604 haveit=
17605 for x in $LDFLAGS $LIBLZMA; do
17606
17607 acl_save_prefix="$prefix"
17608 prefix="$acl_final_prefix"
17609 acl_save_exec_prefix="$exec_prefix"
17610 exec_prefix="$acl_final_exec_prefix"
17611 eval x=\"$x\"
17612 exec_prefix="$acl_save_exec_prefix"
17613 prefix="$acl_save_prefix"
17614
17615 if test "X$x" = "X-L$additional_libdir"; then
17616 haveit=yes
17617 break
17618 fi
17619 done
17620 if test -z "$haveit"; then
17621 if test -d "$additional_libdir"; then
17622 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
17623 fi
17624 fi
17625 haveit=
17626 for x in $LDFLAGS $LTLIBLZMA; do
17627
17628 acl_save_prefix="$prefix"
17629 prefix="$acl_final_prefix"
17630 acl_save_exec_prefix="$exec_prefix"
17631 exec_prefix="$acl_final_exec_prefix"
17632 eval x=\"$x\"
17633 exec_prefix="$acl_save_exec_prefix"
17634 prefix="$acl_save_prefix"
17635
17636 if test "X$x" = "X-L$additional_libdir"; then
17637 haveit=yes
17638 break
17639 fi
17640 done
17641 if test -z "$haveit"; then
17642 if test -d "$additional_libdir"; then
17643 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
17644 fi
17645 fi
17646 fi
17647 fi
17648 ;;
17649 -R*)
17650 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17651 if test "$enable_rpath" != no; then
17652 haveit=
17653 for x in $rpathdirs; do
17654 if test "X$x" = "X$dir"; then
17655 haveit=yes
17656 break
17657 fi
17658 done
17659 if test -z "$haveit"; then
17660 rpathdirs="$rpathdirs $dir"
17661 fi
17662 haveit=
17663 for x in $ltrpathdirs; do
17664 if test "X$x" = "X$dir"; then
17665 haveit=yes
17666 break
17667 fi
17668 done
17669 if test -z "$haveit"; then
17670 ltrpathdirs="$ltrpathdirs $dir"
17671 fi
17672 fi
17673 ;;
17674 -l*)
17675 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17676 ;;
17677 *.la)
17678 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17679 ;;
17680 *)
17681 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
17682 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
17683 ;;
17684 esac
17685 done
17686 fi
17687 else
17688 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
17689 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17690 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
17691 else
17692 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l:lib$name.$libext"
17693 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l:lib$name.$libext"
17694 fi
17695 fi
17696 fi
17697 fi
17698 done
17699 done
17700 if test "X$rpathdirs" != "X"; then
17701 if test -n "$hardcode_libdir_separator"; then
17702 alldirs=
17703 for found_dir in $rpathdirs; do
17704 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17705 done
17706 acl_save_libdir="$libdir"
17707 libdir="$alldirs"
17708 eval flag=\"$hardcode_libdir_flag_spec\"
17709 libdir="$acl_save_libdir"
17710 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17711 else
17712 for found_dir in $rpathdirs; do
17713 acl_save_libdir="$libdir"
17714 libdir="$found_dir"
17715 eval flag=\"$hardcode_libdir_flag_spec\"
17716 libdir="$acl_save_libdir"
17717 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17718 done
17719 fi
17720 fi
17721 if test "X$ltrpathdirs" != "X"; then
17722 for found_dir in $ltrpathdirs; do
17723 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
17724 done
17725 fi
17726
17727
17728 ac_save_CPPFLAGS="$CPPFLAGS"
17729
17730 for element in $INCLZMA; do
17731 haveit=
17732 for x in $CPPFLAGS; do
17733
17734 acl_save_prefix="$prefix"
17735 prefix="$acl_final_prefix"
17736 acl_save_exec_prefix="$exec_prefix"
17737 exec_prefix="$acl_final_exec_prefix"
17738 eval x=\"$x\"
17739 exec_prefix="$acl_save_exec_prefix"
17740 prefix="$acl_save_prefix"
17741
17742 if test "X$x" = "X$element"; then
17743 haveit=yes
17744 break
17745 fi
17746 done
17747 if test -z "$haveit"; then
17748 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17749 fi
17750 done
17751
17752
17753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
17754$as_echo_n "checking for liblzma... " >&6; }
17755if ${ac_cv_liblzma+:} false; then :
17756 $as_echo_n "(cached) " >&6
17757else
17758
17759 ac_save_LIBS="$LIBS"
17760 LIBS="$LIBS $LIBLZMA"
17761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17762/* end confdefs.h. */
17763#include "lzma.h"
17764int
17765main ()
17766{
17767lzma_index_iter iter;
17768 lzma_index_iter_init (&iter, 0);
17769 lzma_mf_is_supported (LZMA_MF_HC3);
17770 ;
17771 return 0;
17772}
17773_ACEOF
17774if ac_fn_c_try_link "$LINENO"; then :
17775 ac_cv_liblzma=yes
17776else
17777 ac_cv_liblzma=no
17778fi
17779rm -f core conftest.err conftest.$ac_objext \
17780 conftest$ac_exeext conftest.$ac_ext
17781 LIBS="$ac_save_LIBS"
17782
17783fi
17784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
17785$as_echo "$ac_cv_liblzma" >&6; }
17786 if test "$ac_cv_liblzma" = yes; then
17787 HAVE_LIBLZMA=yes
17788
17789$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
17790
17791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
17792$as_echo_n "checking how to link with liblzma... " >&6; }
17793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
17794$as_echo "$LIBLZMA" >&6; }
17795 else
17796 HAVE_LIBLZMA=no
17797 CPPFLAGS="$ac_save_CPPFLAGS"
17798 LIBLZMA=
17799 LTLIBLZMA=
17800 fi
17801
17802
17803
17804
17805
17806
17807 if test "$HAVE_LIBLZMA" != yes; then
17808 if test "$with_lzma" = yes; then
17809 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
17810 fi
17811 fi
17812 fi
17813fi
17814
17815LIBGUI="../libgui/src/libgui.a"
17816GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
17817
17818
17819
17820WIN32LDAPP=
17821
17822
17823
17824case "${host}" in
17825*-*-cygwin* | *-*-mingw* )
17826 configdir="win"
17827 ;;
17828*)
17829 configdir="unix"
17830 ;;
17831esac
17832
17833GDBTKLIBS=
17834if test "${enable_gdbtk}" = "yes"; then
17835
17836 # Gdbtk must have an absolute path to srcdir in order to run
17837 # properly when not installed.
17838 here=`pwd`
17839 cd ${srcdir}
17840 GDBTK_SRC_DIR=`pwd`
17841 cd $here
17842
17843
17844 #
17845 # Ok, lets find the tcl configuration
17846 # First, look for one uninstalled.
17847 # the alternative search directory is invoked by --with-tcl
17848 #
17849
17850 if test x"${no_tcl}" = x ; then
17851 # we reset no_tcl in case something fails here
17852 no_tcl=true
17853
17854# Check whether --with-tcl was given.
17855if test "${with_tcl+set}" = set; then :
17856 withval=$with_tcl; with_tclconfig=${withval}
17857fi
17858
17859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
17860$as_echo_n "checking for Tcl configuration... " >&6; }
17861 if ${ac_cv_c_tclconfig+:} false; then :
17862 $as_echo_n "(cached) " >&6
17863else
17864
17865
17866 # First check to see if --with-tcl was specified.
17867 case "${host}" in
17868 *-*-cygwin*) platDir="win" ;;
17869 *) platDir="unix" ;;
17870 esac
17871 if test x"${with_tclconfig}" != x ; then
17872 if test -f "${with_tclconfig}/tclConfig.sh" ; then
17873 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
17874 else
17875 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
17876 fi
17877 fi
17878
17879 # then check for a private Tcl installation
17880 if test x"${ac_cv_c_tclconfig}" = x ; then
17881 for i in \
17882 ../tcl \
17883 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17884 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
17885 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
17886 ../../tcl \
17887 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17888 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
17889 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
17890 ../../../tcl \
17891 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17892 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
17893 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
17894 if test -f "$i/$platDir/tclConfig.sh" ; then
17895 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17896 break
17897 fi
17898 done
17899 fi
17900
17901 # on Darwin, check in Framework installation locations
17902 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
17903 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17904 `ls -d /Library/Frameworks 2>/dev/null` \
17905 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17906 `ls -d /System/Library/Frameworks 2>/dev/null` \
17907 ; do
17908 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
17909 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
17910 break
17911 fi
17912 done
17913 fi
17914
17915 # check in a few common install locations
17916 if test x"${ac_cv_c_tclconfig}" = x ; then
17917 for i in `ls -d ${libdir} 2>/dev/null` \
17918 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17919 `ls -d ${prefix}/lib 2>/dev/null` \
17920 `ls -d /usr/local/lib 2>/dev/null` \
17921 `ls -d /usr/contrib/lib 2>/dev/null` \
17922 `ls -d /usr/lib 2>/dev/null` \
17923 ; do
17924 if test -f "$i/tclConfig.sh" ; then
17925 ac_cv_c_tclconfig=`(cd $i; pwd)`
17926 break
17927 fi
17928 done
17929 fi
17930
17931 # check in a few other private locations
17932 if test x"${ac_cv_c_tclconfig}" = x ; then
17933 for i in \
17934 ${srcdir}/../tcl \
17935 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17936 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
17937 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
17938 if test -f "$i/$platDir/tclConfig.sh" ; then
17939 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17940 break
17941 fi
17942 done
17943 fi
17944
17945fi
17946
17947
17948 if test x"${ac_cv_c_tclconfig}" = x ; then
17949 TCL_BIN_DIR="# no Tcl configs found"
17950 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
17951$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
17952 else
17953 no_tcl=
17954 TCL_BIN_DIR=${ac_cv_c_tclconfig}
17955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
17956$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
17957 fi
17958 fi
17959
17960
17961 # If $no_tk is nonempty, then we can't do Tk, and there is no
17962 # point to doing Tcl.
17963
17964 #
17965 # Ok, lets find the tk configuration
17966 # First, look for one uninstalled.
17967 # the alternative search directory is invoked by --with-tk
17968 #
17969
17970 if test x"${no_tk}" = x ; then
17971 # we reset no_tk in case something fails here
17972 no_tk=true
17973
17974# Check whether --with-tk was given.
17975if test "${with_tk+set}" = set; then :
17976 withval=$with_tk; with_tkconfig=${withval}
17977fi
17978
17979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
17980$as_echo_n "checking for Tk configuration... " >&6; }
17981 if ${ac_cv_c_tkconfig+:} false; then :
17982 $as_echo_n "(cached) " >&6
17983else
17984
17985
17986 # First check to see if --with-tkconfig was specified.
17987 if test x"${with_tkconfig}" != x ; then
17988 if test -f "${with_tkconfig}/tkConfig.sh" ; then
17989 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
17990 else
17991 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
17992 fi
17993 fi
17994
17995 # then check for a private Tk library
17996 case "${host}" in
17997 *-*-cygwin*) platDir="win" ;;
17998 *) platDir="unix" ;;
17999 esac
18000 if test x"${ac_cv_c_tkconfig}" = x ; then
18001 for i in \
18002 ../tk \
18003 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
18004 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
18005 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
18006 ../../tk \
18007 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
18008 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
18009 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
18010 ../../../tk \
18011 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
18012 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
18013 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
18014 if test -f "$i/$platDir/tkConfig.sh" ; then
18015 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
18016 break
18017 fi
18018 done
18019 fi
18020
18021 # on Darwin, check in Framework installation locations
18022 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
18023 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
18024 `ls -d /Library/Frameworks 2>/dev/null` \
18025 `ls -d /Network/Library/Frameworks 2>/dev/null` \
18026 `ls -d /System/Library/Frameworks 2>/dev/null` \
18027 ; do
18028 if test -f "$i/Tk.framework/tkConfig.sh" ; then
18029 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
18030 break
18031 fi
18032 done
18033 fi
18034
18035 # check in a few common install locations
18036 if test x"${ac_cv_c_tkconfig}" = x ; then
18037 for i in `ls -d ${libdir} 2>/dev/null` \
18038 `ls -d ${exec_prefix}/lib 2>/dev/null` \
18039 `ls -d ${prefix}/lib 2>/dev/null` \
18040 `ls -d /usr/local/lib 2>/dev/null` \
18041 `ls -d /usr/contrib/lib 2>/dev/null` \
18042 `ls -d /usr/lib 2>/dev/null` \
18043 ; do
18044 if test -f "$i/tkConfig.sh" ; then
18045 ac_cv_c_tkconfig=`(cd $i; pwd)`
18046 break
18047 fi
18048 done
18049 fi
18050 # check in a few other private locations
18051 if test x"${ac_cv_c_tkconfig}" = x ; then
18052 for i in \
18053 ${srcdir}/../tk \
18054 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
18055 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
18056 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
18057 if test -f "$i/$platDir/tkConfig.sh" ; then
18058 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
18059 break
18060 fi
18061 done
18062 fi
18063
18064fi
18065
18066
18067 if test x"${ac_cv_c_tkconfig}" = x ; then
18068 TK_BIN_DIR="# no Tk configs found"
18069 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
18070$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
18071 else
18072 no_tk=
18073 TK_BIN_DIR=${ac_cv_c_tkconfig}
18074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
18075$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
18076 fi
18077 fi
18078
18079
18080 if test -z "${no_tcl}" -a -z "${no_tk}"; then
18081
18082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
18083$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
18084
18085 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
18086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
18087$as_echo "loading" >&6; }
18088 . ${TCL_BIN_DIR}/tclConfig.sh
18089 else
18090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
18091$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
18092 fi
18093
18094 # eval is required to do the TCL_DBGX substitution
18095 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
18096 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
18097
18098 # If the TCL_BIN_DIR is the build directory (not the install directory),
18099 # then set the common variable name to the value of the build variables.
18100 # For example, the variable TCL_LIB_SPEC will be set to the value
18101 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
18102 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
18103 # installed and uninstalled version of Tcl.
18104 if test -f "${TCL_BIN_DIR}/Makefile" ; then
18105 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
18106 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
18107 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
18108 elif test "`uname -s`" = "Darwin"; then
18109 # If Tcl was built as a framework, attempt to use the libraries
18110 # from the framework at the given location so that linking works
18111 # against Tcl.framework installed in an arbitrary location.
18112 case ${TCL_DEFS} in
18113 *TCL_FRAMEWORK*)
18114 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
18115 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
18116 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
18117 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
18118 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
18119 break
18120 fi
18121 done
18122 fi
18123 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
18124 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
18125 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
18126 fi
18127 ;;
18128 esac
18129 fi
18130
18131 # eval is required to do the TCL_DBGX substitution
18132 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
18133 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
18134 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
18135 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
18136
18137
18138
18139
18140
18141
18142
18143
18144
18145
18146
18147
18148
18149
18150
18151 # Check for in-tree tcl
18152 here=`pwd`
18153 cd ${srcdir}/..
18154 topdir=`pwd`
18155 cd ${here}
18156
18157 intree="no"
18158 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
18159 intree="yes"
18160 fi
18161
18162 # Find Tcl private headers
18163 if test x"${intree}" = xno; then
18164
18165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
18166$as_echo_n "checking for Tcl private headers... " >&6; }
18167 private_dir=""
18168 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
18169 if test -f ${dir}/tclInt.h ; then
18170 private_dir=${dir}
18171 fi
18172
18173 if test x"${private_dir}" = x; then
18174 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
18175 else
18176 TCL_PRIVATE_INCLUDE="-I${private_dir}"
18177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
18178$as_echo "${private_dir}" >&6; }
18179 fi
18180
18181 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
18182 TCL_LIBRARY="${TCL_LIB_SPEC}"
18183 TCL_DEPS=""
18184 else
18185 # If building tcl in the same src tree, private headers
18186 # are not needed, but we need to be sure to use the right
18187 # headers library
18188 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
18189 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
18190 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
18191 fi
18192
18193
18194
18195
18196
18197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
18198$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
18199
18200 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
18201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
18202$as_echo "loading" >&6; }
18203 . ${TK_BIN_DIR}/tkConfig.sh
18204 else
18205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
18206$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
18207 fi
18208
18209 # eval is required to do the TK_DBGX substitution
18210 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
18211 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
18212
18213 # If the TK_BIN_DIR is the build directory (not the install directory),
18214 # then set the common variable name to the value of the build variables.
18215 # For example, the variable TK_LIB_SPEC will be set to the value
18216 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
18217 # instead of TK_BUILD_LIB_SPEC since it will work with both an
18218 # installed and uninstalled version of Tcl.
18219 if test -f "${TK_BIN_DIR}/Makefile" ; then
18220 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
18221 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
18222 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
18223 elif test "`uname -s`" = "Darwin"; then
18224 # If Tk was built as a framework, attempt to use the libraries
18225 # from the framework at the given location so that linking works
18226 # against Tk.framework installed in an arbitrary location.
18227 case ${TK_DEFS} in
18228 *TK_FRAMEWORK*)
18229 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
18230 for i in "`cd ${TK_BIN_DIR}; pwd`" \
18231 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
18232 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
18233 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
18234 break
18235 fi
18236 done
18237 fi
18238 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
18239 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
18240 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
18241 fi
18242 ;;
18243 esac
18244 fi
18245
18246 # eval is required to do the TK_DBGX substitution
18247 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
18248 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
18249 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
18250 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
18251
18252
18253
18254
18255
18256
18257
18258
18259
18260
18261
18262
18263
18264
18265 # Check for in-tree Tk
18266 intree="no"
18267 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
18268 intree="yes"
18269 fi
18270
18271 # Find Tk private headers
18272 if test x"${intree}" = xno; then
18273
18274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
18275$as_echo_n "checking for Tk private headers... " >&6; }
18276 private_dir=""
18277 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
18278 if test -f ${dir}/tkInt.h; then
18279 private_dir=${dir}
18280 fi
18281
18282 if test x"${private_dir}" = x; then
18283 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
18284 else
18285 TK_PRIVATE_INCLUDE="-I${private_dir}"
18286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
18287$as_echo "${private_dir}" >&6; }
18288 fi
18289
18290 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
18291 TK_LIBRARY=${TK_LIB_SPEC}
18292 TK_DEPS=""
18293 else
18294 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
18295 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
18296 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
18297 fi
18298
18299
18300
18301
18302
18303 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
18304
18305 # Include some libraries that Tcl and Tk want.
18306 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
18307 # Yes, the ordering seems wrong here. But it isn't.
18308 # TK_LIBS is the list of libraries that need to be linked
18309 # after Tcl/Tk. Note that this isn't put into LIBS. If it
18310 # were in LIBS then any link tests after this point would
18311 # try to include things like `$(LIBGUI)', which wouldn't work.
18312 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
18313
18314 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
18315 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
18316 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
18317 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
18318 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
18319 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
18320 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
18321
18322 if test x"$gdb_cv_os_cygwin" = xyes; then
18323 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
18324 WIN32LDAPP="-Wl,--subsystem,console"
18325 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
18326 fi
18327
18328
18329
18330subdirs="$subdirs gdbtk"
18331
18332 fi
18333fi
18334
18335
18336
18337
18338
18339
18340
18341
18342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
18343$as_echo_n "checking for X... " >&6; }
18344
18345
18346# Check whether --with-x was given.
18347if test "${with_x+set}" = set; then :
18348 withval=$with_x;
18349fi
18350
18351# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
18352if test "x$with_x" = xno; then
18353 # The user explicitly disabled X.
18354 have_x=disabled
18355else
18356 case $x_includes,$x_libraries in #(
18357 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
18358 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
18359 $as_echo_n "(cached) " >&6
18360else
18361 # One or both of the vars are not set, and there is no cached value.
18362ac_x_includes=no ac_x_libraries=no
18363rm -f -r conftest.dir
18364if mkdir conftest.dir; then
18365 cd conftest.dir
18366 cat >Imakefile <<'_ACEOF'
18367incroot:
18368 @echo incroot='${INCROOT}'
18369usrlibdir:
18370 @echo usrlibdir='${USRLIBDIR}'
18371libdir:
18372 @echo libdir='${LIBDIR}'
18373_ACEOF
18374 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
18375 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
18376 for ac_var in incroot usrlibdir libdir; do
18377 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
18378 done
18379 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
18380 for ac_extension in a so sl dylib la dll; do
18381 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
18382 test -f "$ac_im_libdir/libX11.$ac_extension"; then
18383 ac_im_usrlibdir=$ac_im_libdir; break
18384 fi
18385 done
18386 # Screen out bogus values from the imake configuration. They are
18387 # bogus both because they are the default anyway, and because
18388 # using them would break gcc on systems where it needs fixed includes.
18389 case $ac_im_incroot in
18390 /usr/include) ac_x_includes= ;;
18391 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
18392 esac
18393 case $ac_im_usrlibdir in
18394 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
18395 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
18396 esac
18397 fi
18398 cd ..
18399 rm -f -r conftest.dir
18400fi
18401
18402# Standard set of common directories for X headers.
18403# Check X11 before X11Rn because it is often a symlink to the current release.
18404ac_x_header_dirs='
18405/usr/X11/include
18406/usr/X11R7/include
18407/usr/X11R6/include
18408/usr/X11R5/include
18409/usr/X11R4/include
18410
18411/usr/include/X11
18412/usr/include/X11R7
18413/usr/include/X11R6
18414/usr/include/X11R5
18415/usr/include/X11R4
18416
18417/usr/local/X11/include
18418/usr/local/X11R7/include
18419/usr/local/X11R6/include
18420/usr/local/X11R5/include
18421/usr/local/X11R4/include
18422
18423/usr/local/include/X11
18424/usr/local/include/X11R7
18425/usr/local/include/X11R6
18426/usr/local/include/X11R5
18427/usr/local/include/X11R4
18428
18429/usr/X386/include
18430/usr/x386/include
18431/usr/XFree86/include/X11
18432
18433/usr/include
18434/usr/local/include
18435/usr/unsupported/include
18436/usr/athena/include
18437/usr/local/x11r5/include
18438/usr/lpp/Xamples/include
18439
18440/usr/openwin/include
18441/usr/openwin/share/include'
18442
18443if test "$ac_x_includes" = no; then
18444 # Guess where to find include files, by looking for Xlib.h.
18445 # First, try using that file with no special directory specified.
18446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18447/* end confdefs.h. */
18448#include <X11/Xlib.h>
18449_ACEOF
18450if ac_fn_c_try_cpp "$LINENO"; then :
18451 # We can compile using X headers with no special include directory.
18452ac_x_includes=
18453else
18454 for ac_dir in $ac_x_header_dirs; do
18455 if test -r "$ac_dir/X11/Xlib.h"; then
18456 ac_x_includes=$ac_dir
18457 break
18458 fi
18459done
18460fi
18461rm -f conftest.err conftest.i conftest.$ac_ext
18462fi # $ac_x_includes = no
18463
18464if test "$ac_x_libraries" = no; then
18465 # Check for the libraries.
18466 # See if we find them without any special options.
18467 # Don't add to $LIBS permanently.
18468 ac_save_LIBS=$LIBS
18469 LIBS="-lX11 $LIBS"
18470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18471/* end confdefs.h. */
18472#include <X11/Xlib.h>
18473int
18474main ()
18475{
18476XrmInitialize ()
18477 ;
18478 return 0;
18479}
18480_ACEOF
18481if ac_fn_c_try_link "$LINENO"; then :
18482 LIBS=$ac_save_LIBS
18483# We can link X programs with no special library path.
18484ac_x_libraries=
18485else
18486 LIBS=$ac_save_LIBS
18487for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
18488do
18489 # Don't even attempt the hair of trying to link an X program!
18490 for ac_extension in a so sl dylib la dll; do
18491 if test -r "$ac_dir/libX11.$ac_extension"; then
18492 ac_x_libraries=$ac_dir
18493 break 2
18494 fi
18495 done
18496done
18497fi
18498rm -f core conftest.err conftest.$ac_objext \
18499 conftest$ac_exeext conftest.$ac_ext
18500fi # $ac_x_libraries = no
18501
18502case $ac_x_includes,$ac_x_libraries in #(
18503 no,* | *,no | *\'*)
18504 # Didn't find X, or a directory has "'" in its name.
18505 ac_cv_have_x="have_x=no";; #(
18506 *)
18507 # Record where we found X for the cache.
18508 ac_cv_have_x="have_x=yes\
18509 ac_x_includes='$ac_x_includes'\
18510 ac_x_libraries='$ac_x_libraries'"
18511esac
18512fi
18513;; #(
18514 *) have_x=yes;;
18515 esac
18516 eval "$ac_cv_have_x"
18517fi # $with_x != no
18518
18519if test "$have_x" != yes; then
18520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
18521$as_echo "$have_x" >&6; }
18522 no_x=yes
18523else
18524 # If each of the values was on the command line, it overrides each guess.
18525 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
18526 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
18527 # Update the cache value to reflect the command line values.
18528 ac_cv_have_x="have_x=yes\
18529 ac_x_includes='$x_includes'\
18530 ac_x_libraries='$x_libraries'"
18531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
18532$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
18533fi
18534
18535
18536# Unlike the sim directory, whether a simulator is linked is controlled by
18537# presence of a gdb_sim definition in the target configure.tgt entry.
18538# This code just checks for a few cases where we'd like to ignore those
18539# definitions, even when they're present in the '.mt' file. These cases
18540# are when --disable-sim is specified, or if the simulator directory is
18541# not part of the source tree.
18542#
18543# Check whether --enable-sim was given.
18544if test "${enable_sim+set}" = set; then :
18545 enableval=$enable_sim; echo "enable_sim = $enable_sim";
18546 echo "enableval = ${enableval}";
18547 case "${enableval}" in
18548 yes) ignore_sim=false ;;
18549 no) ignore_sim=true ;;
18550 *) ignore_sim=false ;;
18551 esac
18552else
18553 ignore_sim=false
18554fi
18555
18556
18557if test ! -d "${srcdir}/../sim"; then
18558 ignore_sim=true
18559fi
18560
18561SIM=
18562SIM_OBS=
18563if test "${ignore_sim}" = "false"; then
18564 if test x"${gdb_sim}" != x ; then
18565 SIM="${gdb_sim}"
18566 SIM_OBS="remote-sim.o"
18567
18568$as_echo "#define WITH_SIM 1" >>confdefs.h
18569
18570
18571 # Some tdep code should only be compiled in when the ppc sim is
18572 # built. PR sim/13418.
18573 case $target in
18574 powerpc*-*-*)
18575
18576$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
18577
18578 ;;
18579 esac
18580 fi
18581fi
18582
18583
18584
18585
18586
18587
18588
18589
18590
18591
18592
18593
18594
18595
18596# List of host floatformats.
18597
18598cat >>confdefs.h <<_ACEOF
18599#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
18600_ACEOF
18601
18602
18603cat >>confdefs.h <<_ACEOF
18604#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
18605_ACEOF
18606
18607
18608cat >>confdefs.h <<_ACEOF
18609#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
18610_ACEOF
18611
18612
18613# target_subdir is used by the testsuite to find the target libraries.
18614target_subdir=
18615if test "${host}" != "${target}"; then
18616 target_subdir="${target_alias}/"
18617fi
18618
18619
18620# Import nat definitions.
18621nat_makefile_frag=/dev/null
18622if test "${gdb_native}" = "yes"; then
18623 . ${srcdir}/configure.nat
18624 nativefile=$NAT_FILE
18625fi
18626
18627
18628
18629
18630
18631
18632
18633
18634
18635
18636
18637if test x"${gdb_osabi}" != x ; then
18638
18639cat >>confdefs.h <<_ACEOF
18640#define GDB_OSABI_DEFAULT $gdb_osabi
18641_ACEOF
18642
18643fi
18644
18645# Check for babeltrace and babeltrace-ctf
18646
18647# Check whether --with-babeltrace was given.
18648if test "${with_babeltrace+set}" = set; then :
18649 withval=$with_babeltrace;
18650else
18651 with_babeltrace=auto
18652fi
18653
18654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
18655$as_echo_n "checking whether to use babeltrace... " >&6; }
18656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
18657$as_echo "$with_babeltrace" >&6; }
18658
18659if test "x$with_babeltrace" = "xno"; then
18660 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
18661$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
18662else
18663 # Append -Werror to CFLAGS so that configure can catch the warning
18664 # "assignment from incompatible pointer type", which is related to
18665 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
18666 # in GDB, while babeltrace 1.0.3 is broken.
18667 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
18668 # safe to save and restore CFLAGS here.
18669 saved_CFLAGS=$CFLAGS
18670 CFLAGS="$CFLAGS -Werror"
18671
18672
18673
18674
18675
18676
18677
18678
18679 use_additional=yes
18680
18681 acl_save_prefix="$prefix"
18682 prefix="$acl_final_prefix"
18683 acl_save_exec_prefix="$exec_prefix"
18684 exec_prefix="$acl_final_exec_prefix"
18685
18686 eval additional_includedir=\"$includedir\"
18687 eval additional_libdir=\"$libdir\"
18688
18689 exec_prefix="$acl_save_exec_prefix"
18690 prefix="$acl_save_prefix"
18691
18692
18693# Check whether --with-libbabeltrace-prefix was given.
18694if test "${with_libbabeltrace_prefix+set}" = set; then :
18695 withval=$with_libbabeltrace_prefix;
18696 if test "X$withval" = "Xno"; then
18697 use_additional=no
18698 else
18699 if test "X$withval" = "X"; then
18700
18701 acl_save_prefix="$prefix"
18702 prefix="$acl_final_prefix"
18703 acl_save_exec_prefix="$exec_prefix"
18704 exec_prefix="$acl_final_exec_prefix"
18705
18706 eval additional_includedir=\"$includedir\"
18707 eval additional_libdir=\"$libdir\"
18708
18709 exec_prefix="$acl_save_exec_prefix"
18710 prefix="$acl_save_prefix"
18711
18712 else
18713 additional_includedir="$withval/include"
18714 additional_libdir="$withval/lib"
18715 fi
18716 fi
18717
18718fi
18719
18720
18721# Check whether --with-libbabeltrace-type was given.
18722if test "${with_libbabeltrace_type+set}" = set; then :
18723 withval=$with_libbabeltrace_type; with_libbabeltrace_type=$withval
18724else
18725 with_libbabeltrace_type=auto
18726fi
18727
18728 lib_type=`eval echo \$with_libbabeltrace_type`
18729
18730 LIBBABELTRACE=
18731 LTLIBBABELTRACE=
18732 INCBABELTRACE=
18733 rpathdirs=
18734 ltrpathdirs=
18735 names_already_handled=
18736 names_next_round='babeltrace babeltrace-ctf'
18737 while test -n "$names_next_round"; do
18738 names_this_round="$names_next_round"
18739 names_next_round=
18740 for name in $names_this_round; do
18741 already_handled=
18742 for n in $names_already_handled; do
18743 if test "$n" = "$name"; then
18744 already_handled=yes
18745 break
18746 fi
18747 done
18748 if test -z "$already_handled"; then
18749 names_already_handled="$names_already_handled $name"
18750 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18751 eval value=\"\$HAVE_LIB$uppername\"
18752 if test -n "$value"; then
18753 if test "$value" = yes; then
18754 eval value=\"\$LIB$uppername\"
18755 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
18756 eval value=\"\$LTLIB$uppername\"
18757 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
18758 else
18759 :
18760 fi
18761 else
18762 found_dir=
18763 found_la=
18764 found_so=
18765 found_a=
18766 if test $use_additional = yes; then
18767 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18768 found_dir="$additional_libdir"
18769 found_so="$additional_libdir/lib$name.$shlibext"
18770 if test -f "$additional_libdir/lib$name.la"; then
18771 found_la="$additional_libdir/lib$name.la"
18772 fi
18773 elif test x$lib_type != xshared; then
18774 if test -f "$additional_libdir/lib$name.$libext"; then
18775 found_dir="$additional_libdir"
18776 found_a="$additional_libdir/lib$name.$libext"
18777 if test -f "$additional_libdir/lib$name.la"; then
18778 found_la="$additional_libdir/lib$name.la"
18779 fi
18780 fi
18781 fi
18782 fi
18783 if test "X$found_dir" = "X"; then
18784 for x in $LDFLAGS $LTLIBBABELTRACE; do
18785
18786 acl_save_prefix="$prefix"
18787 prefix="$acl_final_prefix"
18788 acl_save_exec_prefix="$exec_prefix"
18789 exec_prefix="$acl_final_exec_prefix"
18790 eval x=\"$x\"
18791 exec_prefix="$acl_save_exec_prefix"
18792 prefix="$acl_save_prefix"
18793
18794 case "$x" in
18795 -L*)
18796 dir=`echo "X$x" | sed -e 's/^X-L//'`
18797 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18798 found_dir="$dir"
18799 found_so="$dir/lib$name.$shlibext"
18800 if test -f "$dir/lib$name.la"; then
18801 found_la="$dir/lib$name.la"
18802 fi
18803 elif test x$lib_type != xshared; then
18804 if test -f "$dir/lib$name.$libext"; then
18805 found_dir="$dir"
18806 found_a="$dir/lib$name.$libext"
18807 if test -f "$dir/lib$name.la"; then
18808 found_la="$dir/lib$name.la"
18809 fi
18810 fi
18811 fi
18812 ;;
18813 esac
18814 if test "X$found_dir" != "X"; then
18815 break
18816 fi
18817 done
18818 fi
18819 if test "X$found_dir" != "X"; then
18820 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
18821 if test "X$found_so" != "X"; then
18822 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18823 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18824 else
18825 haveit=
18826 for x in $ltrpathdirs; do
18827 if test "X$x" = "X$found_dir"; then
18828 haveit=yes
18829 break
18830 fi
18831 done
18832 if test -z "$haveit"; then
18833 ltrpathdirs="$ltrpathdirs $found_dir"
18834 fi
18835 if test "$hardcode_direct" = yes; then
18836 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18837 else
18838 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18839 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18840 haveit=
18841 for x in $rpathdirs; do
18842 if test "X$x" = "X$found_dir"; then
18843 haveit=yes
18844 break
18845 fi
18846 done
18847 if test -z "$haveit"; then
18848 rpathdirs="$rpathdirs $found_dir"
18849 fi
18850 else
18851 haveit=
18852 for x in $LDFLAGS $LIBBABELTRACE; do
18853
18854 acl_save_prefix="$prefix"
18855 prefix="$acl_final_prefix"
18856 acl_save_exec_prefix="$exec_prefix"
18857 exec_prefix="$acl_final_exec_prefix"
18858 eval x=\"$x\"
18859 exec_prefix="$acl_save_exec_prefix"
18860 prefix="$acl_save_prefix"
18861
18862 if test "X$x" = "X-L$found_dir"; then
18863 haveit=yes
18864 break
18865 fi
18866 done
18867 if test -z "$haveit"; then
18868 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
18869 fi
18870 if test "$hardcode_minus_L" != no; then
18871 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18872 else
18873 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18874 fi
18875 fi
18876 fi
18877 fi
18878 else
18879 if test "X$found_a" != "X"; then
18880 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
18881 else
18882 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
18883 fi
18884 fi
18885 additional_includedir=
18886 case "$found_dir" in
18887 */lib | */lib/)
18888 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18889 additional_includedir="$basedir/include"
18890 ;;
18891 esac
18892 if test "X$additional_includedir" != "X"; then
18893 if test "X$additional_includedir" != "X/usr/include"; then
18894 haveit=
18895 if test "X$additional_includedir" = "X/usr/local/include"; then
18896 if test -n "$GCC"; then
18897 case $host_os in
18898 linux*) haveit=yes;;
18899 esac
18900 fi
18901 fi
18902 if test -z "$haveit"; then
18903 for x in $CPPFLAGS $INCBABELTRACE; do
18904
18905 acl_save_prefix="$prefix"
18906 prefix="$acl_final_prefix"
18907 acl_save_exec_prefix="$exec_prefix"
18908 exec_prefix="$acl_final_exec_prefix"
18909 eval x=\"$x\"
18910 exec_prefix="$acl_save_exec_prefix"
18911 prefix="$acl_save_prefix"
18912
18913 if test "X$x" = "X-I$additional_includedir"; then
18914 haveit=yes
18915 break
18916 fi
18917 done
18918 if test -z "$haveit"; then
18919 if test -d "$additional_includedir"; then
18920 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
18921 fi
18922 fi
18923 fi
18924 fi
18925 fi
18926 if test -n "$found_la"; then
18927 save_libdir="$libdir"
18928 case "$found_la" in
18929 */* | *\\*) . "$found_la" ;;
18930 *) . "./$found_la" ;;
18931 esac
18932 libdir="$save_libdir"
18933 for dep in $dependency_libs; do
18934 case "$dep" in
18935 -L*)
18936 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18937 if test "X$additional_libdir" != "X/usr/lib"; then
18938 haveit=
18939 if test "X$additional_libdir" = "X/usr/local/lib"; then
18940 if test -n "$GCC"; then
18941 case $host_os in
18942 linux*) haveit=yes;;
18943 esac
18944 fi
18945 fi
18946 if test -z "$haveit"; then
18947 haveit=
18948 for x in $LDFLAGS $LIBBABELTRACE; do
18949
18950 acl_save_prefix="$prefix"
18951 prefix="$acl_final_prefix"
18952 acl_save_exec_prefix="$exec_prefix"
18953 exec_prefix="$acl_final_exec_prefix"
18954 eval x=\"$x\"
18955 exec_prefix="$acl_save_exec_prefix"
18956 prefix="$acl_save_prefix"
18957
18958 if test "X$x" = "X-L$additional_libdir"; then
18959 haveit=yes
18960 break
18961 fi
18962 done
18963 if test -z "$haveit"; then
18964 if test -d "$additional_libdir"; then
18965 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
18966 fi
18967 fi
18968 haveit=
18969 for x in $LDFLAGS $LTLIBBABELTRACE; do
18970
18971 acl_save_prefix="$prefix"
18972 prefix="$acl_final_prefix"
18973 acl_save_exec_prefix="$exec_prefix"
18974 exec_prefix="$acl_final_exec_prefix"
18975 eval x=\"$x\"
18976 exec_prefix="$acl_save_exec_prefix"
18977 prefix="$acl_save_prefix"
18978
18979 if test "X$x" = "X-L$additional_libdir"; then
18980 haveit=yes
18981 break
18982 fi
18983 done
18984 if test -z "$haveit"; then
18985 if test -d "$additional_libdir"; then
18986 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
18987 fi
18988 fi
18989 fi
18990 fi
18991 ;;
18992 -R*)
18993 dir=`echo "X$dep" | sed -e 's/^X-R//'`
18994 if test "$enable_rpath" != no; then
18995 haveit=
18996 for x in $rpathdirs; do
18997 if test "X$x" = "X$dir"; then
18998 haveit=yes
18999 break
19000 fi
19001 done
19002 if test -z "$haveit"; then
19003 rpathdirs="$rpathdirs $dir"
19004 fi
19005 haveit=
19006 for x in $ltrpathdirs; do
19007 if test "X$x" = "X$dir"; then
19008 haveit=yes
19009 break
19010 fi
19011 done
19012 if test -z "$haveit"; then
19013 ltrpathdirs="$ltrpathdirs $dir"
19014 fi
19015 fi
19016 ;;
19017 -l*)
19018 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
19019 ;;
19020 *.la)
19021 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
19022 ;;
19023 *)
19024 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
19025 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
19026 ;;
19027 esac
19028 done
19029 fi
19030 else
19031 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
19032 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
19033 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
19034 else
19035 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l:lib$name.$libext"
19036 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l:lib$name.$libext"
19037 fi
19038 fi
19039 fi
19040 fi
19041 done
19042 done
19043 if test "X$rpathdirs" != "X"; then
19044 if test -n "$hardcode_libdir_separator"; then
19045 alldirs=
19046 for found_dir in $rpathdirs; do
19047 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
19048 done
19049 acl_save_libdir="$libdir"
19050 libdir="$alldirs"
19051 eval flag=\"$hardcode_libdir_flag_spec\"
19052 libdir="$acl_save_libdir"
19053 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
19054 else
19055 for found_dir in $rpathdirs; do
19056 acl_save_libdir="$libdir"
19057 libdir="$found_dir"
19058 eval flag=\"$hardcode_libdir_flag_spec\"
19059 libdir="$acl_save_libdir"
19060 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
19061 done
19062 fi
19063 fi
19064 if test "X$ltrpathdirs" != "X"; then
19065 for found_dir in $ltrpathdirs; do
19066 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
19067 done
19068 fi
19069
19070
19071 ac_save_CPPFLAGS="$CPPFLAGS"
19072
19073 for element in $INCBABELTRACE; do
19074 haveit=
19075 for x in $CPPFLAGS; do
19076
19077 acl_save_prefix="$prefix"
19078 prefix="$acl_final_prefix"
19079 acl_save_exec_prefix="$exec_prefix"
19080 exec_prefix="$acl_final_exec_prefix"
19081 eval x=\"$x\"
19082 exec_prefix="$acl_save_exec_prefix"
19083 prefix="$acl_save_prefix"
19084
19085 if test "X$x" = "X$element"; then
19086 haveit=yes
19087 break
19088 fi
19089 done
19090 if test -z "$haveit"; then
19091 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
19092 fi
19093 done
19094
19095
19096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
19097$as_echo_n "checking for libbabeltrace... " >&6; }
19098if ${ac_cv_libbabeltrace+:} false; then :
19099 $as_echo_n "(cached) " >&6
19100else
19101
19102 ac_save_LIBS="$LIBS"
19103 LIBS="$LIBS $LIBBABELTRACE"
19104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19105/* end confdefs.h. */
19106#include <babeltrace/babeltrace.h>
19107 #include <babeltrace/ctf/events.h>
19108 #include <babeltrace/ctf/iterator.h>
19109int
19110main ()
19111{
19112struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
19113 struct bt_ctf_event *event = NULL;
19114 const struct bt_definition *scope;
19115
19116 pos->type = BT_SEEK_BEGIN;
19117 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
19118 scope = bt_ctf_get_top_level_scope (event,
19119 BT_STREAM_EVENT_HEADER);
19120 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
19121
19122 ;
19123 return 0;
19124}
19125_ACEOF
19126if ac_fn_c_try_link "$LINENO"; then :
19127 ac_cv_libbabeltrace=yes
19128else
19129 ac_cv_libbabeltrace=no
19130fi
19131rm -f core conftest.err conftest.$ac_objext \
19132 conftest$ac_exeext conftest.$ac_ext
19133 LIBS="$ac_save_LIBS"
19134
19135fi
19136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
19137$as_echo "$ac_cv_libbabeltrace" >&6; }
19138 if test "$ac_cv_libbabeltrace" = yes; then
19139 HAVE_LIBBABELTRACE=yes
19140
19141$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
19142
19143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
19144$as_echo_n "checking how to link with libbabeltrace... " >&6; }
19145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
19146$as_echo "$LIBBABELTRACE" >&6; }
19147 else
19148 HAVE_LIBBABELTRACE=no
19149 CPPFLAGS="$ac_save_CPPFLAGS"
19150 LIBBABELTRACE=
19151 LTLIBBABELTRACE=
19152 fi
19153
19154
19155
19156
19157
19158
19159 CFLAGS=$saved_CFLAGS
19160
19161 if test "$HAVE_LIBBABELTRACE" != yes; then
19162 if test "$with_babeltrace" = yes; then
19163 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
19164 else
19165 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
19166$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
19167 fi
19168 fi
19169fi
19170
19171# Check for xxhash
19172
19173# Check whether --with-xxhash was given.
19174if test "${with_xxhash+set}" = set; then :
19175 withval=$with_xxhash;
19176else
19177 with_xxhash=auto
19178fi
19179
19180
19181 # Check whether --enable-libctf was given.
19182if test "${enable_libctf+set}" = set; then :
19183 enableval=$enable_libctf;
19184 case "$enableval" in
19185 yes|no) ;;
19186 *) as_fn_error $? "Argument to enable/disable libctf must be yes or no" "$LINENO" 5 ;;
19187 esac
19188
19189else
19190 enable_libctf=yes
19191fi
19192
19193
19194if test x${enable_static} = xno; then
19195 LIBCTF="-Wl,--rpath,../libctf/.libs ../libctf/.libs/libctf.so"
19196 CTF_DEPS="../libctf/.libs/libctf.so"
19197else
19198 LIBCTF="../libctf/.libs/libctf.a"
19199 CTF_DEPS="$LIBCTF"
19200fi
19201if test "${enable_libctf}" = yes; then
19202
19203$as_echo "#define ENABLE_LIBCTF 1" >>confdefs.h
19204
19205else
19206 LIBCTF=
19207 CTF_DEPS=
19208fi
19209
19210
19211
19212
19213# If nativefile (NAT_FILE) is not set in configure.nat, we link to an
19214# empty version.
19215
19216if test "x$with_xxhash" != "xno"; then
19217
19218
19219
19220
19221
19222
19223
19224
19225 use_additional=yes
19226
19227 acl_save_prefix="$prefix"
19228 prefix="$acl_final_prefix"
19229 acl_save_exec_prefix="$exec_prefix"
19230 exec_prefix="$acl_final_exec_prefix"
19231
19232 eval additional_includedir=\"$includedir\"
19233 eval additional_libdir=\"$libdir\"
19234
19235 exec_prefix="$acl_save_exec_prefix"
19236 prefix="$acl_save_prefix"
19237
19238
19239# Check whether --with-libxxhash-prefix was given.
19240if test "${with_libxxhash_prefix+set}" = set; then :
19241 withval=$with_libxxhash_prefix;
19242 if test "X$withval" = "Xno"; then
19243 use_additional=no
19244 else
19245 if test "X$withval" = "X"; then
19246
19247 acl_save_prefix="$prefix"
19248 prefix="$acl_final_prefix"
19249 acl_save_exec_prefix="$exec_prefix"
19250 exec_prefix="$acl_final_exec_prefix"
19251
19252 eval additional_includedir=\"$includedir\"
19253 eval additional_libdir=\"$libdir\"
19254
19255 exec_prefix="$acl_save_exec_prefix"
19256 prefix="$acl_save_prefix"
19257
19258 else
19259 additional_includedir="$withval/include"
19260 additional_libdir="$withval/lib"
19261 fi
19262 fi
19263
19264fi
19265
19266
19267# Check whether --with-libxxhash-type was given.
19268if test "${with_libxxhash_type+set}" = set; then :
19269 withval=$with_libxxhash_type; with_libxxhash_type=$withval
19270else
19271 with_libxxhash_type=auto
19272fi
19273
19274 lib_type=`eval echo \$with_libxxhash_type`
19275
19276 LIBXXHASH=
19277 LTLIBXXHASH=
19278 INCXXHASH=
19279 rpathdirs=
19280 ltrpathdirs=
19281 names_already_handled=
19282 names_next_round='xxhash '
19283 while test -n "$names_next_round"; do
19284 names_this_round="$names_next_round"
19285 names_next_round=
19286 for name in $names_this_round; do
19287 already_handled=
19288 for n in $names_already_handled; do
19289 if test "$n" = "$name"; then
19290 already_handled=yes
19291 break
19292 fi
19293 done
19294 if test -z "$already_handled"; then
19295 names_already_handled="$names_already_handled $name"
19296 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
19297 eval value=\"\$HAVE_LIB$uppername\"
19298 if test -n "$value"; then
19299 if test "$value" = yes; then
19300 eval value=\"\$LIB$uppername\"
19301 test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
19302 eval value=\"\$LTLIB$uppername\"
19303 test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
19304 else
19305 :
19306 fi
19307 else
19308 found_dir=
19309 found_la=
19310 found_so=
19311 found_a=
19312 if test $use_additional = yes; then
19313 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
19314 found_dir="$additional_libdir"
19315 found_so="$additional_libdir/lib$name.$shlibext"
19316 if test -f "$additional_libdir/lib$name.la"; then
19317 found_la="$additional_libdir/lib$name.la"
19318 fi
19319 elif test x$lib_type != xshared; then
19320 if test -f "$additional_libdir/lib$name.$libext"; then
19321 found_dir="$additional_libdir"
19322 found_a="$additional_libdir/lib$name.$libext"
19323 if test -f "$additional_libdir/lib$name.la"; then
19324 found_la="$additional_libdir/lib$name.la"
19325 fi
19326 fi
19327 fi
19328 fi
19329 if test "X$found_dir" = "X"; then
19330 for x in $LDFLAGS $LTLIBXXHASH; do
19331
19332 acl_save_prefix="$prefix"
19333 prefix="$acl_final_prefix"
19334 acl_save_exec_prefix="$exec_prefix"
19335 exec_prefix="$acl_final_exec_prefix"
19336 eval x=\"$x\"
19337 exec_prefix="$acl_save_exec_prefix"
19338 prefix="$acl_save_prefix"
19339
19340 case "$x" in
19341 -L*)
19342 dir=`echo "X$x" | sed -e 's/^X-L//'`
19343 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
19344 found_dir="$dir"
19345 found_so="$dir/lib$name.$shlibext"
19346 if test -f "$dir/lib$name.la"; then
19347 found_la="$dir/lib$name.la"
19348 fi
19349 elif test x$lib_type != xshared; then
19350 if test -f "$dir/lib$name.$libext"; then
19351 found_dir="$dir"
19352 found_a="$dir/lib$name.$libext"
19353 if test -f "$dir/lib$name.la"; then
19354 found_la="$dir/lib$name.la"
19355 fi
19356 fi
19357 fi
19358 ;;
19359 esac
19360 if test "X$found_dir" != "X"; then
19361 break
19362 fi
19363 done
19364 fi
19365 if test "X$found_dir" != "X"; then
19366 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
19367 if test "X$found_so" != "X"; then
19368 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
19369 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19370 else
19371 haveit=
19372 for x in $ltrpathdirs; do
19373 if test "X$x" = "X$found_dir"; then
19374 haveit=yes
19375 break
19376 fi
19377 done
19378 if test -z "$haveit"; then
19379 ltrpathdirs="$ltrpathdirs $found_dir"
19380 fi
19381 if test "$hardcode_direct" = yes; then
19382 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19383 else
19384 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
19385 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19386 haveit=
19387 for x in $rpathdirs; do
19388 if test "X$x" = "X$found_dir"; then
19389 haveit=yes
19390 break
19391 fi
19392 done
19393 if test -z "$haveit"; then
19394 rpathdirs="$rpathdirs $found_dir"
19395 fi
19396 else
19397 haveit=
19398 for x in $LDFLAGS $LIBXXHASH; do
19399
19400 acl_save_prefix="$prefix"
19401 prefix="$acl_final_prefix"
19402 acl_save_exec_prefix="$exec_prefix"
19403 exec_prefix="$acl_final_exec_prefix"
19404 eval x=\"$x\"
19405 exec_prefix="$acl_save_exec_prefix"
19406 prefix="$acl_save_prefix"
19407
19408 if test "X$x" = "X-L$found_dir"; then
19409 haveit=yes
19410 break
19411 fi
19412 done
19413 if test -z "$haveit"; then
19414 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
19415 fi
19416 if test "$hardcode_minus_L" != no; then
19417 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19418 else
19419 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
19420 fi
19421 fi
19422 fi
19423 fi
19424 else
19425 if test "X$found_a" != "X"; then
19426 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
19427 else
19428 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
19429 fi
19430 fi
19431 additional_includedir=
19432 case "$found_dir" in
19433 */lib | */lib/)
19434 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
19435 additional_includedir="$basedir/include"
19436 ;;
19437 esac
19438 if test "X$additional_includedir" != "X"; then
19439 if test "X$additional_includedir" != "X/usr/include"; then
19440 haveit=
19441 if test "X$additional_includedir" = "X/usr/local/include"; then
19442 if test -n "$GCC"; then
19443 case $host_os in
19444 linux*) haveit=yes;;
19445 esac
19446 fi
19447 fi
19448 if test -z "$haveit"; then
19449 for x in $CPPFLAGS $INCXXHASH; do
19450
19451 acl_save_prefix="$prefix"
19452 prefix="$acl_final_prefix"
19453 acl_save_exec_prefix="$exec_prefix"
19454 exec_prefix="$acl_final_exec_prefix"
19455 eval x=\"$x\"
19456 exec_prefix="$acl_save_exec_prefix"
19457 prefix="$acl_save_prefix"
19458
19459 if test "X$x" = "X-I$additional_includedir"; then
19460 haveit=yes
19461 break
19462 fi
19463 done
19464 if test -z "$haveit"; then
19465 if test -d "$additional_includedir"; then
19466 INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
19467 fi
19468 fi
19469 fi
19470 fi
19471 fi
19472 if test -n "$found_la"; then
19473 save_libdir="$libdir"
19474 case "$found_la" in
19475 */* | *\\*) . "$found_la" ;;
19476 *) . "./$found_la" ;;
19477 esac
19478 libdir="$save_libdir"
19479 for dep in $dependency_libs; do
19480 case "$dep" in
19481 -L*)
19482 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
19483 if test "X$additional_libdir" != "X/usr/lib"; then
19484 haveit=
19485 if test "X$additional_libdir" = "X/usr/local/lib"; then
19486 if test -n "$GCC"; then
19487 case $host_os in
19488 linux*) haveit=yes;;
19489 esac
19490 fi
19491 fi
19492 if test -z "$haveit"; then
19493 haveit=
19494 for x in $LDFLAGS $LIBXXHASH; do
19495
19496 acl_save_prefix="$prefix"
19497 prefix="$acl_final_prefix"
19498 acl_save_exec_prefix="$exec_prefix"
19499 exec_prefix="$acl_final_exec_prefix"
19500 eval x=\"$x\"
19501 exec_prefix="$acl_save_exec_prefix"
19502 prefix="$acl_save_prefix"
19503
19504 if test "X$x" = "X-L$additional_libdir"; then
19505 haveit=yes
19506 break
19507 fi
19508 done
19509 if test -z "$haveit"; then
19510 if test -d "$additional_libdir"; then
19511 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
19512 fi
19513 fi
19514 haveit=
19515 for x in $LDFLAGS $LTLIBXXHASH; do
19516
19517 acl_save_prefix="$prefix"
19518 prefix="$acl_final_prefix"
19519 acl_save_exec_prefix="$exec_prefix"
19520 exec_prefix="$acl_final_exec_prefix"
19521 eval x=\"$x\"
19522 exec_prefix="$acl_save_exec_prefix"
19523 prefix="$acl_save_prefix"
19524
19525 if test "X$x" = "X-L$additional_libdir"; then
19526 haveit=yes
19527 break
19528 fi
19529 done
19530 if test -z "$haveit"; then
19531 if test -d "$additional_libdir"; then
19532 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
19533 fi
19534 fi
19535 fi
19536 fi
19537 ;;
19538 -R*)
19539 dir=`echo "X$dep" | sed -e 's/^X-R//'`
19540 if test "$enable_rpath" != no; then
19541 haveit=
19542 for x in $rpathdirs; do
19543 if test "X$x" = "X$dir"; then
19544 haveit=yes
19545 break
19546 fi
19547 done
19548 if test -z "$haveit"; then
19549 rpathdirs="$rpathdirs $dir"
19550 fi
19551 haveit=
19552 for x in $ltrpathdirs; do
19553 if test "X$x" = "X$dir"; then
19554 haveit=yes
19555 break
19556 fi
19557 done
19558 if test -z "$haveit"; then
19559 ltrpathdirs="$ltrpathdirs $dir"
19560 fi
19561 fi
19562 ;;
19563 -l*)
19564 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
19565 ;;
19566 *.la)
19567 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
19568 ;;
19569 *)
19570 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
19571 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
19572 ;;
19573 esac
19574 done
19575 fi
19576 else
19577 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
19578 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
19579 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
19580 else
19581 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libext"
19582 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.$libext"
19583 fi
19584 fi
19585 fi
19586 fi
19587 done
19588 done
19589 if test "X$rpathdirs" != "X"; then
19590 if test -n "$hardcode_libdir_separator"; then
19591 alldirs=
19592 for found_dir in $rpathdirs; do
19593 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
19594 done
19595 acl_save_libdir="$libdir"
19596 libdir="$alldirs"
19597 eval flag=\"$hardcode_libdir_flag_spec\"
19598 libdir="$acl_save_libdir"
19599 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
19600 else
19601 for found_dir in $rpathdirs; do
19602 acl_save_libdir="$libdir"
19603 libdir="$found_dir"
19604 eval flag=\"$hardcode_libdir_flag_spec\"
19605 libdir="$acl_save_libdir"
19606 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
19607 done
19608 fi
19609 fi
19610 if test "X$ltrpathdirs" != "X"; then
19611 for found_dir in $ltrpathdirs; do
19612 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
19613 done
19614 fi
19615
19616
19617 ac_save_CPPFLAGS="$CPPFLAGS"
19618
19619 for element in $INCXXHASH; do
19620 haveit=
19621 for x in $CPPFLAGS; do
19622
19623 acl_save_prefix="$prefix"
19624 prefix="$acl_final_prefix"
19625 acl_save_exec_prefix="$exec_prefix"
19626 exec_prefix="$acl_final_exec_prefix"
19627 eval x=\"$x\"
19628 exec_prefix="$acl_save_exec_prefix"
19629 prefix="$acl_save_prefix"
19630
19631 if test "X$x" = "X$element"; then
19632 haveit=yes
19633 break
19634 fi
19635 done
19636 if test -z "$haveit"; then
19637 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
19638 fi
19639 done
19640
19641
19642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
19643$as_echo_n "checking for libxxhash... " >&6; }
19644if ${ac_cv_libxxhash+:} false; then :
19645 $as_echo_n "(cached) " >&6
19646else
19647
19648 ac_save_LIBS="$LIBS"
19649 LIBS="$LIBS $LIBXXHASH"
19650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19651/* end confdefs.h. */
19652#include <xxhash.h>
19653int
19654main ()
19655{
19656XXH32("foo", 3, 0);
19657
19658 ;
19659 return 0;
19660}
19661_ACEOF
19662if ac_fn_c_try_link "$LINENO"; then :
19663 ac_cv_libxxhash=yes
19664else
19665 ac_cv_libxxhash=no
19666fi
19667rm -f core conftest.err conftest.$ac_objext \
19668 conftest$ac_exeext conftest.$ac_ext
19669 LIBS="$ac_save_LIBS"
19670
19671fi
19672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
19673$as_echo "$ac_cv_libxxhash" >&6; }
19674 if test "$ac_cv_libxxhash" = yes; then
19675 HAVE_LIBXXHASH=yes
19676
19677$as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
19678
19679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
19680$as_echo_n "checking how to link with libxxhash... " >&6; }
19681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
19682$as_echo "$LIBXXHASH" >&6; }
19683 else
19684 HAVE_LIBXXHASH=no
19685 CPPFLAGS="$ac_save_CPPFLAGS"
19686 LIBXXHASH=
19687 LTLIBXXHASH=
19688 fi
19689
19690
19691
19692
19693
19694
19695 if test "$HAVE_LIBXXHASH" != yes; then
19696 if test "$with_xxhash" = yes; then
19697 as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
19698 fi
19699 fi
19700 if test "x$with_xxhash" = "xauto"; then
19701 with_xxhash="$HAVE_LIBXXHASH"
19702 fi
19703fi
19704
19705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
19706$as_echo_n "checking whether to use xxhash... " >&6; }
19707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
19708$as_echo "$with_xxhash" >&6; }
19709
19710NM_H=
19711rm -f nm.h
19712if test "${nativefile}" != ""; then
19713 case "${nativefile}" in
19714 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
19715 * ) GDB_NM_FILE="${nativefile}"
19716 esac
19717 ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE"
19718
19719
19720cat >>confdefs.h <<_ACEOF
19721#define GDB_NM_FILE "${GDB_NM_FILE}"
19722_ACEOF
19723
19724 NM_H=nm.h
19725fi
19726
19727
19728
19729for ac_prog in xsltproc
19730do
19731 # Extract the first word of "$ac_prog", so it can be a program name with args.
19732set dummy $ac_prog; ac_word=$2
19733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19734$as_echo_n "checking for $ac_word... " >&6; }
19735if ${ac_cv_path_XSLTPROC+:} false; then :
19736 $as_echo_n "(cached) " >&6
19737else
19738 case $XSLTPROC in
19739 [\\/]* | ?:[\\/]*)
19740 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
19741 ;;
19742 *)
19743 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19744for as_dir in $PATH
19745do
19746 IFS=$as_save_IFS
19747 test -z "$as_dir" && as_dir=.
19748 for ac_exec_ext in '' $ac_executable_extensions; do
19749 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19750 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
19751 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19752 break 2
19753 fi
19754done
19755 done
19756IFS=$as_save_IFS
19757
19758 ;;
19759esac
19760fi
19761XSLTPROC=$ac_cv_path_XSLTPROC
19762if test -n "$XSLTPROC"; then
19763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19764$as_echo "$XSLTPROC" >&6; }
19765else
19766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19767$as_echo "no" >&6; }
19768fi
19769
19770
19771 test -n "$XSLTPROC" && break
19772done
19773test -n "$XSLTPROC" || XSLTPROC="missing"
19774
19775if test "x$USE_MAINTAINER_MODE" = xyes; then
19776 if test "${XSLTPROC}" = missing; then
19777 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
19778 fi
19779fi
19780
19781
19782
19783
19784
19785$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
19786
19787
19788
19789# Check whether we will enable the inclusion of unit tests when
19790# compiling GDB.
19791#
19792# The default value of this option changes depending whether we're on
19793# development mode (in which case it's "true") or not (in which case
19794# it's "false"). The $development variable is set by the GDB_AC_COMMON
19795# macro, which must therefore be used before GDB_AC_SELFTEST.
19796
19797if test "x$development" != xtrue && test "x$development" != xfalse; then :
19798 as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5
19799fi
19800
19801# Check whether --enable-unit-tests was given.
19802if test "${enable_unit_tests+set}" = set; then :
19803 enableval=$enable_unit_tests; case "${enableval}" in
19804 yes) enable_unittests=true ;;
19805 no) enable_unittests=false ;;
19806 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
19807esac
19808else
19809 enable_unittests=$development
19810fi
19811
19812
19813if $enable_unittests; then
19814
19815$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
19816
19817
19818 CONFIG_OBS="$CONFIG_OBS \$(SELFTESTS_OBS)"
19819 CONFIG_SRCS="$CONFIG_SRCS \$(SELFTESTS_SRCS)"
19820
19821fi
19822
19823
19824
19825 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19826 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
19827 if test "x$GDB_TRANSFORM_NAME" = x; then
19828 GDB_TRANSFORM_NAME=gdb
19829 fi
19830
19831
19832
19833 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19834 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
19835 if test "x$GCORE_TRANSFORM_NAME" = x; then
19836 GCORE_TRANSFORM_NAME=gcore
19837 fi
19838
19839
19840ac_config_files="$ac_config_files gcore"
19841
19842ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
19843
19844# Transform the name of some programs for the testsuite/lib/pdtrace
19845# test tool.
19846
19847 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19848 STRIP_TRANSFORM_NAME=`echo strip | sed -e "$gdb_ac_transform"`
19849 if test "x$STRIP_TRANSFORM_NAME" = x; then
19850 STRIP_TRANSFORM_NAME=strip
19851 fi
19852
19853
19854
19855 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19856 READELF_TRANSFORM_NAME=`echo readelf | sed -e "$gdb_ac_transform"`
19857 if test "x$READELF_TRANSFORM_NAME" = x; then
19858 READELF_TRANSFORM_NAME=readelf
19859 fi
19860
19861
19862
19863 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19864 GAS_TRANSFORM_NAME=`echo as | sed -e "$gdb_ac_transform"`
19865 if test "x$GAS_TRANSFORM_NAME" = x; then
19866 GAS_TRANSFORM_NAME=as
19867 fi
19868
19869
19870
19871 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19872 NM_TRANSFORM_NAME=`echo nm | sed -e "$gdb_ac_transform"`
19873 if test "x$NM_TRANSFORM_NAME" = x; then
19874 NM_TRANSFORM_NAME=nm
19875 fi
19876
19877
19878ac_config_files="$ac_config_files testsuite/lib/pdtrace"
19879
19880ac_config_files="$ac_config_files testsuite/Makefile"
19881
19882
19883cat >confcache <<\_ACEOF
19884# This file is a shell script that caches the results of configure
19885# tests run on this system so they can be shared between configure
19886# scripts and configure runs, see configure's option --config-cache.
19887# It is not useful on other systems. If it contains results you don't
19888# want to keep, you may remove or edit it.
19889#
19890# config.status only pays attention to the cache file if you give it
19891# the --recheck option to rerun configure.
19892#
19893# `ac_cv_env_foo' variables (set or unset) will be overridden when
19894# loading this file, other *unset* `ac_cv_foo' will be assigned the
19895# following values.
19896
19897_ACEOF
19898
19899# The following way of writing the cache mishandles newlines in values,
19900# but we know of no workaround that is simple, portable, and efficient.
19901# So, we kill variables containing newlines.
19902# Ultrix sh set writes to stderr and can't be redirected directly,
19903# and sets the high bit in the cache file unless we assign to the vars.
19904(
19905 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19906 eval ac_val=\$$ac_var
19907 case $ac_val in #(
19908 *${as_nl}*)
19909 case $ac_var in #(
19910 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19911$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19912 esac
19913 case $ac_var in #(
19914 _ | IFS | as_nl) ;; #(
19915 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19916 *) { eval $ac_var=; unset $ac_var;} ;;
19917 esac ;;
19918 esac
19919 done
19920
19921 (set) 2>&1 |
19922 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19923 *${as_nl}ac_space=\ *)
19924 # `set' does not quote correctly, so add quotes: double-quote
19925 # substitution turns \\\\ into \\, and sed turns \\ into \.
19926 sed -n \
19927 "s/'/'\\\\''/g;
19928 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19929 ;; #(
19930 *)
19931 # `set' quotes correctly as required by POSIX, so do not add quotes.
19932 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19933 ;;
19934 esac |
19935 sort
19936) |
19937 sed '
19938 /^ac_cv_env_/b end
19939 t clear
19940 :clear
19941 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19942 t end
19943 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19944 :end' >>confcache
19945if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19946 if test -w "$cache_file"; then
19947 if test "x$cache_file" != "x/dev/null"; then
19948 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19949$as_echo "$as_me: updating cache $cache_file" >&6;}
19950 if test ! -f "$cache_file" || test -h "$cache_file"; then
19951 cat confcache >"$cache_file"
19952 else
19953 case $cache_file in #(
19954 */* | ?:*)
19955 mv -f confcache "$cache_file"$$ &&
19956 mv -f "$cache_file"$$ "$cache_file" ;; #(
19957 *)
19958 mv -f confcache "$cache_file" ;;
19959 esac
19960 fi
19961 fi
19962 else
19963 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19964$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19965 fi
19966fi
19967rm -f confcache
19968
19969test "x$prefix" = xNONE && prefix=$ac_default_prefix
19970# Let make expand exec_prefix.
19971test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19972
19973DEFS=-DHAVE_CONFIG_H
19974
19975ac_libobjs=
19976ac_ltlibobjs=
19977U=
19978for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19979 # 1. Remove the extension, and $U if already installed.
19980 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19981 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19982 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19983 # will be set to the directory where LIBOBJS objects are built.
19984 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19985 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19986done
19987LIBOBJS=$ac_libobjs
19988
19989LTLIBOBJS=$ac_ltlibobjs
19990
19991
19992if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
19993 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
19994Usually this means the macro was only invoked conditionally." "$LINENO" 5
19995fi
19996if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
19997 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
19998Usually this means the macro was only invoked conditionally." "$LINENO" 5
19999fi
20000if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
20001 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
20002Usually this means the macro was only invoked conditionally." "$LINENO" 5
20003fi
20004
20005
20006: "${CONFIG_STATUS=./config.status}"
20007ac_write_fail=0
20008ac_clean_files_save=$ac_clean_files
20009ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20010{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
20011$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
20012as_write_fail=0
20013cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
20014#! $SHELL
20015# Generated by $as_me.
20016# Run this file to recreate the current configuration.
20017# Compiler output produced by configure, useful for debugging
20018# configure, is in config.log if it exists.
20019
20020debug=false
20021ac_cs_recheck=false
20022ac_cs_silent=false
20023
20024SHELL=\${CONFIG_SHELL-$SHELL}
20025export SHELL
20026_ASEOF
20027cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
20028## -------------------- ##
20029## M4sh Initialization. ##
20030## -------------------- ##
20031
20032# Be more Bourne compatible
20033DUALCASE=1; export DUALCASE # for MKS sh
20034if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20035 emulate sh
20036 NULLCMD=:
20037 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
20038 # is contrary to our usage. Disable this feature.
20039 alias -g '${1+"$@"}'='"$@"'
20040 setopt NO_GLOB_SUBST
20041else
20042 case `(set -o) 2>/dev/null` in #(
20043 *posix*) :
20044 set -o posix ;; #(
20045 *) :
20046 ;;
20047esac
20048fi
20049
20050
20051as_nl='
20052'
20053export as_nl
20054# Printing a long string crashes Solaris 7 /usr/bin/printf.
20055as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
20056as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
20057as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
20058# Prefer a ksh shell builtin over an external printf program on Solaris,
20059# but without wasting forks for bash or zsh.
20060if test -z "$BASH_VERSION$ZSH_VERSION" \
20061 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
20062 as_echo='print -r --'
20063 as_echo_n='print -rn --'
20064elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
20065 as_echo='printf %s\n'
20066 as_echo_n='printf %s'
20067else
20068 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
20069 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
20070 as_echo_n='/usr/ucb/echo -n'
20071 else
20072 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
20073 as_echo_n_body='eval
20074 arg=$1;
20075 case $arg in #(
20076 *"$as_nl"*)
20077 expr "X$arg" : "X\\(.*\\)$as_nl";
20078 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
20079 esac;
20080 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
20081 '
20082 export as_echo_n_body
20083 as_echo_n='sh -c $as_echo_n_body as_echo'
20084 fi
20085 export as_echo_body
20086 as_echo='sh -c $as_echo_body as_echo'
20087fi
20088
20089# The user is always right.
20090if test "${PATH_SEPARATOR+set}" != set; then
20091 PATH_SEPARATOR=:
20092 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
20093 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
20094 PATH_SEPARATOR=';'
20095 }
20096fi
20097
20098
20099# IFS
20100# We need space, tab and new line, in precisely that order. Quoting is
20101# there to prevent editors from complaining about space-tab.
20102# (If _AS_PATH_WALK were called with IFS unset, it would disable word
20103# splitting by setting IFS to empty value.)
20104IFS=" "" $as_nl"
20105
20106# Find who we are. Look in the path if we contain no directory separator.
20107as_myself=
20108case $0 in #((
20109 *[\\/]* ) as_myself=$0 ;;
20110 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20111for as_dir in $PATH
20112do
20113 IFS=$as_save_IFS
20114 test -z "$as_dir" && as_dir=.
20115 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20116 done
20117IFS=$as_save_IFS
20118
20119 ;;
20120esac
20121# We did not find ourselves, most probably we were run as `sh COMMAND'
20122# in which case we are not to be found in the path.
20123if test "x$as_myself" = x; then
20124 as_myself=$0
20125fi
20126if test ! -f "$as_myself"; then
20127 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
20128 exit 1
20129fi
20130
20131# Unset variables that we do not need and which cause bugs (e.g. in
20132# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
20133# suppresses any "Segmentation fault" message there. '((' could
20134# trigger a bug in pdksh 5.2.14.
20135for as_var in BASH_ENV ENV MAIL MAILPATH
20136do eval test x\${$as_var+set} = xset \
20137 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
20138done
20139PS1='$ '
20140PS2='> '
20141PS4='+ '
20142
20143# NLS nuisances.
20144LC_ALL=C
20145export LC_ALL
20146LANGUAGE=C
20147export LANGUAGE
20148
20149# CDPATH.
20150(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
20151
20152
20153# as_fn_error STATUS ERROR [LINENO LOG_FD]
20154# ----------------------------------------
20155# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
20156# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
20157# script with STATUS, using 1 if that was 0.
20158as_fn_error ()
20159{
20160 as_status=$1; test $as_status -eq 0 && as_status=1
20161 if test "$4"; then
20162 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
20163 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
20164 fi
20165 $as_echo "$as_me: error: $2" >&2
20166 as_fn_exit $as_status
20167} # as_fn_error
20168
20169
20170# as_fn_set_status STATUS
20171# -----------------------
20172# Set $? to STATUS, without forking.
20173as_fn_set_status ()
20174{
20175 return $1
20176} # as_fn_set_status
20177
20178# as_fn_exit STATUS
20179# -----------------
20180# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
20181as_fn_exit ()
20182{
20183 set +e
20184 as_fn_set_status $1
20185 exit $1
20186} # as_fn_exit
20187
20188# as_fn_unset VAR
20189# ---------------
20190# Portably unset VAR.
20191as_fn_unset ()
20192{
20193 { eval $1=; unset $1;}
20194}
20195as_unset=as_fn_unset
20196# as_fn_append VAR VALUE
20197# ----------------------
20198# Append the text in VALUE to the end of the definition contained in VAR. Take
20199# advantage of any shell optimizations that allow amortized linear growth over
20200# repeated appends, instead of the typical quadratic growth present in naive
20201# implementations.
20202if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
20203 eval 'as_fn_append ()
20204 {
20205 eval $1+=\$2
20206 }'
20207else
20208 as_fn_append ()
20209 {
20210 eval $1=\$$1\$2
20211 }
20212fi # as_fn_append
20213
20214# as_fn_arith ARG...
20215# ------------------
20216# Perform arithmetic evaluation on the ARGs, and store the result in the
20217# global $as_val. Take advantage of shells that can avoid forks. The arguments
20218# must be portable across $(()) and expr.
20219if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
20220 eval 'as_fn_arith ()
20221 {
20222 as_val=$(( $* ))
20223 }'
20224else
20225 as_fn_arith ()
20226 {
20227 as_val=`expr "$@" || test $? -eq 1`
20228 }
20229fi # as_fn_arith
20230
20231
20232if expr a : '\(a\)' >/dev/null 2>&1 &&
20233 test "X`expr 00001 : '.*\(...\)'`" = X001; then
20234 as_expr=expr
20235else
20236 as_expr=false
20237fi
20238
20239if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
20240 as_basename=basename
20241else
20242 as_basename=false
20243fi
20244
20245if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20246 as_dirname=dirname
20247else
20248 as_dirname=false
20249fi
20250
20251as_me=`$as_basename -- "$0" ||
20252$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20253 X"$0" : 'X\(//\)$' \| \
20254 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
20255$as_echo X/"$0" |
20256 sed '/^.*\/\([^/][^/]*\)\/*$/{
20257 s//\1/
20258 q
20259 }
20260 /^X\/\(\/\/\)$/{
20261 s//\1/
20262 q
20263 }
20264 /^X\/\(\/\).*/{
20265 s//\1/
20266 q
20267 }
20268 s/.*/./; q'`
20269
20270# Avoid depending upon Character Ranges.
20271as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20272as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20273as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20274as_cr_digits='0123456789'
20275as_cr_alnum=$as_cr_Letters$as_cr_digits
20276
20277ECHO_C= ECHO_N= ECHO_T=
20278case `echo -n x` in #(((((
20279-n*)
20280 case `echo 'xy\c'` in
20281 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
20282 xy) ECHO_C='\c';;
20283 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
20284 ECHO_T=' ';;
20285 esac;;
20286*)
20287 ECHO_N='-n';;
20288esac
20289
20290rm -f conf$$ conf$$.exe conf$$.file
20291if test -d conf$$.dir; then
20292 rm -f conf$$.dir/conf$$.file
20293else
20294 rm -f conf$$.dir
20295 mkdir conf$$.dir 2>/dev/null
20296fi
20297if (echo >conf$$.file) 2>/dev/null; then
20298 if ln -s conf$$.file conf$$ 2>/dev/null; then
20299 as_ln_s='ln -s'
20300 # ... but there are two gotchas:
20301 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20302 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
20303 # In both cases, we have to default to `cp -pR'.
20304 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
20305 as_ln_s='cp -pR'
20306 elif ln conf$$.file conf$$ 2>/dev/null; then
20307 as_ln_s=ln
20308 else
20309 as_ln_s='cp -pR'
20310 fi
20311else
20312 as_ln_s='cp -pR'
20313fi
20314rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20315rmdir conf$$.dir 2>/dev/null
20316
20317
20318# as_fn_mkdir_p
20319# -------------
20320# Create "$as_dir" as a directory, including parents if necessary.
20321as_fn_mkdir_p ()
20322{
20323
20324 case $as_dir in #(
20325 -*) as_dir=./$as_dir;;
20326 esac
20327 test -d "$as_dir" || eval $as_mkdir_p || {
20328 as_dirs=
20329 while :; do
20330 case $as_dir in #(
20331 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
20332 *) as_qdir=$as_dir;;
20333 esac
20334 as_dirs="'$as_qdir' $as_dirs"
20335 as_dir=`$as_dirname -- "$as_dir" ||
20336$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20337 X"$as_dir" : 'X\(//\)[^/]' \| \
20338 X"$as_dir" : 'X\(//\)$' \| \
20339 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
20340$as_echo X"$as_dir" |
20341 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20342 s//\1/
20343 q
20344 }
20345 /^X\(\/\/\)[^/].*/{
20346 s//\1/
20347 q
20348 }
20349 /^X\(\/\/\)$/{
20350 s//\1/
20351 q
20352 }
20353 /^X\(\/\).*/{
20354 s//\1/
20355 q
20356 }
20357 s/.*/./; q'`
20358 test -d "$as_dir" && break
20359 done
20360 test -z "$as_dirs" || eval "mkdir $as_dirs"
20361 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
20362
20363
20364} # as_fn_mkdir_p
20365if mkdir -p . 2>/dev/null; then
20366 as_mkdir_p='mkdir -p "$as_dir"'
20367else
20368 test -d ./-p && rmdir ./-p
20369 as_mkdir_p=false
20370fi
20371
20372
20373# as_fn_executable_p FILE
20374# -----------------------
20375# Test if FILE is an executable regular file.
20376as_fn_executable_p ()
20377{
20378 test -f "$1" && test -x "$1"
20379} # as_fn_executable_p
20380as_test_x='test -x'
20381as_executable_p=as_fn_executable_p
20382
20383# Sed expression to map a string onto a valid CPP name.
20384as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20385
20386# Sed expression to map a string onto a valid variable name.
20387as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20388
20389
20390exec 6>&1
20391## ----------------------------------- ##
20392## Main body of $CONFIG_STATUS script. ##
20393## ----------------------------------- ##
20394_ASEOF
20395test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
20396
20397cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20398# Save the log message, to keep $0 and so on meaningful, and to
20399# report actual input values of CONFIG_FILES etc. instead of their
20400# values after options handling.
20401ac_log="
20402This file was extended by $as_me, which was
20403generated by GNU Autoconf 2.69. Invocation command line was
20404
20405 CONFIG_FILES = $CONFIG_FILES
20406 CONFIG_HEADERS = $CONFIG_HEADERS
20407 CONFIG_LINKS = $CONFIG_LINKS
20408 CONFIG_COMMANDS = $CONFIG_COMMANDS
20409 $ $0 $@
20410
20411on `(hostname || uname -n) 2>/dev/null | sed 1q`
20412"
20413
20414_ACEOF
20415
20416case $ac_config_files in *"
20417"*) set x $ac_config_files; shift; ac_config_files=$*;;
20418esac
20419
20420case $ac_config_headers in *"
20421"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
20422esac
20423
20424
20425cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20426# Files that config.status was made for.
20427config_files="$ac_config_files"
20428config_headers="$ac_config_headers"
20429config_links="$ac_config_links"
20430config_commands="$ac_config_commands"
20431
20432_ACEOF
20433
20434cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20435ac_cs_usage="\
20436\`$as_me' instantiates files and other configuration actions
20437from templates according to the current configuration. Unless the files
20438and actions are specified as TAGs, all are instantiated by default.
20439
20440Usage: $0 [OPTION]... [TAG]...
20441
20442 -h, --help print this help, then exit
20443 -V, --version print version number and configuration settings, then exit
20444 --config print configuration, then exit
20445 -q, --quiet, --silent
20446 do not print progress messages
20447 -d, --debug don't remove temporary files
20448 --recheck update $as_me by reconfiguring in the same conditions
20449 --file=FILE[:TEMPLATE]
20450 instantiate the configuration file FILE
20451 --header=FILE[:TEMPLATE]
20452 instantiate the configuration header FILE
20453
20454Configuration files:
20455$config_files
20456
20457Configuration headers:
20458$config_headers
20459
20460Configuration links:
20461$config_links
20462
20463Configuration commands:
20464$config_commands
20465
20466Report bugs to the package provider."
20467
20468_ACEOF
20469cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20470ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
20471ac_cs_version="\\
20472config.status
20473configured by $0, generated by GNU Autoconf 2.69,
20474 with options \\"\$ac_cs_config\\"
20475
20476Copyright (C) 2012 Free Software Foundation, Inc.
20477This config.status script is free software; the Free Software Foundation
20478gives unlimited permission to copy, distribute and modify it."
20479
20480ac_pwd='$ac_pwd'
20481srcdir='$srcdir'
20482INSTALL='$INSTALL'
20483AWK='$AWK'
20484test -n "\$AWK" || AWK=awk
20485_ACEOF
20486
20487cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20488# The default lists apply if the user does not specify any file.
20489ac_need_defaults=:
20490while test $# != 0
20491do
20492 case $1 in
20493 --*=?*)
20494 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20495 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20496 ac_shift=:
20497 ;;
20498 --*=)
20499 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20500 ac_optarg=
20501 ac_shift=:
20502 ;;
20503 *)
20504 ac_option=$1
20505 ac_optarg=$2
20506 ac_shift=shift
20507 ;;
20508 esac
20509
20510 case $ac_option in
20511 # Handling of the options.
20512 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20513 ac_cs_recheck=: ;;
20514 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20515 $as_echo "$ac_cs_version"; exit ;;
20516 --config | --confi | --conf | --con | --co | --c )
20517 $as_echo "$ac_cs_config"; exit ;;
20518 --debug | --debu | --deb | --de | --d | -d )
20519 debug=: ;;
20520 --file | --fil | --fi | --f )
20521 $ac_shift
20522 case $ac_optarg in
20523 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20524 '') as_fn_error $? "missing file argument" ;;
20525 esac
20526 as_fn_append CONFIG_FILES " '$ac_optarg'"
20527 ac_need_defaults=false;;
20528 --header | --heade | --head | --hea )
20529 $ac_shift
20530 case $ac_optarg in
20531 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20532 esac
20533 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
20534 ac_need_defaults=false;;
20535 --he | --h)
20536 # Conflict between --help and --header
20537 as_fn_error $? "ambiguous option: \`$1'
20538Try \`$0 --help' for more information.";;
20539 --help | --hel | -h )
20540 $as_echo "$ac_cs_usage"; exit ;;
20541 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20542 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20543 ac_cs_silent=: ;;
20544
20545 # This is an error.
20546 -*) as_fn_error $? "unrecognized option: \`$1'
20547Try \`$0 --help' for more information." ;;
20548
20549 *) as_fn_append ac_config_targets " $1"
20550 ac_need_defaults=false ;;
20551
20552 esac
20553 shift
20554done
20555
20556ac_configure_extra_args=
20557
20558if $ac_cs_silent; then
20559 exec 6>/dev/null
20560 ac_configure_extra_args="$ac_configure_extra_args --silent"
20561fi
20562
20563_ACEOF
20564cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20565if \$ac_cs_recheck; then
20566 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20567 shift
20568 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20569 CONFIG_SHELL='$SHELL'
20570 export CONFIG_SHELL
20571 exec "\$@"
20572fi
20573
20574_ACEOF
20575cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20576exec 5>>config.log
20577{
20578 echo
20579 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20580## Running $as_me. ##
20581_ASBOX
20582 $as_echo "$ac_log"
20583} >&5
20584
20585_ACEOF
20586cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20587#
20588# INIT-COMMANDS
20589#
20590ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
20591GDB_NM_FILE=$GDB_NM_FILE
20592
20593_ACEOF
20594
20595cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20596
20597# Handling of arguments.
20598for ac_config_target in $ac_config_targets
20599do
20600 case $ac_config_target in
20601 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
20602 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
20603 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
20604 "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;;
20605 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
20606 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20607 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
20608 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
20609 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
20610 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
20611 "testsuite/lib/pdtrace") CONFIG_FILES="$CONFIG_FILES testsuite/lib/pdtrace" ;;
20612 "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
20613
20614 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20615 esac
20616done
20617
20618
20619# If the user did not use the arguments to specify the items to instantiate,
20620# then the envvar interface is used. Set only those that are not.
20621# We use the long form for the default assignment because of an extremely
20622# bizarre bug on SunOS 4.1.3.
20623if $ac_need_defaults; then
20624 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20625 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20626 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20627 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20628fi
20629
20630# Have a temporary directory for convenience. Make it in the build tree
20631# simply because there is no reason against having it here, and in addition,
20632# creating and moving files from /tmp can sometimes cause problems.
20633# Hook for its removal unless debugging.
20634# Note that there is a small window in which the directory will not be cleaned:
20635# after its creation but before its name has been assigned to `$tmp'.
20636$debug ||
20637{
20638 tmp= ac_tmp=
20639 trap 'exit_status=$?
20640 : "${ac_tmp:=$tmp}"
20641 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20642' 0
20643 trap 'as_fn_exit 1' 1 2 13 15
20644}
20645# Create a (secure) tmp directory for tmp files.
20646
20647{
20648 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20649 test -d "$tmp"
20650} ||
20651{
20652 tmp=./conf$$-$RANDOM
20653 (umask 077 && mkdir "$tmp")
20654} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20655ac_tmp=$tmp
20656
20657# Set up the scripts for CONFIG_FILES section.
20658# No need to generate them if there are no CONFIG_FILES.
20659# This happens for instance with `./config.status config.h'.
20660if test -n "$CONFIG_FILES"; then
20661
20662if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
20663 ac_cs_awk_getline=:
20664 ac_cs_awk_pipe_init=
20665 ac_cs_awk_read_file='
20666 while ((getline aline < (F[key])) > 0)
20667 print(aline)
20668 close(F[key])'
20669 ac_cs_awk_pipe_fini=
20670else
20671 ac_cs_awk_getline=false
20672 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
20673 ac_cs_awk_read_file='
20674 print "|#_!!_#|"
20675 print "cat " F[key] " &&"
20676 '$ac_cs_awk_pipe_init
20677 # The final `:' finishes the AND list.
20678 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
20679fi
20680ac_cr=`echo X | tr X '\015'`
20681# On cygwin, bash can eat \r inside `` if the user requested igncr.
20682# But we know of no other shell where ac_cr would be empty at this
20683# point, so we can use a bashism as a fallback.
20684if test "x$ac_cr" = x; then
20685 eval ac_cr=\$\'\\r\'
20686fi
20687ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20688if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20689 ac_cs_awk_cr='\\r'
20690else
20691 ac_cs_awk_cr=$ac_cr
20692fi
20693
20694echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20695_ACEOF
20696
20697# Create commands to substitute file output variables.
20698{
20699 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
20700 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
20701 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
20702 echo "_ACAWK" &&
20703 echo "_ACEOF"
20704} >conf$$files.sh &&
20705. ./conf$$files.sh ||
20706 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20707rm -f conf$$files.sh
20708
20709{
20710 echo "cat >conf$$subs.awk <<_ACEOF" &&
20711 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20712 echo "_ACEOF"
20713} >conf$$subs.sh ||
20714 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20715ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20716ac_delim='%!_!# '
20717for ac_last_try in false false false false false :; do
20718 . ./conf$$subs.sh ||
20719 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20720
20721 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20722 if test $ac_delim_n = $ac_delim_num; then
20723 break
20724 elif $ac_last_try; then
20725 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20726 else
20727 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20728 fi
20729done
20730rm -f conf$$subs.sh
20731
20732cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20733cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20734_ACEOF
20735sed -n '
20736h
20737s/^/S["/; s/!.*/"]=/
20738p
20739g
20740s/^[^!]*!//
20741:repl
20742t repl
20743s/'"$ac_delim"'$//
20744t delim
20745:nl
20746h
20747s/\(.\{148\}\)..*/\1/
20748t more1
20749s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20750p
20751n
20752b repl
20753:more1
20754s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20755p
20756g
20757s/.\{148\}//
20758t nl
20759:delim
20760h
20761s/\(.\{148\}\)..*/\1/
20762t more2
20763s/["\\]/\\&/g; s/^/"/; s/$/"/
20764p
20765b
20766:more2
20767s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20768p
20769g
20770s/.\{148\}//
20771t delim
20772' <conf$$subs.awk | sed '
20773/^[^""]/{
20774 N
20775 s/\n//
20776}
20777' >>$CONFIG_STATUS || ac_write_fail=1
20778rm -f conf$$subs.awk
20779cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20780_ACAWK
20781cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20782 for (key in S) S_is_set[key] = 1
20783 FS = "\a"
20784 \$ac_cs_awk_pipe_init
20785}
20786{
20787 line = $ 0
20788 nfields = split(line, field, "@")
20789 substed = 0
20790 len = length(field[1])
20791 for (i = 2; i < nfields; i++) {
20792 key = field[i]
20793 keylen = length(key)
20794 if (S_is_set[key]) {
20795 value = S[key]
20796 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20797 len += length(value) + length(field[++i])
20798 substed = 1
20799 } else
20800 len += 1 + keylen
20801 }
20802 if (nfields == 3 && !substed) {
20803 key = field[2]
20804 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
20805 \$ac_cs_awk_read_file
20806 next
20807 }
20808 }
20809 print line
20810}
20811\$ac_cs_awk_pipe_fini
20812_ACAWK
20813_ACEOF
20814cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20815if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20816 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20817else
20818 cat
20819fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20820 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20821_ACEOF
20822
20823# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20824# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20825# trailing colons and then remove the whole line if VPATH becomes empty
20826# (actually we leave an empty line to preserve line numbers).
20827if test "x$srcdir" = x.; then
20828 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20829h
20830s///
20831s/^/:/
20832s/[ ]*$/:/
20833s/:\$(srcdir):/:/g
20834s/:\${srcdir}:/:/g
20835s/:@srcdir@:/:/g
20836s/^:*//
20837s/:*$//
20838x
20839s/\(=[ ]*\).*/\1/
20840G
20841s/\n//
20842s/^[^=]*=[ ]*$//
20843}'
20844fi
20845
20846cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20847fi # test -n "$CONFIG_FILES"
20848
20849# Set up the scripts for CONFIG_HEADERS section.
20850# No need to generate them if there are no CONFIG_HEADERS.
20851# This happens for instance with `./config.status Makefile'.
20852if test -n "$CONFIG_HEADERS"; then
20853cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20854BEGIN {
20855_ACEOF
20856
20857# Transform confdefs.h into an awk script `defines.awk', embedded as
20858# here-document in config.status, that substitutes the proper values into
20859# config.h.in to produce config.h.
20860
20861# Create a delimiter string that does not exist in confdefs.h, to ease
20862# handling of long lines.
20863ac_delim='%!_!# '
20864for ac_last_try in false false :; do
20865 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20866 if test -z "$ac_tt"; then
20867 break
20868 elif $ac_last_try; then
20869 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20870 else
20871 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20872 fi
20873done
20874
20875# For the awk script, D is an array of macro values keyed by name,
20876# likewise P contains macro parameters if any. Preserve backslash
20877# newline sequences.
20878
20879ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20880sed -n '
20881s/.\{148\}/&'"$ac_delim"'/g
20882t rset
20883:rset
20884s/^[ ]*#[ ]*define[ ][ ]*/ /
20885t def
20886d
20887:def
20888s/\\$//
20889t bsnl
20890s/["\\]/\\&/g
20891s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20892D["\1"]=" \3"/p
20893s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20894d
20895:bsnl
20896s/["\\]/\\&/g
20897s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20898D["\1"]=" \3\\\\\\n"\\/p
20899t cont
20900s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20901t cont
20902d
20903:cont
20904n
20905s/.\{148\}/&'"$ac_delim"'/g
20906t clear
20907:clear
20908s/\\$//
20909t bsnlc
20910s/["\\]/\\&/g; s/^/"/; s/$/"/p
20911d
20912:bsnlc
20913s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20914b cont
20915' <confdefs.h | sed '
20916s/'"$ac_delim"'/"\\\
20917"/g' >>$CONFIG_STATUS || ac_write_fail=1
20918
20919cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20920 for (key in D) D_is_set[key] = 1
20921 FS = "\a"
20922}
20923/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20924 line = \$ 0
20925 split(line, arg, " ")
20926 if (arg[1] == "#") {
20927 defundef = arg[2]
20928 mac1 = arg[3]
20929 } else {
20930 defundef = substr(arg[1], 2)
20931 mac1 = arg[2]
20932 }
20933 split(mac1, mac2, "(") #)
20934 macro = mac2[1]
20935 prefix = substr(line, 1, index(line, defundef) - 1)
20936 if (D_is_set[macro]) {
20937 # Preserve the white space surrounding the "#".
20938 print prefix "define", macro P[macro] D[macro]
20939 next
20940 } else {
20941 # Replace #undef with comments. This is necessary, for example,
20942 # in the case of _POSIX_SOURCE, which is predefined and required
20943 # on some systems where configure will not decide to define it.
20944 if (defundef == "undef") {
20945 print "/*", prefix defundef, macro, "*/"
20946 next
20947 }
20948 }
20949}
20950{ print }
20951_ACAWK
20952_ACEOF
20953cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20954 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20955fi # test -n "$CONFIG_HEADERS"
20956
20957
20958eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20959shift
20960for ac_tag
20961do
20962 case $ac_tag in
20963 :[FHLC]) ac_mode=$ac_tag; continue;;
20964 esac
20965 case $ac_mode$ac_tag in
20966 :[FHL]*:*);;
20967 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20968 :[FH]-) ac_tag=-:-;;
20969 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20970 esac
20971 ac_save_IFS=$IFS
20972 IFS=:
20973 set x $ac_tag
20974 IFS=$ac_save_IFS
20975 shift
20976 ac_file=$1
20977 shift
20978
20979 case $ac_mode in
20980 :L) ac_source=$1;;
20981 :[FH])
20982 ac_file_inputs=
20983 for ac_f
20984 do
20985 case $ac_f in
20986 -) ac_f="$ac_tmp/stdin";;
20987 *) # Look for the file first in the build tree, then in the source tree
20988 # (if the path is not absolute). The absolute path cannot be DOS-style,
20989 # because $ac_f cannot contain `:'.
20990 test -f "$ac_f" ||
20991 case $ac_f in
20992 [\\/$]*) false;;
20993 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20994 esac ||
20995 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20996 esac
20997 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20998 as_fn_append ac_file_inputs " '$ac_f'"
20999 done
21000
21001 # Let's still pretend it is `configure' which instantiates (i.e., don't
21002 # use $as_me), people would be surprised to read:
21003 # /* config.h. Generated by config.status. */
21004 configure_input='Generated from '`
21005 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
21006 `' by configure.'
21007 if test x"$ac_file" != x-; then
21008 configure_input="$ac_file. $configure_input"
21009 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
21010$as_echo "$as_me: creating $ac_file" >&6;}
21011 fi
21012 # Neutralize special characters interpreted by sed in replacement strings.
21013 case $configure_input in #(
21014 *\&* | *\|* | *\\* )
21015 ac_sed_conf_input=`$as_echo "$configure_input" |
21016 sed 's/[\\\\&|]/\\\\&/g'`;; #(
21017 *) ac_sed_conf_input=$configure_input;;
21018 esac
21019
21020 case $ac_tag in
21021 *:-:* | *:-) cat >"$ac_tmp/stdin" \
21022 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
21023 esac
21024 ;;
21025 esac
21026
21027 ac_dir=`$as_dirname -- "$ac_file" ||
21028$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21029 X"$ac_file" : 'X\(//\)[^/]' \| \
21030 X"$ac_file" : 'X\(//\)$' \| \
21031 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
21032$as_echo X"$ac_file" |
21033 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21034 s//\1/
21035 q
21036 }
21037 /^X\(\/\/\)[^/].*/{
21038 s//\1/
21039 q
21040 }
21041 /^X\(\/\/\)$/{
21042 s//\1/
21043 q
21044 }
21045 /^X\(\/\).*/{
21046 s//\1/
21047 q
21048 }
21049 s/.*/./; q'`
21050 as_dir="$ac_dir"; as_fn_mkdir_p
21051 ac_builddir=.
21052
21053case "$ac_dir" in
21054.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21055*)
21056 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
21057 # A ".." for each directory in $ac_dir_suffix.
21058 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
21059 case $ac_top_builddir_sub in
21060 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21061 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21062 esac ;;
21063esac
21064ac_abs_top_builddir=$ac_pwd
21065ac_abs_builddir=$ac_pwd$ac_dir_suffix
21066# for backward compatibility:
21067ac_top_builddir=$ac_top_build_prefix
21068
21069case $srcdir in
21070 .) # We are building in place.
21071 ac_srcdir=.
21072 ac_top_srcdir=$ac_top_builddir_sub
21073 ac_abs_top_srcdir=$ac_pwd ;;
21074 [\\/]* | ?:[\\/]* ) # Absolute name.
21075 ac_srcdir=$srcdir$ac_dir_suffix;
21076 ac_top_srcdir=$srcdir
21077 ac_abs_top_srcdir=$srcdir ;;
21078 *) # Relative name.
21079 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21080 ac_top_srcdir=$ac_top_build_prefix$srcdir
21081 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
21082esac
21083ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
21084
21085
21086 case $ac_mode in
21087 :F)
21088 #
21089 # CONFIG_FILE
21090 #
21091
21092 case $INSTALL in
21093 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21094 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
21095 esac
21096_ACEOF
21097
21098cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21099# If the template does not know about datarootdir, expand it.
21100# FIXME: This hack should be removed a few years after 2.60.
21101ac_datarootdir_hack=; ac_datarootdir_seen=
21102ac_sed_dataroot='
21103/datarootdir/ {
21104 p
21105 q
21106}
21107/@datadir@/p
21108/@docdir@/p
21109/@infodir@/p
21110/@localedir@/p
21111/@mandir@/p'
21112case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
21113*datarootdir*) ac_datarootdir_seen=yes;;
21114*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
21115 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
21116$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
21117_ACEOF
21118cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21119 ac_datarootdir_hack='
21120 s&@datadir@&$datadir&g
21121 s&@docdir@&$docdir&g
21122 s&@infodir@&$infodir&g
21123 s&@localedir@&$localedir&g
21124 s&@mandir@&$mandir&g
21125 s&\\\${datarootdir}&$datarootdir&g' ;;
21126esac
21127_ACEOF
21128
21129# Neutralize VPATH when `$srcdir' = `.'.
21130# Shell code in configure.ac might set extrasub.
21131# FIXME: do we really want to maintain this feature?
21132cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21133ac_sed_extra="$ac_vpsub
21134$extrasub
21135_ACEOF
21136cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21137:t
21138/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21139s|@configure_input@|$ac_sed_conf_input|;t t
21140s&@top_builddir@&$ac_top_builddir_sub&;t t
21141s&@top_build_prefix@&$ac_top_build_prefix&;t t
21142s&@srcdir@&$ac_srcdir&;t t
21143s&@abs_srcdir@&$ac_abs_srcdir&;t t
21144s&@top_srcdir@&$ac_top_srcdir&;t t
21145s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
21146s&@builddir@&$ac_builddir&;t t
21147s&@abs_builddir@&$ac_abs_builddir&;t t
21148s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
21149s&@INSTALL@&$ac_INSTALL&;t t
21150$ac_datarootdir_hack
21151"
21152eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
21153if $ac_cs_awk_getline; then
21154 $AWK -f "$ac_tmp/subs.awk"
21155else
21156 $AWK -f "$ac_tmp/subs.awk" | $SHELL
21157fi \
21158 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21159
21160test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
21161 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
21162 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
21163 "$ac_tmp/out"`; test -z "$ac_out"; } &&
21164 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21165which seems to be undefined. Please make sure it is defined" >&5
21166$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21167which seems to be undefined. Please make sure it is defined" >&2;}
21168
21169 rm -f "$ac_tmp/stdin"
21170 case $ac_file in
21171 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
21172 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
21173 esac \
21174 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21175 ;;
21176 :H)
21177 #
21178 # CONFIG_HEADER
21179 #
21180 if test x"$ac_file" != x-; then
21181 {
21182 $as_echo "/* $configure_input */" \
21183 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
21184 } >"$ac_tmp/config.h" \
21185 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21186 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
21187 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
21188$as_echo "$as_me: $ac_file is unchanged" >&6;}
21189 else
21190 rm -f "$ac_file"
21191 mv "$ac_tmp/config.h" "$ac_file" \
21192 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21193 fi
21194 else
21195 $as_echo "/* $configure_input */" \
21196 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
21197 || as_fn_error $? "could not create -" "$LINENO" 5
21198 fi
21199 ;;
21200 :L)
21201 #
21202 # CONFIG_LINK
21203 #
21204
21205 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
21206 :
21207 else
21208 # Prefer the file from the source tree if names are identical.
21209 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
21210 ac_source=$srcdir/$ac_source
21211 fi
21212
21213 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
21214$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
21215
21216 if test ! -r "$ac_source"; then
21217 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
21218 fi
21219 rm -f "$ac_file"
21220
21221 # Try a relative symlink, then a hard link, then a copy.
21222 case $ac_source in
21223 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
21224 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
21225 esac
21226 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
21227 ln "$ac_source" "$ac_file" 2>/dev/null ||
21228 cp -p "$ac_source" "$ac_file" ||
21229 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
21230 fi
21231 ;;
21232 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
21233$as_echo "$as_me: executing $ac_file commands" >&6;}
21234 ;;
21235 esac
21236
21237
21238 case $ac_file$ac_mode in
21239 "config.h":H) echo > stamp-h ;;
21240 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
21241 "nm.h":L) echo > stamp-nmh ;;
21242 "gcore":F) chmod +x gcore ;;
21243 "testsuite/lib/pdtrace":F) chmod +x testsuite/lib/pdtrace ;;
21244
21245 esac
21246done # for ac_tag
21247
21248
21249as_fn_exit 0
21250_ACEOF
21251ac_clean_files=$ac_clean_files_save
21252
21253test $ac_write_fail = 0 ||
21254 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
21255
21256
21257# configure is writing to config.log, and then calls config.status.
21258# config.status does its own redirection, appending to config.log.
21259# Unfortunately, on DOS this fails, as config.log is still kept open
21260# by configure, so config.status won't be able to write to it; its
21261# output is simply discarded. So we exec the FD to /dev/null,
21262# effectively closing config.log, so it can be properly (re)opened and
21263# appended to by config.status. When coming back to configure, we
21264# need to make the FD available again.
21265if test "$no_create" != yes; then
21266 ac_cs_success=:
21267 ac_config_status_args=
21268 test "$silent" = yes &&
21269 ac_config_status_args="$ac_config_status_args --quiet"
21270 exec 5>/dev/null
21271 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21272 exec 5>>config.log
21273 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21274 # would make configure fail if this is the last instruction.
21275 $ac_cs_success || as_fn_exit 1
21276fi
21277
21278#
21279# CONFIG_SUBDIRS section.
21280#
21281if test "$no_recursion" != yes; then
21282
21283 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
21284 # so they do not pile up.
21285 ac_sub_configure_args=
21286 ac_prev=
21287 eval "set x $ac_configure_args"
21288 shift
21289 for ac_arg
21290 do
21291 if test -n "$ac_prev"; then
21292 ac_prev=
21293 continue
21294 fi
21295 case $ac_arg in
21296 -cache-file | --cache-file | --cache-fil | --cache-fi \
21297 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
21298 ac_prev=cache_file ;;
21299 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
21300 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
21301 | --c=*)
21302 ;;
21303 --config-cache | -C)
21304 ;;
21305 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
21306 ac_prev=srcdir ;;
21307 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
21308 ;;
21309 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
21310 ac_prev=prefix ;;
21311 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
21312 ;;
21313 --disable-option-checking)
21314 ;;
21315 *)
21316 case $ac_arg in
21317 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
21318 esac
21319 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
21320 esac
21321 done
21322
21323 # Always prepend --prefix to ensure using the same prefix
21324 # in subdir configurations.
21325 ac_arg="--prefix=$prefix"
21326 case $ac_arg in
21327 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
21328 esac
21329 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
21330
21331 # Pass --silent
21332 if test "$silent" = yes; then
21333 ac_sub_configure_args="--silent $ac_sub_configure_args"
21334 fi
21335
21336 # Always prepend --disable-option-checking to silence warnings, since
21337 # different subdirs can have different --enable and --with options.
21338 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
21339
21340 ac_popdir=`pwd`
21341 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
21342
21343 # Do not complain, so a configure script can configure whichever
21344 # parts of a large source tree are present.
21345 test -d "$srcdir/$ac_dir" || continue
21346
21347 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
21348 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
21349 $as_echo "$ac_msg" >&6
21350 as_dir="$ac_dir"; as_fn_mkdir_p
21351 ac_builddir=.
21352
21353case "$ac_dir" in
21354.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21355*)
21356 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
21357 # A ".." for each directory in $ac_dir_suffix.
21358 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
21359 case $ac_top_builddir_sub in
21360 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21361 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21362 esac ;;
21363esac
21364ac_abs_top_builddir=$ac_pwd
21365ac_abs_builddir=$ac_pwd$ac_dir_suffix
21366# for backward compatibility:
21367ac_top_builddir=$ac_top_build_prefix
21368
21369case $srcdir in
21370 .) # We are building in place.
21371 ac_srcdir=.
21372 ac_top_srcdir=$ac_top_builddir_sub
21373 ac_abs_top_srcdir=$ac_pwd ;;
21374 [\\/]* | ?:[\\/]* ) # Absolute name.
21375 ac_srcdir=$srcdir$ac_dir_suffix;
21376 ac_top_srcdir=$srcdir
21377 ac_abs_top_srcdir=$srcdir ;;
21378 *) # Relative name.
21379 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21380 ac_top_srcdir=$ac_top_build_prefix$srcdir
21381 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
21382esac
21383ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
21384
21385
21386 cd "$ac_dir"
21387
21388 # Check for guested configure; otherwise get Cygnus style configure.
21389 if test -f "$ac_srcdir/configure.gnu"; then
21390 ac_sub_configure=$ac_srcdir/configure.gnu
21391 elif test -f "$ac_srcdir/configure"; then
21392 ac_sub_configure=$ac_srcdir/configure
21393 elif test -f "$ac_srcdir/configure.in"; then
21394 # This should be Cygnus configure.
21395 ac_sub_configure=$ac_aux_dir/configure
21396 else
21397 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
21398$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
21399 ac_sub_configure=
21400 fi
21401
21402 # The recursion is here.
21403 if test -n "$ac_sub_configure"; then
21404 # Make the cache file name correct relative to the subdirectory.
21405 case $cache_file in
21406 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
21407 *) # Relative name.
21408 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
21409 esac
21410
21411 { $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
21412$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
21413 # The eval makes quoting arguments work.
21414 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
21415 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
21416 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
21417 fi
21418
21419 cd "$ac_popdir"
21420 done
21421fi
21422if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
21423 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
21424$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
21425fi
21426
This page took 0.104325 seconds and 4 git commands to generate.