[PR build/24886] disable glibc mcheck support
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
d0ac1c44
SM
3# Generated by GNU Autoconf 2.69.
4#
5#
6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
81ecdfbb 7#
c906108c
SS
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
81ecdfbb
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
bec39cab 14
81ecdfbb
RW
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 :
bec39cab
AC
18 emulate sh
19 NULLCMD=:
81ecdfbb 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
bec39cab 31fi
bec39cab 32
81ecdfbb
RW
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 }
bec39cab
AC
79fi
80
81
81ecdfbb
RW
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.
d0ac1c44 90as_myself=
81ecdfbb
RW
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
bec39cab
AC
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
81ecdfbb
RW
127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export LANGUAGE
131
132# CDPATH.
133(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
d0ac1c44
SM
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;}
81ecdfbb
RW
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
d0ac1c44
SM
193test x\$exitcode = x0 || exit 1
194test -x / || exit 1"
81ecdfbb
RW
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
bec39cab 211do
81ecdfbb
RW
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 :
d0ac1c44
SM
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
81ecdfbb
RW
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."
bec39cab 266 else
81ecdfbb
RW
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."
bec39cab 271 fi
81ecdfbb
RW
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
bec39cab 301
81ecdfbb
RW
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"
d0ac1c44 355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb
RW
356
357
358} # as_fn_mkdir_p
d0ac1c44
SM
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
81ecdfbb
RW
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
d0ac1c44
SM
403# as_fn_error STATUS ERROR [LINENO LOG_FD]
404# ----------------------------------------
81ecdfbb
RW
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
d0ac1c44 407# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
408as_fn_error ()
409{
d0ac1c44
SM
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
81ecdfbb 414 fi
d0ac1c44 415 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
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
bec39cab
AC
421 as_expr=expr
422else
423 as_expr=false
424fi
425
81ecdfbb 426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
427 as_basename=basename
428else
429 as_basename=false
430fi
431
81ecdfbb
RW
432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434else
435 as_dirname=false
436fi
bec39cab 437
81ecdfbb 438as_me=`$as_basename -- "$0" ||
bec39cab
AC
439$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
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'`
bec39cab 456
b4e70030
JB
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
4e8d927d 463
bec39cab 464
81ecdfbb
RW
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 |
bec39cab 474 sed '
81ecdfbb
RW
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
bec39cab 479 N
81ecdfbb
RW
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 482 t loop
81ecdfbb 483 s/-\n.*//
bec39cab 484 ' >$as_me.lineno &&
81ecdfbb
RW
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; }
bec39cab 487
d0ac1c44
SM
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
bec39cab
AC
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
81ecdfbb
RW
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
bec39cab
AC
496 # Exit status is that of the last command.
497 exit
498}
499
81ecdfbb
RW
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';;
bec39cab
AC
511esac
512
81ecdfbb
RW
513rm -f conf$$ conf$$.exe conf$$.file
514if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
bec39cab 516else
81ecdfbb
RW
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
bec39cab 519fi
81ecdfbb
RW
520if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 522 as_ln_s='ln -s'
81ecdfbb
RW
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.
d0ac1c44 526 # In both cases, we have to default to `cp -pR'.
81ecdfbb 527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 528 as_ln_s='cp -pR'
81ecdfbb
RW
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
d0ac1c44 532 as_ln_s='cp -pR'
b4e70030 533 fi
bec39cab 534else
d0ac1c44 535 as_ln_s='cp -pR'
bec39cab 536fi
81ecdfbb
RW
537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538rmdir conf$$.dir 2>/dev/null
bec39cab
AC
539
540if mkdir -p . 2>/dev/null; then
81ecdfbb 541 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
542else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545fi
546
d0ac1c44
SM
547as_test_x='test -x'
548as_executable_p=as_fn_executable_p
bec39cab
AC
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
d0ac1c44
SM
557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 6>&1
c906108c 559
bec39cab 560# Name of the host.
d0ac1c44 561# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
bec39cab
AC
562# so uname gets run too.
563ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
bec39cab
AC
565#
566# Initializations.
567#
c906108c 568ac_default_prefix=/usr/local
81ecdfbb 569ac_clean_files=
bec39cab 570ac_config_libobj_dir=.
81ecdfbb 571LIBOBJS=
bec39cab
AC
572cross_compiling=no
573subdirs=
574MFLAGS=
575MAKEFLAGS=
b4e70030 576
bec39cab
AC
577# Identity of this package.
578PACKAGE_NAME=
579PACKAGE_TARNAME=
580PACKAGE_VERSION=
581PACKAGE_STRING=
582PACKAGE_BUGREPORT=
81ecdfbb 583PACKAGE_URL=
bec39cab
AC
584
585ac_unique_file="main.c"
586# Factoring default headers for most tests.
587ac_includes_default="\
588#include <stdio.h>
81ecdfbb 589#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
590# include <sys/types.h>
591#endif
81ecdfbb 592#ifdef HAVE_SYS_STAT_H
bec39cab
AC
593# include <sys/stat.h>
594#endif
81ecdfbb 595#ifdef STDC_HEADERS
bec39cab
AC
596# include <stdlib.h>
597# include <stddef.h>
598#else
81ecdfbb 599# ifdef HAVE_STDLIB_H
bec39cab
AC
600# include <stdlib.h>
601# endif
602#endif
81ecdfbb
RW
603#ifdef HAVE_STRING_H
604# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
605# include <memory.h>
606# endif
607# include <string.h>
608#endif
81ecdfbb 609#ifdef HAVE_STRINGS_H
bec39cab
AC
610# include <strings.h>
611#endif
81ecdfbb 612#ifdef HAVE_INTTYPES_H
bec39cab 613# include <inttypes.h>
bec39cab 614#endif
81ecdfbb
RW
615#ifdef HAVE_STDINT_H
616# include <stdint.h>
617#endif
618#ifdef HAVE_UNISTD_H
bec39cab
AC
619# include <unistd.h>
620#endif"
621
81ecdfbb 622enable_option_checking=no
d0ac1c44 623ac_header_list=
c971b7fa 624ac_subst_vars='LTLIBOBJS
81ecdfbb 625LIBOBJS
b292c783
JK
626GCORE_TRANSFORM_NAME
627GDB_TRANSFORM_NAME
e3487908 628XSLTPROC
81ecdfbb 629GDB_NM_FILE
393fd4c3
YQ
630LTLIBBABELTRACE
631LIBBABELTRACE
632HAVE_LIBBABELTRACE
21ea5acd
SDJ
633HAVE_NATIVE_GCORE_HOST
634NAT_GENERATED_FILES
635XM_CLIBS
636MH_CFLAGS
637LOADLIBES
638NAT_CDEPS
639NATDEPFILES
640NAT_FILE
81ecdfbb
RW
641target_subdir
642CONFIG_UNINSTALL
643CONFIG_INSTALL
644CONFIG_CLEAN
645CONFIG_ALL
646CONFIG_SRCS
647CONFIG_DEPS
648CONFIG_OBS
649PROFILE_CFLAGS
650ENABLE_CFLAGS
651SIM_OBS
652SIM
653XMKMF
654GDBTK_SRC_DIR
655GDBTK_CFLAGS
656GDBTKLIBS
657X_LIBS
658X_LDFLAGS
659X_CFLAGS
660TK_XINCLUDES
661TK_DEPS
662TK_LIBRARY
663TK_INCLUDE
664TK_STUB_LIB_SPEC
665TK_STUB_LIB_FLAG
666TK_STUB_LIB_FILE
667TK_LIB_SPEC
668TK_LIB_FLAG
669TK_LIB_FILE
670TK_SRC_DIR
671TK_BIN_DIR
672TK_VERSION
673TCL_DEPS
674TCL_LIBRARY
675TCL_INCLUDE
676TCL_STUB_LIB_SPEC
677TCL_STUB_LIB_FLAG
678TCL_STUB_LIB_FILE
679TCL_LIB_SPEC
680TCL_LIB_FLAG
681TCL_LIB_FILE
682TCL_SRC_DIR
683TCL_BIN_DIR
684TCL_PATCH_LEVEL
685TCL_VERSION
686WIN32LDAPP
687GUI_CFLAGS_X
688LIBGUI
608e2dbb
TT
689LTLIBLZMA
690LIBLZMA
691HAVE_LIBLZMA
81ecdfbb
RW
692WIN32LIBS
693SER_HARDWIRE
694WERROR_CFLAGS
695WARN_CFLAGS
696SYSTEM_GDBINIT
81ecdfbb
RW
697TARGET_SYSTEM_ROOT
698CONFIG_LDFLAGS
f6528abd 699RDYNAMIC
81ecdfbb 700ALLOCA
58bfce93
MM
701LTLIBIPT
702LIBIPT
703HAVE_LIBIPT
62f29fda
TT
704SRCHIGH_CFLAGS
705SRCHIGH_LIBS
4df42755
DE
706HAVE_GUILE_FALSE
707HAVE_GUILE_TRUE
ed3ef339
DE
708GUILE_LIBS
709GUILE_CPPFLAGS
e76c5d17
DE
710GUILD_TARGET_FLAG
711GUILD
ed3ef339 712pkg_config_prog_path
4df42755
DE
713HAVE_PYTHON_FALSE
714HAVE_PYTHON_TRUE
ac534cba
JB
715PYTHON_LIBS
716PYTHON_CPPFLAGS
81ecdfbb 717PYTHON_CFLAGS
ec685c5e 718python_prog_path
2400729e
UW
719LTLIBMPFR
720LIBMPFR
721HAVE_LIBMPFR
81ecdfbb
RW
722LTLIBEXPAT
723LIBEXPAT
724HAVE_LIBEXPAT
b8e0a31c 725JIT_READER_DIR
f997c383 726TARGET_PTR
39037522 727READLINE_TEXI_INCFLAG
81ecdfbb
RW
728READLINE_CFLAGS
729READLINE_DEPS
730READLINE
016a3251
DD
731LTLIBICONV
732LIBICONV
711a72d3
L
733zlibinc
734zlibdir
81ecdfbb
RW
735MIG
736WINDRES
737DLLTOOL
c971b7fa 738AR
81ecdfbb
RW
739YFLAGS
740YACC
c971b7fa 741RANLIB
81ecdfbb 742LN_S
c971b7fa
PA
743INSTALL_DATA
744INSTALL_SCRIPT
745INSTALL_PROGRAM
746AWK
81ecdfbb
RW
747REPORT_BUGS_TEXI
748REPORT_BUGS_TO
749PKGVERSION
44cee4fd 750CODESIGN_CERT
b292c783 751HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
752TARGET_OBS
753subdirs
754GDB_DATADIR
755DEBUGDIR
5048e516
JK
756MAKEINFO_EXTRA_FLAGS
757MAKEINFOFLAGS
758MAKEINFO
81ecdfbb 759PACKAGE
81ecdfbb
RW
760CATOBJEXT
761GENCAT
762INSTOBJEXT
763DATADIRNAME
764CATALOGS
765POSUB
766GMSGFMT
767XGETTEXT
768INCINTL
769LIBINTL_DEP
770LIBINTL
771USE_NLS
81ecdfbb
RW
772CCDEPMODE
773DEPDIR
774am__leading_dot
0bcda685
PA
775CXX_DIALECT
776HAVE_CXX11
4869db5e
RM
777INSTALL_STRIP_PROGRAM
778STRIP
779install_sh
81ecdfbb
RW
780target_os
781target_vendor
782target_cpu
783target
784host_os
785host_vendor
786host_cpu
787host
788build_os
789build_vendor
790build_cpu
791build
c971b7fa
PA
792EGREP
793GREP
794CPP
3bc3d82a
PA
795ac_ct_CXX
796CXXFLAGS
797CXX
81ecdfbb
RW
798OBJEXT
799EXEEXT
800ac_ct_CC
801CPPFLAGS
802LDFLAGS
803CFLAGS
804CC
805MAINT
806MAINTAINER_MODE_FALSE
807MAINTAINER_MODE_TRUE
808target_alias
809host_alias
810build_alias
811LIBS
812ECHO_T
813ECHO_N
814ECHO_C
815DEFS
816mandir
817localedir
818libdir
819psdir
820pdfdir
821dvidir
822htmldir
823infodir
824docdir
825oldincludedir
826includedir
827localstatedir
828sharedstatedir
829sysconfdir
830datadir
831datarootdir
832libexecdir
833sbindir
834bindir
835program_transform_name
836prefix
837exec_prefix
838PACKAGE_URL
839PACKAGE_BUGREPORT
840PACKAGE_STRING
841PACKAGE_VERSION
842PACKAGE_TARNAME
843PACKAGE_NAME
844PATH_SEPARATOR
845SHELL'
2b351b19 846ac_subst_files='nat_makefile_frag'
81ecdfbb
RW
847ac_user_opts='
848enable_option_checking
849enable_maintainer_mode
da2f07f1
JK
850enable_plugins
851enable_largefile
81ecdfbb
RW
852with_separate_debug_dir
853with_gdb_datadir
854with_relocated_sources
7349ff92 855with_auto_load_dir
bccbefd2 856with_auto_load_safe_path
81ecdfbb
RW
857enable_targets
858enable_64_bit_bfd
81ecdfbb
RW
859enable_gdbmi
860enable_tui
861enable_gdbtk
05e7c244 862with_libunwind_ia64
81ecdfbb
RW
863with_curses
864enable_profiling
44cee4fd 865enable_codesign
81ecdfbb
RW
866with_pkgversion
867with_bugurl
711a72d3 868with_system_zlib
016a3251
DD
869with_gnu_ld
870enable_rpath
81ecdfbb 871with_libiconv_prefix
478aac75 872with_iconv_bin
81ecdfbb 873with_system_readline
b8e0a31c 874with_jit_reader_dir
81ecdfbb 875with_expat
81ecdfbb 876with_libexpat_prefix
2400729e
UW
877with_mpfr
878with_libmpfr_prefix
81ecdfbb 879with_python
ed3ef339 880with_guile
189b8c2e 881enable_source_highlight
58bfce93
MM
882with_intel_pt
883with_libipt_prefix
81ecdfbb
RW
884with_included_regex
885with_sysroot
886with_system_gdbinit
887enable_werror
888enable_build_warnings
889enable_gdb_build_warnings
f35d5ade 890enable_ubsan
608e2dbb
TT
891with_lzma
892with_liblzma_prefix
81ecdfbb
RW
893with_tcl
894with_tk
895with_x
896enable_sim
496c0e1b 897enable_gdbserver
393fd4c3
YQ
898with_babeltrace
899with_libbabeltrace_prefix
8ecfd7bd 900enable_unit_tests
81ecdfbb
RW
901'
902 ac_precious_vars='build_alias
903host_alias
904target_alias
905CC
906CFLAGS
907LDFLAGS
908LIBS
909CPPFLAGS
3bc3d82a
PA
910CXX
911CXXFLAGS
912CCC
81ecdfbb 913CPP
f06e05e0
JK
914MAKEINFO
915MAKEINFOFLAGS
81ecdfbb
RW
916YACC
917YFLAGS
918XMKMF'
5ae98d25 919ac_subdirs_all='testsuite
81ecdfbb 920gdbtk
81ecdfbb 921gdbserver'
c906108c
SS
922
923# Initialize some variables set by options.
bec39cab
AC
924ac_init_help=
925ac_init_version=false
81ecdfbb
RW
926ac_unrecognized_opts=
927ac_unrecognized_sep=
c906108c
SS
928# The variables have the same names as the options, with
929# dashes changed to underlines.
bec39cab 930cache_file=/dev/null
c906108c 931exec_prefix=NONE
c906108c 932no_create=
c906108c
SS
933no_recursion=
934prefix=NONE
935program_prefix=NONE
936program_suffix=NONE
937program_transform_name=s,x,x,
938silent=
939site=
940srcdir=
c906108c
SS
941verbose=
942x_includes=NONE
943x_libraries=NONE
bec39cab
AC
944
945# Installation directory options.
946# These are left unexpanded so users can "make install exec_prefix=/foo"
947# and all the variables that are supposed to be based on exec_prefix
948# by default will actually change.
949# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 950# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
951bindir='${exec_prefix}/bin'
952sbindir='${exec_prefix}/sbin'
953libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
954datarootdir='${prefix}/share'
955datadir='${datarootdir}'
c906108c
SS
956sysconfdir='${prefix}/etc'
957sharedstatedir='${prefix}/com'
958localstatedir='${prefix}/var'
c906108c
SS
959includedir='${prefix}/include'
960oldincludedir='/usr/include'
81ecdfbb
RW
961docdir='${datarootdir}/doc/${PACKAGE}'
962infodir='${datarootdir}/info'
963htmldir='${docdir}'
964dvidir='${docdir}'
965pdfdir='${docdir}'
966psdir='${docdir}'
967libdir='${exec_prefix}/lib'
968localedir='${datarootdir}/locale'
969mandir='${datarootdir}/man'
c906108c 970
c906108c 971ac_prev=
81ecdfbb 972ac_dashdash=
c906108c
SS
973for ac_option
974do
c906108c
SS
975 # If the previous option needs an argument, assign it.
976 if test -n "$ac_prev"; then
81ecdfbb 977 eval $ac_prev=\$ac_option
c906108c
SS
978 ac_prev=
979 continue
980 fi
981
81ecdfbb 982 case $ac_option in
d0ac1c44
SM
983 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
984 *=) ac_optarg= ;;
985 *) ac_optarg=yes ;;
81ecdfbb 986 esac
c906108c
SS
987
988 # Accept the important Cygnus configure options, so we can diagnose typos.
989
81ecdfbb
RW
990 case $ac_dashdash$ac_option in
991 --)
992 ac_dashdash=yes ;;
c906108c
SS
993
994 -bindir | --bindir | --bindi | --bind | --bin | --bi)
995 ac_prev=bindir ;;
996 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 997 bindir=$ac_optarg ;;
c906108c
SS
998
999 -build | --build | --buil | --bui | --bu)
bec39cab 1000 ac_prev=build_alias ;;
c906108c 1001 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1002 build_alias=$ac_optarg ;;
c906108c
SS
1003
1004 -cache-file | --cache-file | --cache-fil | --cache-fi \
1005 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1006 ac_prev=cache_file ;;
1007 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1008 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1009 cache_file=$ac_optarg ;;
1010
1011 --config-cache | -C)
1012 cache_file=config.cache ;;
c906108c 1013
81ecdfbb 1014 -datadir | --datadir | --datadi | --datad)
c906108c 1015 ac_prev=datadir ;;
81ecdfbb 1016 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1017 datadir=$ac_optarg ;;
c906108c 1018
81ecdfbb
RW
1019 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1020 | --dataroo | --dataro | --datar)
1021 ac_prev=datarootdir ;;
1022 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1023 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1024 datarootdir=$ac_optarg ;;
1025
c906108c 1026 -disable-* | --disable-*)
81ecdfbb 1027 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1028 # Reject names that are not valid shell variable names.
81ecdfbb 1029 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1030 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1031 ac_useropt_orig=$ac_useropt
1032 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1033 case $ac_user_opts in
1034 *"
1035"enable_$ac_useropt"
1036"*) ;;
1037 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1038 ac_unrecognized_sep=', ';;
1039 esac
1040 eval enable_$ac_useropt=no ;;
1041
1042 -docdir | --docdir | --docdi | --doc | --do)
1043 ac_prev=docdir ;;
1044 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1045 docdir=$ac_optarg ;;
1046
1047 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1048 ac_prev=dvidir ;;
1049 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1050 dvidir=$ac_optarg ;;
c906108c
SS
1051
1052 -enable-* | --enable-*)
81ecdfbb 1053 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1054 # Reject names that are not valid shell variable names.
81ecdfbb 1055 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1056 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1057 ac_useropt_orig=$ac_useropt
1058 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1059 case $ac_user_opts in
1060 *"
1061"enable_$ac_useropt"
1062"*) ;;
1063 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1064 ac_unrecognized_sep=', ';;
b4e70030 1065 esac
81ecdfbb 1066 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1067
1068 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1069 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1070 | --exec | --exe | --ex)
1071 ac_prev=exec_prefix ;;
1072 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1073 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1074 | --exec=* | --exe=* | --ex=*)
bec39cab 1075 exec_prefix=$ac_optarg ;;
c906108c
SS
1076
1077 -gas | --gas | --ga | --g)
1078 # Obsolete; use --with-gas.
1079 with_gas=yes ;;
1080
bec39cab
AC
1081 -help | --help | --hel | --he | -h)
1082 ac_init_help=long ;;
1083 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1084 ac_init_help=recursive ;;
1085 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1086 ac_init_help=short ;;
c906108c
SS
1087
1088 -host | --host | --hos | --ho)
bec39cab 1089 ac_prev=host_alias ;;
c906108c 1090 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1091 host_alias=$ac_optarg ;;
c906108c 1092
81ecdfbb
RW
1093 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1094 ac_prev=htmldir ;;
1095 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1096 | --ht=*)
1097 htmldir=$ac_optarg ;;
1098
c906108c
SS
1099 -includedir | --includedir | --includedi | --included | --include \
1100 | --includ | --inclu | --incl | --inc)
1101 ac_prev=includedir ;;
1102 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1103 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1104 includedir=$ac_optarg ;;
c906108c
SS
1105
1106 -infodir | --infodir | --infodi | --infod | --info | --inf)
1107 ac_prev=infodir ;;
1108 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1109 infodir=$ac_optarg ;;
c906108c
SS
1110
1111 -libdir | --libdir | --libdi | --libd)
1112 ac_prev=libdir ;;
1113 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1114 libdir=$ac_optarg ;;
c906108c
SS
1115
1116 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1117 | --libexe | --libex | --libe)
1118 ac_prev=libexecdir ;;
1119 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1120 | --libexe=* | --libex=* | --libe=*)
bec39cab 1121 libexecdir=$ac_optarg ;;
c906108c 1122
81ecdfbb
RW
1123 -localedir | --localedir | --localedi | --localed | --locale)
1124 ac_prev=localedir ;;
1125 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1126 localedir=$ac_optarg ;;
1127
c906108c 1128 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1129 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1130 ac_prev=localstatedir ;;
1131 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1132 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1133 localstatedir=$ac_optarg ;;
c906108c
SS
1134
1135 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1136 ac_prev=mandir ;;
1137 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1138 mandir=$ac_optarg ;;
c906108c
SS
1139
1140 -nfp | --nfp | --nf)
1141 # Obsolete; use --without-fp.
1142 with_fp=no ;;
1143
1144 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1145 | --no-cr | --no-c | -n)
c906108c
SS
1146 no_create=yes ;;
1147
1148 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1149 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1150 no_recursion=yes ;;
1151
1152 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1153 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1154 | --oldin | --oldi | --old | --ol | --o)
1155 ac_prev=oldincludedir ;;
1156 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1157 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1158 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1159 oldincludedir=$ac_optarg ;;
c906108c
SS
1160
1161 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1162 ac_prev=prefix ;;
1163 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1164 prefix=$ac_optarg ;;
c906108c
SS
1165
1166 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1167 | --program-pre | --program-pr | --program-p)
1168 ac_prev=program_prefix ;;
1169 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1170 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1171 program_prefix=$ac_optarg ;;
c906108c
SS
1172
1173 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1174 | --program-suf | --program-su | --program-s)
1175 ac_prev=program_suffix ;;
1176 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1177 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1178 program_suffix=$ac_optarg ;;
c906108c
SS
1179
1180 -program-transform-name | --program-transform-name \
1181 | --program-transform-nam | --program-transform-na \
1182 | --program-transform-n | --program-transform- \
1183 | --program-transform | --program-transfor \
1184 | --program-transfo | --program-transf \
1185 | --program-trans | --program-tran \
1186 | --progr-tra | --program-tr | --program-t)
1187 ac_prev=program_transform_name ;;
1188 -program-transform-name=* | --program-transform-name=* \
1189 | --program-transform-nam=* | --program-transform-na=* \
1190 | --program-transform-n=* | --program-transform-=* \
1191 | --program-transform=* | --program-transfor=* \
1192 | --program-transfo=* | --program-transf=* \
1193 | --program-trans=* | --program-tran=* \
1194 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1195 program_transform_name=$ac_optarg ;;
c906108c 1196
81ecdfbb
RW
1197 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1198 ac_prev=pdfdir ;;
1199 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1200 pdfdir=$ac_optarg ;;
1201
1202 -psdir | --psdir | --psdi | --psd | --ps)
1203 ac_prev=psdir ;;
1204 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1205 psdir=$ac_optarg ;;
1206
c906108c
SS
1207 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1208 | -silent | --silent | --silen | --sile | --sil)
1209 silent=yes ;;
1210
1211 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1212 ac_prev=sbindir ;;
1213 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1214 | --sbi=* | --sb=*)
bec39cab 1215 sbindir=$ac_optarg ;;
c906108c
SS
1216
1217 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1218 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1219 | --sharedst | --shareds | --shared | --share | --shar \
1220 | --sha | --sh)
1221 ac_prev=sharedstatedir ;;
1222 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1223 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1224 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1225 | --sha=* | --sh=*)
bec39cab 1226 sharedstatedir=$ac_optarg ;;
c906108c
SS
1227
1228 -site | --site | --sit)
1229 ac_prev=site ;;
1230 -site=* | --site=* | --sit=*)
bec39cab 1231 site=$ac_optarg ;;
3ace7edb 1232
c906108c
SS
1233 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1234 ac_prev=srcdir ;;
1235 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1236 srcdir=$ac_optarg ;;
c906108c
SS
1237
1238 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1239 | --syscon | --sysco | --sysc | --sys | --sy)
1240 ac_prev=sysconfdir ;;
1241 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1242 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1243 sysconfdir=$ac_optarg ;;
c906108c
SS
1244
1245 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1246 ac_prev=target_alias ;;
c906108c 1247 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1248 target_alias=$ac_optarg ;;
c906108c
SS
1249
1250 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1251 verbose=yes ;;
1252
bec39cab
AC
1253 -version | --version | --versio | --versi | --vers | -V)
1254 ac_init_version=: ;;
c906108c
SS
1255
1256 -with-* | --with-*)
81ecdfbb 1257 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1258 # Reject names that are not valid shell variable names.
81ecdfbb 1259 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1260 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1261 ac_useropt_orig=$ac_useropt
1262 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1263 case $ac_user_opts in
1264 *"
1265"with_$ac_useropt"
1266"*) ;;
1267 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1268 ac_unrecognized_sep=', ';;
b4e70030 1269 esac
81ecdfbb 1270 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1271
1272 -without-* | --without-*)
81ecdfbb 1273 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1274 # Reject names that are not valid shell variable names.
81ecdfbb 1275 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1276 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1277 ac_useropt_orig=$ac_useropt
1278 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1279 case $ac_user_opts in
1280 *"
1281"with_$ac_useropt"
1282"*) ;;
1283 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1284 ac_unrecognized_sep=', ';;
1285 esac
1286 eval with_$ac_useropt=no ;;
c906108c
SS
1287
1288 --x)
1289 # Obsolete; use --with-x.
1290 with_x=yes ;;
1291
1292 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1293 | --x-incl | --x-inc | --x-in | --x-i)
1294 ac_prev=x_includes ;;
1295 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1296 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1297 x_includes=$ac_optarg ;;
c906108c
SS
1298
1299 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1300 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1301 ac_prev=x_libraries ;;
1302 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1303 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1304 x_libraries=$ac_optarg ;;
c906108c 1305
d0ac1c44
SM
1306 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1307Try \`$0 --help' for more information"
c906108c
SS
1308 ;;
1309
bec39cab
AC
1310 *=*)
1311 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1312 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1313 case $ac_envvar in #(
1314 '' | [0-9]* | *[!_$as_cr_alnum]* )
d0ac1c44 1315 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
81ecdfbb
RW
1316 esac
1317 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1318 export $ac_envvar ;;
1319
c906108c 1320 *)
bec39cab 1321 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1322 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1323 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1324 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
d0ac1c44 1325 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
c906108c
SS
1326 ;;
1327
1328 esac
1329done
1330
1331if test -n "$ac_prev"; then
bec39cab 1332 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
d0ac1c44 1333 as_fn_error $? "missing argument to $ac_option"
c906108c 1334fi
c906108c 1335
81ecdfbb
RW
1336if test -n "$ac_unrecognized_opts"; then
1337 case $enable_option_checking in
1338 no) ;;
d0ac1c44 1339 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
81ecdfbb 1340 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1341 esac
81ecdfbb 1342fi
b4e70030 1343
81ecdfbb
RW
1344# Check all directory arguments for consistency.
1345for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1346 datadir sysconfdir sharedstatedir localstatedir includedir \
1347 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1348 libdir localedir mandir
b4e70030 1349do
81ecdfbb
RW
1350 eval ac_val=\$$ac_var
1351 # Remove trailing slashes.
1352 case $ac_val in
1353 */ )
1354 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1355 eval $ac_var=\$ac_val;;
1356 esac
1357 # Be sure to have absolute directory names.
b4e70030 1358 case $ac_val in
81ecdfbb
RW
1359 [\\/$]* | ?:[\\/]* ) continue;;
1360 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1361 esac
d0ac1c44 1362 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1363done
1364
bec39cab
AC
1365# There might be people who depend on the old broken behavior: `$host'
1366# used to hold the argument of --host etc.
1367# FIXME: To remove some day.
1368build=$build_alias
1369host=$host_alias
1370target=$target_alias
1371
1372# FIXME: To remove some day.
1373if test "x$host_alias" != x; then
1374 if test "x$build_alias" = x; then
1375 cross_compiling=maybe
bec39cab
AC
1376 elif test "x$build_alias" != "x$host_alias"; then
1377 cross_compiling=yes
1378 fi
1379fi
c906108c 1380
bec39cab
AC
1381ac_tool_prefix=
1382test -n "$host_alias" && ac_tool_prefix=$host_alias-
1383
1384test "$silent" = yes && exec 6>/dev/null
c906108c 1385
c906108c 1386
81ecdfbb
RW
1387ac_pwd=`pwd` && test -n "$ac_pwd" &&
1388ac_ls_di=`ls -di .` &&
1389ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
d0ac1c44 1390 as_fn_error $? "working directory cannot be determined"
81ecdfbb 1391test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
d0ac1c44 1392 as_fn_error $? "pwd does not report name of working directory"
81ecdfbb
RW
1393
1394
c906108c
SS
1395# Find the source files, if location was not specified.
1396if test -z "$srcdir"; then
1397 ac_srcdir_defaulted=yes
81ecdfbb
RW
1398 # Try the directory containing this script, then the parent directory.
1399 ac_confdir=`$as_dirname -- "$as_myself" ||
1400$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1401 X"$as_myself" : 'X\(//\)[^/]' \| \
1402 X"$as_myself" : 'X\(//\)$' \| \
1403 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1404$as_echo X"$as_myself" |
1405 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1406 s//\1/
1407 q
1408 }
1409 /^X\(\/\/\)[^/].*/{
1410 s//\1/
1411 q
1412 }
1413 /^X\(\/\/\)$/{
1414 s//\1/
1415 q
1416 }
1417 /^X\(\/\).*/{
1418 s//\1/
1419 q
1420 }
1421 s/.*/./; q'`
c906108c 1422 srcdir=$ac_confdir
81ecdfbb 1423 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1424 srcdir=..
1425 fi
1426else
1427 ac_srcdir_defaulted=no
1428fi
81ecdfbb
RW
1429if test ! -r "$srcdir/$ac_unique_file"; then
1430 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
d0ac1c44 1431 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
81ecdfbb
RW
1432fi
1433ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1434ac_abs_confdir=`(
d0ac1c44 1435 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
81ecdfbb
RW
1436 pwd)`
1437# When building in place, set srcdir=.
1438if test "$ac_abs_confdir" = "$ac_pwd"; then
1439 srcdir=.
1440fi
1441# Remove unnecessary trailing slashes from srcdir.
1442# Double slashes in file names in object file debugging info
1443# mess up M-x gdb in Emacs.
1444case $srcdir in
1445*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1446esac
1447for ac_var in $ac_precious_vars; do
1448 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1449 eval ac_env_${ac_var}_value=\$${ac_var}
1450 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1451 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1452done
c906108c 1453
bec39cab
AC
1454#
1455# Report the --help message.
1456#
1457if test "$ac_init_help" = "long"; then
1458 # Omit some internal or obsolete options to make the list less imposing.
1459 # This message is too long to be a string in the A/UX 3.1 sh.
1460 cat <<_ACEOF
1461\`configure' configures this package to adapt to many kinds of systems.
1462
1463Usage: $0 [OPTION]... [VAR=VALUE]...
1464
1465To assign environment variables (e.g., CC, CFLAGS...), specify them as
1466VAR=VALUE. See below for descriptions of some of the useful variables.
1467
1468Defaults for the options are specified in brackets.
1469
1470Configuration:
1471 -h, --help display this help and exit
1472 --help=short display options specific to this package
1473 --help=recursive display the short help of all the included packages
1474 -V, --version display version information and exit
d0ac1c44 1475 -q, --quiet, --silent do not print \`checking ...' messages
bec39cab
AC
1476 --cache-file=FILE cache test results in FILE [disabled]
1477 -C, --config-cache alias for \`--cache-file=config.cache'
1478 -n, --no-create do not create output files
1479 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1480
bec39cab
AC
1481Installation directories:
1482 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1483 [$ac_default_prefix]
bec39cab 1484 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1485 [PREFIX]
bec39cab
AC
1486
1487By default, \`make install' will install all the files in
1488\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1489an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1490for instance \`--prefix=\$HOME'.
1491
1492For better control, use the options below.
1493
1494Fine tuning of the installation directories:
81ecdfbb
RW
1495 --bindir=DIR user executables [EPREFIX/bin]
1496 --sbindir=DIR system admin executables [EPREFIX/sbin]
1497 --libexecdir=DIR program executables [EPREFIX/libexec]
1498 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1499 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1500 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1501 --libdir=DIR object code libraries [EPREFIX/lib]
1502 --includedir=DIR C header files [PREFIX/include]
1503 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1504 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1505 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1506 --infodir=DIR info documentation [DATAROOTDIR/info]
1507 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1508 --mandir=DIR man documentation [DATAROOTDIR/man]
1509 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1510 --htmldir=DIR html documentation [DOCDIR]
1511 --dvidir=DIR dvi documentation [DOCDIR]
1512 --pdfdir=DIR pdf documentation [DOCDIR]
1513 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1514_ACEOF
1515
1516 cat <<\_ACEOF
1517
9009e1ae
MR
1518Program names:
1519 --program-prefix=PREFIX prepend PREFIX to installed program names
1520 --program-suffix=SUFFIX append SUFFIX to installed program names
1521 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1522
bec39cab
AC
1523X features:
1524 --x-includes=DIR X include files are in DIR
1525 --x-libraries=DIR X library files are in DIR
1526
1527System types:
1528 --build=BUILD configure for building on BUILD [guessed]
1529 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1530 --target=TARGET configure for building compilers for TARGET [HOST]
1531_ACEOF
1532fi
1533
1534if test -n "$ac_init_help"; then
1535
1536 cat <<\_ACEOF
1537
1538Optional Features:
81ecdfbb 1539 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1540 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1541 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
d0ac1c44
SM
1542 --enable-maintainer-mode
1543 enable make rules and dependencies not useful (and
1544 sometimes confusing) to the casual installer
2974be62 1545 --enable-plugins Enable support for plugins
da2f07f1 1546 --disable-largefile omit support for large files
a1220294
TT
1547 --enable-targets=TARGETS
1548 alternative target configurations
c0993dbe 1549 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1550 --disable-gdbmi disable machine-interface (MI)
1551 --enable-tui enable full-screen terminal user interface (TUI)
1552 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1553 --enable-profiling enable profiling of GDB
44cee4fd 1554 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
3841debe 1555 --disable-rpath do not hardcode runtime library paths
189b8c2e
ST
1556 --enable-source-highlight
1557 enable source-highlight for source listings
a1220294 1558 --enable-werror treat compile warnings as errors
32c1c914 1559 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1560 --enable-gdb-build-warnings
32c1c914 1561 enable GDB specific build-time compiler warnings if
a1220294 1562 gcc is used
f35d5ade 1563 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
32c1c914 1564 --enable-sim link gdb with simulator
496c0e1b
JB
1565 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1566 is auto)
8ecfd7bd
SDJ
1567 --enable-unit-tests Enable the inclusion of unit tests when compiling
1568 GDB
bec39cab
AC
1569
1570Optional Packages:
1571 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1572 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1573 --with-separate-debug-dir=PATH
32c1c914 1574 look for global separate debug info in this path
62e4f60c 1575 [LIBDIR/debug]
b14b1491
TT
1576 --with-gdb-datadir=PATH look for global separate data files in this path
1577 [DATADIR/gdb]
29b0e8a2 1578 --with-relocated-sources=PATH
32c1c914 1579 automatically relocate this path for source files
7349ff92 1580 --with-auto-load-dir=PATH
aff139ff 1581 directories from which to load auto-loaded scripts
1564a261 1582 [$debugdir:$datadir/auto-load]
bccbefd2 1583 --with-auto-load-safe-path=PATH
aff139ff 1584 directories safe to hold auto-loaded files
7349ff92 1585 [--with-auto-load-dir]
bccbefd2
JK
1586 --without-auto-load-safe-path
1587 do not restrict auto-loaded files locations
05e7c244 1588 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1589 --with-curses use the curses library instead of the termcap
1590 library
c16158bc
JM
1591 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1592 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1593 --with-system-zlib use installed libz
016a3251
DD
1594 --with-gnu-ld assume the C compiler uses GNU ld default=no
1595 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1596 --without-libiconv-prefix don't search for libiconv in includedir and libdir
478aac75 1597 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1598 --with-system-readline use installed readline library
b8e0a31c
SD
1599 --with-jit-reader-dir=PATH
1600 directory to load the JIT readers from
5c39566f 1601 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1602 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1603 --without-libexpat-prefix don't search for libexpat in includedir and libdir
2400729e
UW
1604 --with-mpfr include MPFR support (auto/yes/no)
1605 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1606 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
0c4a4063
DE
1607 --with-python[=PYTHON] include python support
1608 (auto/yes/no/<python-program>)
ed3ef339
DE
1609 --with-guile[=GUILE] include guile support
1610 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1611 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1612 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1613 --without-libipt-prefix don't search for libipt in includedir and libdir
a1220294
TT
1614 --without-included-regex
1615 don't use included regex; this is the default on
1616 systems with version 2 of the GNU C library (use
1617 with caution on other system)
81ecdfbb 1618 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1619 --with-system-gdbinit=PATH
32c1c914 1620 automatically load a system-wide gdbinit file
608e2dbb
TT
1621 --with-lzma support lzma compression (auto/yes/no)
1622 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1623 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1624 --with-tcl directory containing tcl configuration (tclConfig.sh)
1625 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1626 --with-x use the X Window System
393fd4c3
YQ
1627 --with-babeltrace include babeltrace support (auto/yes/no)
1628 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1629 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1630
1631Some influential environment variables:
1632 CC C compiler command
1633 CFLAGS C compiler flags
1634 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1635 nonstandard directory <lib dir>
81ecdfbb 1636 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 1637 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
81ecdfbb 1638 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1639 CXX C++ compiler command
1640 CXXFLAGS C++ compiler flags
bec39cab 1641 CPP C preprocessor
f06e05e0
JK
1642 MAKEINFO Parent configure detects if it is of sufficient version.
1643 MAKEINFOFLAGS
1644 Parameters for MAKEINFO.
d0ac1c44
SM
1645 YACC The `Yet Another Compiler Compiler' implementation to use.
1646 Defaults to the first program found out of: `bison -y', `byacc',
1647 `yacc'.
81ecdfbb
RW
1648 YFLAGS The list of arguments that will be passed by default to $YACC.
1649 This script will default YFLAGS to the empty string to avoid a
1650 default value of `-d' given by some make applications.
1651 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1652
1653Use these variables to override the choices made by `configure' or to help
1654it to find libraries and programs with nonstandard names/locations.
1655
81ecdfbb 1656Report bugs to the package provider.
bec39cab 1657_ACEOF
81ecdfbb 1658ac_status=$?
bec39cab
AC
1659fi
1660
1661if test "$ac_init_help" = "recursive"; then
1662 # If there are subdirs, report their specific --help.
bec39cab 1663 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1664 test -d "$ac_dir" ||
1665 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1666 continue
bec39cab
AC
1667 ac_builddir=.
1668
81ecdfbb
RW
1669case "$ac_dir" in
1670.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1671*)
1672 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1673 # A ".." for each directory in $ac_dir_suffix.
1674 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1675 case $ac_top_builddir_sub in
1676 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1677 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1678 esac ;;
1679esac
1680ac_abs_top_builddir=$ac_pwd
1681ac_abs_builddir=$ac_pwd$ac_dir_suffix
1682# for backward compatibility:
1683ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1684
1685case $srcdir in
81ecdfbb 1686 .) # We are building in place.
bec39cab 1687 ac_srcdir=.
81ecdfbb
RW
1688 ac_top_srcdir=$ac_top_builddir_sub
1689 ac_abs_top_srcdir=$ac_pwd ;;
1690 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1691 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1692 ac_top_srcdir=$srcdir
1693 ac_abs_top_srcdir=$srcdir ;;
1694 *) # Relative name.
1695 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1696 ac_top_srcdir=$ac_top_build_prefix$srcdir
1697 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1698esac
81ecdfbb 1699ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1700
81ecdfbb
RW
1701 cd "$ac_dir" || { ac_status=$?; continue; }
1702 # Check for guested configure.
1703 if test -f "$ac_srcdir/configure.gnu"; then
1704 echo &&
1705 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1706 elif test -f "$ac_srcdir/configure"; then
1707 echo &&
1708 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1709 else
81ecdfbb
RW
1710 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1711 fi || ac_status=$?
1712 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1713 done
1714fi
1715
81ecdfbb 1716test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1717if $ac_init_version; then
1718 cat <<\_ACEOF
81ecdfbb 1719configure
d0ac1c44 1720generated by GNU Autoconf 2.69
bec39cab 1721
d0ac1c44 1722Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
1723This configure script is free software; the Free Software Foundation
1724gives unlimited permission to copy, distribute and modify it.
1725_ACEOF
81ecdfbb 1726 exit
bec39cab 1727fi
bec39cab 1728
81ecdfbb
RW
1729## ------------------------ ##
1730## Autoconf initialization. ##
1731## ------------------------ ##
bec39cab 1732
81ecdfbb
RW
1733# ac_fn_c_try_compile LINENO
1734# --------------------------
1735# Try to compile conftest.$ac_ext, and return whether this succeeded.
1736ac_fn_c_try_compile ()
1737{
1738 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1739 rm -f conftest.$ac_objext
1740 if { { ac_try="$ac_compile"
1741case "(($ac_try" in
1742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1743 *) ac_try_echo=$ac_try;;
1744esac
1745eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1746$as_echo "$ac_try_echo"; } >&5
1747 (eval "$ac_compile") 2>conftest.err
1748 ac_status=$?
1749 if test -s conftest.err; then
1750 grep -v '^ *+' conftest.err >conftest.er1
1751 cat conftest.er1 >&5
1752 mv -f conftest.er1 conftest.err
1753 fi
1754 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1755 test $ac_status = 0; } && {
1756 test -z "$ac_c_werror_flag" ||
1757 test ! -s conftest.err
1758 } && test -s conftest.$ac_objext; then :
1759 ac_retval=0
1760else
1761 $as_echo "$as_me: failed program was:" >&5
1762sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1763
81ecdfbb
RW
1764 ac_retval=1
1765fi
d0ac1c44
SM
1766 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1767 as_fn_set_status $ac_retval
81ecdfbb
RW
1768
1769} # ac_fn_c_try_compile
1770
3bc3d82a
PA
1771# ac_fn_cxx_try_compile LINENO
1772# ----------------------------
1773# Try to compile conftest.$ac_ext, and return whether this succeeded.
1774ac_fn_cxx_try_compile ()
1775{
1776 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1777 rm -f conftest.$ac_objext
1778 if { { ac_try="$ac_compile"
1779case "(($ac_try" in
1780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1781 *) ac_try_echo=$ac_try;;
1782esac
1783eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1784$as_echo "$ac_try_echo"; } >&5
1785 (eval "$ac_compile") 2>conftest.err
1786 ac_status=$?
1787 if test -s conftest.err; then
1788 grep -v '^ *+' conftest.err >conftest.er1
1789 cat conftest.er1 >&5
1790 mv -f conftest.er1 conftest.err
1791 fi
1792 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1793 test $ac_status = 0; } && {
1794 test -z "$ac_cxx_werror_flag" ||
1795 test ! -s conftest.err
1796 } && test -s conftest.$ac_objext; then :
1797 ac_retval=0
1798else
1799 $as_echo "$as_me: failed program was:" >&5
1800sed 's/^/| /' conftest.$ac_ext >&5
1801
1802 ac_retval=1
1803fi
d0ac1c44
SM
1804 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1805 as_fn_set_status $ac_retval
3bc3d82a
PA
1806
1807} # ac_fn_cxx_try_compile
1808
81ecdfbb
RW
1809# ac_fn_c_try_cpp LINENO
1810# ----------------------
1811# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1812ac_fn_c_try_cpp ()
bec39cab 1813{
81ecdfbb
RW
1814 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1815 if { { ac_try="$ac_cpp conftest.$ac_ext"
1816case "(($ac_try" in
1817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1818 *) ac_try_echo=$ac_try;;
1819esac
1820eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1821$as_echo "$ac_try_echo"; } >&5
1822 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1823 ac_status=$?
1824 if test -s conftest.err; then
1825 grep -v '^ *+' conftest.err >conftest.er1
1826 cat conftest.er1 >&5
1827 mv -f conftest.er1 conftest.err
1828 fi
1829 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 1830 test $ac_status = 0; } > conftest.i && {
81ecdfbb
RW
1831 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1832 test ! -s conftest.err
1833 }; then :
1834 ac_retval=0
1835else
1836 $as_echo "$as_me: failed program was:" >&5
1837sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1838
81ecdfbb
RW
1839 ac_retval=1
1840fi
d0ac1c44
SM
1841 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1842 as_fn_set_status $ac_retval
bec39cab 1843
81ecdfbb 1844} # ac_fn_c_try_cpp
bec39cab 1845
81ecdfbb
RW
1846# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1847# -------------------------------------------------------
1848# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1849# the include files in INCLUDES and setting the cache variable VAR
1850# accordingly.
1851ac_fn_c_check_header_mongrel ()
1852{
1853 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 1854 if eval \${$3+:} false; then :
81ecdfbb
RW
1855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1856$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1857if eval \${$3+:} false; then :
81ecdfbb
RW
1858 $as_echo_n "(cached) " >&6
1859fi
1860eval ac_res=\$$3
1861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1862$as_echo "$ac_res" >&6; }
1863else
1864 # Is the header compilable?
1865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1866$as_echo_n "checking $2 usability... " >&6; }
1867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1868/* end confdefs.h. */
1869$4
1870#include <$2>
1871_ACEOF
1872if ac_fn_c_try_compile "$LINENO"; then :
1873 ac_header_compiler=yes
1874else
1875 ac_header_compiler=no
1876fi
1877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1879$as_echo "$ac_header_compiler" >&6; }
bec39cab 1880
81ecdfbb
RW
1881# Is the header present?
1882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1883$as_echo_n "checking $2 presence... " >&6; }
1884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1885/* end confdefs.h. */
1886#include <$2>
1887_ACEOF
1888if ac_fn_c_try_cpp "$LINENO"; then :
1889 ac_header_preproc=yes
1890else
1891 ac_header_preproc=no
1892fi
d0ac1c44 1893rm -f conftest.err conftest.i conftest.$ac_ext
81ecdfbb
RW
1894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1895$as_echo "$ac_header_preproc" >&6; }
bec39cab 1896
81ecdfbb
RW
1897# So? What about this header?
1898case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1899 yes:no: )
1900 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1901$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1902 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1903$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1904 ;;
1905 no:yes:* )
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1907$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1908 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1909$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1910 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1911$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1912 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1913$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1915$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1916 ;;
1917esac
1918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1919$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1920if eval \${$3+:} false; then :
81ecdfbb
RW
1921 $as_echo_n "(cached) " >&6
1922else
1923 eval "$3=\$ac_header_compiler"
1924fi
1925eval ac_res=\$$3
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1927$as_echo "$ac_res" >&6; }
1928fi
d0ac1c44 1929 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 1930
81ecdfbb 1931} # ac_fn_c_check_header_mongrel
bec39cab 1932
81ecdfbb
RW
1933# ac_fn_c_try_run LINENO
1934# ----------------------
1935# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1936# that executables *can* be run.
1937ac_fn_c_try_run ()
1938{
1939 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1940 if { { ac_try="$ac_link"
1941case "(($ac_try" in
1942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1943 *) ac_try_echo=$ac_try;;
1944esac
1945eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1946$as_echo "$ac_try_echo"; } >&5
1947 (eval "$ac_link") 2>&5
1948 ac_status=$?
1949 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1950 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1951 { { case "(($ac_try" in
1952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1953 *) ac_try_echo=$ac_try;;
1954esac
1955eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1956$as_echo "$ac_try_echo"; } >&5
1957 (eval "$ac_try") 2>&5
1958 ac_status=$?
1959 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1960 test $ac_status = 0; }; }; then :
1961 ac_retval=0
1962else
1963 $as_echo "$as_me: program exited with status $ac_status" >&5
1964 $as_echo "$as_me: failed program was:" >&5
1965sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1966
81ecdfbb
RW
1967 ac_retval=$ac_status
1968fi
1969 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
1970 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1971 as_fn_set_status $ac_retval
bec39cab 1972
81ecdfbb 1973} # ac_fn_c_try_run
bec39cab 1974
81ecdfbb
RW
1975# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1976# -------------------------------------------------------
1977# Tests whether HEADER exists and can be compiled using the include files in
1978# INCLUDES, setting the cache variable VAR accordingly.
1979ac_fn_c_check_header_compile ()
1980{
1981 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1983$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1984if eval \${$3+:} false; then :
81ecdfbb
RW
1985 $as_echo_n "(cached) " >&6
1986else
1987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1988/* end confdefs.h. */
1989$4
1990#include <$2>
bec39cab 1991_ACEOF
81ecdfbb
RW
1992if ac_fn_c_try_compile "$LINENO"; then :
1993 eval "$3=yes"
1994else
1995 eval "$3=no"
1996fi
1997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1998fi
1999eval ac_res=\$$3
2000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2001$as_echo "$ac_res" >&6; }
d0ac1c44 2002 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 2003
81ecdfbb 2004} # ac_fn_c_check_header_compile
bec39cab 2005
2974be62
AM
2006# ac_fn_c_try_link LINENO
2007# -----------------------
2008# Try to link conftest.$ac_ext, and return whether this succeeded.
2009ac_fn_c_try_link ()
2010{
2011 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2012 rm -f conftest.$ac_objext conftest$ac_exeext
2013 if { { ac_try="$ac_link"
2014case "(($ac_try" in
2015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2016 *) ac_try_echo=$ac_try;;
2017esac
2018eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2019$as_echo "$ac_try_echo"; } >&5
2020 (eval "$ac_link") 2>conftest.err
2021 ac_status=$?
2022 if test -s conftest.err; then
2023 grep -v '^ *+' conftest.err >conftest.er1
2024 cat conftest.er1 >&5
2025 mv -f conftest.er1 conftest.err
2026 fi
2027 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2028 test $ac_status = 0; } && {
2029 test -z "$ac_c_werror_flag" ||
2030 test ! -s conftest.err
2031 } && test -s conftest$ac_exeext && {
2032 test "$cross_compiling" = yes ||
d0ac1c44 2033 test -x conftest$ac_exeext
2974be62
AM
2034 }; then :
2035 ac_retval=0
2036else
2037 $as_echo "$as_me: failed program was:" >&5
2038sed 's/^/| /' conftest.$ac_ext >&5
2039
2040 ac_retval=1
2041fi
2042 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2043 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2044 # interfere with the next link command; also delete a directory that is
2045 # left behind by Apple's compiler. We do this before executing the actions.
2046 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2047 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2048 as_fn_set_status $ac_retval
2974be62
AM
2049
2050} # ac_fn_c_try_link
2051
81ecdfbb
RW
2052# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2053# --------------------------------------------
2054# Tries to find the compile-time value of EXPR in a program that includes
2055# INCLUDES, setting VAR accordingly. Returns whether the value could be
2056# computed
2057ac_fn_c_compute_int ()
2058{
2059 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2060 if test "$cross_compiling" = yes; then
2061 # Depending upon the size, compute the lo and hi bounds.
2062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2063/* end confdefs.h. */
2064$4
2065int
2066main ()
2067{
2068static int test_array [1 - 2 * !(($2) >= 0)];
d0ac1c44
SM
2069test_array [0] = 0;
2070return test_array [0];
bec39cab 2071
81ecdfbb
RW
2072 ;
2073 return 0;
2074}
2075_ACEOF
2076if ac_fn_c_try_compile "$LINENO"; then :
2077 ac_lo=0 ac_mid=0
2078 while :; do
2079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2080/* end confdefs.h. */
2081$4
2082int
2083main ()
2084{
2085static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2086test_array [0] = 0;
2087return test_array [0];
bec39cab 2088
81ecdfbb
RW
2089 ;
2090 return 0;
2091}
2092_ACEOF
2093if ac_fn_c_try_compile "$LINENO"; then :
2094 ac_hi=$ac_mid; break
2095else
2096 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2097 if test $ac_lo -le $ac_mid; then
2098 ac_lo= ac_hi=
2099 break
2100 fi
2101 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2102fi
81ecdfbb
RW
2103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2104 done
c906108c 2105else
81ecdfbb
RW
2106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2107/* end confdefs.h. */
2108$4
2109int
2110main ()
2111{
2112static int test_array [1 - 2 * !(($2) < 0)];
d0ac1c44
SM
2113test_array [0] = 0;
2114return test_array [0];
bec39cab 2115
81ecdfbb
RW
2116 ;
2117 return 0;
2118}
2119_ACEOF
2120if ac_fn_c_try_compile "$LINENO"; then :
2121 ac_hi=-1 ac_mid=-1
2122 while :; do
2123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2124/* end confdefs.h. */
2125$4
2126int
2127main ()
2128{
2129static int test_array [1 - 2 * !(($2) >= $ac_mid)];
d0ac1c44
SM
2130test_array [0] = 0;
2131return test_array [0];
bec39cab 2132
81ecdfbb
RW
2133 ;
2134 return 0;
2135}
2136_ACEOF
2137if ac_fn_c_try_compile "$LINENO"; then :
2138 ac_lo=$ac_mid; break
2139else
2140 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2141 if test $ac_mid -le $ac_hi; then
2142 ac_lo= ac_hi=
2143 break
2144 fi
2145 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2146fi
2147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2148 done
2149else
2150 ac_lo= ac_hi=
2151fi
2152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2153fi
2154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2155# Binary search between lo and hi bounds.
2156while test "x$ac_lo" != "x$ac_hi"; do
2157 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2159/* end confdefs.h. */
2160$4
2161int
2162main ()
2163{
2164static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2165test_array [0] = 0;
2166return test_array [0];
bec39cab 2167
81ecdfbb
RW
2168 ;
2169 return 0;
2170}
2171_ACEOF
2172if ac_fn_c_try_compile "$LINENO"; then :
2173 ac_hi=$ac_mid
2174else
2175 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2176fi
2177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2178done
2179case $ac_lo in #((
2180?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2181'') ac_retval=1 ;;
2182esac
2183 else
2184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2185/* end confdefs.h. */
2186$4
2187static long int longval () { return $2; }
2188static unsigned long int ulongval () { return $2; }
2189#include <stdio.h>
2190#include <stdlib.h>
2191int
2192main ()
2193{
bec39cab 2194
81ecdfbb
RW
2195 FILE *f = fopen ("conftest.val", "w");
2196 if (! f)
2197 return 1;
2198 if (($2) < 0)
2199 {
2200 long int i = longval ();
2201 if (i != ($2))
2202 return 1;
2203 fprintf (f, "%ld", i);
2204 }
2205 else
2206 {
2207 unsigned long int i = ulongval ();
2208 if (i != ($2))
2209 return 1;
2210 fprintf (f, "%lu", i);
2211 }
2212 /* Do not output a trailing newline, as this causes \r\n confusion
2213 on some platforms. */
2214 return ferror (f) || fclose (f) != 0;
bec39cab 2215
81ecdfbb
RW
2216 ;
2217 return 0;
2218}
2219_ACEOF
2220if ac_fn_c_try_run "$LINENO"; then :
2221 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2222else
2223 ac_retval=1
2224fi
2225rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2226 conftest.$ac_objext conftest.beam conftest.$ac_ext
2227rm -f conftest.val
bec39cab 2228
81ecdfbb 2229 fi
d0ac1c44
SM
2230 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2231 as_fn_set_status $ac_retval
bec39cab 2232
81ecdfbb 2233} # ac_fn_c_compute_int
bec39cab 2234
55a8c076
YQ
2235# ac_fn_c_check_func LINENO FUNC VAR
2236# ----------------------------------
2237# Tests whether FUNC exists, setting the cache variable VAR accordingly
2238ac_fn_c_check_func ()
81ecdfbb
RW
2239{
2240 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2242$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2243if eval \${$3+:} false; then :
81ecdfbb
RW
2244 $as_echo_n "(cached) " >&6
2245else
81ecdfbb
RW
2246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2247/* end confdefs.h. */
55a8c076
YQ
2248/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2249 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2250#define $2 innocuous_$2
2251
2252/* System header to define __stub macros and hopefully few prototypes,
2253 which can conflict with char $2 (); below.
2254 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2255 <limits.h> exists even on freestanding compilers. */
2256
2257#ifdef __STDC__
2258# include <limits.h>
2259#else
2260# include <assert.h>
2261#endif
2262
2263#undef $2
2264
2265/* Override any GCC internal prototype to avoid an error.
2266 Use char because int might match the return type of a GCC
2267 builtin and then its argument prototype would still apply. */
2268#ifdef __cplusplus
2269extern "C"
2270#endif
2271char $2 ();
2272/* The GNU C library defines this for functions which it implements
2273 to always fail with ENOSYS. Some functions are actually named
2274 something starting with __ and the normal name is an alias. */
2275#if defined __stub_$2 || defined __stub___$2
2276choke me
2277#endif
2278
2279int
2280main ()
2281{
2282return $2 ();
2283 ;
2284 return 0;
2285}
2286_ACEOF
2287if ac_fn_c_try_link "$LINENO"; then :
2288 eval "$3=yes"
2289else
2290 eval "$3=no"
2291fi
2292rm -f core conftest.err conftest.$ac_objext \
2293 conftest$ac_exeext conftest.$ac_ext
2294fi
2295eval ac_res=\$$3
2296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2297$as_echo "$ac_res" >&6; }
d0ac1c44 2298 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
55a8c076
YQ
2299
2300} # ac_fn_c_check_func
2301
c56ccc05
MM
2302# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2303# ----------------------------------------------------
2304# Tries to find if the field MEMBER exists in type AGGR, after including
2305# INCLUDES, setting cache variable VAR accordingly.
2306ac_fn_c_check_member ()
2307{
2308 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2310$as_echo_n "checking for $2.$3... " >&6; }
d0ac1c44 2311if eval \${$4+:} false; then :
c56ccc05
MM
2312 $as_echo_n "(cached) " >&6
2313else
2314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2315/* end confdefs.h. */
2316$5
2317int
2318main ()
2319{
2320static $2 ac_aggr;
2321if (ac_aggr.$3)
2322return 0;
2323 ;
2324 return 0;
2325}
2326_ACEOF
2327if ac_fn_c_try_compile "$LINENO"; then :
2328 eval "$4=yes"
2329else
2330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2331/* end confdefs.h. */
2332$5
2333int
2334main ()
2335{
2336static $2 ac_aggr;
2337if (sizeof ac_aggr.$3)
2338return 0;
2339 ;
2340 return 0;
2341}
2342_ACEOF
2343if ac_fn_c_try_compile "$LINENO"; then :
2344 eval "$4=yes"
2345else
2346 eval "$4=no"
2347fi
2348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2349fi
2350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2351fi
2352eval ac_res=\$$4
2353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2354$as_echo "$ac_res" >&6; }
d0ac1c44 2355 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
c56ccc05
MM
2356
2357} # ac_fn_c_check_member
2358
07697489
PA
2359# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2360# -------------------------------------------
2361# Tests whether TYPE exists after having included INCLUDES, setting cache
2362# variable VAR accordingly.
2363ac_fn_c_check_type ()
2364{
2365 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2367$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2368if eval \${$3+:} false; then :
07697489
PA
2369 $as_echo_n "(cached) " >&6
2370else
2371 eval "$3=no"
2372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2373/* end confdefs.h. */
2374$4
2375int
2376main ()
2377{
2378if (sizeof ($2))
2379 return 0;
2380 ;
2381 return 0;
2382}
2383_ACEOF
2384if ac_fn_c_try_compile "$LINENO"; then :
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
2399else
2400 eval "$3=yes"
2401fi
2402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2403fi
2404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2405fi
2406eval ac_res=\$$3
2407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2408$as_echo "$ac_res" >&6; }
d0ac1c44 2409 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
07697489
PA
2410
2411} # ac_fn_c_check_type
2412
d0ac1c44
SM
2413# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2414# ---------------------------------------------
2415# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2416# accordingly.
770d76d7
PA
2417ac_fn_c_check_decl ()
2418{
2419 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2420 as_decl_name=`echo $2|sed 's/ *(.*//'`
2421 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2423$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
d0ac1c44 2424if eval \${$3+:} false; then :
770d76d7
PA
2425 $as_echo_n "(cached) " >&6
2426else
2427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2428/* end confdefs.h. */
2429$4
2430int
2431main ()
2432{
2433#ifndef $as_decl_name
2434#ifdef __cplusplus
2435 (void) $as_decl_use;
2436#else
2437 (void) $as_decl_name;
2438#endif
2439#endif
2440
2441 ;
2442 return 0;
2443}
2444_ACEOF
2445if ac_fn_c_try_compile "$LINENO"; then :
2446 eval "$3=yes"
2447else
2448 eval "$3=no"
2449fi
2450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2451fi
2452eval ac_res=\$$3
2453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2454$as_echo "$ac_res" >&6; }
d0ac1c44 2455 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
770d76d7
PA
2456
2457} # ac_fn_c_check_decl
f35d5ade
TT
2458
2459# ac_fn_cxx_try_link LINENO
2460# -------------------------
2461# Try to link conftest.$ac_ext, and return whether this succeeded.
2462ac_fn_cxx_try_link ()
2463{
2464 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2465 rm -f conftest.$ac_objext conftest$ac_exeext
2466 if { { ac_try="$ac_link"
2467case "(($ac_try" in
2468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2469 *) ac_try_echo=$ac_try;;
2470esac
2471eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2472$as_echo "$ac_try_echo"; } >&5
2473 (eval "$ac_link") 2>conftest.err
2474 ac_status=$?
2475 if test -s conftest.err; then
2476 grep -v '^ *+' conftest.err >conftest.er1
2477 cat conftest.er1 >&5
2478 mv -f conftest.er1 conftest.err
2479 fi
2480 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2481 test $ac_status = 0; } && {
2482 test -z "$ac_cxx_werror_flag" ||
2483 test ! -s conftest.err
2484 } && test -s conftest$ac_exeext && {
2485 test "$cross_compiling" = yes ||
2486 test -x conftest$ac_exeext
2487 }; then :
2488 ac_retval=0
2489else
2490 $as_echo "$as_me: failed program was:" >&5
2491sed 's/^/| /' conftest.$ac_ext >&5
2492
2493 ac_retval=1
2494fi
2495 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2496 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2497 # interfere with the next link command; also delete a directory that is
2498 # left behind by Apple's compiler. We do this before executing the actions.
2499 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2500 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2501 as_fn_set_status $ac_retval
2502
2503} # ac_fn_cxx_try_link
81ecdfbb
RW
2504cat >config.log <<_ACEOF
2505This file contains any messages produced by compilers while
2506running configure, to aid debugging if configure makes a mistake.
d5af19ba 2507
81ecdfbb 2508It was created by $as_me, which was
d0ac1c44 2509generated by GNU Autoconf 2.69. Invocation command line was
b4e70030 2510
81ecdfbb 2511 $ $0 $@
413ccac7 2512
81ecdfbb
RW
2513_ACEOF
2514exec 5>>config.log
2515{
2516cat <<_ASUNAME
2517## --------- ##
2518## Platform. ##
2519## --------- ##
413ccac7 2520
81ecdfbb
RW
2521hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2522uname -m = `(uname -m) 2>/dev/null || echo unknown`
2523uname -r = `(uname -r) 2>/dev/null || echo unknown`
2524uname -s = `(uname -s) 2>/dev/null || echo unknown`
2525uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2526
81ecdfbb
RW
2527/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2528/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2529
81ecdfbb
RW
2530/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2531/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2532/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2533/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2534/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2535/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2536/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2537
81ecdfbb 2538_ASUNAME
bec39cab 2539
bec39cab
AC
2540as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2541for as_dir in $PATH
2542do
2543 IFS=$as_save_IFS
2544 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2545 $as_echo "PATH: $as_dir"
2546 done
2547IFS=$as_save_IFS
bec39cab 2548
81ecdfbb 2549} >&5
bec39cab 2550
81ecdfbb 2551cat >&5 <<_ACEOF
bec39cab 2552
bec39cab 2553
81ecdfbb
RW
2554## ----------- ##
2555## Core tests. ##
2556## ----------- ##
2557
2558_ACEOF
2559
2560
2561# Keep a trace of the command line.
2562# Strip out --no-create and --no-recursion so they do not pile up.
2563# Strip out --silent because we don't want to record it for future runs.
2564# Also quote any args containing shell meta-characters.
2565# Make two passes to allow for proper duplicate-argument suppression.
2566ac_configure_args=
2567ac_configure_args0=
2568ac_configure_args1=
2569ac_must_keep_next=false
2570for ac_pass in 1 2
2571do
2572 for ac_arg
2573 do
2574 case $ac_arg in
2575 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2576 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2577 | -silent | --silent | --silen | --sile | --sil)
2578 continue ;;
2579 *\'*)
2580 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2581 esac
2582 case $ac_pass in
2583 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2584 2)
2585 as_fn_append ac_configure_args1 " '$ac_arg'"
2586 if test $ac_must_keep_next = true; then
2587 ac_must_keep_next=false # Got value, back to normal.
2588 else
2589 case $ac_arg in
2590 *=* | --config-cache | -C | -disable-* | --disable-* \
2591 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2592 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2593 | -with-* | --with-* | -without-* | --without-* | --x)
2594 case "$ac_configure_args0 " in
2595 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2596 esac
2597 ;;
2598 -* ) ac_must_keep_next=true ;;
2599 esac
2600 fi
2601 as_fn_append ac_configure_args " '$ac_arg'"
2602 ;;
2603 esac
2604 done
2605done
2606{ ac_configure_args0=; unset ac_configure_args0;}
2607{ ac_configure_args1=; unset ac_configure_args1;}
2608
2609# When interrupted or exit'd, cleanup temporary files, and complete
2610# config.log. We remove comments because anyway the quotes in there
2611# would cause problems or look ugly.
2612# WARNING: Use '\'' to represent an apostrophe within the trap.
2613# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2614trap 'exit_status=$?
2615 # Save into config.log some information that might help in debugging.
2616 {
2617 echo
2618
d0ac1c44 2619 $as_echo "## ---------------- ##
81ecdfbb 2620## Cache variables. ##
d0ac1c44 2621## ---------------- ##"
81ecdfbb
RW
2622 echo
2623 # The following way of writing the cache mishandles newlines in values,
2624(
2625 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2626 eval ac_val=\$$ac_var
2627 case $ac_val in #(
2628 *${as_nl}*)
2629 case $ac_var in #(
2630 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2631$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2632 esac
2633 case $ac_var in #(
2634 _ | IFS | as_nl) ;; #(
2635 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2636 *) { eval $ac_var=; unset $ac_var;} ;;
2637 esac ;;
2638 esac
2639 done
2640 (set) 2>&1 |
2641 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2642 *${as_nl}ac_space=\ *)
2643 sed -n \
2644 "s/'\''/'\''\\\\'\'''\''/g;
2645 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2646 ;; #(
2647 *)
2648 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2649 ;;
2650 esac |
2651 sort
2652)
2653 echo
2654
d0ac1c44 2655 $as_echo "## ----------------- ##
81ecdfbb 2656## Output variables. ##
d0ac1c44 2657## ----------------- ##"
81ecdfbb
RW
2658 echo
2659 for ac_var in $ac_subst_vars
2660 do
2661 eval ac_val=\$$ac_var
2662 case $ac_val in
2663 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2664 esac
2665 $as_echo "$ac_var='\''$ac_val'\''"
2666 done | sort
2667 echo
2668
2669 if test -n "$ac_subst_files"; then
d0ac1c44 2670 $as_echo "## ------------------- ##
81ecdfbb 2671## File substitutions. ##
d0ac1c44 2672## ------------------- ##"
81ecdfbb
RW
2673 echo
2674 for ac_var in $ac_subst_files
2675 do
2676 eval ac_val=\$$ac_var
2677 case $ac_val in
2678 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2679 esac
2680 $as_echo "$ac_var='\''$ac_val'\''"
2681 done | sort
2682 echo
2683 fi
2684
2685 if test -s confdefs.h; then
d0ac1c44 2686 $as_echo "## ----------- ##
81ecdfbb 2687## confdefs.h. ##
d0ac1c44 2688## ----------- ##"
81ecdfbb
RW
2689 echo
2690 cat confdefs.h
2691 echo
2692 fi
2693 test "$ac_signal" != 0 &&
2694 $as_echo "$as_me: caught signal $ac_signal"
2695 $as_echo "$as_me: exit $exit_status"
2696 } >&5
2697 rm -f core *.core core.conftest.* &&
2698 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2699 exit $exit_status
2700' 0
2701for ac_signal in 1 2 13 15; do
2702 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2703done
2704ac_signal=0
2705
2706# confdefs.h avoids OS command line length limits that DEFS can exceed.
2707rm -f -r conftest* confdefs.h
2708
2709$as_echo "/* confdefs.h */" > confdefs.h
2710
2711# Predefined preprocessor variables.
2712
2713cat >>confdefs.h <<_ACEOF
2714#define PACKAGE_NAME "$PACKAGE_NAME"
2715_ACEOF
2716
2717cat >>confdefs.h <<_ACEOF
2718#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2719_ACEOF
2720
2721cat >>confdefs.h <<_ACEOF
2722#define PACKAGE_VERSION "$PACKAGE_VERSION"
2723_ACEOF
2724
2725cat >>confdefs.h <<_ACEOF
2726#define PACKAGE_STRING "$PACKAGE_STRING"
2727_ACEOF
2728
2729cat >>confdefs.h <<_ACEOF
2730#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2731_ACEOF
2732
2733cat >>confdefs.h <<_ACEOF
2734#define PACKAGE_URL "$PACKAGE_URL"
2735_ACEOF
2736
2737
2738# Let the site file select an alternate cache file if it wants to.
2739# Prefer an explicitly selected file to automatically selected ones.
2740ac_site_file1=NONE
2741ac_site_file2=NONE
2742if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
2743 # We do not want a PATH search for config.site.
2744 case $CONFIG_SITE in #((
2745 -*) ac_site_file1=./$CONFIG_SITE;;
2746 */*) ac_site_file1=$CONFIG_SITE;;
2747 *) ac_site_file1=./$CONFIG_SITE;;
2748 esac
81ecdfbb
RW
2749elif test "x$prefix" != xNONE; then
2750 ac_site_file1=$prefix/share/config.site
2751 ac_site_file2=$prefix/etc/config.site
2752else
2753 ac_site_file1=$ac_default_prefix/share/config.site
2754 ac_site_file2=$ac_default_prefix/etc/config.site
2755fi
2756for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2757do
2758 test "x$ac_site_file" = xNONE && continue
d0ac1c44 2759 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
81ecdfbb
RW
2760 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2761$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2762 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
2763 . "$ac_site_file" \
2764 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2765$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2766as_fn_error $? "failed to load site script $ac_site_file
2767See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
2768 fi
2769done
2770
2771if test -r "$cache_file"; then
d0ac1c44
SM
2772 # Some versions of bash will fail to source /dev/null (special files
2773 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2774 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
81ecdfbb
RW
2775 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2776$as_echo "$as_me: loading cache $cache_file" >&6;}
2777 case $cache_file in
2778 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2779 *) . "./$cache_file";;
2780 esac
2781 fi
2782else
2783 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2784$as_echo "$as_me: creating cache $cache_file" >&6;}
2785 >$cache_file
bec39cab
AC
2786fi
2787
d0ac1c44
SM
2788as_fn_append ac_header_list " stdlib.h"
2789as_fn_append ac_header_list " unistd.h"
2790as_fn_append ac_header_list " sys/param.h"
81ecdfbb
RW
2791# Check that the precious variables saved in the cache have kept the same
2792# value.
2793ac_cache_corrupted=false
2794for ac_var in $ac_precious_vars; do
2795 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2796 eval ac_new_set=\$ac_env_${ac_var}_set
2797 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2798 eval ac_new_val=\$ac_env_${ac_var}_value
2799 case $ac_old_set,$ac_new_set in
2800 set,)
2801 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2802$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2803 ac_cache_corrupted=: ;;
2804 ,set)
2805 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2806$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2807 ac_cache_corrupted=: ;;
2808 ,);;
2809 *)
2810 if test "x$ac_old_val" != "x$ac_new_val"; then
2811 # differences in whitespace do not lead to failure.
2812 ac_old_val_w=`echo x $ac_old_val`
2813 ac_new_val_w=`echo x $ac_new_val`
2814 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2815 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2816$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2817 ac_cache_corrupted=:
2818 else
2819 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2820$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2821 eval $ac_var=\$ac_old_val
2822 fi
2823 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2824$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2825 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2826$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2827 fi;;
2828 esac
2829 # Pass precious variables to config.status.
2830 if test "$ac_new_set" = set; then
2831 case $ac_new_val in
2832 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2833 *) ac_arg=$ac_var=$ac_new_val ;;
2834 esac
2835 case " $ac_configure_args " in
2836 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2837 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2838 esac
2839 fi
2840done
2841if $ac_cache_corrupted; then
2842 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2843$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2844 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2845$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 2846 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
81ecdfbb
RW
2847fi
2848## -------------------- ##
2849## Main body of script. ##
2850## -------------------- ##
2851
2852ac_ext=c
2853ac_cpp='$CPP $CPPFLAGS'
2854ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2855ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2856ac_compiler_gnu=$ac_cv_c_compiler_gnu
2857
2858
2859
2860
2861
2862ac_config_headers="$ac_config_headers config.h:config.in"
2863
2864
2865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2866$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2867 # Check whether --enable-maintainer-mode was given.
2868if test "${enable_maintainer_mode+set}" = set; then :
2869 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2870else
2871 USE_MAINTAINER_MODE=no
2872fi
2873
2874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2875$as_echo "$USE_MAINTAINER_MODE" >&6; }
2876 if test $USE_MAINTAINER_MODE = yes; then
2877 MAINTAINER_MODE_TRUE=
2878 MAINTAINER_MODE_FALSE='#'
2879else
2880 MAINTAINER_MODE_TRUE='#'
2881 MAINTAINER_MODE_FALSE=
2882fi
2883
2884 MAINT=$MAINTAINER_MODE_TRUE
2885
2886
2887
17ef446e 2888# Set the 'development' global.
270c9937 2889. $srcdir/../bfd/development.sh
f5f1cdb6 2890
81ecdfbb
RW
2891ac_ext=c
2892ac_cpp='$CPP $CPPFLAGS'
2893ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2894ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2895ac_compiler_gnu=$ac_cv_c_compiler_gnu
2896if test -n "$ac_tool_prefix"; then
2897 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2898set dummy ${ac_tool_prefix}gcc; ac_word=$2
2899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2900$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2901if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2902 $as_echo_n "(cached) " >&6
c906108c
SS
2903else
2904 if test -n "$CC"; then
2905 ac_cv_prog_CC="$CC" # Let the user override the test.
2906else
bec39cab
AC
2907as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2908for as_dir in $PATH
2909do
2910 IFS=$as_save_IFS
2911 test -z "$as_dir" && as_dir=.
81ecdfbb 2912 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2913 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2914 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2915 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2916 break 2
2917 fi
2918done
81ecdfbb
RW
2919 done
2920IFS=$as_save_IFS
bec39cab 2921
c906108c
SS
2922fi
2923fi
bec39cab 2924CC=$ac_cv_prog_CC
c906108c 2925if test -n "$CC"; then
81ecdfbb
RW
2926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2927$as_echo "$CC" >&6; }
c906108c 2928else
81ecdfbb
RW
2929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2930$as_echo "no" >&6; }
c906108c
SS
2931fi
2932
81ecdfbb 2933
b4e70030
JB
2934fi
2935if test -z "$ac_cv_prog_CC"; then
2936 ac_ct_CC=$CC
81ecdfbb
RW
2937 # Extract the first word of "gcc", so it can be a program name with args.
2938set dummy gcc; ac_word=$2
2939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2940$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2941if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 2942 $as_echo_n "(cached) " >&6
b4e70030
JB
2943else
2944 if test -n "$ac_ct_CC"; then
2945 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2946else
2947as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2948for as_dir in $PATH
2949do
2950 IFS=$as_save_IFS
2951 test -z "$as_dir" && as_dir=.
81ecdfbb 2952 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2953 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2954 ac_cv_prog_ac_ct_CC="gcc"
2955 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2956 break 2
4e8d927d 2957 fi
b4e70030 2958done
81ecdfbb
RW
2959 done
2960IFS=$as_save_IFS
b4e70030
JB
2961
2962fi
2963fi
2964ac_ct_CC=$ac_cv_prog_ac_ct_CC
2965if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2967$as_echo "$ac_ct_CC" >&6; }
b4e70030 2968else
81ecdfbb
RW
2969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2970$as_echo "no" >&6; }
b4e70030
JB
2971fi
2972
81ecdfbb
RW
2973 if test "x$ac_ct_CC" = x; then
2974 CC=""
2975 else
2976 case $cross_compiling:$ac_tool_warned in
2977yes:)
2978{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2979$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2980ac_tool_warned=yes ;;
2981esac
2982 CC=$ac_ct_CC
2983 fi
b4e70030
JB
2984else
2985 CC="$ac_cv_prog_CC"
2986fi
2987
c906108c 2988if test -z "$CC"; then
81ecdfbb
RW
2989 if test -n "$ac_tool_prefix"; then
2990 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2991set dummy ${ac_tool_prefix}cc; ac_word=$2
2992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2993$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2994if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2995 $as_echo_n "(cached) " >&6
c906108c
SS
2996else
2997 if test -n "$CC"; then
2998 ac_cv_prog_CC="$CC" # Let the user override the test.
2999else
bec39cab
AC
3000as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3001for as_dir in $PATH
3002do
3003 IFS=$as_save_IFS
3004 test -z "$as_dir" && as_dir=.
81ecdfbb 3005 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3006 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3007 ac_cv_prog_CC="${ac_tool_prefix}cc"
3008 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3009 break 2
3010 fi
3011done
81ecdfbb
RW
3012 done
3013IFS=$as_save_IFS
3014
3015fi
3016fi
3017CC=$ac_cv_prog_CC
3018if test -n "$CC"; then
3019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3020$as_echo "$CC" >&6; }
3021else
3022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3023$as_echo "no" >&6; }
3024fi
3025
3026
3027 fi
3028fi
3029if test -z "$CC"; then
3030 # Extract the first word of "cc", so it can be a program name with args.
3031set dummy cc; ac_word=$2
3032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3033$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3034if ${ac_cv_prog_CC+:} false; then :
81ecdfbb
RW
3035 $as_echo_n "(cached) " >&6
3036else
3037 if test -n "$CC"; then
3038 ac_cv_prog_CC="$CC" # Let the user override the test.
3039else
3040 ac_prog_rejected=no
3041as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3042for as_dir in $PATH
3043do
3044 IFS=$as_save_IFS
3045 test -z "$as_dir" && as_dir=.
3046 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3047 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3048 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3049 ac_prog_rejected=yes
3050 continue
3051 fi
3052 ac_cv_prog_CC="cc"
3053 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3054 break 2
3055 fi
3056done
3057 done
3058IFS=$as_save_IFS
bec39cab 3059
c906108c
SS
3060if test $ac_prog_rejected = yes; then
3061 # We found a bogon in the path, so make sure we never use it.
3062 set dummy $ac_cv_prog_CC
3063 shift
bec39cab 3064 if test $# != 0; then
c906108c
SS
3065 # We chose a different compiler from the bogus one.
3066 # However, it has the same basename, so the bogon will be chosen
3067 # first if we set CC to just the basename; use the full file name.
3068 shift
bec39cab 3069 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3070 fi
3071fi
3072fi
3073fi
bec39cab 3074CC=$ac_cv_prog_CC
c906108c 3075if test -n "$CC"; then
81ecdfbb
RW
3076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3077$as_echo "$CC" >&6; }
c906108c 3078else
81ecdfbb
RW
3079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3080$as_echo "no" >&6; }
c906108c
SS
3081fi
3082
81ecdfbb 3083
bec39cab
AC
3084fi
3085if test -z "$CC"; then
3086 if test -n "$ac_tool_prefix"; then
81ecdfbb 3087 for ac_prog in cl.exe
bec39cab
AC
3088 do
3089 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3090set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3092$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3093if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3094 $as_echo_n "(cached) " >&6
c906108c
SS
3095else
3096 if test -n "$CC"; then
3097 ac_cv_prog_CC="$CC" # Let the user override the test.
3098else
bec39cab
AC
3099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3100for as_dir in $PATH
3101do
3102 IFS=$as_save_IFS
3103 test -z "$as_dir" && as_dir=.
81ecdfbb 3104 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3105 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3106 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3107 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3108 break 2
3109 fi
3110done
81ecdfbb
RW
3111 done
3112IFS=$as_save_IFS
bec39cab 3113
c906108c
SS
3114fi
3115fi
bec39cab 3116CC=$ac_cv_prog_CC
c906108c 3117if test -n "$CC"; then
81ecdfbb
RW
3118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3119$as_echo "$CC" >&6; }
c906108c 3120else
81ecdfbb
RW
3121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3122$as_echo "no" >&6; }
c906108c 3123fi
bec39cab 3124
81ecdfbb 3125
bec39cab
AC
3126 test -n "$CC" && break
3127 done
3128fi
3129if test -z "$CC"; then
3130 ac_ct_CC=$CC
81ecdfbb 3131 for ac_prog in cl.exe
bec39cab
AC
3132do
3133 # Extract the first word of "$ac_prog", so it can be a program name with args.
3134set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3136$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3137if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3138 $as_echo_n "(cached) " >&6
bec39cab
AC
3139else
3140 if test -n "$ac_ct_CC"; then
3141 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3142else
3143as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3144for as_dir in $PATH
3145do
3146 IFS=$as_save_IFS
3147 test -z "$as_dir" && as_dir=.
81ecdfbb 3148 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3149 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3150 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3151 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3152 break 2
c906108c 3153 fi
bec39cab 3154done
81ecdfbb
RW
3155 done
3156IFS=$as_save_IFS
bec39cab
AC
3157
3158fi
3159fi
3160ac_ct_CC=$ac_cv_prog_ac_ct_CC
3161if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3163$as_echo "$ac_ct_CC" >&6; }
bec39cab 3164else
81ecdfbb
RW
3165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3166$as_echo "no" >&6; }
c906108c
SS
3167fi
3168
81ecdfbb 3169
bec39cab
AC
3170 test -n "$ac_ct_CC" && break
3171done
c906108c 3172
81ecdfbb
RW
3173 if test "x$ac_ct_CC" = x; then
3174 CC=""
3175 else
3176 case $cross_compiling:$ac_tool_warned in
3177yes:)
3178{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3179$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3180ac_tool_warned=yes ;;
3181esac
3182 CC=$ac_ct_CC
3183 fi
bec39cab
AC
3184fi
3185
3186fi
3187
3188
81ecdfbb
RW
3189test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3190$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3191as_fn_error $? "no acceptable C compiler found in \$PATH
3192See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3193
3194# Provide some information about the compiler.
81ecdfbb
RW
3195$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3196set X $ac_compile
3197ac_compiler=$2
3198for ac_option in --version -v -V -qversion; do
3199 { { ac_try="$ac_compiler $ac_option >&5"
3200case "(($ac_try" in
3201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3202 *) ac_try_echo=$ac_try;;
3203esac
3204eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3205$as_echo "$ac_try_echo"; } >&5
3206 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3207 ac_status=$?
81ecdfbb
RW
3208 if test -s conftest.err; then
3209 sed '10a\
3210... rest of stderr output deleted ...
3211 10q' conftest.err >conftest.er1
3212 cat conftest.er1 >&5
81ecdfbb 3213 fi
d0ac1c44 3214 rm -f conftest.er1 conftest.err
81ecdfbb
RW
3215 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3216 test $ac_status = 0; }
3217done
bec39cab 3218
81ecdfbb 3219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3220/* end confdefs.h. */
3221
3222int
3223main ()
3224{
3225
3226 ;
3227 return 0;
3228}
3229_ACEOF
3230ac_clean_files_save=$ac_clean_files
d0ac1c44 3231ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
bec39cab
AC
3232# Try to create an executable without -o first, disregard a.out.
3233# It will help us diagnose broken compilers, and finding out an intuition
3234# of exeext.
d0ac1c44
SM
3235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3236$as_echo_n "checking whether the C compiler works... " >&6; }
81ecdfbb
RW
3237ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3238
3239# The possible output files:
3240ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3241
3242ac_rmfiles=
3243for ac_file in $ac_files
3244do
3245 case $ac_file in
3246 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3247 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3248 esac
3249done
3250rm -f $ac_rmfiles
3251
3252if { { ac_try="$ac_link_default"
3253case "(($ac_try" in
3254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3255 *) ac_try_echo=$ac_try;;
3256esac
3257eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3258$as_echo "$ac_try_echo"; } >&5
3259 (eval "$ac_link_default") 2>&5
3260 ac_status=$?
3261 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3262 test $ac_status = 0; }; then :
3263 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3264# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3265# in a Makefile. We should not override ac_cv_exeext if it was cached,
3266# so that the user can short-circuit this test for compilers unknown to
3267# Autoconf.
3268for ac_file in $ac_files ''
bec39cab
AC
3269do
3270 test -f "$ac_file" || continue
3271 case $ac_file in
81ecdfbb 3272 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3273 ;;
3274 [ab].out )
3275 # We found the default executable, but exeext='' is most
3276 # certainly right.
3277 break;;
3278 *.* )
81ecdfbb
RW
3279 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3280 then :; else
3281 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3282 fi
3283 # We set ac_cv_exeext here because the later test for it is not
3284 # safe: cross compilers may not add the suffix if given an `-o'
3285 # argument, so we may need to know it at that point already.
3286 # Even if this section looks crufty: it has the advantage of
3287 # actually working.
b4e70030
JB
3288 break;;
3289 * )
3290 break;;
bec39cab
AC
3291 esac
3292done
81ecdfbb
RW
3293test "$ac_cv_exeext" = no && ac_cv_exeext=
3294
bec39cab 3295else
81ecdfbb
RW
3296 ac_file=''
3297fi
81ecdfbb 3298if test -z "$ac_file"; then :
d0ac1c44
SM
3299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3300$as_echo "no" >&6; }
3301$as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3302sed 's/^/| /' conftest.$ac_ext >&5
3303
81ecdfbb
RW
3304{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3305$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3306as_fn_error 77 "C compiler cannot create executables
3307See \`config.log' for more details" "$LINENO" 5; }
3308else
3309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3310$as_echo "yes" >&6; }
bec39cab 3311fi
d0ac1c44
SM
3312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3313$as_echo_n "checking for C compiler default output file name... " >&6; }
3314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3315$as_echo "$ac_file" >&6; }
b4e70030 3316ac_exeext=$ac_cv_exeext
b4e70030 3317
d0ac1c44 3318rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
b4e70030 3319ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3321$as_echo_n "checking for suffix of executables... " >&6; }
3322if { { ac_try="$ac_link"
3323case "(($ac_try" in
3324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3325 *) ac_try_echo=$ac_try;;
3326esac
3327eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3328$as_echo "$ac_try_echo"; } >&5
3329 (eval "$ac_link") 2>&5
bec39cab 3330 ac_status=$?
81ecdfbb
RW
3331 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3332 test $ac_status = 0; }; then :
b4e70030
JB
3333 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3334# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3335# work properly (i.e., refer to `conftest.exe'), while it won't with
3336# `rm'.
3337for ac_file in conftest.exe conftest conftest.*; do
3338 test -f "$ac_file" || continue
3339 case $ac_file in
81ecdfbb 3340 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3341 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3342 break;;
3343 * ) break;;
3344 esac
3345done
c906108c 3346else
81ecdfbb
RW
3347 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3348$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3349as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3350See \`config.log' for more details" "$LINENO" 5; }
c906108c 3351fi
d0ac1c44 3352rm -f conftest conftest$ac_cv_exeext
81ecdfbb
RW
3353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3354$as_echo "$ac_cv_exeext" >&6; }
c906108c 3355
b4e70030 3356rm -f conftest.$ac_ext
bec39cab
AC
3357EXEEXT=$ac_cv_exeext
3358ac_exeext=$EXEEXT
d0ac1c44
SM
3359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3360/* end confdefs.h. */
3361#include <stdio.h>
3362int
3363main ()
3364{
3365FILE *f = fopen ("conftest.out", "w");
3366 return ferror (f) || fclose (f) != 0;
3367
3368 ;
3369 return 0;
3370}
3371_ACEOF
3372ac_clean_files="$ac_clean_files conftest.out"
3373# Check that the compiler produces executables we can run. If not, either
3374# the compiler is broken, or we cross compile.
3375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3376$as_echo_n "checking whether we are cross compiling... " >&6; }
3377if test "$cross_compiling" != yes; then
3378 { { ac_try="$ac_link"
3379case "(($ac_try" in
3380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3381 *) ac_try_echo=$ac_try;;
3382esac
3383eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3384$as_echo "$ac_try_echo"; } >&5
3385 (eval "$ac_link") 2>&5
3386 ac_status=$?
3387 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3388 test $ac_status = 0; }
3389 if { ac_try='./conftest$ac_cv_exeext'
3390 { { case "(($ac_try" in
3391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3392 *) ac_try_echo=$ac_try;;
3393esac
3394eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3395$as_echo "$ac_try_echo"; } >&5
3396 (eval "$ac_try") 2>&5
3397 ac_status=$?
3398 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3399 test $ac_status = 0; }; }; then
3400 cross_compiling=no
3401 else
3402 if test "$cross_compiling" = maybe; then
3403 cross_compiling=yes
3404 else
3405 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3406$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3407as_fn_error $? "cannot run C compiled programs.
3408If you meant to cross compile, use \`--host'.
3409See \`config.log' for more details" "$LINENO" 5; }
3410 fi
3411 fi
3412fi
3413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3414$as_echo "$cross_compiling" >&6; }
3415
3416rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3417ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3419$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 3420if ${ac_cv_objext+:} false; then :
81ecdfbb 3421 $as_echo_n "(cached) " >&6
bec39cab 3422else
81ecdfbb 3423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3424/* end confdefs.h. */
3425
3426int
3427main ()
3428{
3429
3430 ;
3431 return 0;
3432}
3433_ACEOF
3434rm -f conftest.o conftest.obj
81ecdfbb
RW
3435if { { ac_try="$ac_compile"
3436case "(($ac_try" in
3437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3438 *) ac_try_echo=$ac_try;;
3439esac
3440eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3441$as_echo "$ac_try_echo"; } >&5
3442 (eval "$ac_compile") 2>&5
3443 ac_status=$?
3444 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3445 test $ac_status = 0; }; then :
3446 for ac_file in conftest.o conftest.obj conftest.*; do
3447 test -f "$ac_file" || continue;
bec39cab 3448 case $ac_file in
81ecdfbb 3449 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3450 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3451 break;;
3452 esac
3453done
c906108c 3454else
81ecdfbb 3455 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3456sed 's/^/| /' conftest.$ac_ext >&5
3457
81ecdfbb
RW
3458{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3459$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3460as_fn_error $? "cannot compute suffix of object files: cannot compile
3461See \`config.log' for more details" "$LINENO" 5; }
c906108c 3462fi
b4e70030 3463rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3464fi
81ecdfbb
RW
3465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3466$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3467OBJEXT=$ac_cv_objext
3468ac_objext=$OBJEXT
81ecdfbb
RW
3469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3470$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 3471if ${ac_cv_c_compiler_gnu+:} false; then :
81ecdfbb 3472 $as_echo_n "(cached) " >&6
c906108c 3473else
81ecdfbb 3474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3475/* end confdefs.h. */
3476
3477int
3478main ()
3479{
3480#ifndef __GNUC__
3481 choke me
3482#endif
3483
3484 ;
3485 return 0;
3486}
3487_ACEOF
81ecdfbb 3488if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3489 ac_compiler_gnu=yes
3490else
81ecdfbb 3491 ac_compiler_gnu=no
bec39cab 3492fi
81ecdfbb 3493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3494ac_cv_c_compiler_gnu=$ac_compiler_gnu
3495
3496fi
81ecdfbb
RW
3497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3498$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3499if test $ac_compiler_gnu = yes; then
3500 GCC=yes
3501else
3502 GCC=
3503fi
bec39cab
AC
3504ac_test_CFLAGS=${CFLAGS+set}
3505ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3507$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 3508if ${ac_cv_prog_cc_g+:} false; then :
81ecdfbb 3509 $as_echo_n "(cached) " >&6
bec39cab 3510else
81ecdfbb
RW
3511 ac_save_c_werror_flag=$ac_c_werror_flag
3512 ac_c_werror_flag=yes
3513 ac_cv_prog_cc_g=no
3514 CFLAGS="-g"
3515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3516/* end confdefs.h. */
3517
3518int
3519main ()
3520{
3521
3522 ;
3523 return 0;
3524}
3525_ACEOF
81ecdfbb 3526if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3527 ac_cv_prog_cc_g=yes
3528else
81ecdfbb
RW
3529 CFLAGS=""
3530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3531/* end confdefs.h. */
3532
3533int
3534main ()
3535{
3536
3537 ;
3538 return 0;
3539}
3540_ACEOF
3541if ac_fn_c_try_compile "$LINENO"; then :
3542
3543else
3544 ac_c_werror_flag=$ac_save_c_werror_flag
3545 CFLAGS="-g"
3546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3547/* end confdefs.h. */
3548
3549int
3550main ()
3551{
c906108c 3552
81ecdfbb
RW
3553 ;
3554 return 0;
3555}
3556_ACEOF
3557if ac_fn_c_try_compile "$LINENO"; then :
3558 ac_cv_prog_cc_g=yes
3559fi
3560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3561fi
3562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3563fi
81ecdfbb
RW
3564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3565 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3566fi
81ecdfbb
RW
3567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3568$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3569if test "$ac_test_CFLAGS" = set; then
bec39cab 3570 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3571elif test $ac_cv_prog_cc_g = yes; then
3572 if test "$GCC" = yes; then
3573 CFLAGS="-g -O2"
3574 else
3575 CFLAGS="-g"
3576 fi
3577else
3578 if test "$GCC" = yes; then
3579 CFLAGS="-O2"
3580 else
3581 CFLAGS=
3582 fi
3583fi
81ecdfbb
RW
3584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3585$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
d0ac1c44 3586if ${ac_cv_prog_cc_c89+:} false; then :
81ecdfbb 3587 $as_echo_n "(cached) " >&6
bec39cab 3588else
81ecdfbb 3589 ac_cv_prog_cc_c89=no
bec39cab 3590ac_save_CC=$CC
81ecdfbb 3591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3592/* end confdefs.h. */
c906108c
SS
3593#include <stdarg.h>
3594#include <stdio.h>
d0ac1c44 3595struct stat;
c906108c
SS
3596/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3597struct buf { int x; };
3598FILE * (*rcsopen) (struct buf *, struct stat *, int);
3599static char *e (p, i)
3600 char **p;
3601 int i;
3602{
3603 return p[i];
3604}
3605static char *f (char * (*g) (char **, int), char **p, ...)
3606{
3607 char *s;
3608 va_list v;
3609 va_start (v,p);
3610 s = g (p, va_arg (v,int));
3611 va_end (v);
3612 return s;
3613}
bec39cab
AC
3614
3615/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3616 function prototypes and stuff, but not '\xHH' hex character constants.
3617 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3618 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3619 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3620 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3621 that's true only with -std. */
bec39cab
AC
3622int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3623
81ecdfbb
RW
3624/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3625 inside strings and character constants. */
3626#define FOO(x) 'x'
3627int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3628
c906108c
SS
3629int test (int i, double x);
3630struct s1 {int (*f) (int a);};
3631struct s2 {int (*f) (double a);};
3632int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3633int argc;
3634char **argv;
bec39cab
AC
3635int
3636main ()
3637{
c906108c 3638return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3639 ;
3640 return 0;
3641}
3642_ACEOF
81ecdfbb
RW
3643for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3644 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3645do
3646 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3647 if ac_fn_c_try_compile "$LINENO"; then :
3648 ac_cv_prog_cc_c89=$ac_arg
c906108c 3649fi
81ecdfbb
RW
3650rm -f core conftest.err conftest.$ac_objext
3651 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3652done
81ecdfbb 3653rm -f conftest.$ac_ext
bec39cab 3654CC=$ac_save_CC
c906108c
SS
3655
3656fi
81ecdfbb
RW
3657# AC_CACHE_VAL
3658case "x$ac_cv_prog_cc_c89" in
3659 x)
3660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3661$as_echo "none needed" >&6; } ;;
3662 xno)
3663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3664$as_echo "unsupported" >&6; } ;;
bec39cab 3665 *)
81ecdfbb
RW
3666 CC="$CC $ac_cv_prog_cc_c89"
3667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3668$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3669esac
81ecdfbb 3670if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3671
b4e70030
JB
3672fi
3673
bec39cab
AC
3674ac_ext=c
3675ac_cpp='$CPP $CPPFLAGS'
3676ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3677ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3678ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3679
3bc3d82a
PA
3680ac_ext=cpp
3681ac_cpp='$CXXCPP $CPPFLAGS'
3682ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3683ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3684ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3685if test -z "$CXX"; then
3686 if test -n "$CCC"; then
3687 CXX=$CCC
3688 else
3689 if test -n "$ac_tool_prefix"; then
3690 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3691 do
3692 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3693set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3695$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3696if ${ac_cv_prog_CXX+:} false; then :
3bc3d82a
PA
3697 $as_echo_n "(cached) " >&6
3698else
3699 if test -n "$CXX"; then
3700 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3701else
3702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3703for as_dir in $PATH
3704do
3705 IFS=$as_save_IFS
3706 test -z "$as_dir" && as_dir=.
3707 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3708 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3709 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3710 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3711 break 2
3712 fi
3713done
3714 done
3715IFS=$as_save_IFS
3716
3717fi
3718fi
3719CXX=$ac_cv_prog_CXX
3720if test -n "$CXX"; then
3721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3722$as_echo "$CXX" >&6; }
3723else
3724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3725$as_echo "no" >&6; }
3726fi
3727
3728
3729 test -n "$CXX" && break
3730 done
3731fi
3732if test -z "$CXX"; then
3733 ac_ct_CXX=$CXX
3734 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3735do
3736 # Extract the first word of "$ac_prog", so it can be a program name with args.
3737set dummy $ac_prog; ac_word=$2
3738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3739$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3740if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3bc3d82a
PA
3741 $as_echo_n "(cached) " >&6
3742else
3743 if test -n "$ac_ct_CXX"; then
3744 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3745else
3746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3747for as_dir in $PATH
3748do
3749 IFS=$as_save_IFS
3750 test -z "$as_dir" && as_dir=.
3751 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3752 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3753 ac_cv_prog_ac_ct_CXX="$ac_prog"
3754 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3755 break 2
3756 fi
3757done
3758 done
3759IFS=$as_save_IFS
3760
3761fi
3762fi
3763ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3764if test -n "$ac_ct_CXX"; then
3765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3766$as_echo "$ac_ct_CXX" >&6; }
3767else
3768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3769$as_echo "no" >&6; }
3770fi
3771
3772
3773 test -n "$ac_ct_CXX" && break
3774done
3775
3776 if test "x$ac_ct_CXX" = x; then
3777 CXX="g++"
3778 else
3779 case $cross_compiling:$ac_tool_warned in
3780yes:)
3781{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3782$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3783ac_tool_warned=yes ;;
3784esac
3785 CXX=$ac_ct_CXX
3786 fi
3787fi
3788
3789 fi
3790fi
3791# Provide some information about the compiler.
3792$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3793set X $ac_compile
3794ac_compiler=$2
3795for ac_option in --version -v -V -qversion; do
3796 { { ac_try="$ac_compiler $ac_option >&5"
3797case "(($ac_try" in
3798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3799 *) ac_try_echo=$ac_try;;
3800esac
3801eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3802$as_echo "$ac_try_echo"; } >&5
3803 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3804 ac_status=$?
3805 if test -s conftest.err; then
3806 sed '10a\
3807... rest of stderr output deleted ...
3808 10q' conftest.err >conftest.er1
3809 cat conftest.er1 >&5
3bc3d82a 3810 fi
d0ac1c44 3811 rm -f conftest.er1 conftest.err
3bc3d82a
PA
3812 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3813 test $ac_status = 0; }
3814done
3815
3816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3817$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
d0ac1c44 3818if ${ac_cv_cxx_compiler_gnu+:} false; then :
3bc3d82a
PA
3819 $as_echo_n "(cached) " >&6
3820else
3821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3822/* end confdefs.h. */
3823
3824int
3825main ()
3826{
3827#ifndef __GNUC__
3828 choke me
3829#endif
3830
3831 ;
3832 return 0;
3833}
3834_ACEOF
3835if ac_fn_cxx_try_compile "$LINENO"; then :
3836 ac_compiler_gnu=yes
3837else
3838 ac_compiler_gnu=no
3839fi
3840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3841ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3842
3843fi
3844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3845$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3846if test $ac_compiler_gnu = yes; then
3847 GXX=yes
3848else
3849 GXX=
3850fi
3851ac_test_CXXFLAGS=${CXXFLAGS+set}
3852ac_save_CXXFLAGS=$CXXFLAGS
3853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3854$as_echo_n "checking whether $CXX accepts -g... " >&6; }
d0ac1c44 3855if ${ac_cv_prog_cxx_g+:} false; then :
3bc3d82a
PA
3856 $as_echo_n "(cached) " >&6
3857else
3858 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3859 ac_cxx_werror_flag=yes
3860 ac_cv_prog_cxx_g=no
3861 CXXFLAGS="-g"
3862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3863/* end confdefs.h. */
3864
3865int
3866main ()
3867{
3868
3869 ;
3870 return 0;
3871}
3872_ACEOF
3873if ac_fn_cxx_try_compile "$LINENO"; then :
3874 ac_cv_prog_cxx_g=yes
3875else
3876 CXXFLAGS=""
3877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3878/* end confdefs.h. */
3879
3880int
3881main ()
3882{
3883
3884 ;
3885 return 0;
3886}
3887_ACEOF
3888if ac_fn_cxx_try_compile "$LINENO"; then :
3889
3890else
3891 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3892 CXXFLAGS="-g"
3893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3894/* end confdefs.h. */
3895
3896int
3897main ()
3898{
3899
3900 ;
3901 return 0;
3902}
3903_ACEOF
3904if ac_fn_cxx_try_compile "$LINENO"; then :
3905 ac_cv_prog_cxx_g=yes
3906fi
3907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3908fi
3909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3910fi
3911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3912 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3913fi
3914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3915$as_echo "$ac_cv_prog_cxx_g" >&6; }
3916if test "$ac_test_CXXFLAGS" = set; then
3917 CXXFLAGS=$ac_save_CXXFLAGS
3918elif test $ac_cv_prog_cxx_g = yes; then
3919 if test "$GXX" = yes; then
3920 CXXFLAGS="-g -O2"
3921 else
3922 CXXFLAGS="-g"
3923 fi
3924else
3925 if test "$GXX" = yes; then
3926 CXXFLAGS="-O2"
3927 else
3928 CXXFLAGS=
3929 fi
3930fi
3931ac_ext=c
3932ac_cpp='$CPP $CPPFLAGS'
3933ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3934ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3935ac_compiler_gnu=$ac_cv_c_compiler_gnu
3936
3937
60ca704f 3938
bec39cab
AC
3939ac_ext=c
3940ac_cpp='$CPP $CPPFLAGS'
3941ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3942ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3943ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3945$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3946# On Suns, sometimes $CPP names a directory.
3947if test -n "$CPP" && test -d "$CPP"; then
3948 CPP=
8bb2c122 3949fi
bec39cab 3950if test -z "$CPP"; then
d0ac1c44 3951 if ${ac_cv_prog_CPP+:} false; then :
81ecdfbb 3952 $as_echo_n "(cached) " >&6
bec39cab
AC
3953else
3954 # Double quotes because CPP needs to be expanded
3955 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3956 do
3957 ac_preproc_ok=false
3958for ac_c_preproc_warn_flag in '' yes
3959do
3960 # Use a header file that comes with gcc, so configuring glibc
3961 # with a fresh cross-compiler works.
3962 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3963 # <limits.h> exists even on freestanding compilers.
3964 # On the NeXT, cc -E runs the code through the compiler's parser,
3965 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3967/* end confdefs.h. */
3968#ifdef __STDC__
3969# include <limits.h>
3970#else
3971# include <assert.h>
3972#endif
3973 Syntax error
3974_ACEOF
81ecdfbb 3975if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3976
81ecdfbb 3977else
bec39cab
AC
3978 # Broken: fails on valid input.
3979continue
3980fi
d0ac1c44 3981rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 3982
81ecdfbb 3983 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3984 # can be detected and how.
81ecdfbb 3985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3986/* end confdefs.h. */
3987#include <ac_nonexistent.h>
3988_ACEOF
81ecdfbb 3989if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3990 # Broken: success on invalid input.
3991continue
8bb2c122 3992else
bec39cab
AC
3993 # Passes both tests.
3994ac_preproc_ok=:
3995break
8bb2c122 3996fi
d0ac1c44 3997rm -f conftest.err conftest.i conftest.$ac_ext
8bb2c122 3998
bec39cab
AC
3999done
4000# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4001rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb 4002if $ac_preproc_ok; then :
bec39cab
AC
4003 break
4004fi
8bb2c122 4005
bec39cab
AC
4006 done
4007 ac_cv_prog_CPP=$CPP
ddc9cd0f 4008
c906108c 4009fi
bec39cab
AC
4010 CPP=$ac_cv_prog_CPP
4011else
4012 ac_cv_prog_CPP=$CPP
c906108c 4013fi
81ecdfbb
RW
4014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4015$as_echo "$CPP" >&6; }
bec39cab
AC
4016ac_preproc_ok=false
4017for ac_c_preproc_warn_flag in '' yes
4018do
4019 # Use a header file that comes with gcc, so configuring glibc
4020 # with a fresh cross-compiler works.
4021 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4022 # <limits.h> exists even on freestanding compilers.
4023 # On the NeXT, cc -E runs the code through the compiler's parser,
4024 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4026/* end confdefs.h. */
4027#ifdef __STDC__
4028# include <limits.h>
4029#else
4030# include <assert.h>
4031#endif
4032 Syntax error
4033_ACEOF
81ecdfbb 4034if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4035
81ecdfbb 4036else
bec39cab
AC
4037 # Broken: fails on valid input.
4038continue
4039fi
d0ac1c44 4040rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4041
81ecdfbb 4042 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4043 # can be detected and how.
81ecdfbb 4044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4045/* end confdefs.h. */
4046#include <ac_nonexistent.h>
4047_ACEOF
81ecdfbb 4048if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4049 # Broken: success on invalid input.
4050continue
c906108c 4051else
bec39cab
AC
4052 # Passes both tests.
4053ac_preproc_ok=:
4054break
c906108c 4055fi
d0ac1c44 4056rm -f conftest.err conftest.i conftest.$ac_ext
c906108c 4057
bec39cab
AC
4058done
4059# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4060rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb
RW
4061if $ac_preproc_ok; then :
4062
c906108c 4063else
81ecdfbb
RW
4064 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4065$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4066as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4067See \`config.log' for more details" "$LINENO" 5; }
c906108c 4068fi
c906108c 4069
bec39cab
AC
4070ac_ext=c
4071ac_cpp='$CPP $CPPFLAGS'
4072ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4073ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4074ac_compiler_gnu=$ac_cv_c_compiler_gnu
4075
4076
81ecdfbb
RW
4077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4078$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 4079if ${ac_cv_path_GREP+:} false; then :
81ecdfbb 4080 $as_echo_n "(cached) " >&6
4e8d927d 4081else
81ecdfbb
RW
4082 if test -z "$GREP"; then
4083 ac_path_GREP_found=false
4084 # Loop through the user's path and test for each of PROGNAME-LIST
4085 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4086for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4087do
4088 IFS=$as_save_IFS
4089 test -z "$as_dir" && as_dir=.
4090 for ac_prog in grep ggrep; do
4091 for ac_exec_ext in '' $ac_executable_extensions; do
4092 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4093 as_fn_executable_p "$ac_path_GREP" || continue
81ecdfbb
RW
4094# Check for GNU ac_path_GREP and select it if it is found.
4095 # Check for GNU $ac_path_GREP
4096case `"$ac_path_GREP" --version 2>&1` in
4097*GNU*)
4098 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4099*)
4100 ac_count=0
4101 $as_echo_n 0123456789 >"conftest.in"
4102 while :
4103 do
4104 cat "conftest.in" "conftest.in" >"conftest.tmp"
4105 mv "conftest.tmp" "conftest.in"
4106 cp "conftest.in" "conftest.nl"
4107 $as_echo 'GREP' >> "conftest.nl"
4108 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4109 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4110 as_fn_arith $ac_count + 1 && ac_count=$as_val
4111 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4112 # Best one so far, save it but keep looking for a better one
4113 ac_cv_path_GREP="$ac_path_GREP"
4114 ac_path_GREP_max=$ac_count
bec39cab 4115 fi
81ecdfbb
RW
4116 # 10*(2^10) chars as input seems more than enough
4117 test $ac_count -gt 10 && break
4118 done
4119 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4120esac
bec39cab 4121
81ecdfbb
RW
4122 $ac_path_GREP_found && break 3
4123 done
4124 done
4125 done
4126IFS=$as_save_IFS
4127 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 4128 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
81ecdfbb 4129 fi
c906108c 4130else
81ecdfbb 4131 ac_cv_path_GREP=$GREP
c906108c 4132fi
c906108c 4133
81ecdfbb
RW
4134fi
4135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4136$as_echo "$ac_cv_path_GREP" >&6; }
4137 GREP="$ac_cv_path_GREP"
c906108c 4138
c906108c 4139
81ecdfbb
RW
4140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4141$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 4142if ${ac_cv_path_EGREP+:} false; then :
81ecdfbb 4143 $as_echo_n "(cached) " >&6
783e057b 4144else
81ecdfbb
RW
4145 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4146 then ac_cv_path_EGREP="$GREP -E"
4147 else
4148 if test -z "$EGREP"; then
4149 ac_path_EGREP_found=false
4150 # Loop through the user's path and test for each of PROGNAME-LIST
4151 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4152for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4153do
4154 IFS=$as_save_IFS
4155 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4156 for ac_prog in egrep; do
4157 for ac_exec_ext in '' $ac_executable_extensions; do
4158 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4159 as_fn_executable_p "$ac_path_EGREP" || continue
81ecdfbb
RW
4160# Check for GNU ac_path_EGREP and select it if it is found.
4161 # Check for GNU $ac_path_EGREP
4162case `"$ac_path_EGREP" --version 2>&1` in
4163*GNU*)
4164 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4165*)
4166 ac_count=0
4167 $as_echo_n 0123456789 >"conftest.in"
4168 while :
4169 do
4170 cat "conftest.in" "conftest.in" >"conftest.tmp"
4171 mv "conftest.tmp" "conftest.in"
4172 cp "conftest.in" "conftest.nl"
4173 $as_echo 'EGREP' >> "conftest.nl"
4174 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4175 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4176 as_fn_arith $ac_count + 1 && ac_count=$as_val
4177 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4178 # Best one so far, save it but keep looking for a better one
4179 ac_cv_path_EGREP="$ac_path_EGREP"
4180 ac_path_EGREP_max=$ac_count
4181 fi
4182 # 10*(2^10) chars as input seems more than enough
4183 test $ac_count -gt 10 && break
4184 done
4185 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4186esac
bec39cab 4187
81ecdfbb
RW
4188 $ac_path_EGREP_found && break 3
4189 done
4190 done
4191 done
4192IFS=$as_save_IFS
4193 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4194 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4195 fi
783e057b 4196else
81ecdfbb 4197 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4198fi
4199
81ecdfbb 4200 fi
783e057b 4201fi
81ecdfbb
RW
4202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4203$as_echo "$ac_cv_path_EGREP" >&6; }
4204 EGREP="$ac_cv_path_EGREP"
4205
783e057b 4206
81ecdfbb
RW
4207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4208$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4209if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 4210 $as_echo_n "(cached) " >&6
783e057b 4211else
81ecdfbb 4212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4213/* end confdefs.h. */
783e057b 4214#include <stdlib.h>
bec39cab 4215#include <stdarg.h>
783e057b
DJ
4216#include <string.h>
4217#include <float.h>
c906108c 4218
bec39cab
AC
4219int
4220main ()
4221{
c906108c 4222
bec39cab
AC
4223 ;
4224 return 0;
4225}
4226_ACEOF
81ecdfbb 4227if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4228 ac_cv_header_stdc=yes
c906108c 4229else
81ecdfbb 4230 ac_cv_header_stdc=no
c906108c 4231fi
81ecdfbb 4232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4233
783e057b
DJ
4234if test $ac_cv_header_stdc = yes; then
4235 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4237/* end confdefs.h. */
4238#include <string.h>
c906108c 4239
783e057b
DJ
4240_ACEOF
4241if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4242 $EGREP "memchr" >/dev/null 2>&1; then :
4243
c906108c 4244else
783e057b 4245 ac_cv_header_stdc=no
c906108c 4246fi
783e057b 4247rm -f conftest*
c906108c
SS
4248
4249fi
4250
783e057b
DJ
4251if test $ac_cv_header_stdc = yes; then
4252 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4254/* end confdefs.h. */
4255#include <stdlib.h>
bec39cab 4256
783e057b
DJ
4257_ACEOF
4258if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4259 $EGREP "free" >/dev/null 2>&1; then :
4260
bec39cab 4261else
783e057b 4262 ac_cv_header_stdc=no
bec39cab 4263fi
783e057b 4264rm -f conftest*
bec39cab
AC
4265
4266fi
bec39cab 4267
783e057b
DJ
4268if test $ac_cv_header_stdc = yes; then
4269 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4270 if test "$cross_compiling" = yes; then :
783e057b 4271 :
bec39cab 4272else
81ecdfbb 4273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4274/* end confdefs.h. */
4275#include <ctype.h>
81ecdfbb 4276#include <stdlib.h>
783e057b
DJ
4277#if ((' ' & 0x0FF) == 0x020)
4278# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4279# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4280#else
4281# define ISLOWER(c) \
4282 (('a' <= (c) && (c) <= 'i') \
4283 || ('j' <= (c) && (c) <= 'r') \
4284 || ('s' <= (c) && (c) <= 'z'))
4285# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4286#endif
4287
4288#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4289int
4290main ()
4291{
4292 int i;
4293 for (i = 0; i < 256; i++)
4294 if (XOR (islower (i), ISLOWER (i))
4295 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4296 return 2;
4297 return 0;
783e057b
DJ
4298}
4299_ACEOF
81ecdfbb 4300if ac_fn_c_try_run "$LINENO"; then :
783e057b 4301
81ecdfbb
RW
4302else
4303 ac_cv_header_stdc=no
783e057b 4304fi
81ecdfbb
RW
4305rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4306 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4307fi
81ecdfbb 4308
783e057b
DJ
4309fi
4310fi
81ecdfbb
RW
4311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4312$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4313if test $ac_cv_header_stdc = yes; then
4314
81ecdfbb 4315$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4316
4317fi
4318
4319# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4320for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4321 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4322do :
4323 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4324ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4325"
d0ac1c44 4326if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
783e057b 4327 cat >>confdefs.h <<_ACEOF
81ecdfbb 4328#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4329_ACEOF
4330
4331fi
4332
4333done
4334
4335
4336
81ecdfbb 4337 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4338if test "x$ac_cv_header_minix_config_h" = xyes; then :
783e057b
DJ
4339 MINIX=yes
4340else
4341 MINIX=
4342fi
4343
4344
4345 if test "$MINIX" = yes; then
4346
81ecdfbb 4347$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4348
4349
81ecdfbb 4350$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4351
4352
81ecdfbb 4353$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4354
4355 fi
4356
4357
81ecdfbb
RW
4358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4359$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4360if ${ac_cv_safe_to_define___extensions__+:} false; then :
81ecdfbb 4361 $as_echo_n "(cached) " >&6
783e057b 4362else
81ecdfbb 4363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4364/* end confdefs.h. */
4365
d0ac1c44
SM
4366# define __EXTENSIONS__ 1
4367 $ac_includes_default
783e057b
DJ
4368int
4369main ()
4370{
4371
4372 ;
4373 return 0;
4374}
4375_ACEOF
81ecdfbb 4376if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4377 ac_cv_safe_to_define___extensions__=yes
4378else
81ecdfbb 4379 ac_cv_safe_to_define___extensions__=no
783e057b 4380fi
81ecdfbb 4381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4382fi
81ecdfbb
RW
4383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4384$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4385 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4386 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4387
81ecdfbb 4388 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4389
81ecdfbb 4390 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4391
81ecdfbb 4392 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4393
81ecdfbb 4394 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4395
4396
c971b7fa
PA
4397ac_aux_dir=
4398for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
d0ac1c44
SM
4399 if test -f "$ac_dir/install-sh"; then
4400 ac_aux_dir=$ac_dir
4401 ac_install_sh="$ac_aux_dir/install-sh -c"
4402 break
4403 elif test -f "$ac_dir/install.sh"; then
4404 ac_aux_dir=$ac_dir
4405 ac_install_sh="$ac_aux_dir/install.sh -c"
4406 break
4407 elif test -f "$ac_dir/shtool"; then
4408 ac_aux_dir=$ac_dir
4409 ac_install_sh="$ac_aux_dir/shtool install -c"
4410 break
4411 fi
c971b7fa
PA
4412done
4413if test -z "$ac_aux_dir"; then
d0ac1c44 4414 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
c971b7fa 4415fi
770d76d7 4416
c971b7fa
PA
4417# These three variables are undocumented and unsupported,
4418# and are intended to be withdrawn in a future Autoconf release.
4419# They can cause serious problems if a builder's source tree is in a directory
4420# whose full name contains unusual characters.
4421ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4422ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4423ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4424
770d76d7 4425
c971b7fa
PA
4426# Make sure we can run config.sub.
4427$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 4428 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4429
c971b7fa
PA
4430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4431$as_echo_n "checking build system type... " >&6; }
d0ac1c44 4432if ${ac_cv_build+:} false; then :
c971b7fa 4433 $as_echo_n "(cached) " >&6
770d76d7 4434else
c971b7fa
PA
4435 ac_build_alias=$build_alias
4436test "x$ac_build_alias" = x &&
4437 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4438test "x$ac_build_alias" = x &&
d0ac1c44 4439 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
c971b7fa 4440ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 4441 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
c971b7fa 4442
770d76d7 4443fi
c971b7fa
PA
4444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4445$as_echo "$ac_cv_build" >&6; }
4446case $ac_cv_build in
4447*-*-*) ;;
d0ac1c44 4448*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4449esac
c971b7fa
PA
4450build=$ac_cv_build
4451ac_save_IFS=$IFS; IFS='-'
4452set x $ac_cv_build
4453shift
4454build_cpu=$1
4455build_vendor=$2
4456shift; shift
4457# Remember, the first character of IFS is used to create $*,
4458# except with old shells:
4459build_os=$*
4460IFS=$ac_save_IFS
4461case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4462
4463
c971b7fa
PA
4464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4465$as_echo_n "checking host system type... " >&6; }
d0ac1c44 4466if ${ac_cv_host+:} false; then :
81ecdfbb
RW
4467 $as_echo_n "(cached) " >&6
4468else
c971b7fa
PA
4469 if test "x$host_alias" = x; then
4470 ac_cv_host=$ac_cv_build
81ecdfbb 4471else
c971b7fa 4472 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 4473 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4474fi
81ecdfbb
RW
4475
4476fi
c971b7fa
PA
4477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4478$as_echo "$ac_cv_host" >&6; }
4479case $ac_cv_host in
4480*-*-*) ;;
d0ac1c44 4481*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4482esac
c971b7fa
PA
4483host=$ac_cv_host
4484ac_save_IFS=$IFS; IFS='-'
4485set x $ac_cv_host
4486shift
4487host_cpu=$1
4488host_vendor=$2
4489shift; shift
4490# Remember, the first character of IFS is used to create $*,
4491# except with old shells:
4492host_os=$*
4493IFS=$ac_save_IFS
4494case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4495
4496
4497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4498$as_echo_n "checking target system type... " >&6; }
d0ac1c44 4499if ${ac_cv_target+:} false; then :
3388710e
JM
4500 $as_echo_n "(cached) " >&6
4501else
4502 if test "x$target_alias" = x; then
4503 ac_cv_target=$ac_cv_host
4504else
4505 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
d0ac1c44 4506 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
3388710e
JM
4507fi
4508
4509fi
4510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4511$as_echo "$ac_cv_target" >&6; }
4512case $ac_cv_target in
4513*-*-*) ;;
d0ac1c44 4514*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
3388710e
JM
4515esac
4516target=$ac_cv_target
4517ac_save_IFS=$IFS; IFS='-'
4518set x $ac_cv_target
4519shift
4520target_cpu=$1
4521target_vendor=$2
4522shift; shift
4523# Remember, the first character of IFS is used to create $*,
4524# except with old shells:
4525target_os=$*
4526IFS=$ac_save_IFS
4527case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4528
4529
4530# The aliases save the names the user supplied, while $host etc.
4531# will get canonicalized.
4532test -n "$target_alias" &&
4533 test "$program_prefix$program_suffix$program_transform_name" = \
4534 NONENONEs,x,x, &&
4535 program_prefix=${target_alias}-
4536
4537# The tests for host and target for $enable_largefile require
4538# canonical names.
4539
4540
81ecdfbb 4541
da2f07f1
JK
4542# As the $enable_largefile decision depends on --enable-plugins we must set it
4543# even in directories otherwise not depending on the $plugins option.
4544
4545
2974be62
AM
4546 maybe_plugins=no
4547 for ac_header in dlfcn.h
4548do :
4549 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4550"
d0ac1c44 4551if test "x$ac_cv_header_dlfcn_h" = xyes; then :
2974be62
AM
4552 cat >>confdefs.h <<_ACEOF
4553#define HAVE_DLFCN_H 1
4554_ACEOF
4555 maybe_plugins=yes
4556fi
4557
4558done
4559
4560 for ac_header in windows.h
4561do :
4562 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4563"
d0ac1c44 4564if test "x$ac_cv_header_windows_h" = xyes; then :
2974be62
AM
4565 cat >>confdefs.h <<_ACEOF
4566#define HAVE_WINDOWS_H 1
4567_ACEOF
4568 maybe_plugins=yes
4569fi
4570
4571done
4572
4573
4574 # Check whether --enable-plugins was given.
da2f07f1
JK
4575if test "${enable_plugins+set}" = set; then :
4576 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4577 no) plugins=no ;;
4578 *) plugins=yes
4579 if test "$maybe_plugins" != "yes" ; then
d0ac1c44 4580 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
2974be62
AM
4581 fi ;;
4582 esac
da2f07f1 4583else
2974be62
AM
4584 plugins=$maybe_plugins
4585
da2f07f1
JK
4586fi
4587
2974be62 4588 if test "$plugins" = "yes"; then
458412c3
TT
4589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4590$as_echo_n "checking for library containing dlsym... " >&6; }
d0ac1c44 4591if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4592 $as_echo_n "(cached) " >&6
4593else
4594 ac_func_search_save_LIBS=$LIBS
4595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4596/* end confdefs.h. */
4597
4598/* Override any GCC internal prototype to avoid an error.
4599 Use char because int might match the return type of a GCC
4600 builtin and then its argument prototype would still apply. */
4601#ifdef __cplusplus
4602extern "C"
4603#endif
458412c3 4604char dlsym ();
2974be62
AM
4605int
4606main ()
4607{
458412c3 4608return dlsym ();
2974be62
AM
4609 ;
4610 return 0;
4611}
4612_ACEOF
4613for ac_lib in '' dl; do
4614 if test -z "$ac_lib"; then
4615 ac_res="none required"
4616 else
4617 ac_res=-l$ac_lib
4618 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4619 fi
4620 if ac_fn_c_try_link "$LINENO"; then :
458412c3 4621 ac_cv_search_dlsym=$ac_res
2974be62
AM
4622fi
4623rm -f core conftest.err conftest.$ac_objext \
4624 conftest$ac_exeext
d0ac1c44 4625 if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4626 break
4627fi
4628done
d0ac1c44 4629if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4630
4631else
458412c3 4632 ac_cv_search_dlsym=no
2974be62
AM
4633fi
4634rm conftest.$ac_ext
4635LIBS=$ac_func_search_save_LIBS
4636fi
458412c3
TT
4637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4638$as_echo "$ac_cv_search_dlsym" >&6; }
4639ac_res=$ac_cv_search_dlsym
2974be62
AM
4640if test "$ac_res" != no; then :
4641 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4642
4643fi
4644
4645 fi
da2f07f1
JK
4646
4647
4648case "${host}" in
4649 sparc-*-solaris*|i[3-7]86-*-solaris*)
4650 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4651 # are mutually exclusive; and without procfs support, the bfd/ elf module
4652 # cannot provide certain routines such as elfcore_write_prpsinfo
4653 # or elfcore_write_prstatus. So unless the user explicitly requested
4654 # large-file support through the --enable-largefile switch, disable
4655 # large-file support in favor of procfs support.
4656 test "${target}" = "${host}" -a "x$plugins" = xno \
4657 && : ${enable_largefile="no"}
4658 ;;
4659esac
4660
4661# Check whether --enable-largefile was given.
4662if test "${enable_largefile+set}" = set; then :
4663 enableval=$enable_largefile;
4664fi
4665
4666if test "$enable_largefile" != no; then
4667
4668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4669$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 4670if ${ac_cv_sys_largefile_CC+:} false; then :
da2f07f1
JK
4671 $as_echo_n "(cached) " >&6
4672else
4673 ac_cv_sys_largefile_CC=no
4674 if test "$GCC" != yes; then
4675 ac_save_CC=$CC
4676 while :; do
4677 # IRIX 6.2 and later do not support large files by default,
4678 # so use the C compiler's -n32 option if that helps.
4679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4680/* end confdefs.h. */
4681#include <sys/types.h>
4682 /* Check that off_t can represent 2**63 - 1 correctly.
4683 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4684 since some C++ compilers masquerading as C compilers
4685 incorrectly reject 9223372036854775807. */
4686#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4687 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4688 && LARGE_OFF_T % 2147483647 == 1)
4689 ? 1 : -1];
4690int
4691main ()
4692{
4693
4694 ;
4695 return 0;
4696}
4697_ACEOF
4698 if ac_fn_c_try_compile "$LINENO"; then :
4699 break
4700fi
4701rm -f core conftest.err conftest.$ac_objext
4702 CC="$CC -n32"
4703 if ac_fn_c_try_compile "$LINENO"; then :
4704 ac_cv_sys_largefile_CC=' -n32'; break
4705fi
4706rm -f core conftest.err conftest.$ac_objext
4707 break
4708 done
4709 CC=$ac_save_CC
4710 rm -f conftest.$ac_ext
4711 fi
4712fi
4713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4714$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4715 if test "$ac_cv_sys_largefile_CC" != no; then
4716 CC=$CC$ac_cv_sys_largefile_CC
4717 fi
4718
4719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4720$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 4721if ${ac_cv_sys_file_offset_bits+:} false; then :
da2f07f1
JK
4722 $as_echo_n "(cached) " >&6
4723else
4724 while :; do
4725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4726/* end confdefs.h. */
4727#include <sys/types.h>
4728 /* Check that off_t can represent 2**63 - 1 correctly.
4729 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4730 since some C++ compilers masquerading as C compilers
4731 incorrectly reject 9223372036854775807. */
4732#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4733 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4734 && LARGE_OFF_T % 2147483647 == 1)
4735 ? 1 : -1];
4736int
4737main ()
4738{
4739
4740 ;
4741 return 0;
4742}
4743_ACEOF
4744if ac_fn_c_try_compile "$LINENO"; then :
4745 ac_cv_sys_file_offset_bits=no; break
4746fi
4747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4749/* end confdefs.h. */
4750#define _FILE_OFFSET_BITS 64
4751#include <sys/types.h>
4752 /* Check that off_t can represent 2**63 - 1 correctly.
4753 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4754 since some C++ compilers masquerading as C compilers
4755 incorrectly reject 9223372036854775807. */
4756#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4757 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4758 && LARGE_OFF_T % 2147483647 == 1)
4759 ? 1 : -1];
4760int
4761main ()
4762{
4763
4764 ;
4765 return 0;
4766}
4767_ACEOF
4768if ac_fn_c_try_compile "$LINENO"; then :
4769 ac_cv_sys_file_offset_bits=64; break
4770fi
4771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4772 ac_cv_sys_file_offset_bits=unknown
4773 break
4774done
4775fi
4776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4777$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4778case $ac_cv_sys_file_offset_bits in #(
4779 no | unknown) ;;
4780 *)
4781cat >>confdefs.h <<_ACEOF
4782#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4783_ACEOF
4784;;
4785esac
4786rm -rf conftest*
4787 if test $ac_cv_sys_file_offset_bits = unknown; then
4788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4789$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 4790if ${ac_cv_sys_large_files+:} false; then :
da2f07f1
JK
4791 $as_echo_n "(cached) " >&6
4792else
4793 while :; do
4794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4795/* end confdefs.h. */
4796#include <sys/types.h>
4797 /* Check that off_t can represent 2**63 - 1 correctly.
4798 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4799 since some C++ compilers masquerading as C compilers
4800 incorrectly reject 9223372036854775807. */
4801#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4802 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4803 && LARGE_OFF_T % 2147483647 == 1)
4804 ? 1 : -1];
4805int
4806main ()
4807{
4808
4809 ;
4810 return 0;
4811}
4812_ACEOF
4813if ac_fn_c_try_compile "$LINENO"; then :
4814 ac_cv_sys_large_files=no; break
4815fi
4816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4818/* end confdefs.h. */
4819#define _LARGE_FILES 1
4820#include <sys/types.h>
4821 /* Check that off_t can represent 2**63 - 1 correctly.
4822 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4823 since some C++ compilers masquerading as C compilers
4824 incorrectly reject 9223372036854775807. */
4825#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4826 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4827 && LARGE_OFF_T % 2147483647 == 1)
4828 ? 1 : -1];
4829int
4830main ()
4831{
4832
4833 ;
4834 return 0;
4835}
4836_ACEOF
4837if ac_fn_c_try_compile "$LINENO"; then :
4838 ac_cv_sys_large_files=1; break
4839fi
4840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4841 ac_cv_sys_large_files=unknown
4842 break
4843done
4844fi
4845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4846$as_echo "$ac_cv_sys_large_files" >&6; }
4847case $ac_cv_sys_large_files in #(
4848 no | unknown) ;;
4849 *)
4850cat >>confdefs.h <<_ACEOF
4851#define _LARGE_FILES $ac_cv_sys_large_files
4852_ACEOF
4853;;
4854esac
4855rm -rf conftest*
4856 fi
d0ac1c44
SM
4857
4858
da2f07f1
JK
4859fi
4860
4861
4862
81ecdfbb
RW
4863
4864
4865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4866$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
d0ac1c44 4867if ${am_cv_prog_cc_stdc+:} false; then :
81ecdfbb
RW
4868 $as_echo_n "(cached) " >&6
4869else
4870 am_cv_prog_cc_stdc=no
4871ac_save_CC="$CC"
4872# Don't try gcc -ansi; that turns off useful extensions and
4873# breaks some systems' header files.
4874# AIX -qlanglvl=ansi
4875# Ultrix and OSF/1 -std1
4876# HP-UX 10.20 and later -Ae
4877# HP-UX older versions -Aa -D_HPUX_SOURCE
4878# SVR4 -Xc -D__EXTENSIONS__
4879for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4880do
783e057b 4881 CC="$ac_save_CC $ac_arg"
81ecdfbb 4882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4883/* end confdefs.h. */
4884#include <stdarg.h>
4885#include <stdio.h>
4886#include <sys/types.h>
4887#include <sys/stat.h>
4888/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4889struct buf { int x; };
4890FILE * (*rcsopen) (struct buf *, struct stat *, int);
4891static char *e (p, i)
4892 char **p;
4893 int i;
4894{
4895 return p[i];
4896}
4897static char *f (char * (*g) (char **, int), char **p, ...)
4898{
4899 char *s;
4900 va_list v;
4901 va_start (v,p);
4902 s = g (p, va_arg (v,int));
4903 va_end (v);
4904 return s;
4905}
4906int test (int i, double x);
4907struct s1 {int (*f) (int a);};
4908struct s2 {int (*f) (double a);};
4909int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4910int argc;
4911char **argv;
4912
4913int
4914main ()
4915{
4916
4917return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4918
4919 ;
4920 return 0;
4921}
4922_ACEOF
81ecdfbb 4923if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4924 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4925fi
81ecdfbb 4926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4927done
4928CC="$ac_save_CC"
4929
4930fi
4931
4932if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4934$as_echo "none needed" >&6; }
783e057b 4935else
81ecdfbb
RW
4936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4937$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4938fi
4939case "x$am_cv_prog_cc_stdc" in
4940 x|xno) ;;
4941 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4942esac
4943
d0ac1c44
SM
4944# Expand $ac_aux_dir to an absolute path.
4945am_aux_dir=`cd "$ac_aux_dir" && pwd`
4869db5e 4946
d0ac1c44 4947if test x"${install_sh+set}" != xset; then
4869db5e
RM
4948 case $am_aux_dir in
4949 *\ * | *\ *)
4950 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4951 *)
4952 install_sh="\${SHELL} $am_aux_dir/install-sh"
4953 esac
4954fi
4955
d0ac1c44
SM
4956# Installed binaries are usually stripped using 'strip' when the user
4957# run "make install-strip". However 'strip' might not be the right
4869db5e 4958# tool to use in cross-compilation environments, therefore Automake
d0ac1c44 4959# will honor the 'STRIP' environment variable to overrule this program.
4869db5e
RM
4960if test "$cross_compiling" != no; then
4961 if test -n "$ac_tool_prefix"; then
4962 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4963set dummy ${ac_tool_prefix}strip; ac_word=$2
4964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4965$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4966if ${ac_cv_prog_STRIP+:} false; then :
4869db5e
RM
4967 $as_echo_n "(cached) " >&6
4968else
4969 if test -n "$STRIP"; then
4970 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4971else
4972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4973for as_dir in $PATH
4974do
4975 IFS=$as_save_IFS
4976 test -z "$as_dir" && as_dir=.
4977 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4978 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
4979 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4980 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4981 break 2
4982 fi
4983done
4984 done
4985IFS=$as_save_IFS
4986
4987fi
4988fi
4989STRIP=$ac_cv_prog_STRIP
4990if test -n "$STRIP"; then
4991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4992$as_echo "$STRIP" >&6; }
4993else
4994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4995$as_echo "no" >&6; }
4996fi
4997
4998
4999fi
5000if test -z "$ac_cv_prog_STRIP"; then
5001 ac_ct_STRIP=$STRIP
5002 # Extract the first word of "strip", so it can be a program name with args.
5003set dummy strip; ac_word=$2
5004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5005$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5006if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4869db5e
RM
5007 $as_echo_n "(cached) " >&6
5008else
5009 if test -n "$ac_ct_STRIP"; then
5010 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5011else
5012as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5013for as_dir in $PATH
5014do
5015 IFS=$as_save_IFS
5016 test -z "$as_dir" && as_dir=.
5017 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5018 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5019 ac_cv_prog_ac_ct_STRIP="strip"
5020 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5021 break 2
5022 fi
5023done
5024 done
5025IFS=$as_save_IFS
5026
5027fi
5028fi
5029ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5030if test -n "$ac_ct_STRIP"; then
5031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5032$as_echo "$ac_ct_STRIP" >&6; }
5033else
5034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5035$as_echo "no" >&6; }
5036fi
5037
5038 if test "x$ac_ct_STRIP" = x; then
5039 STRIP=":"
5040 else
5041 case $cross_compiling:$ac_tool_warned in
5042yes:)
5043{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5044$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5045ac_tool_warned=yes ;;
5046esac
5047 STRIP=$ac_ct_STRIP
5048 fi
5049else
5050 STRIP="$ac_cv_prog_STRIP"
5051fi
5052
5053fi
5054INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5055
783e057b
DJ
5056
5057ac_aux_dir=
81ecdfbb 5058for ac_dir in .. "$srcdir"/..; do
d0ac1c44
SM
5059 if test -f "$ac_dir/install-sh"; then
5060 ac_aux_dir=$ac_dir
5061 ac_install_sh="$ac_aux_dir/install-sh -c"
5062 break
5063 elif test -f "$ac_dir/install.sh"; then
5064 ac_aux_dir=$ac_dir
5065 ac_install_sh="$ac_aux_dir/install.sh -c"
5066 break
5067 elif test -f "$ac_dir/shtool"; then
5068 ac_aux_dir=$ac_dir
5069 ac_install_sh="$ac_aux_dir/shtool install -c"
5070 break
5071 fi
783e057b
DJ
5072done
5073if test -z "$ac_aux_dir"; then
d0ac1c44 5074 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 5075fi
81ecdfbb
RW
5076
5077# These three variables are undocumented and unsupported,
5078# and are intended to be withdrawn in a future Autoconf release.
5079# They can cause serious problems if a builder's source tree is in a directory
5080# whose full name contains unusual characters.
5081ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5082ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5083ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5084
783e057b 5085
783e057b 5086
9009e1ae
MR
5087test "$program_prefix" != NONE &&
5088 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5089# Use a double $ so make ignores it.
5090test "$program_suffix" != NONE &&
5091 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5092# Double any \ or $.
5093# By default was `s,x,x', remove it if useless.
5094ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5095program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5096
81ecdfbb 5097
0bcda685
PA
5098# We require a C++11 compiler. Check if one is available, and if
5099# necessary, set CXX_DIALECT to some -std=xxx switch.
5100
41260ac2 5101 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
0bcda685
PA
5102 ac_ext=cpp
5103ac_cpp='$CXXCPP $CPPFLAGS'
5104ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5105ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5106ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5107 CXX_DIALECT=""
5108 ac_success=no
5109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5110$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
d0ac1c44 5111if ${ax_cv_cxx_compile_cxx11+:} false; then :
0bcda685
PA
5112 $as_echo_n "(cached) " >&6
5113else
5114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5115/* end confdefs.h. */
5116
5117
5118// If the compiler admits that it is not ready for C++11, why torture it?
5119// Hopefully, this will speed up the test.
5120
5121#ifndef __cplusplus
5122
5123#error "This is not a C++ compiler"
5124
5125#elif __cplusplus < 201103L
5126
5127#error "This is not a C++11 compiler"
5128
5129#else
5130
5131namespace cxx11
5132{
5133
5134 namespace test_static_assert
5135 {
5136
5137 template <typename T>
5138 struct check
5139 {
5140 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5141 };
5142
5143 }
5144
5145 namespace test_final_override
5146 {
5147
5148 struct Base
5149 {
5150 virtual void f() {}
5151 };
5152
5153 struct Derived : public Base
5154 {
5155 virtual void f() override {}
5156 };
5157
5158 }
5159
5160 namespace test_double_right_angle_brackets
5161 {
5162
5163 template < typename T >
5164 struct check {};
5165
5166 typedef check<void> single_type;
5167 typedef check<check<void>> double_type;
5168 typedef check<check<check<void>>> triple_type;
5169 typedef check<check<check<check<void>>>> quadruple_type;
5170
5171 }
5172
5173 namespace test_decltype
5174 {
5175
5176 int
5177 f()
5178 {
5179 int a = 1;
5180 decltype(a) b = 2;
5181 return a + b;
5182 }
5183
5184 }
5185
5186 namespace test_type_deduction
5187 {
5188
5189 template < typename T1, typename T2 >
5190 struct is_same
5191 {
5192 static const bool value = false;
5193 };
5194
5195 template < typename T >
5196 struct is_same<T, T>
5197 {
5198 static const bool value = true;
5199 };
5200
5201 template < typename T1, typename T2 >
5202 auto
5203 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5204 {
5205 return a1 + a2;
5206 }
5207
5208 int
5209 test(const int c, volatile int v)
5210 {
5211 static_assert(is_same<int, decltype(0)>::value == true, "");
5212 static_assert(is_same<int, decltype(c)>::value == false, "");
5213 static_assert(is_same<int, decltype(v)>::value == false, "");
5214 auto ac = c;
5215 auto av = v;
5216 auto sumi = ac + av + 'x';
5217 auto sumf = ac + av + 1.0;
5218 static_assert(is_same<int, decltype(ac)>::value == true, "");
5219 static_assert(is_same<int, decltype(av)>::value == true, "");
5220 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5221 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5222 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5223 return (sumf > 0.0) ? sumi : add(c, v);
5224 }
5225
5226 }
5227
5228 namespace test_noexcept
5229 {
5230
5231 int f() { return 0; }
5232 int g() noexcept { return 0; }
5233
5234 static_assert(noexcept(f()) == false, "");
5235 static_assert(noexcept(g()) == true, "");
5236
5237 }
5238
5239 namespace test_constexpr
5240 {
5241
5242 template < typename CharT >
5243 unsigned long constexpr
5244 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5245 {
5246 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5247 }
5248
5249 template < typename CharT >
5250 unsigned long constexpr
5251 strlen_c(const CharT *const s) noexcept
5252 {
5253 return strlen_c_r(s, 0UL);
5254 }
5255
5256 static_assert(strlen_c("") == 0UL, "");
5257 static_assert(strlen_c("1") == 1UL, "");
5258 static_assert(strlen_c("example") == 7UL, "");
5259 static_assert(strlen_c("another\0example") == 7UL, "");
5260
5261 }
5262
5263 namespace test_rvalue_references
5264 {
5265
5266 template < int N >
5267 struct answer
5268 {
5269 static constexpr int value = N;
5270 };
5271
5272 answer<1> f(int&) { return answer<1>(); }
5273 answer<2> f(const int&) { return answer<2>(); }
5274 answer<3> f(int&&) { return answer<3>(); }
5275
5276 void
5277 test()
5278 {
5279 int i = 0;
5280 const int c = 0;
5281 static_assert(decltype(f(i))::value == 1, "");
5282 static_assert(decltype(f(c))::value == 2, "");
5283 static_assert(decltype(f(0))::value == 3, "");
5284 }
5285
5286 }
5287
5288 namespace test_uniform_initialization
5289 {
5290
5291 struct test
5292 {
5293 static const int zero {};
5294 static const int one {1};
5295 };
5296
5297 static_assert(test::zero == 0, "");
5298 static_assert(test::one == 1, "");
5299
5300 }
5301
5302 namespace test_lambdas
5303 {
5304
5305 void
5306 test1()
5307 {
5308 auto lambda1 = [](){};
5309 auto lambda2 = lambda1;
5310 lambda1();
5311 lambda2();
5312 }
5313
5314 int
5315 test2()
5316 {
5317 auto a = [](int i, int j){ return i + j; }(1, 2);
5318 auto b = []() -> int { return '0'; }();
5319 auto c = [=](){ return a + b; }();
5320 auto d = [&](){ return c; }();
5321 auto e = [a, &b](int x) mutable {
5322 const auto identity = [](int y){ return y; };
5323 for (auto i = 0; i < a; ++i)
5324 a += b--;
5325 return x + identity(a + b);
5326 }(0);
5327 return a + b + c + d + e;
5328 }
5329
5330 int
5331 test3()
5332 {
5333 const auto nullary = [](){ return 0; };
5334 const auto unary = [](int x){ return x; };
5335 using nullary_t = decltype(nullary);
5336 using unary_t = decltype(unary);
5337 const auto higher1st = [](nullary_t f){ return f(); };
5338 const auto higher2nd = [unary](nullary_t f1){
5339 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5340 };
5341 return higher1st(nullary) + higher2nd(nullary)(unary);
5342 }
5343
5344 }
5345
5346 namespace test_variadic_templates
5347 {
5348
5349 template <int...>
5350 struct sum;
5351
5352 template <int N0, int... N1toN>
5353 struct sum<N0, N1toN...>
5354 {
5355 static constexpr auto value = N0 + sum<N1toN...>::value;
5356 };
5357
5358 template <>
5359 struct sum<>
5360 {
5361 static constexpr auto value = 0;
5362 };
5363
5364 static_assert(sum<>::value == 0, "");
5365 static_assert(sum<1>::value == 1, "");
5366 static_assert(sum<23>::value == 23, "");
5367 static_assert(sum<1, 2>::value == 3, "");
5368 static_assert(sum<5, 5, 11>::value == 21, "");
5369 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5370
5371 }
5372
5373 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5374 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5375 // because of this.
5376 namespace test_template_alias_sfinae
5377 {
5378
5379 struct foo {};
5380
5381 template<typename T>
5382 using member = typename T::member_type;
5383
5384 template<typename T>
5385 void func(...) {}
5386
5387 template<typename T>
5388 void func(member<T>*) {}
5389
5390 void test();
5391
5392 void test() { func<foo>(0); }
5393
5394 }
5395
5396} // namespace cxx11
5397
5398#endif // __cplusplus >= 201103L
5399
5400
5401
5402_ACEOF
5403if ac_fn_cxx_try_compile "$LINENO"; then :
5404 ax_cv_cxx_compile_cxx11=yes
5405else
5406 ax_cv_cxx_compile_cxx11=no
5407fi
5408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5409fi
5410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5411$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5412 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5413 ac_success=yes
5414 fi
5415
5416 if test x$ac_success = xno; then
41260ac2
SM
5417 for alternative in ${ax_cxx_compile_alternatives}; do
5418 switch="-std=gnu++${alternative}"
0bcda685
PA
5419 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5421$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5422if eval \${$cachevar+:} false; then :
0bcda685
PA
5423 $as_echo_n "(cached) " >&6
5424else
5425 ac_save_CXX="$CXX"
5426 CXX="$CXX $switch"
5427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5428/* end confdefs.h. */
5429
5430
5431// If the compiler admits that it is not ready for C++11, why torture it?
5432// Hopefully, this will speed up the test.
5433
5434#ifndef __cplusplus
5435
5436#error "This is not a C++ compiler"
5437
5438#elif __cplusplus < 201103L
5439
5440#error "This is not a C++11 compiler"
5441
5442#else
5443
5444namespace cxx11
5445{
5446
5447 namespace test_static_assert
5448 {
5449
5450 template <typename T>
5451 struct check
5452 {
5453 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5454 };
5455
5456 }
5457
5458 namespace test_final_override
5459 {
5460
5461 struct Base
5462 {
5463 virtual void f() {}
5464 };
5465
5466 struct Derived : public Base
5467 {
5468 virtual void f() override {}
5469 };
5470
5471 }
5472
5473 namespace test_double_right_angle_brackets
5474 {
5475
5476 template < typename T >
5477 struct check {};
5478
5479 typedef check<void> single_type;
5480 typedef check<check<void>> double_type;
5481 typedef check<check<check<void>>> triple_type;
5482 typedef check<check<check<check<void>>>> quadruple_type;
5483
5484 }
5485
5486 namespace test_decltype
5487 {
5488
5489 int
5490 f()
5491 {
5492 int a = 1;
5493 decltype(a) b = 2;
5494 return a + b;
5495 }
5496
5497 }
5498
5499 namespace test_type_deduction
5500 {
5501
5502 template < typename T1, typename T2 >
5503 struct is_same
5504 {
5505 static const bool value = false;
5506 };
5507
5508 template < typename T >
5509 struct is_same<T, T>
5510 {
5511 static const bool value = true;
5512 };
5513
5514 template < typename T1, typename T2 >
5515 auto
5516 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5517 {
5518 return a1 + a2;
5519 }
5520
5521 int
5522 test(const int c, volatile int v)
5523 {
5524 static_assert(is_same<int, decltype(0)>::value == true, "");
5525 static_assert(is_same<int, decltype(c)>::value == false, "");
5526 static_assert(is_same<int, decltype(v)>::value == false, "");
5527 auto ac = c;
5528 auto av = v;
5529 auto sumi = ac + av + 'x';
5530 auto sumf = ac + av + 1.0;
5531 static_assert(is_same<int, decltype(ac)>::value == true, "");
5532 static_assert(is_same<int, decltype(av)>::value == true, "");
5533 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5534 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5535 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5536 return (sumf > 0.0) ? sumi : add(c, v);
5537 }
5538
5539 }
5540
5541 namespace test_noexcept
5542 {
5543
5544 int f() { return 0; }
5545 int g() noexcept { return 0; }
5546
5547 static_assert(noexcept(f()) == false, "");
5548 static_assert(noexcept(g()) == true, "");
5549
5550 }
5551
5552 namespace test_constexpr
5553 {
5554
5555 template < typename CharT >
5556 unsigned long constexpr
5557 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5558 {
5559 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5560 }
5561
5562 template < typename CharT >
5563 unsigned long constexpr
5564 strlen_c(const CharT *const s) noexcept
5565 {
5566 return strlen_c_r(s, 0UL);
5567 }
5568
5569 static_assert(strlen_c("") == 0UL, "");
5570 static_assert(strlen_c("1") == 1UL, "");
5571 static_assert(strlen_c("example") == 7UL, "");
5572 static_assert(strlen_c("another\0example") == 7UL, "");
5573
5574 }
5575
5576 namespace test_rvalue_references
5577 {
5578
5579 template < int N >
5580 struct answer
5581 {
5582 static constexpr int value = N;
5583 };
5584
5585 answer<1> f(int&) { return answer<1>(); }
5586 answer<2> f(const int&) { return answer<2>(); }
5587 answer<3> f(int&&) { return answer<3>(); }
5588
5589 void
5590 test()
5591 {
5592 int i = 0;
5593 const int c = 0;
5594 static_assert(decltype(f(i))::value == 1, "");
5595 static_assert(decltype(f(c))::value == 2, "");
5596 static_assert(decltype(f(0))::value == 3, "");
5597 }
5598
5599 }
5600
5601 namespace test_uniform_initialization
5602 {
5603
5604 struct test
5605 {
5606 static const int zero {};
5607 static const int one {1};
5608 };
5609
5610 static_assert(test::zero == 0, "");
5611 static_assert(test::one == 1, "");
5612
5613 }
5614
5615 namespace test_lambdas
5616 {
5617
5618 void
5619 test1()
5620 {
5621 auto lambda1 = [](){};
5622 auto lambda2 = lambda1;
5623 lambda1();
5624 lambda2();
5625 }
5626
5627 int
5628 test2()
5629 {
5630 auto a = [](int i, int j){ return i + j; }(1, 2);
5631 auto b = []() -> int { return '0'; }();
5632 auto c = [=](){ return a + b; }();
5633 auto d = [&](){ return c; }();
5634 auto e = [a, &b](int x) mutable {
5635 const auto identity = [](int y){ return y; };
5636 for (auto i = 0; i < a; ++i)
5637 a += b--;
5638 return x + identity(a + b);
5639 }(0);
5640 return a + b + c + d + e;
5641 }
5642
5643 int
5644 test3()
5645 {
5646 const auto nullary = [](){ return 0; };
5647 const auto unary = [](int x){ return x; };
5648 using nullary_t = decltype(nullary);
5649 using unary_t = decltype(unary);
5650 const auto higher1st = [](nullary_t f){ return f(); };
5651 const auto higher2nd = [unary](nullary_t f1){
5652 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5653 };
5654 return higher1st(nullary) + higher2nd(nullary)(unary);
5655 }
5656
5657 }
5658
5659 namespace test_variadic_templates
5660 {
5661
5662 template <int...>
5663 struct sum;
5664
5665 template <int N0, int... N1toN>
5666 struct sum<N0, N1toN...>
5667 {
5668 static constexpr auto value = N0 + sum<N1toN...>::value;
5669 };
5670
5671 template <>
5672 struct sum<>
5673 {
5674 static constexpr auto value = 0;
5675 };
5676
5677 static_assert(sum<>::value == 0, "");
5678 static_assert(sum<1>::value == 1, "");
5679 static_assert(sum<23>::value == 23, "");
5680 static_assert(sum<1, 2>::value == 3, "");
5681 static_assert(sum<5, 5, 11>::value == 21, "");
5682 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5683
5684 }
5685
5686 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5687 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5688 // because of this.
5689 namespace test_template_alias_sfinae
5690 {
5691
5692 struct foo {};
5693
5694 template<typename T>
5695 using member = typename T::member_type;
5696
5697 template<typename T>
5698 void func(...) {}
5699
5700 template<typename T>
5701 void func(member<T>*) {}
5702
5703 void test();
5704
5705 void test() { func<foo>(0); }
5706
5707 }
5708
5709} // namespace cxx11
5710
5711#endif // __cplusplus >= 201103L
5712
5713
5714
5715_ACEOF
5716if ac_fn_cxx_try_compile "$LINENO"; then :
5717 eval $cachevar=yes
5718else
5719 eval $cachevar=no
5720fi
5721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5722 CXX="$ac_save_CXX"
5723fi
5724eval ac_res=\$$cachevar
5725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5726$as_echo "$ac_res" >&6; }
5727 if eval test x\$$cachevar = xyes; then
5728 CXX_DIALECT="$switch"
5729 ac_success=yes
5730 break
5731 fi
5732 done
5733 fi
5734
5735 if test x$ac_success = xno; then
41260ac2
SM
5736 for alternative in ${ax_cxx_compile_alternatives}; do
5737 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5738 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
0bcda685 5740$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5741if eval \${$cachevar+:} false; then :
0bcda685
PA
5742 $as_echo_n "(cached) " >&6
5743else
5744 ac_save_CXX="$CXX"
41260ac2
SM
5745 CXX="$CXX $switch"
5746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0bcda685
PA
5747/* end confdefs.h. */
5748
5749
5750// If the compiler admits that it is not ready for C++11, why torture it?
5751// Hopefully, this will speed up the test.
5752
5753#ifndef __cplusplus
5754
5755#error "This is not a C++ compiler"
5756
5757#elif __cplusplus < 201103L
5758
5759#error "This is not a C++11 compiler"
5760
5761#else
5762
5763namespace cxx11
5764{
5765
5766 namespace test_static_assert
5767 {
5768
5769 template <typename T>
5770 struct check
5771 {
5772 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5773 };
5774
5775 }
5776
5777 namespace test_final_override
5778 {
5779
5780 struct Base
5781 {
5782 virtual void f() {}
5783 };
5784
5785 struct Derived : public Base
5786 {
5787 virtual void f() override {}
5788 };
5789
5790 }
5791
5792 namespace test_double_right_angle_brackets
5793 {
5794
5795 template < typename T >
5796 struct check {};
5797
5798 typedef check<void> single_type;
5799 typedef check<check<void>> double_type;
5800 typedef check<check<check<void>>> triple_type;
5801 typedef check<check<check<check<void>>>> quadruple_type;
5802
5803 }
5804
5805 namespace test_decltype
5806 {
5807
5808 int
5809 f()
5810 {
5811 int a = 1;
5812 decltype(a) b = 2;
5813 return a + b;
5814 }
5815
5816 }
5817
5818 namespace test_type_deduction
5819 {
5820
5821 template < typename T1, typename T2 >
5822 struct is_same
5823 {
5824 static const bool value = false;
5825 };
5826
5827 template < typename T >
5828 struct is_same<T, T>
5829 {
5830 static const bool value = true;
5831 };
5832
5833 template < typename T1, typename T2 >
5834 auto
5835 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5836 {
5837 return a1 + a2;
5838 }
5839
5840 int
5841 test(const int c, volatile int v)
5842 {
5843 static_assert(is_same<int, decltype(0)>::value == true, "");
5844 static_assert(is_same<int, decltype(c)>::value == false, "");
5845 static_assert(is_same<int, decltype(v)>::value == false, "");
5846 auto ac = c;
5847 auto av = v;
5848 auto sumi = ac + av + 'x';
5849 auto sumf = ac + av + 1.0;
5850 static_assert(is_same<int, decltype(ac)>::value == true, "");
5851 static_assert(is_same<int, decltype(av)>::value == true, "");
5852 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5853 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5854 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5855 return (sumf > 0.0) ? sumi : add(c, v);
5856 }
5857
5858 }
5859
5860 namespace test_noexcept
5861 {
5862
5863 int f() { return 0; }
5864 int g() noexcept { return 0; }
5865
5866 static_assert(noexcept(f()) == false, "");
5867 static_assert(noexcept(g()) == true, "");
5868
5869 }
5870
5871 namespace test_constexpr
5872 {
5873
5874 template < typename CharT >
5875 unsigned long constexpr
5876 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5877 {
5878 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5879 }
5880
5881 template < typename CharT >
5882 unsigned long constexpr
5883 strlen_c(const CharT *const s) noexcept
5884 {
5885 return strlen_c_r(s, 0UL);
5886 }
5887
5888 static_assert(strlen_c("") == 0UL, "");
5889 static_assert(strlen_c("1") == 1UL, "");
5890 static_assert(strlen_c("example") == 7UL, "");
5891 static_assert(strlen_c("another\0example") == 7UL, "");
5892
5893 }
5894
5895 namespace test_rvalue_references
5896 {
5897
5898 template < int N >
5899 struct answer
5900 {
5901 static constexpr int value = N;
5902 };
5903
5904 answer<1> f(int&) { return answer<1>(); }
5905 answer<2> f(const int&) { return answer<2>(); }
5906 answer<3> f(int&&) { return answer<3>(); }
5907
5908 void
5909 test()
5910 {
5911 int i = 0;
5912 const int c = 0;
5913 static_assert(decltype(f(i))::value == 1, "");
5914 static_assert(decltype(f(c))::value == 2, "");
5915 static_assert(decltype(f(0))::value == 3, "");
5916 }
5917
5918 }
5919
5920 namespace test_uniform_initialization
5921 {
5922
5923 struct test
5924 {
5925 static const int zero {};
5926 static const int one {1};
5927 };
5928
5929 static_assert(test::zero == 0, "");
5930 static_assert(test::one == 1, "");
5931
5932 }
5933
5934 namespace test_lambdas
5935 {
5936
5937 void
5938 test1()
5939 {
5940 auto lambda1 = [](){};
5941 auto lambda2 = lambda1;
5942 lambda1();
5943 lambda2();
5944 }
5945
5946 int
5947 test2()
5948 {
5949 auto a = [](int i, int j){ return i + j; }(1, 2);
5950 auto b = []() -> int { return '0'; }();
5951 auto c = [=](){ return a + b; }();
5952 auto d = [&](){ return c; }();
5953 auto e = [a, &b](int x) mutable {
5954 const auto identity = [](int y){ return y; };
5955 for (auto i = 0; i < a; ++i)
5956 a += b--;
5957 return x + identity(a + b);
5958 }(0);
5959 return a + b + c + d + e;
5960 }
5961
5962 int
5963 test3()
5964 {
5965 const auto nullary = [](){ return 0; };
5966 const auto unary = [](int x){ return x; };
5967 using nullary_t = decltype(nullary);
5968 using unary_t = decltype(unary);
5969 const auto higher1st = [](nullary_t f){ return f(); };
5970 const auto higher2nd = [unary](nullary_t f1){
5971 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5972 };
5973 return higher1st(nullary) + higher2nd(nullary)(unary);
5974 }
5975
5976 }
5977
5978 namespace test_variadic_templates
5979 {
5980
5981 template <int...>
5982 struct sum;
5983
5984 template <int N0, int... N1toN>
5985 struct sum<N0, N1toN...>
5986 {
5987 static constexpr auto value = N0 + sum<N1toN...>::value;
5988 };
5989
5990 template <>
5991 struct sum<>
5992 {
5993 static constexpr auto value = 0;
5994 };
5995
5996 static_assert(sum<>::value == 0, "");
5997 static_assert(sum<1>::value == 1, "");
5998 static_assert(sum<23>::value == 23, "");
5999 static_assert(sum<1, 2>::value == 3, "");
6000 static_assert(sum<5, 5, 11>::value == 21, "");
6001 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6002
6003 }
6004
6005 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6006 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6007 // because of this.
6008 namespace test_template_alias_sfinae
6009 {
6010
6011 struct foo {};
6012
6013 template<typename T>
6014 using member = typename T::member_type;
6015
6016 template<typename T>
6017 void func(...) {}
6018
6019 template<typename T>
6020 void func(member<T>*) {}
6021
6022 void test();
6023
6024 void test() { func<foo>(0); }
6025
6026 }
6027
6028} // namespace cxx11
6029
6030#endif // __cplusplus >= 201103L
6031
6032
6033
6034_ACEOF
6035if ac_fn_cxx_try_compile "$LINENO"; then :
6036 eval $cachevar=yes
6037else
6038 eval $cachevar=no
6039fi
6040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41260ac2 6041 CXX="$ac_save_CXX"
0bcda685
PA
6042fi
6043eval ac_res=\$$cachevar
6044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6045$as_echo "$ac_res" >&6; }
41260ac2
SM
6046 if eval test x\$$cachevar = xyes; then
6047 CXX_DIALECT="$switch"
6048 ac_success=yes
6049 break
6050 fi
6051 done
6052 if test x$ac_success = xyes; then
0bcda685
PA
6053 break
6054 fi
6055 done
6056 fi
6057 ac_ext=c
6058ac_cpp='$CPP $CPPFLAGS'
6059ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6060ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6061ac_compiler_gnu=$ac_cv_c_compiler_gnu
6062
6063 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6064 if test x$ac_success = xno; then
d0ac1c44 6065 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
0bcda685
PA
6066 fi
6067 fi
6068 if test x$ac_success = xno; then
6069 HAVE_CXX11=0
6070 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6071$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6072 else
6073 HAVE_CXX11=1
6074
6075$as_echo "#define HAVE_CXX11 1" >>confdefs.h
6076
6077 fi
6078
6079
6080
6081
a417dc56
RW
6082# Dependency checking.
6083rm -rf .tst 2>/dev/null
6084mkdir .tst 2>/dev/null
6085if test -d .tst; then
6086 am__leading_dot=.
6087else
6088 am__leading_dot=_
6089fi
6090rmdir .tst 2>/dev/null
6091
6092DEPDIR="${am__leading_dot}deps"
6093
81ecdfbb 6094ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
6095
6096
6097depcc="$CC" am_compiler_list=
6098
6099am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
6100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6101$as_echo_n "checking dependency style of $depcc... " >&6; }
d0ac1c44 6102if ${am_cv_CC_dependencies_compiler_type+:} false; then :
81ecdfbb 6103 $as_echo_n "(cached) " >&6
a417dc56
RW
6104else
6105 if test -f "$am_depcomp"; then
6106 # We make a subdir and do the tests there. Otherwise we can end up
6107 # making bogus files that we don't know about and never remove. For
6108 # instance it was reported that on HP-UX the gcc test will end up
6109 # making a dummy file named `D' -- because `-MD' means `put the output
6110 # in D'.
6111 mkdir conftest.dir
6112 # Copy depcomp to subdir because otherwise we won't find it if we're
6113 # using a relative directory.
6114 cp "$am_depcomp" conftest.dir
6115 cd conftest.dir
6116 # We will build objects and dependencies in a subdirectory because
6117 # it helps to detect inapplicable dependency modes. For instance
6118 # both Tru64's cc and ICC support -MD to output dependencies as a
6119 # side effect of compilation, but ICC will put the dependencies in
6120 # the current directory while Tru64 will put them in the object
6121 # directory.
6122 mkdir sub
6123
6124 am_cv_CC_dependencies_compiler_type=none
6125 if test "$am_compiler_list" = ""; then
6126 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6127 fi
6128 for depmode in $am_compiler_list; do
6129 if test $depmode = none; then break; fi
6130
81ecdfbb 6131 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
6132 # Setup a source with many dependencies, because some compilers
6133 # like to wrap large dependency lists on column 80 (with \), and
6134 # we should not choose a depcomp mode which is confused by this.
6135 #
6136 # We need to recreate these files for each test, as the compiler may
6137 # overwrite some of them when testing with obscure command lines.
6138 # This happens at least with the AIX C compiler.
6139 : > sub/conftest.c
6140 for i in 1 2 3 4 5 6; do
6141 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6142 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6143 # Solaris 8's {/usr,}/bin/sh.
6144 touch sub/conftst$i.h
6145 done
6146 echo "include sub/conftest.Po" > confmf
6147
6148 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6149 # mode. It turns out that the SunPro C++ compiler does not properly
6150 # handle `-M -o', and we need to detect this.
6151 depcmd="depmode=$depmode \
6152 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6153 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6154 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6155 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6156 if env $depcmd > conftest.err 2>&1 &&
6157 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6158 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6159 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6160 # icc doesn't choke on unknown options, it will just issue warnings
6161 # or remarks (even with -Werror). So we grep stderr for any message
6162 # that says an option was ignored or not supported.
6163 # When given -MP, icc 7.0 and 7.1 complain thusly:
6164 # icc: Command line warning: ignoring option '-M'; no argument required
6165 # The diagnosis changed in icc 8.0:
6166 # icc: Command line remark: option '-MP' not supported
6167 if (grep 'ignoring option' conftest.err ||
6168 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6169 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 6170 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
6171 break
6172 fi
6173 fi
81ecdfbb 6174 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
6175 sed -e 's/^/| /' < conftest.err >&5
6176 done
6177
6178 cd ..
6179 rm -rf conftest.dir
6180else
6181 am_cv_CC_dependencies_compiler_type=none
6182fi
6183
6184fi
81ecdfbb
RW
6185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6186$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 6187if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
d0ac1c44 6188then as_fn_error $? "no usable dependency style found" "$LINENO" 5
a417dc56
RW
6189else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6190
6191fi
6192
6193
c971b7fa
PA
6194
6195CONFIG_OBS=
6196CONFIG_DEPS=
6197CONFIG_SRCS=
6198ENABLE_CFLAGS=
6199
6200CONFIG_ALL=
6201CONFIG_CLEAN=
6202CONFIG_INSTALL=
6203CONFIG_UNINSTALL=
6204
6205# If we haven't got the data from the intl directory,
6206# assume NLS is disabled.
6207USE_NLS=no
6208LIBINTL=
6209LIBINTL_DEP=
6210INCINTL=
6211XGETTEXT=
6212GMSGFMT=
6213POSUB=
783e057b
DJ
6214
6215if test -f ../intl/config.intl; then
6216 . ../intl/config.intl
6217fi
81ecdfbb
RW
6218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6219$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 6220if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
6221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6222$as_echo "no" >&6; }
783e057b 6223else
81ecdfbb
RW
6224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6225$as_echo "yes" >&6; }
783e057b 6226
81ecdfbb 6227$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
6228
6229
81ecdfbb
RW
6230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6231$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
6232 # Look for .po and .gmo files in the source directory.
6233 CATALOGS=
6234 XLINGUAS=
6235 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6236 # If there aren't any .gmo files the shell will give us the
6237 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6238 # weeded out.
6239 case "$cat" in *\**)
6240 continue;;
6241 esac
6242 # The quadruple backslash is collapsed to a double backslash
6243 # by the backticks, then collapsed again by the double quotes,
6244 # leaving us with one backslash in the sed expression (right
6245 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
6246 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6247 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6248 # The user is allowed to set LINGUAS to a list of languages to
6249 # install catalogs for. If it's empty that means "all of them."
6250 if test "x$LINGUAS" = x; then
6251 CATALOGS="$CATALOGS $cat"
6252 XLINGUAS="$XLINGUAS $lang"
6253 else
6254 case "$LINGUAS" in *$lang*)
6255 CATALOGS="$CATALOGS $cat"
6256 XLINGUAS="$XLINGUAS $lang"
6257 ;;
6258 esac
e28b3332
DJ
6259 fi
6260 done
c971b7fa
PA
6261 LINGUAS="$XLINGUAS"
6262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6263$as_echo "$LINGUAS" >&6; }
6264
6265
6266 DATADIRNAME=share
6267
6268 INSTOBJEXT=.mo
6269
6270 GENCAT=gencat
6271
6272 CATOBJEXT=.gmo
e28b3332 6273
e28b3332
DJ
6274fi
6275
c971b7fa
PA
6276localedir='${datadir}/locale'
6277
6278
6279if test x"$USE_NLS" = xyes; then
6280 CONFIG_ALL="$CONFIG_ALL all-po"
6281 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6282 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6283 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 6284fi
e28b3332 6285
c971b7fa
PA
6286PACKAGE=gdb
6287
6288cat >>confdefs.h <<_ACEOF
6289#define PACKAGE "$PACKAGE"
6290_ACEOF
6291
6292
6293
6294# We never need to detect it in this sub-configure.
6295# But preserve it for config.status --recheck.
6296
6297
6298
6299MAKEINFO_EXTRA_FLAGS=""
6300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6301$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
d0ac1c44 6302if ${gdb_cv_have_makeinfo_click+:} false; then :
c971b7fa
PA
6303 $as_echo_n "(cached) " >&6
6304else
6305 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6306 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6307 gdb_cv_have_makeinfo_click=yes
6308 else
6309 gdb_cv_have_makeinfo_click=no
6310 fi
6311fi
6312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6313$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6314if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6315 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6316fi
e28b3332
DJ
6317
6318
bec39cab
AC
6319
6320
81ecdfbb
RW
6321# Check whether --with-separate-debug-dir was given.
6322if test "${with_separate_debug_dir+set}" = set; then :
6323 withval=$with_separate_debug_dir;
b14b1491
TT
6324 DEBUGDIR=$withval
6325else
6326 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
6327fi
6328
20e95c23 6329
783e057b
DJ
6330 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6331 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 6332 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 6333 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 6334
783e057b
DJ
6335cat >>confdefs.h <<_ACEOF
6336#define DEBUGDIR "$ac_define_dir"
20e95c23 6337_ACEOF
20e95c23 6338
20e95c23 6339
20e95c23 6340
0c4a4063 6341
b14b1491
TT
6342 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6343 if test "x$prefix" = xNONE; then
6344 test_prefix=/usr/local
6345 else
6346 test_prefix=$prefix
6347 fi
783e057b 6348 else
b14b1491 6349 test_prefix=$exec_prefix
783e057b 6350 fi
b14b1491
TT
6351 value=0
6352 case ${ac_define_dir} in
6353 "${test_prefix}"|"${test_prefix}/"*|\
6354 '${exec_prefix}'|'${exec_prefix}/'*)
6355 value=1
6356 ;;
6357 esac
6358
6359cat >>confdefs.h <<_ACEOF
6360#define DEBUGDIR_RELOCATABLE $value
6361_ACEOF
6362
6363
6364
0c4a4063 6365
f83d8a90
DE
6366# We can't pass paths as command line arguments.
6367# Mingw32 tries to be clever and will convert the paths for us.
6368# For example -DBINDIR="/usr/local/bin" passed on the command line may get
6369# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6370# This breaks GDB's relocatable path conversions since paths passed in
6371# config.h would not get so translated, the path prefixes no longer match.
6372
6373 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6374 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6375 ac_define_dir=`eval echo $bindir`
6376 ac_define_dir=`eval echo $ac_define_dir`
6377
6378cat >>confdefs.h <<_ACEOF
6379#define BINDIR "$ac_define_dir"
6380_ACEOF
6381
6382
6383
b14b1491
TT
6384# GDB's datadir relocation
6385
6386
6387
81ecdfbb
RW
6388# Check whether --with-gdb-datadir was given.
6389if test "${with_gdb_datadir+set}" = set; then :
6390 withval=$with_gdb_datadir;
b14b1491 6391 GDB_DATADIR=$withval
20e95c23 6392else
b14b1491 6393 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
6394fi
6395
20e95c23 6396
b14b1491
TT
6397 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6398 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6399 ac_define_dir=`eval echo $GDB_DATADIR`
6400 ac_define_dir=`eval echo $ac_define_dir`
6401
6402cat >>confdefs.h <<_ACEOF
6403#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
6404_ACEOF
6405
b14b1491
TT
6406
6407
0c4a4063 6408
b14b1491
TT
6409 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6410 if test "x$prefix" = xNONE; then
6411 test_prefix=/usr/local
6412 else
6413 test_prefix=$prefix
6414 fi
6415 else
6416 test_prefix=$exec_prefix
6417 fi
6418 value=0
6419 case ${ac_define_dir} in
6420 "${test_prefix}"|"${test_prefix}/"*|\
6421 '${exec_prefix}'|'${exec_prefix}/'*)
6422 value=1
6423 ;;
6424 esac
6425
6426cat >>confdefs.h <<_ACEOF
6427#define GDB_DATADIR_RELOCATABLE $value
6428_ACEOF
6429
6430
783e057b 6431
20e95c23 6432
0c4a4063 6433
81ecdfbb
RW
6434# Check whether --with-relocated-sources was given.
6435if test "${with_relocated_sources+set}" = set; then :
6436 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
6437
6438 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6439 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6440 ac_define_dir=`eval echo $reloc_srcdir`
6441 ac_define_dir=`eval echo $ac_define_dir`
6442
6443cat >>confdefs.h <<_ACEOF
6444#define RELOC_SRCDIR "$ac_define_dir"
6445_ACEOF
6446
6447
6448
81ecdfbb
RW
6449fi
6450
29b0e8a2 6451
7349ff92
JK
6452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6453$as_echo_n "checking for default auto-load directory... " >&6; }
6454
6455# Check whether --with-auto-load-dir was given.
6456if test "${with_auto_load_dir+set}" = set; then :
6457 withval=$with_auto_load_dir;
6458else
1564a261 6459 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
6460fi
6461
2861ee4f 6462escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
6463
6464 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6465 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6466 ac_define_dir=`eval echo $escape_dir`
6467 ac_define_dir=`eval echo $ac_define_dir`
6468
6469cat >>confdefs.h <<_ACEOF
6470#define AUTO_LOAD_DIR "$ac_define_dir"
6471_ACEOF
6472
6473
6474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6475$as_echo "$with_auto_load_dir" >&6; }
6476
bccbefd2
JK
6477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6478$as_echo_n "checking for default auto-load safe-path... " >&6; }
6479
6480# Check whether --with-auto-load-safe-path was given.
6481if test "${with_auto_load_safe_path+set}" = set; then :
6482 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
6483 with_auto_load_safe_path="/"
6484 fi
bccbefd2 6485else
7349ff92 6486 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
6487fi
6488
2861ee4f 6489escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
6490
6491 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6492 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 6493 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
6494 ac_define_dir=`eval echo $ac_define_dir`
6495
6496cat >>confdefs.h <<_ACEOF
6dea1fbd 6497#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
6498_ACEOF
6499
6500
6501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6502$as_echo "$with_auto_load_safe_path" >&6; }
6503
29b0e8a2 6504
20e95c23 6505
5ae98d25 6506subdirs="$subdirs testsuite"
20e95c23
DJ
6507
6508
783e057b 6509# Check whether to support alternative target configurations
81ecdfbb
RW
6510# Check whether --enable-targets was given.
6511if test "${enable_targets+set}" = set; then :
6512 enableval=$enable_targets; case "${enableval}" in
d0ac1c44 6513 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
6514 ;;
6515 no) enable_targets= ;;
6516 *) enable_targets=$enableval ;;
6517esac
81ecdfbb
RW
6518fi
6519
20e95c23 6520
783e057b 6521# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
6522# Check whether --enable-64-bit-bfd was given.
6523if test "${enable_64_bit_bfd+set}" = set; then :
6524 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
6525 yes) want64=true ;;
6526 no) want64=false ;;
d0ac1c44 6527 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
6528esac
6529else
6530 want64=false
81ecdfbb
RW
6531fi
6532
783e057b
DJ
6533# Provide defaults for some variables set by the per-host and per-target
6534# configuration.
6535gdb_host_obs=posix-hdep.o
20e95c23 6536
783e057b
DJ
6537if test "${target}" = "${host}"; then
6538 gdb_native=yes
6539else
6540 gdb_native=no
6541fi
20e95c23 6542
783e057b 6543. $srcdir/configure.host
20e95c23 6544
fb23d554 6545# Add in the common host objects.
268a13a5 6546. $srcdir/gdbsupport/common.host
fb23d554
SDJ
6547gdb_host_obs="$gdb_host_obs $common_host_obs"
6548
783e057b 6549# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 6550
783e057b
DJ
6551TARGET_OBS=
6552all_targets=
b292c783 6553HAVE_NATIVE_GCORE_TARGET=
20e95c23 6554
783e057b 6555for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 6556do
783e057b
DJ
6557 if test "$targ_alias" = "all"; then
6558 all_targets=true
6559 else
6560 # Canonicalize the secondary target names.
6561 result=`$ac_config_sub $targ_alias 2>/dev/null`
6562 if test -n "$result"; then
6563 targ=$result
6564 else
6565 targ=$targ_alias
6566 fi
20e95c23 6567
783e057b 6568 . ${srcdir}/configure.tgt
20e95c23 6569
bf307134 6570 if test -z "${gdb_target_obs}"; then :
d0ac1c44 6571 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
bf307134
JB
6572fi
6573
783e057b
DJ
6574 # Target-specific object files
6575 for i in ${gdb_target_obs}; do
6576 case " $TARGET_OBS " in
6577 *" ${i} "*) ;;
6578 *)
6579 TARGET_OBS="$TARGET_OBS ${i}"
6580 ;;
6581 esac
6582 done
20e95c23 6583
783e057b
DJ
6584 # Check whether this target needs 64-bit CORE_ADDR
6585 if test x${want64} = xfalse; then
6586 . ${srcdir}/../bfd/config.bfd
6587 fi
b292c783
JK
6588
6589 # Check whether this target is native and supports gcore.
6590 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6591 && $gdb_have_gcore; then
6592 HAVE_NATIVE_GCORE_TARGET=1
6593 fi
783e057b 6594 fi
20e95c23
DJ
6595done
6596
783e057b
DJ
6597if test x${all_targets} = xtrue; then
6598
6599 # We want all 64-bit targets if we either:
6600 # - run on a 64-bit host or
6601 # - already require 64-bit support for some other target or
6602 # - the --enable-64-bit-bfd option was supplied
6603 # Otherwise we only support all 32-bit targets.
6604 #
6605 # NOTE: This test must be in sync with the corresponding
6606 # tests in BFD!
20e95c23 6607
783e057b 6608 if test x${want64} = xfalse; then
81ecdfbb
RW
6609 # The cast to long int works around a bug in the HP C Compiler
6610# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6611# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6612# This bug is HP SR number 8606223364.
6613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6614$as_echo_n "checking size of long... " >&6; }
d0ac1c44 6615if ${ac_cv_sizeof_long+:} false; then :
81ecdfbb 6616 $as_echo_n "(cached) " >&6
c0993dbe 6617else
81ecdfbb 6618 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 6619
81ecdfbb
RW
6620else
6621 if test "$ac_cv_type_long" = yes; then
6622 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6623$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
6624as_fn_error 77 "cannot compute sizeof (long)
6625See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
6626 else
6627 ac_cv_sizeof_long=0
6628 fi
c0993dbe 6629fi
81ecdfbb 6630
c0993dbe 6631fi
81ecdfbb
RW
6632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6633$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 6634
c0993dbe 6635
c0993dbe 6636
c0993dbe
UW
6637cat >>confdefs.h <<_ACEOF
6638#define SIZEOF_LONG $ac_cv_sizeof_long
6639_ACEOF
6640
6641
6642 if test "x${ac_cv_sizeof_long}" = "x8"; then
6643 want64=true
6644 fi
6645 fi
6646 if test x${want64} = xtrue; then
6647 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6648 else
6649 TARGET_OBS='$(ALL_TARGET_OBS)'
6650 fi
6651fi
6652
6653
6654
b292c783 6655
c0993dbe
UW
6656# For other settings, only the main target counts.
6657gdb_sim=
6658gdb_osabi=
6659build_gdbserver=
6660targ=$target; . ${srcdir}/configure.tgt
6661
6662# Fetch the default architecture and default target vector from BFD.
6663targ=$target; . $srcdir/../bfd/config.bfd
6664
6665# We only want the first architecture, so strip off the others if
6666# there is more than one.
6667targ_archs=`echo $targ_archs | sed 's/ .*//'`
6668
6669if test "x$targ_archs" != x; then
6670
6671cat >>confdefs.h <<_ACEOF
6672#define DEFAULT_BFD_ARCH $targ_archs
6673_ACEOF
6674
6675fi
6676if test "x$targ_defvec" != x; then
6677
6678cat >>confdefs.h <<_ACEOF
6679#define DEFAULT_BFD_VEC $targ_defvec
6680_ACEOF
6681
6682fi
6683
c0993dbe 6684# Enable MI.
81ecdfbb
RW
6685# Check whether --enable-gdbmi was given.
6686if test "${enable_gdbmi+set}" = set; then :
6687 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
6688 yes | no)
6689 ;;
6690 *)
d0ac1c44 6691 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
6692 esac
6693else
6694 enable_gdbmi=yes
81ecdfbb
RW
6695fi
6696
c0993dbe
UW
6697if test x"$enable_gdbmi" = xyes; then
6698 if test -d $srcdir/mi; then
6699 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6700 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6701 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6702 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6703 fi
6704fi
6705
6706# Enable TUI.
81ecdfbb
RW
6707# Check whether --enable-tui was given.
6708if test "${enable_tui+set}" = set; then :
6709 enableval=$enable_tui; case $enableval in
3ca64bd3 6710 yes | no | auto)
c0993dbe
UW
6711 ;;
6712 *)
d0ac1c44 6713 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
6714 esac
6715else
3ca64bd3 6716 enable_tui=auto
81ecdfbb
RW
6717fi
6718
c0993dbe
UW
6719
6720# Enable gdbtk.
81ecdfbb
RW
6721# Check whether --enable-gdbtk was given.
6722if test "${enable_gdbtk+set}" = set; then :
6723 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
6724 yes | no)
6725 ;;
6726 *)
d0ac1c44 6727 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
6728 esac
6729else
5062cc19 6730 if test -d $srcdir/gdbtk; then
c0993dbe
UW
6731 enable_gdbtk=yes
6732 else
6733 enable_gdbtk=no
6734 fi
81ecdfbb
RW
6735fi
6736
c0993dbe
UW
6737# We unconditionally disable gdbtk tests on selected platforms.
6738case $host_os in
6739 go32* | windows*)
81ecdfbb
RW
6740 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6741$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
6742 enable_gdbtk=no ;;
6743esac
6744
05e7c244 6745# Libunwind support for ia64.
bec39cab 6746
05e7c244
JK
6747
6748# Check whether --with-libunwind-ia64 was given.
6749if test "${with_libunwind_ia64+set}" = set; then :
6750 withval=$with_libunwind_ia64;
bec39cab 6751else
05e7c244
JK
6752 with_libunwind_ia64=auto
6753fi
bec39cab 6754
05e7c244
JK
6755
6756# Backward compatibility option.
6757if test "${with_libunwind+set}" = set; then
6758 if test x"$with_libunwind_ia64" != xauto; then
d0ac1c44 6759 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
05e7c244
JK
6760 fi
6761 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6762$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6763 with_libunwind_ia64="$with_libunwind"
6764fi
6765
6766case "$with_libunwind_ia64" in
6767 yes | no)
6768 ;;
6769 auto)
6770 for ac_header in libunwind-ia64.h
81ecdfbb 6771do :
b54a8fd7 6772 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 6773if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6774 cat >>confdefs.h <<_ACEOF
b54a8fd7 6775#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6776_ACEOF
6777
6778fi
6779
6780done
6781
05e7c244
JK
6782 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6783 ;;
6784 *)
d0ac1c44 6785 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
05e7c244
JK
6786 ;;
6787esac
bec39cab 6788
05e7c244 6789if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 6790 for ac_header in libunwind-ia64.h
81ecdfbb 6791do :
b54a8fd7 6792 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 6793if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6794 cat >>confdefs.h <<_ACEOF
b54a8fd7 6795#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6796_ACEOF
6797
6798fi
6799
6800done
6801
05e7c244 6802 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
d0ac1c44 6803 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
05e7c244
JK
6804 fi
6805 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6806 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6807 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
6808fi
6809
cb01cfba
JB
6810opt_curses=no
6811
81ecdfbb
RW
6812# Check whether --with-curses was given.
6813if test "${with_curses+set}" = set; then :
6814 withval=$with_curses; opt_curses=$withval
6815fi
6816
cb01cfba 6817
76a39ba7 6818prefer_curses=no
cb01cfba 6819if test "$opt_curses" = "yes"; then
76a39ba7 6820 prefer_curses=yes
cb01cfba
JB
6821fi
6822
a9322a30 6823# Profiling support.
81ecdfbb
RW
6824# Check whether --enable-profiling was given.
6825if test "${enable_profiling+set}" = set; then :
6826 enableval=$enable_profiling; case $enableval in
a9322a30
TT
6827 yes | no)
6828 ;;
6829 *)
d0ac1c44 6830 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
6831 esac
6832else
6833 enable_profiling=no
81ecdfbb 6834fi
bec39cab 6835
a9322a30
TT
6836
6837for ac_func in monstartup _mcleanup
81ecdfbb
RW
6838do :
6839 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6840ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 6841if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
81ecdfbb
RW
6842 cat >>confdefs.h <<_ACEOF
6843#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 6844_ACEOF
a9322a30 6845
81ecdfbb
RW
6846fi
6847done
a9322a30 6848
81ecdfbb
RW
6849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6850$as_echo_n "checking for _etext... " >&6; }
d0ac1c44 6851if ${ac_cv_var__etext+:} false; then :
81ecdfbb
RW
6852 $as_echo_n "(cached) " >&6
6853else
6854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6855/* end confdefs.h. */
6856#include <stdlib.h>
6857extern char _etext;
a9322a30
TT
6858
6859int
6860main ()
6861{
6862free (&_etext);
6863 ;
6864 return 0;
6865}
bec39cab 6866_ACEOF
81ecdfbb 6867if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6868 ac_cv_var__etext=yes
bec39cab 6869else
81ecdfbb 6870 ac_cv_var__etext=no
bec39cab 6871fi
81ecdfbb
RW
6872rm -f core conftest.err conftest.$ac_objext \
6873 conftest$ac_exeext conftest.$ac_ext
bec39cab 6874fi
81ecdfbb
RW
6875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6876$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 6877if test $ac_cv_var__etext = yes; then
60ca704f 6878
81ecdfbb 6879$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 6880
bec39cab 6881fi
81ecdfbb
RW
6882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6883$as_echo_n "checking for etext... " >&6; }
d0ac1c44 6884if ${ac_cv_var_etext+:} false; then :
81ecdfbb 6885 $as_echo_n "(cached) " >&6
bec39cab 6886else
81ecdfbb 6887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6888/* end confdefs.h. */
a9322a30
TT
6889#include <stdlib.h>
6890extern char etext;
bec39cab
AC
6891
6892int
6893main ()
6894{
a9322a30 6895free (&etext);
bec39cab
AC
6896 ;
6897 return 0;
6898}
6899_ACEOF
81ecdfbb 6900if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6901 ac_cv_var_etext=yes
bec39cab 6902else
81ecdfbb 6903 ac_cv_var_etext=no
bec39cab 6904fi
81ecdfbb
RW
6905rm -f core conftest.err conftest.$ac_objext \
6906 conftest$ac_exeext conftest.$ac_ext
bec39cab 6907fi
81ecdfbb
RW
6908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
6909$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
6910if test $ac_cv_var_etext = yes; then
6911
81ecdfbb 6912$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
6913
6914fi
a9322a30
TT
6915if test "$enable_profiling" = yes ; then
6916 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
d0ac1c44 6917 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
6918 fi
6919 PROFILE_CFLAGS=-pg
6920 OLD_CFLAGS="$CFLAGS"
6921 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 6922
81ecdfbb
RW
6923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
6924$as_echo_n "checking whether $CC supports -pg... " >&6; }
d0ac1c44 6925if ${ac_cv_cc_supports_pg+:} false; then :
81ecdfbb 6926 $as_echo_n "(cached) " >&6
bec39cab 6927else
81ecdfbb 6928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6929/* end confdefs.h. */
bec39cab
AC
6930
6931int
6932main ()
6933{
a9322a30 6934int x;
bec39cab
AC
6935 ;
6936 return 0;
6937}
6938_ACEOF
81ecdfbb 6939if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 6940 ac_cv_cc_supports_pg=yes
bec39cab 6941else
81ecdfbb 6942 ac_cv_cc_supports_pg=no
bec39cab 6943fi
81ecdfbb 6944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 6945fi
81ecdfbb
RW
6946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
6947$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 6948
a9322a30 6949 if test $ac_cv_cc_supports_pg = no; then
d0ac1c44 6950 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 6951 fi
bec39cab 6952
a9322a30 6953 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
6954fi
6955
44cee4fd
TT
6956CODESIGN_CERT=
6957# Check whether --enable-codesign was given.
6958if test "${enable_codesign+set}" = set; then :
6959 enableval=$enable_codesign; CODESIGN_CERT=$enableval
6960fi
6961
6962
6963
c16158bc
JM
6964
6965
81ecdfbb
RW
6966# Check whether --with-pkgversion was given.
6967if test "${with_pkgversion+set}" = set; then :
6968 withval=$with_pkgversion; case "$withval" in
d0ac1c44 6969 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
6970 no) PKGVERSION= ;;
6971 *) PKGVERSION="($withval) " ;;
6972 esac
6973else
6974 PKGVERSION="(GDB) "
6975
81ecdfbb 6976fi
c16158bc
JM
6977
6978
6979
6980
81ecdfbb
RW
6981
6982# Check whether --with-bugurl was given.
6983if test "${with_bugurl+set}" = set; then :
6984 withval=$with_bugurl; case "$withval" in
d0ac1c44 6985 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
6986 no) BUGURL=
6987 ;;
6988 *) BUGURL="$withval"
6989 ;;
6990 esac
6991else
6992 BUGURL="http://www.gnu.org/software/gdb/bugs/"
6993
81ecdfbb
RW
6994fi
6995
c16158bc
JM
6996 case ${BUGURL} in
6997 "")
6998 REPORT_BUGS_TO=
6999 REPORT_BUGS_TEXI=
7000 ;;
7001 *)
7002 REPORT_BUGS_TO="<$BUGURL>"
7003 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7004 ;;
7005 esac;
7006
7007
7008
7009
7010cat >>confdefs.h <<_ACEOF
7011#define PKGVERSION "$PKGVERSION"
7012_ACEOF
7013
7014
7015cat >>confdefs.h <<_ACEOF
7016#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7017_ACEOF
7018
7019
bec39cab
AC
7020# --------------------- #
7021# Checks for programs. #
7022# --------------------- #
7023
7024for ac_prog in gawk mawk nawk awk
7025do
7026 # Extract the first word of "$ac_prog", so it can be a program name with args.
7027set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7029$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7030if ${ac_cv_prog_AWK+:} false; then :
81ecdfbb 7031 $as_echo_n "(cached) " >&6
bec39cab
AC
7032else
7033 if test -n "$AWK"; then
7034 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7035else
7036as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7037for as_dir in $PATH
7038do
7039 IFS=$as_save_IFS
7040 test -z "$as_dir" && as_dir=.
81ecdfbb 7041 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7042 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7043 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7044 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7045 break 2
7046 fi
7047done
81ecdfbb
RW
7048 done
7049IFS=$as_save_IFS
bec39cab
AC
7050
7051fi
7052fi
7053AWK=$ac_cv_prog_AWK
7054if test -n "$AWK"; then
81ecdfbb
RW
7055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7056$as_echo "$AWK" >&6; }
bec39cab 7057else
81ecdfbb
RW
7058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7059$as_echo "no" >&6; }
bec39cab
AC
7060fi
7061
bec39cab 7062
81ecdfbb 7063 test -n "$AWK" && break
bec39cab
AC
7064done
7065
c971b7fa
PA
7066# Find a good install program. We prefer a C program (faster),
7067# so one script is as good as another. But avoid the broken or
7068# incompatible versions:
7069# SysV /etc/install, /usr/sbin/install
7070# SunOS /usr/etc/install
7071# IRIX /sbin/install
7072# AIX /bin/install
7073# AmigaOS /C/install, which installs bootblocks on floppy discs
7074# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7075# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7076# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7077# OS/2's system install, which has a completely different semantic
7078# ./install, which can be erroneously created by make from ./install.sh.
7079# Reject install programs that cannot install multiple files.
7080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7081$as_echo_n "checking for a BSD-compatible install... " >&6; }
7082if test -z "$INSTALL"; then
d0ac1c44 7083if ${ac_cv_path_install+:} false; then :
c971b7fa
PA
7084 $as_echo_n "(cached) " >&6
7085else
7086 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7087for as_dir in $PATH
7088do
7089 IFS=$as_save_IFS
7090 test -z "$as_dir" && as_dir=.
7091 # Account for people who put trailing slashes in PATH elements.
7092case $as_dir/ in #((
7093 ./ | .// | /[cC]/* | \
7094 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7095 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7096 /usr/ucb/* ) ;;
7097 *)
7098 # OSF1 and SCO ODT 3.0 have their own names for install.
7099 # Don't use installbsd from OSF since it installs stuff as root
7100 # by default.
7101 for ac_prog in ginstall scoinst install; do
7102 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7103 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
c971b7fa
PA
7104 if test $ac_prog = install &&
7105 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7106 # AIX install. It has an incompatible calling convention.
7107 :
7108 elif test $ac_prog = install &&
7109 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7110 # program-specific install script used by HP pwplus--don't use.
7111 :
7112 else
7113 rm -rf conftest.one conftest.two conftest.dir
7114 echo one > conftest.one
7115 echo two > conftest.two
7116 mkdir conftest.dir
7117 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7118 test -s conftest.one && test -s conftest.two &&
7119 test -s conftest.dir/conftest.one &&
7120 test -s conftest.dir/conftest.two
7121 then
7122 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7123 break 3
7124 fi
7125 fi
7126 fi
7127 done
7128 done
7129 ;;
7130esac
7131
7132 done
7133IFS=$as_save_IFS
7134
7135rm -rf conftest.one conftest.two conftest.dir
7136
7137fi
7138 if test "${ac_cv_path_install+set}" = set; then
7139 INSTALL=$ac_cv_path_install
7140 else
7141 # As a last resort, use the slow shell script. Don't cache a
7142 # value for INSTALL within a source directory, because that will
7143 # break other packages using the cache if that directory is
7144 # removed, or if the value is a relative name.
7145 INSTALL=$ac_install_sh
7146 fi
7147fi
7148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7149$as_echo "$INSTALL" >&6; }
7150
7151# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7152# It thinks the first close brace ends the variable substitution.
7153test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7154
7155test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7156
7157test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 7158
81ecdfbb
RW
7159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7160$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
7161LN_S=$as_ln_s
7162if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
7163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7164$as_echo "yes" >&6; }
bec39cab 7165else
81ecdfbb
RW
7166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7167$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
7168fi
7169
7170if test -n "$ac_tool_prefix"; then
7171 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7172set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
7173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7174$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7175if ${ac_cv_prog_RANLIB+:} false; then :
81ecdfbb 7176 $as_echo_n "(cached) " >&6
bec39cab
AC
7177else
7178 if test -n "$RANLIB"; then
7179 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7180else
7181as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7182for as_dir in $PATH
7183do
7184 IFS=$as_save_IFS
7185 test -z "$as_dir" && as_dir=.
81ecdfbb 7186 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7187 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7188 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 7189 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7190 break 2
7191 fi
7192done
81ecdfbb
RW
7193 done
7194IFS=$as_save_IFS
bec39cab
AC
7195
7196fi
7197fi
7198RANLIB=$ac_cv_prog_RANLIB
7199if test -n "$RANLIB"; then
81ecdfbb
RW
7200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7201$as_echo "$RANLIB" >&6; }
bec39cab 7202else
81ecdfbb
RW
7203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7204$as_echo "no" >&6; }
bec39cab
AC
7205fi
7206
81ecdfbb 7207
bec39cab
AC
7208fi
7209if test -z "$ac_cv_prog_RANLIB"; then
7210 ac_ct_RANLIB=$RANLIB
7211 # Extract the first word of "ranlib", so it can be a program name with args.
7212set dummy ranlib; ac_word=$2
81ecdfbb
RW
7213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7214$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7215if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
81ecdfbb 7216 $as_echo_n "(cached) " >&6
bec39cab
AC
7217else
7218 if test -n "$ac_ct_RANLIB"; then
7219 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7220else
7221as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7222for as_dir in $PATH
7223do
7224 IFS=$as_save_IFS
7225 test -z "$as_dir" && as_dir=.
81ecdfbb 7226 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7227 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7228 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 7229 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7230 break 2
7231 fi
7232done
81ecdfbb
RW
7233 done
7234IFS=$as_save_IFS
bec39cab 7235
bec39cab
AC
7236fi
7237fi
7238ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7239if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
7240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7241$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 7242else
81ecdfbb
RW
7243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7244$as_echo "no" >&6; }
bec39cab
AC
7245fi
7246
81ecdfbb
RW
7247 if test "x$ac_ct_RANLIB" = x; then
7248 RANLIB=":"
7249 else
7250 case $cross_compiling:$ac_tool_warned in
7251yes:)
7252{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7253$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7254ac_tool_warned=yes ;;
7255esac
7256 RANLIB=$ac_ct_RANLIB
7257 fi
bec39cab
AC
7258else
7259 RANLIB="$ac_cv_prog_RANLIB"
7260fi
7261
7262for ac_prog in 'bison -y' byacc
7263do
7264 # Extract the first word of "$ac_prog", so it can be a program name with args.
7265set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7267$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7268if ${ac_cv_prog_YACC+:} false; then :
81ecdfbb 7269 $as_echo_n "(cached) " >&6
bec39cab
AC
7270else
7271 if test -n "$YACC"; then
7272 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7273else
7274as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7275for as_dir in $PATH
7276do
7277 IFS=$as_save_IFS
7278 test -z "$as_dir" && as_dir=.
81ecdfbb 7279 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7280 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7281 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 7282 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7283 break 2
7284 fi
7285done
81ecdfbb
RW
7286 done
7287IFS=$as_save_IFS
bec39cab
AC
7288
7289fi
7290fi
7291YACC=$ac_cv_prog_YACC
7292if test -n "$YACC"; then
81ecdfbb
RW
7293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7294$as_echo "$YACC" >&6; }
bec39cab 7295else
81ecdfbb
RW
7296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7297$as_echo "no" >&6; }
bec39cab
AC
7298fi
7299
81ecdfbb 7300
bec39cab
AC
7301 test -n "$YACC" && break
7302done
7303test -n "$YACC" || YACC="yacc"
7304
7305
7306if test -n "$ac_tool_prefix"; then
7307 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7308set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
7309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7310$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7311if ${ac_cv_prog_AR+:} false; then :
81ecdfbb 7312 $as_echo_n "(cached) " >&6
bec39cab
AC
7313else
7314 if test -n "$AR"; then
7315 ac_cv_prog_AR="$AR" # Let the user override the test.
7316else
7317as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7318for as_dir in $PATH
7319do
7320 IFS=$as_save_IFS
7321 test -z "$as_dir" && as_dir=.
81ecdfbb 7322 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7323 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7324 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 7325 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7326 break 2
7327 fi
7328done
81ecdfbb
RW
7329 done
7330IFS=$as_save_IFS
bec39cab
AC
7331
7332fi
7333fi
7334AR=$ac_cv_prog_AR
7335if test -n "$AR"; then
81ecdfbb
RW
7336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7337$as_echo "$AR" >&6; }
bec39cab 7338else
81ecdfbb
RW
7339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7340$as_echo "no" >&6; }
bec39cab
AC
7341fi
7342
81ecdfbb 7343
bec39cab
AC
7344fi
7345if test -z "$ac_cv_prog_AR"; then
7346 ac_ct_AR=$AR
7347 # Extract the first word of "ar", so it can be a program name with args.
7348set dummy ar; ac_word=$2
81ecdfbb
RW
7349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7350$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7351if ${ac_cv_prog_ac_ct_AR+:} false; then :
81ecdfbb 7352 $as_echo_n "(cached) " >&6
bec39cab
AC
7353else
7354 if test -n "$ac_ct_AR"; then
7355 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7356else
7357as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7358for as_dir in $PATH
7359do
7360 IFS=$as_save_IFS
7361 test -z "$as_dir" && as_dir=.
81ecdfbb 7362 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7363 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7364 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 7365 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7366 break 2
7367 fi
7368done
81ecdfbb
RW
7369 done
7370IFS=$as_save_IFS
bec39cab
AC
7371
7372fi
7373fi
7374ac_ct_AR=$ac_cv_prog_ac_ct_AR
7375if test -n "$ac_ct_AR"; then
81ecdfbb
RW
7376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7377$as_echo "$ac_ct_AR" >&6; }
bec39cab 7378else
81ecdfbb
RW
7379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7380$as_echo "no" >&6; }
bec39cab
AC
7381fi
7382
81ecdfbb
RW
7383 if test "x$ac_ct_AR" = x; then
7384 AR=""
7385 else
7386 case $cross_compiling:$ac_tool_warned in
7387yes:)
7388{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7389$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7390ac_tool_warned=yes ;;
7391esac
7392 AR=$ac_ct_AR
7393 fi
bec39cab
AC
7394else
7395 AR="$ac_cv_prog_AR"
7396fi
7397
7398if test -n "$ac_tool_prefix"; then
7399 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7400set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
7401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7402$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7403if ${ac_cv_prog_DLLTOOL+:} false; then :
81ecdfbb 7404 $as_echo_n "(cached) " >&6
bec39cab
AC
7405else
7406 if test -n "$DLLTOOL"; then
7407 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7408else
7409as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7410for as_dir in $PATH
7411do
7412 IFS=$as_save_IFS
7413 test -z "$as_dir" && as_dir=.
81ecdfbb 7414 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7415 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7416 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 7417 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7418 break 2
7419 fi
7420done
81ecdfbb
RW
7421 done
7422IFS=$as_save_IFS
bec39cab
AC
7423
7424fi
7425fi
7426DLLTOOL=$ac_cv_prog_DLLTOOL
7427if test -n "$DLLTOOL"; then
81ecdfbb
RW
7428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7429$as_echo "$DLLTOOL" >&6; }
bec39cab 7430else
81ecdfbb
RW
7431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7432$as_echo "no" >&6; }
bec39cab
AC
7433fi
7434
81ecdfbb 7435
bec39cab
AC
7436fi
7437if test -z "$ac_cv_prog_DLLTOOL"; then
7438 ac_ct_DLLTOOL=$DLLTOOL
7439 # Extract the first word of "dlltool", so it can be a program name with args.
7440set dummy dlltool; ac_word=$2
81ecdfbb
RW
7441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7442$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7443if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
81ecdfbb 7444 $as_echo_n "(cached) " >&6
bec39cab
AC
7445else
7446 if test -n "$ac_ct_DLLTOOL"; then
7447 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7448else
7449as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7450for as_dir in $PATH
7451do
7452 IFS=$as_save_IFS
7453 test -z "$as_dir" && as_dir=.
81ecdfbb 7454 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7455 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7456 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 7457 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7458 break 2
7459 fi
7460done
81ecdfbb
RW
7461 done
7462IFS=$as_save_IFS
bec39cab
AC
7463
7464fi
7465fi
7466ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7467if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
7468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7469$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 7470else
81ecdfbb
RW
7471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7472$as_echo "no" >&6; }
bec39cab
AC
7473fi
7474
81ecdfbb
RW
7475 if test "x$ac_ct_DLLTOOL" = x; then
7476 DLLTOOL=""
7477 else
7478 case $cross_compiling:$ac_tool_warned in
7479yes:)
7480{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7481$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7482ac_tool_warned=yes ;;
7483esac
7484 DLLTOOL=$ac_ct_DLLTOOL
7485 fi
bec39cab
AC
7486else
7487 DLLTOOL="$ac_cv_prog_DLLTOOL"
7488fi
7489
7490if test -n "$ac_tool_prefix"; then
7491 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7492set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
7493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7494$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7495if ${ac_cv_prog_WINDRES+:} false; then :
81ecdfbb 7496 $as_echo_n "(cached) " >&6
bec39cab
AC
7497else
7498 if test -n "$WINDRES"; then
7499 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7500else
7501as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7502for as_dir in $PATH
7503do
7504 IFS=$as_save_IFS
7505 test -z "$as_dir" && as_dir=.
81ecdfbb 7506 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7507 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7508 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 7509 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7510 break 2
7511 fi
7512done
81ecdfbb
RW
7513 done
7514IFS=$as_save_IFS
bec39cab
AC
7515
7516fi
7517fi
7518WINDRES=$ac_cv_prog_WINDRES
7519if test -n "$WINDRES"; then
81ecdfbb
RW
7520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7521$as_echo "$WINDRES" >&6; }
bec39cab 7522else
81ecdfbb
RW
7523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7524$as_echo "no" >&6; }
bec39cab
AC
7525fi
7526
81ecdfbb 7527
bec39cab
AC
7528fi
7529if test -z "$ac_cv_prog_WINDRES"; then
7530 ac_ct_WINDRES=$WINDRES
7531 # Extract the first word of "windres", so it can be a program name with args.
7532set dummy windres; ac_word=$2
81ecdfbb
RW
7533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7534$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7535if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
81ecdfbb 7536 $as_echo_n "(cached) " >&6
bec39cab
AC
7537else
7538 if test -n "$ac_ct_WINDRES"; then
7539 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7540else
7541as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7542for as_dir in $PATH
7543do
7544 IFS=$as_save_IFS
7545 test -z "$as_dir" && as_dir=.
81ecdfbb 7546 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7547 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7548 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 7549 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7550 break 2
7551 fi
7552done
81ecdfbb
RW
7553 done
7554IFS=$as_save_IFS
bec39cab
AC
7555
7556fi
7557fi
7558ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7559if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
7560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7561$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 7562else
81ecdfbb
RW
7563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7564$as_echo "no" >&6; }
c906108c 7565fi
bec39cab 7566
81ecdfbb
RW
7567 if test "x$ac_ct_WINDRES" = x; then
7568 WINDRES=""
7569 else
7570 case $cross_compiling:$ac_tool_warned in
7571yes:)
7572{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7573$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7574ac_tool_warned=yes ;;
7575esac
7576 WINDRES=$ac_ct_WINDRES
7577 fi
c906108c 7578else
bec39cab 7579 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
7580fi
7581
bec39cab 7582
036c3acb
TS
7583case $host_os in
7584 gnu*)
7585 # Needed for GNU Hurd hosts.
7586 if test -n "$ac_tool_prefix"; then
bec39cab
AC
7587 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7588set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
7589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7590$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7591if ${ac_cv_prog_MIG+:} false; then :
81ecdfbb 7592 $as_echo_n "(cached) " >&6
c906108c 7593else
bec39cab
AC
7594 if test -n "$MIG"; then
7595 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7596else
7597as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7598for as_dir in $PATH
7599do
7600 IFS=$as_save_IFS
7601 test -z "$as_dir" && as_dir=.
81ecdfbb 7602 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7603 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7604 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 7605 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7606 break 2
7607 fi
7608done
81ecdfbb
RW
7609 done
7610IFS=$as_save_IFS
bec39cab 7611
c906108c 7612fi
bec39cab
AC
7613fi
7614MIG=$ac_cv_prog_MIG
7615if test -n "$MIG"; then
81ecdfbb
RW
7616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7617$as_echo "$MIG" >&6; }
c906108c 7618else
81ecdfbb
RW
7619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7620$as_echo "no" >&6; }
c906108c
SS
7621fi
7622
81ecdfbb 7623
bec39cab
AC
7624fi
7625if test -z "$ac_cv_prog_MIG"; then
7626 ac_ct_MIG=$MIG
7627 # Extract the first word of "mig", so it can be a program name with args.
7628set dummy mig; ac_word=$2
81ecdfbb
RW
7629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7630$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7631if ${ac_cv_prog_ac_ct_MIG+:} false; then :
81ecdfbb 7632 $as_echo_n "(cached) " >&6
bec39cab
AC
7633else
7634 if test -n "$ac_ct_MIG"; then
7635 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7636else
7637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7638for as_dir in $PATH
7639do
7640 IFS=$as_save_IFS
7641 test -z "$as_dir" && as_dir=.
81ecdfbb 7642 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7643 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7644 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 7645 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7646 break 2
7647 fi
7648done
81ecdfbb
RW
7649 done
7650IFS=$as_save_IFS
c906108c 7651
bec39cab
AC
7652fi
7653fi
7654ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7655if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
7656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7657$as_echo "$ac_ct_MIG" >&6; }
bec39cab 7658else
81ecdfbb
RW
7659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7660$as_echo "no" >&6; }
bec39cab 7661fi
c906108c 7662
81ecdfbb
RW
7663 if test "x$ac_ct_MIG" = x; then
7664 MIG=""
7665 else
7666 case $cross_compiling:$ac_tool_warned in
7667yes:)
7668{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7669$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7670ac_tool_warned=yes ;;
7671esac
7672 MIG=$ac_ct_MIG
7673 fi
bec39cab
AC
7674else
7675 MIG="$ac_cv_prog_MIG"
7676fi
c906108c 7677
036c3acb 7678 if test x"$MIG" = x; then
d0ac1c44 7679 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
036c3acb
TS
7680 fi
7681 ;;
7682esac
c906108c 7683
bec39cab
AC
7684# ---------------------- #
7685# Checks for libraries. #
7686# ---------------------- #
c906108c 7687
bec39cab 7688# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
7689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7690$as_echo_n "checking for main in -lm... " >&6; }
d0ac1c44 7691if ${ac_cv_lib_m_main+:} false; then :
81ecdfbb 7692 $as_echo_n "(cached) " >&6
bec39cab
AC
7693else
7694 ac_check_lib_save_LIBS=$LIBS
7695LIBS="-lm $LIBS"
81ecdfbb 7696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7697/* end confdefs.h. */
c906108c 7698
c906108c 7699
bec39cab
AC
7700int
7701main ()
7702{
81ecdfbb 7703return main ();
bec39cab
AC
7704 ;
7705 return 0;
7706}
7707_ACEOF
81ecdfbb 7708if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
7709 ac_cv_lib_m_main=yes
7710else
81ecdfbb 7711 ac_cv_lib_m_main=no
bec39cab 7712fi
81ecdfbb
RW
7713rm -f core conftest.err conftest.$ac_objext \
7714 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
7715LIBS=$ac_check_lib_save_LIBS
7716fi
81ecdfbb
RW
7717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7718$as_echo "$ac_cv_lib_m_main" >&6; }
d0ac1c44 7719if test "x$ac_cv_lib_m_main" = xyes; then :
bec39cab
AC
7720 cat >>confdefs.h <<_ACEOF
7721#define HAVE_LIBM 1
7722_ACEOF
7723
7724 LIBS="-lm $LIBS"
c906108c 7725
c906108c 7726fi
bec39cab
AC
7727
7728
bec39cab 7729# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
7730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7731$as_echo_n "checking for library containing gethostbyname... " >&6; }
d0ac1c44 7732if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb 7733 $as_echo_n "(cached) " >&6
bec39cab
AC
7734else
7735 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7736cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7737/* end confdefs.h. */
ddc9cd0f 7738
81ecdfbb
RW
7739/* Override any GCC internal prototype to avoid an error.
7740 Use char because int might match the return type of a GCC
7741 builtin and then its argument prototype would still apply. */
bec39cab
AC
7742#ifdef __cplusplus
7743extern "C"
7744#endif
bec39cab
AC
7745char gethostbyname ();
7746int
7747main ()
7748{
81ecdfbb 7749return gethostbyname ();
bec39cab
AC
7750 ;
7751 return 0;
7752}
7753_ACEOF
81ecdfbb
RW
7754for ac_lib in '' nsl; do
7755 if test -z "$ac_lib"; then
7756 ac_res="none required"
7757 else
7758 ac_res=-l$ac_lib
b4e70030 7759 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7760 fi
7761 if ac_fn_c_try_link "$LINENO"; then :
7762 ac_cv_search_gethostbyname=$ac_res
7763fi
7764rm -f core conftest.err conftest.$ac_objext \
7765 conftest$ac_exeext
d0ac1c44 7766 if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb
RW
7767 break
7768fi
7769done
d0ac1c44 7770if ${ac_cv_search_gethostbyname+:} false; then :
ddc9cd0f 7771
bec39cab 7772else
81ecdfbb 7773 ac_cv_search_gethostbyname=no
bec39cab 7774fi
81ecdfbb 7775rm conftest.$ac_ext
bec39cab
AC
7776LIBS=$ac_func_search_save_LIBS
7777fi
81ecdfbb
RW
7778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7779$as_echo "$ac_cv_search_gethostbyname" >&6; }
7780ac_res=$ac_cv_search_gethostbyname
7781if test "$ac_res" != no; then :
7782 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 7783
bec39cab 7784fi
96baa820 7785
c906108c 7786
b4e70030 7787# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
7788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7789$as_echo_n "checking for library containing socketpair... " >&6; }
d0ac1c44 7790if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb 7791 $as_echo_n "(cached) " >&6
b4e70030
JB
7792else
7793 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7795/* end confdefs.h. */
7796
81ecdfbb
RW
7797/* Override any GCC internal prototype to avoid an error.
7798 Use char because int might match the return type of a GCC
7799 builtin and then its argument prototype would still apply. */
b4e70030
JB
7800#ifdef __cplusplus
7801extern "C"
7802#endif
b4e70030
JB
7803char socketpair ();
7804int
7805main ()
7806{
81ecdfbb 7807return socketpair ();
b4e70030
JB
7808 ;
7809 return 0;
7810}
7811_ACEOF
81ecdfbb
RW
7812for ac_lib in '' socket; do
7813 if test -z "$ac_lib"; then
7814 ac_res="none required"
7815 else
7816 ac_res=-l$ac_lib
b4e70030 7817 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7818 fi
7819 if ac_fn_c_try_link "$LINENO"; then :
7820 ac_cv_search_socketpair=$ac_res
7821fi
7822rm -f core conftest.err conftest.$ac_objext \
7823 conftest$ac_exeext
d0ac1c44 7824 if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb
RW
7825 break
7826fi
7827done
d0ac1c44 7828if ${ac_cv_search_socketpair+:} false; then :
b4e70030 7829
b4e70030 7830else
81ecdfbb 7831 ac_cv_search_socketpair=no
b4e70030 7832fi
81ecdfbb 7833rm conftest.$ac_ext
b4e70030
JB
7834LIBS=$ac_func_search_save_LIBS
7835fi
81ecdfbb
RW
7836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7837$as_echo "$ac_cv_search_socketpair" >&6; }
7838ac_res=$ac_cv_search_socketpair
7839if test "$ac_res" != no; then :
7840 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7841
7842fi
7843
7844
233a11ab 7845# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 7846
711a72d3 7847 # Use the system's zlib library.
39f3de7c
L
7848 zlibdir="-L\$(top_builddir)/../zlib"
7849 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 7850
711a72d3
L
7851# Check whether --with-system-zlib was given.
7852if test "${with_system_zlib+set}" = set; then :
afa59b79
L
7853 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7854 zlibdir=
7855 zlibinc=
7856 fi
b040ad30 7857
233a11ab 7858fi
233a11ab 7859
233a11ab 7860
233a11ab 7861
b040ad30 7862
233a11ab 7863
25268153 7864# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
37773e78 7865# On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
25268153
JB
7866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7867$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
d0ac1c44 7868if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7869 $as_echo_n "(cached) " >&6
7870else
7871 ac_func_search_save_LIBS=$LIBS
7872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7873/* end confdefs.h. */
7874
7875/* Override any GCC internal prototype to avoid an error.
7876 Use char because int might match the return type of a GCC
7877 builtin and then its argument prototype would still apply. */
7878#ifdef __cplusplus
7879extern "C"
7880#endif
7881char kinfo_getvmmap ();
7882int
7883main ()
7884{
7885return kinfo_getvmmap ();
7886 ;
7887 return 0;
7888}
7889_ACEOF
37773e78 7890for ac_lib in '' util util-freebsd; do
25268153
JB
7891 if test -z "$ac_lib"; then
7892 ac_res="none required"
7893 else
7894 ac_res=-l$ac_lib
7895 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7896 fi
7897 if ac_fn_c_try_link "$LINENO"; then :
7898 ac_cv_search_kinfo_getvmmap=$ac_res
7899fi
7900rm -f core conftest.err conftest.$ac_objext \
7901 conftest$ac_exeext
d0ac1c44 7902 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7903 break
7904fi
7905done
d0ac1c44 7906if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7907
7908else
7909 ac_cv_search_kinfo_getvmmap=no
7910fi
7911rm conftest.$ac_ext
7912LIBS=$ac_func_search_save_LIBS
7913fi
7914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
7915$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
7916ac_res=$ac_cv_search_kinfo_getvmmap
7917if test "$ac_res" != no; then :
7918 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7919
7920$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
7921
7922fi
7923
7924
92fce24d
JB
7925# fbsd-nat.c can also use kinfo_getfile.
7926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
7927$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
d0ac1c44 7928if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
7929 $as_echo_n "(cached) " >&6
7930else
7931 ac_func_search_save_LIBS=$LIBS
7932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7933/* end confdefs.h. */
7934
7935/* Override any GCC internal prototype to avoid an error.
7936 Use char because int might match the return type of a GCC
7937 builtin and then its argument prototype would still apply. */
7938#ifdef __cplusplus
7939extern "C"
7940#endif
7941char kinfo_getfile ();
7942int
7943main ()
7944{
7945return kinfo_getfile ();
7946 ;
7947 return 0;
7948}
7949_ACEOF
7950for ac_lib in '' util util-freebsd; do
7951 if test -z "$ac_lib"; then
7952 ac_res="none required"
7953 else
7954 ac_res=-l$ac_lib
7955 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7956 fi
7957 if ac_fn_c_try_link "$LINENO"; then :
7958 ac_cv_search_kinfo_getfile=$ac_res
7959fi
7960rm -f core conftest.err conftest.$ac_objext \
7961 conftest$ac_exeext
d0ac1c44 7962 if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
7963 break
7964fi
7965done
d0ac1c44 7966if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
7967
7968else
7969 ac_cv_search_kinfo_getfile=no
7970fi
7971rm conftest.$ac_ext
7972LIBS=$ac_func_search_save_LIBS
7973fi
7974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
7975$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
7976ac_res=$ac_cv_search_kinfo_getfile
7977if test "$ac_res" != no; then :
7978 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7979
7980$as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
7981
7982fi
7983
7984
77f120bf 7985
016a3251
DD
7986 if test "X$prefix" = "XNONE"; then
7987 acl_final_prefix="$ac_default_prefix"
7988 else
7989 acl_final_prefix="$prefix"
7990 fi
7991 if test "X$exec_prefix" = "XNONE"; then
7992 acl_final_exec_prefix='${prefix}'
7993 else
7994 acl_final_exec_prefix="$exec_prefix"
7995 fi
7996 acl_save_prefix="$prefix"
7997 prefix="$acl_final_prefix"
7998 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7999 prefix="$acl_save_prefix"
8000
8001
8002# Check whether --with-gnu-ld was given.
8003if test "${with_gnu_ld+set}" = set; then :
8004 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8005else
8006 with_gnu_ld=no
8007fi
8008
8009# Prepare PATH_SEPARATOR.
8010# The user is always right.
8011if test "${PATH_SEPARATOR+set}" != set; then
8012 echo "#! /bin/sh" >conf$$.sh
8013 echo "exit 0" >>conf$$.sh
8014 chmod +x conf$$.sh
8015 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8016 PATH_SEPARATOR=';'
8017 else
8018 PATH_SEPARATOR=:
8019 fi
8020 rm -f conf$$.sh
8021fi
8022ac_prog=ld
8023if test "$GCC" = yes; then
8024 # Check if gcc -print-prog-name=ld gives a path.
8025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8026$as_echo_n "checking for ld used by GCC... " >&6; }
8027 case $host in
8028 *-*-mingw*)
8029 # gcc leaves a trailing carriage return which upsets mingw
8030 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8031 *)
8032 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8033 esac
8034 case $ac_prog in
8035 # Accept absolute paths.
8036 [\\/]* | [A-Za-z]:[\\/]*)
8037 re_direlt='/[^/][^/]*/\.\./'
8038 # Canonicalize the path of ld
8039 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8040 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8041 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8042 done
8043 test -z "$LD" && LD="$ac_prog"
8044 ;;
8045 "")
8046 # If it fails, then pretend we aren't using GCC.
8047 ac_prog=ld
8048 ;;
8049 *)
8050 # If it is relative, then search for the first ld in PATH.
8051 with_gnu_ld=unknown
8052 ;;
8053 esac
8054elif test "$with_gnu_ld" = yes; then
8055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8056$as_echo_n "checking for GNU ld... " >&6; }
8057else
8058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8059$as_echo_n "checking for non-GNU ld... " >&6; }
8060fi
d0ac1c44 8061if ${acl_cv_path_LD+:} false; then :
016a3251
DD
8062 $as_echo_n "(cached) " >&6
8063else
8064 if test -z "$LD"; then
8065 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8066 for ac_dir in $PATH; do
8067 test -z "$ac_dir" && ac_dir=.
8068 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8069 acl_cv_path_LD="$ac_dir/$ac_prog"
8070 # Check to see if the program is GNU ld. I'd rather use --version,
8071 # but apparently some GNU ld's only accept -v.
8072 # Break only if it was the GNU/non-GNU ld that we prefer.
8073 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8074 test "$with_gnu_ld" != no && break
8075 else
8076 test "$with_gnu_ld" != yes && break
8077 fi
8078 fi
8079 done
8080 IFS="$ac_save_ifs"
8081else
8082 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8083fi
8084fi
8085
8086LD="$acl_cv_path_LD"
8087if test -n "$LD"; then
8088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8089$as_echo "$LD" >&6; }
8090else
8091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8092$as_echo "no" >&6; }
8093fi
d0ac1c44 8094test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
016a3251
DD
8095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8096$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
d0ac1c44 8097if ${acl_cv_prog_gnu_ld+:} false; then :
016a3251
DD
8098 $as_echo_n "(cached) " >&6
8099else
8100 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8101if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8102 acl_cv_prog_gnu_ld=yes
8103else
8104 acl_cv_prog_gnu_ld=no
8105fi
8106fi
8107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8108$as_echo "$acl_cv_prog_gnu_ld" >&6; }
8109with_gnu_ld=$acl_cv_prog_gnu_ld
8110
8111
8112
8113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8114$as_echo_n "checking for shared library run path origin... " >&6; }
d0ac1c44 8115if ${acl_cv_rpath+:} false; then :
016a3251
DD
8116 $as_echo_n "(cached) " >&6
8117else
8118
8119 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8120 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8121 . ./conftest.sh
8122 rm -f ./conftest.sh
8123 acl_cv_rpath=done
8124
8125fi
8126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8127$as_echo "$acl_cv_rpath" >&6; }
8128 wl="$acl_cv_wl"
8129 libext="$acl_cv_libext"
8130 shlibext="$acl_cv_shlibext"
8131 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8132 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8133 hardcode_direct="$acl_cv_hardcode_direct"
8134 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8135 # Check whether --enable-rpath was given.
8136if test "${enable_rpath+set}" = set; then :
8137 enableval=$enable_rpath; :
8138else
8139 enable_rpath=yes
8140fi
8141
8142
8143
8144
8145
8146
8147
8148
8149 use_additional=yes
8150
8151 acl_save_prefix="$prefix"
8152 prefix="$acl_final_prefix"
8153 acl_save_exec_prefix="$exec_prefix"
8154 exec_prefix="$acl_final_exec_prefix"
8155
8156 eval additional_includedir=\"$includedir\"
8157 eval additional_libdir=\"$libdir\"
8158
8159 exec_prefix="$acl_save_exec_prefix"
8160 prefix="$acl_save_prefix"
77f120bf 8161
6c7a06a3 8162
81ecdfbb
RW
8163# Check whether --with-libiconv-prefix was given.
8164if test "${with_libiconv_prefix+set}" = set; then :
8165 withval=$with_libiconv_prefix;
016a3251
DD
8166 if test "X$withval" = "Xno"; then
8167 use_additional=no
8168 else
8169 if test "X$withval" = "X"; then
8170
8171 acl_save_prefix="$prefix"
8172 prefix="$acl_final_prefix"
8173 acl_save_exec_prefix="$exec_prefix"
8174 exec_prefix="$acl_final_exec_prefix"
8175
8176 eval additional_includedir=\"$includedir\"
8177 eval additional_libdir=\"$libdir\"
8178
8179 exec_prefix="$acl_save_exec_prefix"
8180 prefix="$acl_save_prefix"
8181
8182 else
8183 additional_includedir="$withval/include"
8184 additional_libdir="$withval/lib"
8185 fi
8186 fi
6c7a06a3 8187
81ecdfbb
RW
8188fi
8189
016a3251
DD
8190 LIBICONV=
8191 LTLIBICONV=
8192 INCICONV=
8193 rpathdirs=
8194 ltrpathdirs=
8195 names_already_handled=
8196 names_next_round='iconv '
8197 while test -n "$names_next_round"; do
8198 names_this_round="$names_next_round"
8199 names_next_round=
8200 for name in $names_this_round; do
8201 already_handled=
8202 for n in $names_already_handled; do
8203 if test "$n" = "$name"; then
8204 already_handled=yes
8205 break
8206 fi
8207 done
8208 if test -z "$already_handled"; then
8209 names_already_handled="$names_already_handled $name"
8210 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8211 eval value=\"\$HAVE_LIB$uppername\"
8212 if test -n "$value"; then
8213 if test "$value" = yes; then
8214 eval value=\"\$LIB$uppername\"
8215 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8216 eval value=\"\$LTLIB$uppername\"
8217 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8218 else
8219 :
8220 fi
8221 else
8222 found_dir=
8223 found_la=
8224 found_so=
8225 found_a=
8226 if test $use_additional = yes; then
8227 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8228 found_dir="$additional_libdir"
8229 found_so="$additional_libdir/lib$name.$shlibext"
8230 if test -f "$additional_libdir/lib$name.la"; then
8231 found_la="$additional_libdir/lib$name.la"
8232 fi
8233 else
8234 if test -f "$additional_libdir/lib$name.$libext"; then
8235 found_dir="$additional_libdir"
8236 found_a="$additional_libdir/lib$name.$libext"
8237 if test -f "$additional_libdir/lib$name.la"; then
8238 found_la="$additional_libdir/lib$name.la"
8239 fi
8240 fi
8241 fi
8242 fi
8243 if test "X$found_dir" = "X"; then
8244 for x in $LDFLAGS $LTLIBICONV; do
8245
8246 acl_save_prefix="$prefix"
8247 prefix="$acl_final_prefix"
8248 acl_save_exec_prefix="$exec_prefix"
8249 exec_prefix="$acl_final_exec_prefix"
8250 eval x=\"$x\"
8251 exec_prefix="$acl_save_exec_prefix"
8252 prefix="$acl_save_prefix"
8253
8254 case "$x" in
8255 -L*)
8256 dir=`echo "X$x" | sed -e 's/^X-L//'`
8257 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8258 found_dir="$dir"
8259 found_so="$dir/lib$name.$shlibext"
8260 if test -f "$dir/lib$name.la"; then
8261 found_la="$dir/lib$name.la"
8262 fi
8263 else
8264 if test -f "$dir/lib$name.$libext"; then
8265 found_dir="$dir"
8266 found_a="$dir/lib$name.$libext"
8267 if test -f "$dir/lib$name.la"; then
8268 found_la="$dir/lib$name.la"
8269 fi
8270 fi
8271 fi
8272 ;;
8273 esac
8274 if test "X$found_dir" != "X"; then
8275 break
8276 fi
8277 done
8278 fi
8279 if test "X$found_dir" != "X"; then
8280 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8281 if test "X$found_so" != "X"; then
8282 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8283 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8284 else
8285 haveit=
8286 for x in $ltrpathdirs; do
8287 if test "X$x" = "X$found_dir"; then
8288 haveit=yes
8289 break
8290 fi
8291 done
8292 if test -z "$haveit"; then
8293 ltrpathdirs="$ltrpathdirs $found_dir"
8294 fi
8295 if test "$hardcode_direct" = yes; then
8296 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8297 else
8298 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8299 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8300 haveit=
8301 for x in $rpathdirs; do
8302 if test "X$x" = "X$found_dir"; then
8303 haveit=yes
8304 break
8305 fi
8306 done
8307 if test -z "$haveit"; then
8308 rpathdirs="$rpathdirs $found_dir"
8309 fi
8310 else
8311 haveit=
8312 for x in $LDFLAGS $LIBICONV; do
8313
8314 acl_save_prefix="$prefix"
8315 prefix="$acl_final_prefix"
8316 acl_save_exec_prefix="$exec_prefix"
8317 exec_prefix="$acl_final_exec_prefix"
8318 eval x=\"$x\"
8319 exec_prefix="$acl_save_exec_prefix"
8320 prefix="$acl_save_prefix"
8321
8322 if test "X$x" = "X-L$found_dir"; then
8323 haveit=yes
8324 break
8325 fi
8326 done
8327 if test -z "$haveit"; then
8328 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8329 fi
8330 if test "$hardcode_minus_L" != no; then
8331 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8332 else
8333 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8334 fi
8335 fi
8336 fi
8337 fi
8338 else
8339 if test "X$found_a" != "X"; then
8340 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8341 else
8342 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8343 fi
8344 fi
8345 additional_includedir=
8346 case "$found_dir" in
8347 */lib | */lib/)
8348 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8349 additional_includedir="$basedir/include"
8350 ;;
8351 esac
8352 if test "X$additional_includedir" != "X"; then
8353 if test "X$additional_includedir" != "X/usr/include"; then
8354 haveit=
8355 if test "X$additional_includedir" = "X/usr/local/include"; then
8356 if test -n "$GCC"; then
8357 case $host_os in
8358 linux*) haveit=yes;;
8359 esac
8360 fi
8361 fi
8362 if test -z "$haveit"; then
8363 for x in $CPPFLAGS $INCICONV; do
8364
8365 acl_save_prefix="$prefix"
8366 prefix="$acl_final_prefix"
8367 acl_save_exec_prefix="$exec_prefix"
8368 exec_prefix="$acl_final_exec_prefix"
8369 eval x=\"$x\"
8370 exec_prefix="$acl_save_exec_prefix"
8371 prefix="$acl_save_prefix"
8372
8373 if test "X$x" = "X-I$additional_includedir"; then
8374 haveit=yes
8375 break
8376 fi
8377 done
8378 if test -z "$haveit"; then
8379 if test -d "$additional_includedir"; then
8380 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8381 fi
8382 fi
8383 fi
8384 fi
8385 fi
8386 if test -n "$found_la"; then
8387 save_libdir="$libdir"
8388 case "$found_la" in
8389 */* | *\\*) . "$found_la" ;;
8390 *) . "./$found_la" ;;
8391 esac
8392 libdir="$save_libdir"
8393 for dep in $dependency_libs; do
8394 case "$dep" in
8395 -L*)
8396 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8397 if test "X$additional_libdir" != "X/usr/lib"; then
8398 haveit=
8399 if test "X$additional_libdir" = "X/usr/local/lib"; then
8400 if test -n "$GCC"; then
8401 case $host_os in
8402 linux*) haveit=yes;;
8403 esac
8404 fi
8405 fi
8406 if test -z "$haveit"; then
8407 haveit=
8408 for x in $LDFLAGS $LIBICONV; do
8409
8410 acl_save_prefix="$prefix"
8411 prefix="$acl_final_prefix"
8412 acl_save_exec_prefix="$exec_prefix"
8413 exec_prefix="$acl_final_exec_prefix"
8414 eval x=\"$x\"
8415 exec_prefix="$acl_save_exec_prefix"
8416 prefix="$acl_save_prefix"
8417
8418 if test "X$x" = "X-L$additional_libdir"; then
8419 haveit=yes
8420 break
8421 fi
8422 done
8423 if test -z "$haveit"; then
8424 if test -d "$additional_libdir"; then
8425 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8426 fi
8427 fi
8428 haveit=
8429 for x in $LDFLAGS $LTLIBICONV; do
8430
8431 acl_save_prefix="$prefix"
8432 prefix="$acl_final_prefix"
8433 acl_save_exec_prefix="$exec_prefix"
8434 exec_prefix="$acl_final_exec_prefix"
8435 eval x=\"$x\"
8436 exec_prefix="$acl_save_exec_prefix"
8437 prefix="$acl_save_prefix"
8438
8439 if test "X$x" = "X-L$additional_libdir"; then
8440 haveit=yes
8441 break
8442 fi
8443 done
8444 if test -z "$haveit"; then
8445 if test -d "$additional_libdir"; then
8446 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8447 fi
8448 fi
8449 fi
8450 fi
8451 ;;
8452 -R*)
8453 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8454 if test "$enable_rpath" != no; then
8455 haveit=
8456 for x in $rpathdirs; do
8457 if test "X$x" = "X$dir"; then
8458 haveit=yes
8459 break
8460 fi
8461 done
8462 if test -z "$haveit"; then
8463 rpathdirs="$rpathdirs $dir"
8464 fi
8465 haveit=
8466 for x in $ltrpathdirs; do
8467 if test "X$x" = "X$dir"; then
8468 haveit=yes
8469 break
8470 fi
8471 done
8472 if test -z "$haveit"; then
8473 ltrpathdirs="$ltrpathdirs $dir"
8474 fi
8475 fi
8476 ;;
8477 -l*)
8478 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8479 ;;
8480 *.la)
8481 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8482 ;;
8483 *)
8484 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8485 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8486 ;;
8487 esac
8488 done
8489 fi
8490 else
8491 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8492 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8493 fi
8494 fi
8495 fi
8496 done
8497 done
8498 if test "X$rpathdirs" != "X"; then
8499 if test -n "$hardcode_libdir_separator"; then
8500 alldirs=
8501 for found_dir in $rpathdirs; do
8502 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8503 done
8504 acl_save_libdir="$libdir"
8505 libdir="$alldirs"
8506 eval flag=\"$hardcode_libdir_flag_spec\"
8507 libdir="$acl_save_libdir"
8508 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8509 else
8510 for found_dir in $rpathdirs; do
8511 acl_save_libdir="$libdir"
8512 libdir="$found_dir"
8513 eval flag=\"$hardcode_libdir_flag_spec\"
8514 libdir="$acl_save_libdir"
8515 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8516 done
8517 fi
8518 fi
8519 if test "X$ltrpathdirs" != "X"; then
8520 for found_dir in $ltrpathdirs; do
8521 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8522 done
8523 fi
8524
8525
8526
8527
8528
6c7a06a3 8529
6c7a06a3 8530
81ecdfbb
RW
8531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8532$as_echo_n "checking for iconv... " >&6; }
d0ac1c44 8533if ${am_cv_func_iconv+:} false; then :
81ecdfbb 8534 $as_echo_n "(cached) " >&6
d542061a 8535else
6c7a06a3
TT
8536
8537 am_cv_func_iconv="no, consider installing GNU libiconv"
8538 am_cv_lib_iconv=no
016a3251
DD
8539 am_save_CPPFLAGS="$CPPFLAGS"
8540 CPPFLAGS="$CPPFLAGS $INCICONV"
8541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8542/* end confdefs.h. */
6c7a06a3
TT
8543#include <stdlib.h>
8544#include <iconv.h>
d542061a
UW
8545int
8546main ()
8547{
6c7a06a3 8548iconv_t cd = iconv_open("","");
016a3251
DD
8549 iconv(cd,NULL,NULL,NULL,NULL);
8550 iconv_close(cd);
d542061a
UW
8551 ;
8552 return 0;
8553}
8554_ACEOF
81ecdfbb 8555if ac_fn_c_try_link "$LINENO"; then :
016a3251 8556 am_cv_func_iconv=yes
d542061a 8557fi
81ecdfbb
RW
8558rm -f core conftest.err conftest.$ac_objext \
8559 conftest$ac_exeext conftest.$ac_ext
016a3251 8560 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 8561
016a3251
DD
8562 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8563 for _libs in .libs _libs; do
8564 am_save_CPPFLAGS="$CPPFLAGS"
8565 am_save_LIBS="$LIBS"
8566 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8567 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8569/* end confdefs.h. */
6c7a06a3
TT
8570#include <stdlib.h>
8571#include <iconv.h>
d542061a
UW
8572int
8573main ()
8574{
6c7a06a3 8575iconv_t cd = iconv_open("","");
016a3251
DD
8576 iconv(cd,NULL,NULL,NULL,NULL);
8577 iconv_close(cd);
d542061a
UW
8578 ;
8579 return 0;
8580}
8581_ACEOF
81ecdfbb 8582if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
8583 INCICONV="-I../libiconv/include"
8584 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8585 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8586 am_cv_lib_iconv=yes
8587 am_cv_func_iconv=yes
d542061a 8588fi
81ecdfbb
RW
8589rm -f core conftest.err conftest.$ac_objext \
8590 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
8591 CPPFLAGS="$am_save_CPPFLAGS"
8592 LIBS="$am_save_LIBS"
8593 if test "$am_cv_func_iconv" = "yes"; then
8594 break
8595 fi
8596 done
77f120bf 8597 fi
94ae1714 8598
4edb1e84 8599 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 8600 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 8601 am_save_LIBS="$LIBS"
5d762de0 8602 CPPFLAGS="$CPPFLAGS $INCICONV"
016a3251 8603 LIBS="$LIBS $LIBICONV"
81ecdfbb 8604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8605/* end confdefs.h. */
6c7a06a3
TT
8606#include <stdlib.h>
8607#include <iconv.h>
bec39cab
AC
8608int
8609main ()
8610{
6c7a06a3
TT
8611iconv_t cd = iconv_open("","");
8612 iconv(cd,NULL,NULL,NULL,NULL);
8613 iconv_close(cd);
bec39cab
AC
8614 ;
8615 return 0;
8616}
8617_ACEOF
81ecdfbb 8618if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8619 am_cv_lib_iconv=yes
6c7a06a3 8620 am_cv_func_iconv=yes
627af7ea 8621fi
81ecdfbb
RW
8622rm -f core conftest.err conftest.$ac_objext \
8623 conftest$ac_exeext conftest.$ac_ext
fc3b640d 8624 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 8625 LIBS="$am_save_LIBS"
6c7a06a3
TT
8626 fi
8627
8628fi
81ecdfbb
RW
8629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8630$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
8631 if test "$am_cv_func_iconv" = yes; then
8632
8633$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 8634
016a3251 8635 fi
fc3b640d 8636 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
8637
8638 for element in $INCICONV; do
8639 haveit=
8640 for x in $CPPFLAGS; do
8641
8642 acl_save_prefix="$prefix"
8643 prefix="$acl_final_prefix"
8644 acl_save_exec_prefix="$exec_prefix"
8645 exec_prefix="$acl_final_exec_prefix"
8646 eval x=\"$x\"
8647 exec_prefix="$acl_save_exec_prefix"
8648 prefix="$acl_save_prefix"
8649
8650 if test "X$x" = "X$element"; then
8651 haveit=yes
8652 break
8653 fi
8654 done
8655 if test -z "$haveit"; then
8656 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8657 fi
8658 done
8659
8660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8661$as_echo_n "checking how to link with libiconv... " >&6; }
8662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8663$as_echo "$LIBICONV" >&6; }
94ae1714 8664 else
016a3251
DD
8665 LIBICONV=
8666 LTLIBICONV=
fc3b640d 8667 fi
94ae1714 8668
6c7a06a3 8669
6c7a06a3 8670
016a3251 8671 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
8672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8673$as_echo_n "checking for iconv declaration... " >&6; }
d0ac1c44 8674 if ${am_cv_proto_iconv+:} false; then :
81ecdfbb 8675 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8676else
8677
81ecdfbb 8678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8679/* end confdefs.h. */
8680
6c7a06a3
TT
8681#include <stdlib.h>
8682#include <iconv.h>
8683extern
b4e70030 8684#ifdef __cplusplus
6c7a06a3 8685"C"
b4e70030 8686#endif
6c7a06a3
TT
8687#if defined(__STDC__) || defined(__cplusplus)
8688size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8689#else
8690size_t iconv();
8691#endif
8692
b4e70030
JB
8693int
8694main ()
8695{
6c7a06a3 8696
b4e70030
JB
8697 ;
8698 return 0;
8699}
8700_ACEOF
81ecdfbb 8701if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 8702 am_cv_proto_iconv_arg1=""
4e8d927d 8703else
81ecdfbb 8704 am_cv_proto_iconv_arg1="const"
b4e70030 8705fi
81ecdfbb 8706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
8707 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);"
8708fi
8709
8710 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 8711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 8712 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
8713$as_echo "${ac_t:-
8714 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
8715
8716cat >>confdefs.h <<_ACEOF
8717#define ICONV_CONST $am_cv_proto_iconv_arg1
8718_ACEOF
8719
8720 fi
6c7a06a3
TT
8721
8722
478aac75
DE
8723# GDB may fork/exec the iconv program to get the list of supported character
8724# sets. Allow the user to specify where to find it.
8725# There are several factors affecting the choice of option name:
8726# - There is already --with-libiconv-prefix but we can't use it, it specifies
8727# the build-time location of libiconv files.
8728# - The program we need to find is iconv, which comes with glibc. The user
8729# doesn't necessarily have libiconv installed. Therefore naming this
8730# --with-libiconv-foo feels wrong.
8731# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8732# defined to work on directories not files (though it really doesn't know
8733# the difference).
8734# - Calling this --with-iconv-prefix is perceived to cause too much confusion
8735# with --with-libiconv-prefix.
8736# Putting these together is why the option name is --with-iconv-bin.
8737
8738
8739# Check whether --with-iconv-bin was given.
8740if test "${with_iconv_bin+set}" = set; then :
8741 withval=$with_iconv_bin; iconv_bin="${withval}"
8742
8743cat >>confdefs.h <<_ACEOF
8744#define ICONV_BIN "${iconv_bin}"
8745_ACEOF
8746
8747
8748 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8749 if test "x$prefix" = xNONE; then
8750 test_prefix=/usr/local
8751 else
8752 test_prefix=$prefix
8753 fi
8754 else
8755 test_prefix=$exec_prefix
8756 fi
8757 value=0
8758 case ${iconv_bin} in
8759 "${test_prefix}"|"${test_prefix}/"*|\
8760 '${exec_prefix}'|'${exec_prefix}/'*)
8761 value=1
8762 ;;
8763 esac
8764
8765cat >>confdefs.h <<_ACEOF
8766#define ICONV_BIN_RELOCATABLE $value
8767_ACEOF
8768
8769
8770
8771fi
8772
8773
cb01cfba 8774# For the TUI, we need enhanced curses functionality.
bd8a8e1b 8775if test x"$enable_tui" != xno; then
cb01cfba
JB
8776 prefer_curses=yes
8777fi
8778
8779curses_found=no
8780if test x"$prefer_curses" = xyes; then
8781 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8782 # curses library because the latter might not provide all the
8783 # functionality we need. However, this leads to problems on systems
8784 # where the linker searches /usr/local/lib, but the compiler doesn't
8785 # search /usr/local/include, if ncurses is installed in /usr/local. A
8786 # default installation of ncurses on alpha*-dec-osf* will lead to such
8787 # a situation.
81ecdfbb
RW
8788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8789$as_echo_n "checking for library containing waddstr... " >&6; }
d0ac1c44 8790if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8791 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8792else
8793 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8795/* end confdefs.h. */
8796
81ecdfbb
RW
8797/* Override any GCC internal prototype to avoid an error.
8798 Use char because int might match the return type of a GCC
8799 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8800#ifdef __cplusplus
8801extern "C"
8802#endif
6c7a06a3
TT
8803char waddstr ();
8804int
8805main ()
8806{
81ecdfbb 8807return waddstr ();
6c7a06a3
TT
8808 ;
8809 return 0;
8810}
8811_ACEOF
5007d765 8812for ac_lib in '' ncursesw ncurses cursesX curses; do
81ecdfbb
RW
8813 if test -z "$ac_lib"; then
8814 ac_res="none required"
8815 else
8816 ac_res=-l$ac_lib
8817 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8818 fi
8819 if ac_fn_c_try_link "$LINENO"; then :
8820 ac_cv_search_waddstr=$ac_res
8821fi
8822rm -f core conftest.err conftest.$ac_objext \
8823 conftest$ac_exeext
d0ac1c44 8824 if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb
RW
8825 break
8826fi
8827done
d0ac1c44 8828if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8829
6c7a06a3 8830else
81ecdfbb
RW
8831 ac_cv_search_waddstr=no
8832fi
8833rm conftest.$ac_ext
8834LIBS=$ac_func_search_save_LIBS
8835fi
8836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8837$as_echo "$ac_cv_search_waddstr" >&6; }
8838ac_res=$ac_cv_search_waddstr
8839if test "$ac_res" != no; then :
8840 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
8841
8842fi
8843
8844
cb01cfba
JB
8845 if test "$ac_cv_search_waddstr" != no; then
8846 curses_found=yes
8847 fi
8848fi
8849
8850# Check whether we should enable the TUI, but only do so if we really
8851# can.
8852if test x"$enable_tui" != xno; then
8853 if test -d $srcdir/tui; then
8854 if test "$curses_found" != no; then
6c7a06a3
TT
8855 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8856 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8857 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8858 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
8859 else
8860 if test x"$enable_tui" = xyes; then
d0ac1c44 8861 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 8862 else
81ecdfbb
RW
8863 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8864$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
8865 fi
8866 fi
8867 fi
8868fi
8869
8870# Since GDB uses Readline, we need termcap functionality. In many
8871# cases this will be provided by the curses library, but some systems
96fe4562 8872# have a separate termcap library, or no curses library at all.
6c7a06a3
TT
8873
8874case $host_os in
8875 cygwin*)
8876 if test -d $srcdir/libtermcap; then
8877 LIBS="../libtermcap/libtermcap.a $LIBS"
8878 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8879 fi ;;
8880 go32* | *djgpp*)
8881 ac_cv_search_tgetent="none required"
8882 ;;
6c7a06a3
TT
8883esac
8884
8885# These are the libraries checked by Readline.
81ecdfbb
RW
8886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8887$as_echo_n "checking for library containing tgetent... " >&6; }
d0ac1c44 8888if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb 8889 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8890else
8891 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8892cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8893/* end confdefs.h. */
8894
81ecdfbb
RW
8895/* Override any GCC internal prototype to avoid an error.
8896 Use char because int might match the return type of a GCC
8897 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8898#ifdef __cplusplus
8899extern "C"
8900#endif
6c7a06a3
TT
8901char tgetent ();
8902int
8903main ()
8904{
81ecdfbb 8905return tgetent ();
6c7a06a3
TT
8906 ;
8907 return 0;
8908}
8909_ACEOF
2578ecb1 8910for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
81ecdfbb
RW
8911 if test -z "$ac_lib"; then
8912 ac_res="none required"
8913 else
8914 ac_res=-l$ac_lib
6c7a06a3 8915 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8916 fi
8917 if ac_fn_c_try_link "$LINENO"; then :
8918 ac_cv_search_tgetent=$ac_res
8919fi
8920rm -f core conftest.err conftest.$ac_objext \
8921 conftest$ac_exeext
d0ac1c44 8922 if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb
RW
8923 break
8924fi
8925done
d0ac1c44 8926if ${ac_cv_search_tgetent+:} false; then :
6c7a06a3 8927
6c7a06a3 8928else
81ecdfbb 8929 ac_cv_search_tgetent=no
6c7a06a3 8930fi
81ecdfbb 8931rm conftest.$ac_ext
6c7a06a3
TT
8932LIBS=$ac_func_search_save_LIBS
8933fi
81ecdfbb
RW
8934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8935$as_echo "$ac_cv_search_tgetent" >&6; }
8936ac_res=$ac_cv_search_tgetent
8937if test "$ac_res" != no; then :
8938 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 8939
06825bd1
MK
8940fi
8941
06825bd1 8942
bec39cab 8943if test "$ac_cv_search_tgetent" = no; then
7a85168d 8944 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
8945fi
8946
3841debe 8947
81ecdfbb
RW
8948# Check whether --with-system-readline was given.
8949if test "${with_system_readline+set}" = set; then :
8950 withval=$with_system_readline;
8951fi
6a30b0a5 8952
6a30b0a5
AS
8953
8954if test "$with_system_readline" = yes; then
8955 READLINE=-lreadline
8956 READLINE_DEPS=
8957 READLINE_CFLAGS=
39037522 8958 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
8959else
8960 READLINE='$(READLINE_DIR)/libreadline.a'
8961 READLINE_DEPS='$(READLINE)'
8962 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 8963 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
8964fi
8965
8966
8967
8968
8969
f997c383
SD
8970# Generate jit-reader.h
8971
8972# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
8973TARGET_PTR=
8974
8975# The cast to long int works around a bug in the HP C Compiler
8976# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8977# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8978# This bug is HP SR number 8606223364.
8979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
8980$as_echo_n "checking size of unsigned long long... " >&6; }
d0ac1c44 8981if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
f997c383
SD
8982 $as_echo_n "(cached) " >&6
8983else
8984 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
8985
8986else
8987 if test "$ac_cv_type_unsigned_long_long" = yes; then
8988 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8989$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
8990as_fn_error 77 "cannot compute sizeof (unsigned long long)
8991See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
8992 else
8993 ac_cv_sizeof_unsigned_long_long=0
8994 fi
8995fi
8996
8997fi
8998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
8999$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9000
9001
9002
9003cat >>confdefs.h <<_ACEOF
9004#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9005_ACEOF
9006
9007
9008# The cast to long int works around a bug in the HP C Compiler
9009# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9010# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9011# This bug is HP SR number 8606223364.
9012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9013$as_echo_n "checking size of unsigned long... " >&6; }
d0ac1c44 9014if ${ac_cv_sizeof_unsigned_long+:} false; then :
f997c383
SD
9015 $as_echo_n "(cached) " >&6
9016else
9017 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9018
9019else
9020 if test "$ac_cv_type_unsigned_long" = yes; then
9021 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9022$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9023as_fn_error 77 "cannot compute sizeof (unsigned long)
9024See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9025 else
9026 ac_cv_sizeof_unsigned_long=0
9027 fi
9028fi
9029
9030fi
9031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9032$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9033
9034
9035
9036cat >>confdefs.h <<_ACEOF
9037#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9038_ACEOF
9039
9040
9041# The cast to long int works around a bug in the HP C Compiler
9042# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9043# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9044# This bug is HP SR number 8606223364.
9045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9046$as_echo_n "checking size of unsigned __int128... " >&6; }
d0ac1c44 9047if ${ac_cv_sizeof_unsigned___int128+:} false; then :
f997c383
SD
9048 $as_echo_n "(cached) " >&6
9049else
9050 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9051
9052else
9053 if test "$ac_cv_type_unsigned___int128" = yes; then
9054 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9055$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9056as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9057See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9058 else
9059 ac_cv_sizeof_unsigned___int128=0
9060 fi
9061fi
9062
9063fi
9064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9065$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9066
9067
9068
9069cat >>confdefs.h <<_ACEOF
9070#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9071_ACEOF
9072
9073
9074
9075if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9076 TARGET_PTR="unsigned long"
9077elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9078 TARGET_PTR="unsigned long long"
9079elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9080 TARGET_PTR="unsigned __int128"
9081else
9082 TARGET_PTR="unsigned long"
9083fi
9084
9085
9086ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9087
9088
a2d08b9e
SD
9089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9090$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 9091if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9092 $as_echo_n "(cached) " >&6
9093else
9094 ac_func_search_save_LIBS=$LIBS
9095cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9096/* end confdefs.h. */
9097
9098/* Override any GCC internal prototype to avoid an error.
9099 Use char because int might match the return type of a GCC
9100 builtin and then its argument prototype would still apply. */
9101#ifdef __cplusplus
9102extern "C"
9103#endif
9104char dlopen ();
9105int
9106main ()
9107{
9108return dlopen ();
9109 ;
9110 return 0;
9111}
9112_ACEOF
9113for ac_lib in '' dl; do
9114 if test -z "$ac_lib"; then
9115 ac_res="none required"
9116 else
9117 ac_res=-l$ac_lib
9118 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9119 fi
9120 if ac_fn_c_try_link "$LINENO"; then :
9121 ac_cv_search_dlopen=$ac_res
9122fi
9123rm -f core conftest.err conftest.$ac_objext \
9124 conftest$ac_exeext
d0ac1c44 9125 if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9126 break
9127fi
9128done
d0ac1c44 9129if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9130
9131else
9132 ac_cv_search_dlopen=no
9133fi
9134rm conftest.$ac_ext
9135LIBS=$ac_func_search_save_LIBS
9136fi
9137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9138$as_echo "$ac_cv_search_dlopen" >&6; }
9139ac_res=$ac_cv_search_dlopen
9140if test "$ac_res" != no; then :
9141 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9142
9143fi
9144
9145
39037522 9146
b8e0a31c
SD
9147
9148# Check whether --with-jit-reader-dir was given.
9149if test "${with_jit_reader_dir+set}" = set; then :
9150 withval=$with_jit_reader_dir;
9151 JIT_READER_DIR=$withval
9152else
9153 JIT_READER_DIR=${libdir}/gdb
9154fi
9155
9156
9157 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9158 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9159 ac_define_dir=`eval echo $JIT_READER_DIR`
9160 ac_define_dir=`eval echo $ac_define_dir`
9161
9162cat >>confdefs.h <<_ACEOF
9163#define JIT_READER_DIR "$ac_define_dir"
9164_ACEOF
9165
9166
9167
9168
9169 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9170 if test "x$prefix" = xNONE; then
9171 test_prefix=/usr/local
9172 else
9173 test_prefix=$prefix
9174 fi
9175 else
9176 test_prefix=$exec_prefix
9177 fi
9178 value=0
9179 case ${ac_define_dir} in
9180 "${test_prefix}"|"${test_prefix}/"*|\
9181 '${exec_prefix}'|'${exec_prefix}/'*)
9182 value=1
9183 ;;
9184 esac
9185
9186cat >>confdefs.h <<_ACEOF
9187#define JIT_READER_DIR_RELOCATABLE $value
9188_ACEOF
9189
9190
9191
9192
9193
81ecdfbb
RW
9194# Check whether --with-expat was given.
9195if test "${with_expat+set}" = set; then :
9196 withval=$with_expat;
5c39566f
DJ
9197else
9198 with_expat=auto
81ecdfbb
RW
9199fi
9200
9201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9202$as_echo_n "checking whether to use expat... " >&6; }
9203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9204$as_echo "$with_expat" >&6; }
5c39566f
DJ
9205
9206if test "${with_expat}" = no; then
81ecdfbb
RW
9207 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9208$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9209 HAVE_LIBEXPAT=no
9210else
9211
3841debe
DJ
9212
9213
9214
9215
9216
9217
9218
9219 use_additional=yes
9220
9221 acl_save_prefix="$prefix"
9222 prefix="$acl_final_prefix"
9223 acl_save_exec_prefix="$exec_prefix"
9224 exec_prefix="$acl_final_exec_prefix"
9225
9226 eval additional_includedir=\"$includedir\"
9227 eval additional_libdir=\"$libdir\"
9228
9229 exec_prefix="$acl_save_exec_prefix"
9230 prefix="$acl_save_prefix"
9231
9232
81ecdfbb
RW
9233# Check whether --with-libexpat-prefix was given.
9234if test "${with_libexpat_prefix+set}" = set; then :
9235 withval=$with_libexpat_prefix;
3841debe
DJ
9236 if test "X$withval" = "Xno"; then
9237 use_additional=no
9238 else
9239 if test "X$withval" = "X"; then
9240
9241 acl_save_prefix="$prefix"
9242 prefix="$acl_final_prefix"
9243 acl_save_exec_prefix="$exec_prefix"
9244 exec_prefix="$acl_final_exec_prefix"
9245
9246 eval additional_includedir=\"$includedir\"
9247 eval additional_libdir=\"$libdir\"
9248
9249 exec_prefix="$acl_save_exec_prefix"
9250 prefix="$acl_save_prefix"
9251
9252 else
9253 additional_includedir="$withval/include"
9254 additional_libdir="$withval/lib"
9255 fi
9256 fi
9257
81ecdfbb
RW
9258fi
9259
3841debe
DJ
9260 LIBEXPAT=
9261 LTLIBEXPAT=
9262 INCEXPAT=
9263 rpathdirs=
9264 ltrpathdirs=
9265 names_already_handled=
9266 names_next_round='expat '
9267 while test -n "$names_next_round"; do
9268 names_this_round="$names_next_round"
9269 names_next_round=
9270 for name in $names_this_round; do
9271 already_handled=
9272 for n in $names_already_handled; do
9273 if test "$n" = "$name"; then
9274 already_handled=yes
9275 break
9276 fi
9277 done
9278 if test -z "$already_handled"; then
9279 names_already_handled="$names_already_handled $name"
9280 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9281 eval value=\"\$HAVE_LIB$uppername\"
9282 if test -n "$value"; then
9283 if test "$value" = yes; then
9284 eval value=\"\$LIB$uppername\"
9285 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9286 eval value=\"\$LTLIB$uppername\"
9287 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9288 else
9289 :
9290 fi
9291 else
9292 found_dir=
9293 found_la=
9294 found_so=
9295 found_a=
9296 if test $use_additional = yes; then
9297 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9298 found_dir="$additional_libdir"
9299 found_so="$additional_libdir/lib$name.$shlibext"
9300 if test -f "$additional_libdir/lib$name.la"; then
9301 found_la="$additional_libdir/lib$name.la"
9302 fi
9303 else
9304 if test -f "$additional_libdir/lib$name.$libext"; then
9305 found_dir="$additional_libdir"
9306 found_a="$additional_libdir/lib$name.$libext"
9307 if test -f "$additional_libdir/lib$name.la"; then
9308 found_la="$additional_libdir/lib$name.la"
9309 fi
9310 fi
9311 fi
9312 fi
9313 if test "X$found_dir" = "X"; then
9314 for x in $LDFLAGS $LTLIBEXPAT; do
9315
9316 acl_save_prefix="$prefix"
9317 prefix="$acl_final_prefix"
9318 acl_save_exec_prefix="$exec_prefix"
9319 exec_prefix="$acl_final_exec_prefix"
9320 eval x=\"$x\"
9321 exec_prefix="$acl_save_exec_prefix"
9322 prefix="$acl_save_prefix"
9323
9324 case "$x" in
9325 -L*)
9326 dir=`echo "X$x" | sed -e 's/^X-L//'`
9327 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9328 found_dir="$dir"
9329 found_so="$dir/lib$name.$shlibext"
9330 if test -f "$dir/lib$name.la"; then
9331 found_la="$dir/lib$name.la"
9332 fi
9333 else
9334 if test -f "$dir/lib$name.$libext"; then
9335 found_dir="$dir"
9336 found_a="$dir/lib$name.$libext"
9337 if test -f "$dir/lib$name.la"; then
9338 found_la="$dir/lib$name.la"
9339 fi
9340 fi
9341 fi
9342 ;;
9343 esac
9344 if test "X$found_dir" != "X"; then
9345 break
9346 fi
9347 done
9348 fi
9349 if test "X$found_dir" != "X"; then
9350 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9351 if test "X$found_so" != "X"; then
9352 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9353 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9354 else
9355 haveit=
9356 for x in $ltrpathdirs; do
9357 if test "X$x" = "X$found_dir"; then
9358 haveit=yes
9359 break
9360 fi
9361 done
9362 if test -z "$haveit"; then
9363 ltrpathdirs="$ltrpathdirs $found_dir"
9364 fi
9365 if test "$hardcode_direct" = yes; then
9366 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9367 else
9368 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9369 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9370 haveit=
9371 for x in $rpathdirs; do
9372 if test "X$x" = "X$found_dir"; then
9373 haveit=yes
9374 break
9375 fi
9376 done
9377 if test -z "$haveit"; then
9378 rpathdirs="$rpathdirs $found_dir"
9379 fi
9380 else
9381 haveit=
9382 for x in $LDFLAGS $LIBEXPAT; do
9383
9384 acl_save_prefix="$prefix"
9385 prefix="$acl_final_prefix"
9386 acl_save_exec_prefix="$exec_prefix"
9387 exec_prefix="$acl_final_exec_prefix"
9388 eval x=\"$x\"
9389 exec_prefix="$acl_save_exec_prefix"
9390 prefix="$acl_save_prefix"
9391
9392 if test "X$x" = "X-L$found_dir"; then
9393 haveit=yes
9394 break
9395 fi
9396 done
9397 if test -z "$haveit"; then
9398 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9399 fi
9400 if test "$hardcode_minus_L" != no; then
9401 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9402 else
9403 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9404 fi
9405 fi
9406 fi
9407 fi
9408 else
9409 if test "X$found_a" != "X"; then
9410 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9411 else
9412 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9413 fi
9414 fi
9415 additional_includedir=
9416 case "$found_dir" in
9417 */lib | */lib/)
9418 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9419 additional_includedir="$basedir/include"
9420 ;;
9421 esac
9422 if test "X$additional_includedir" != "X"; then
9423 if test "X$additional_includedir" != "X/usr/include"; then
9424 haveit=
9425 if test "X$additional_includedir" = "X/usr/local/include"; then
9426 if test -n "$GCC"; then
9427 case $host_os in
9428 linux*) haveit=yes;;
9429 esac
9430 fi
9431 fi
9432 if test -z "$haveit"; then
9433 for x in $CPPFLAGS $INCEXPAT; do
9434
9435 acl_save_prefix="$prefix"
9436 prefix="$acl_final_prefix"
9437 acl_save_exec_prefix="$exec_prefix"
9438 exec_prefix="$acl_final_exec_prefix"
9439 eval x=\"$x\"
9440 exec_prefix="$acl_save_exec_prefix"
9441 prefix="$acl_save_prefix"
9442
9443 if test "X$x" = "X-I$additional_includedir"; then
9444 haveit=yes
9445 break
9446 fi
9447 done
9448 if test -z "$haveit"; then
9449 if test -d "$additional_includedir"; then
9450 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9451 fi
9452 fi
9453 fi
9454 fi
9455 fi
9456 if test -n "$found_la"; then
9457 save_libdir="$libdir"
9458 case "$found_la" in
9459 */* | *\\*) . "$found_la" ;;
9460 *) . "./$found_la" ;;
9461 esac
9462 libdir="$save_libdir"
9463 for dep in $dependency_libs; do
9464 case "$dep" in
9465 -L*)
9466 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9467 if test "X$additional_libdir" != "X/usr/lib"; then
9468 haveit=
9469 if test "X$additional_libdir" = "X/usr/local/lib"; then
9470 if test -n "$GCC"; then
9471 case $host_os in
9472 linux*) haveit=yes;;
9473 esac
9474 fi
9475 fi
9476 if test -z "$haveit"; then
9477 haveit=
9478 for x in $LDFLAGS $LIBEXPAT; do
9479
9480 acl_save_prefix="$prefix"
9481 prefix="$acl_final_prefix"
9482 acl_save_exec_prefix="$exec_prefix"
9483 exec_prefix="$acl_final_exec_prefix"
9484 eval x=\"$x\"
9485 exec_prefix="$acl_save_exec_prefix"
9486 prefix="$acl_save_prefix"
9487
9488 if test "X$x" = "X-L$additional_libdir"; then
9489 haveit=yes
9490 break
9491 fi
9492 done
9493 if test -z "$haveit"; then
9494 if test -d "$additional_libdir"; then
9495 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9496 fi
9497 fi
9498 haveit=
9499 for x in $LDFLAGS $LTLIBEXPAT; do
9500
9501 acl_save_prefix="$prefix"
9502 prefix="$acl_final_prefix"
9503 acl_save_exec_prefix="$exec_prefix"
9504 exec_prefix="$acl_final_exec_prefix"
9505 eval x=\"$x\"
9506 exec_prefix="$acl_save_exec_prefix"
9507 prefix="$acl_save_prefix"
9508
9509 if test "X$x" = "X-L$additional_libdir"; then
9510 haveit=yes
9511 break
9512 fi
9513 done
9514 if test -z "$haveit"; then
9515 if test -d "$additional_libdir"; then
9516 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9517 fi
9518 fi
9519 fi
9520 fi
9521 ;;
9522 -R*)
9523 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9524 if test "$enable_rpath" != no; then
9525 haveit=
9526 for x in $rpathdirs; do
9527 if test "X$x" = "X$dir"; then
9528 haveit=yes
9529 break
9530 fi
9531 done
9532 if test -z "$haveit"; then
9533 rpathdirs="$rpathdirs $dir"
9534 fi
9535 haveit=
9536 for x in $ltrpathdirs; do
9537 if test "X$x" = "X$dir"; then
9538 haveit=yes
9539 break
9540 fi
9541 done
9542 if test -z "$haveit"; then
9543 ltrpathdirs="$ltrpathdirs $dir"
9544 fi
9545 fi
9546 ;;
9547 -l*)
9548 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9549 ;;
9550 *.la)
9551 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9552 ;;
9553 *)
9554 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9555 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9556 ;;
81ecdfbb
RW
9557 esac
9558 done
9559 fi
9560 else
9561 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9562 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9563 fi
9564 fi
9565 fi
9566 done
9567 done
9568 if test "X$rpathdirs" != "X"; then
9569 if test -n "$hardcode_libdir_separator"; then
9570 alldirs=
9571 for found_dir in $rpathdirs; do
9572 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9573 done
9574 acl_save_libdir="$libdir"
9575 libdir="$alldirs"
9576 eval flag=\"$hardcode_libdir_flag_spec\"
9577 libdir="$acl_save_libdir"
9578 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9579 else
9580 for found_dir in $rpathdirs; do
9581 acl_save_libdir="$libdir"
9582 libdir="$found_dir"
9583 eval flag=\"$hardcode_libdir_flag_spec\"
9584 libdir="$acl_save_libdir"
9585 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9586 done
9587 fi
9588 fi
9589 if test "X$ltrpathdirs" != "X"; then
9590 for found_dir in $ltrpathdirs; do
9591 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9592 done
9593 fi
a9322a30
TT
9594
9595
81ecdfbb 9596 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 9597
81ecdfbb
RW
9598 for element in $INCEXPAT; do
9599 haveit=
9600 for x in $CPPFLAGS; do
a9322a30 9601
81ecdfbb
RW
9602 acl_save_prefix="$prefix"
9603 prefix="$acl_final_prefix"
9604 acl_save_exec_prefix="$exec_prefix"
9605 exec_prefix="$acl_final_exec_prefix"
9606 eval x=\"$x\"
9607 exec_prefix="$acl_save_exec_prefix"
9608 prefix="$acl_save_prefix"
a8111142 9609
81ecdfbb
RW
9610 if test "X$x" = "X$element"; then
9611 haveit=yes
9612 break
9613 fi
9614 done
9615 if test -z "$haveit"; then
9616 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9617 fi
9618 done
a9322a30
TT
9619
9620
81ecdfbb
RW
9621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9622$as_echo_n "checking for libexpat... " >&6; }
d0ac1c44 9623if ${ac_cv_libexpat+:} false; then :
81ecdfbb 9624 $as_echo_n "(cached) " >&6
bec39cab 9625else
bec39cab 9626
81ecdfbb
RW
9627 ac_save_LIBS="$LIBS"
9628 LIBS="$LIBS $LIBEXPAT"
9629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9630/* end confdefs.h. */
81ecdfbb
RW
9631#include "expat.h"
9632int
9633main ()
9634{
9635XML_Parser p = XML_ParserCreate (0);
9636 ;
9637 return 0;
9638}
bec39cab 9639_ACEOF
81ecdfbb
RW
9640if ac_fn_c_try_link "$LINENO"; then :
9641 ac_cv_libexpat=yes
c906108c 9642else
81ecdfbb 9643 ac_cv_libexpat=no
bec39cab 9644fi
81ecdfbb
RW
9645rm -f core conftest.err conftest.$ac_objext \
9646 conftest$ac_exeext conftest.$ac_ext
9647 LIBS="$ac_save_LIBS"
c906108c 9648
95ca63c4 9649fi
81ecdfbb
RW
9650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9651$as_echo "$ac_cv_libexpat" >&6; }
9652 if test "$ac_cv_libexpat" = yes; then
9653 HAVE_LIBEXPAT=yes
bec39cab 9654
81ecdfbb 9655$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 9656
81ecdfbb
RW
9657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9658$as_echo_n "checking how to link with libexpat... " >&6; }
9659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9660$as_echo "$LIBEXPAT" >&6; }
9661 else
9662 HAVE_LIBEXPAT=no
9663 CPPFLAGS="$ac_save_CPPFLAGS"
9664 LIBEXPAT=
9665 LTLIBEXPAT=
9666 fi
95ca63c4
CF
9667
9668
9669
7cb9022a
MK
9670
9671
bec39cab 9672
81ecdfbb
RW
9673 if test "$HAVE_LIBEXPAT" != yes; then
9674 if test "$with_expat" = yes; then
d0ac1c44 9675 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
81ecdfbb
RW
9676 else
9677 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9678$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9679 fi
9680 else
9681 save_LIBS=$LIBS
9682 LIBS="$LIBS $LIBEXPAT"
9683 for ac_func in XML_StopParser
9684do :
9685 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
d0ac1c44 9686if test "x$ac_cv_func_XML_StopParser" = xyes; then :
bec39cab 9687 cat >>confdefs.h <<_ACEOF
81ecdfbb 9688#define HAVE_XML_STOPPARSER 1
bec39cab 9689_ACEOF
95ca63c4 9690
bec39cab 9691fi
bec39cab 9692done
95ca63c4 9693
81ecdfbb
RW
9694 LIBS=$save_LIBS
9695 fi
a9322a30
TT
9696fi
9697
2400729e
UW
9698
9699# Check whether --with-mpfr was given.
9700if test "${with_mpfr+set}" = set; then :
9701 withval=$with_mpfr;
9702else
9703 with_mpfr=auto
9704fi
9705
9706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
9707$as_echo_n "checking whether to use MPFR... " >&6; }
9708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
9709$as_echo "$with_mpfr" >&6; }
9710
9711if test "${with_mpfr}" = no; then
9712 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
9713$as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
9714 HAVE_LIBMPFR=no
9715else
9716
9717
9718
9719
9720
9721
9722
9723
9724 use_additional=yes
9725
9726 acl_save_prefix="$prefix"
9727 prefix="$acl_final_prefix"
9728 acl_save_exec_prefix="$exec_prefix"
9729 exec_prefix="$acl_final_exec_prefix"
9730
9731 eval additional_includedir=\"$includedir\"
9732 eval additional_libdir=\"$libdir\"
9733
9734 exec_prefix="$acl_save_exec_prefix"
9735 prefix="$acl_save_prefix"
9736
9737
9738# Check whether --with-libmpfr-prefix was given.
9739if test "${with_libmpfr_prefix+set}" = set; then :
9740 withval=$with_libmpfr_prefix;
9741 if test "X$withval" = "Xno"; then
9742 use_additional=no
9743 else
9744 if test "X$withval" = "X"; then
9745
9746 acl_save_prefix="$prefix"
9747 prefix="$acl_final_prefix"
9748 acl_save_exec_prefix="$exec_prefix"
9749 exec_prefix="$acl_final_exec_prefix"
9750
9751 eval additional_includedir=\"$includedir\"
9752 eval additional_libdir=\"$libdir\"
9753
9754 exec_prefix="$acl_save_exec_prefix"
9755 prefix="$acl_save_prefix"
9756
9757 else
9758 additional_includedir="$withval/include"
9759 additional_libdir="$withval/lib"
9760 fi
9761 fi
9762
9763fi
9764
9765 LIBMPFR=
9766 LTLIBMPFR=
9767 INCMPFR=
9768 rpathdirs=
9769 ltrpathdirs=
9770 names_already_handled=
da658607 9771 names_next_round='mpfr gmp'
2400729e
UW
9772 while test -n "$names_next_round"; do
9773 names_this_round="$names_next_round"
9774 names_next_round=
9775 for name in $names_this_round; do
9776 already_handled=
9777 for n in $names_already_handled; do
9778 if test "$n" = "$name"; then
9779 already_handled=yes
9780 break
9781 fi
9782 done
9783 if test -z "$already_handled"; then
9784 names_already_handled="$names_already_handled $name"
9785 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9786 eval value=\"\$HAVE_LIB$uppername\"
9787 if test -n "$value"; then
9788 if test "$value" = yes; then
9789 eval value=\"\$LIB$uppername\"
9790 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
9791 eval value=\"\$LTLIB$uppername\"
9792 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
9793 else
9794 :
9795 fi
9796 else
9797 found_dir=
9798 found_la=
9799 found_so=
9800 found_a=
9801 if test $use_additional = yes; then
9802 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9803 found_dir="$additional_libdir"
9804 found_so="$additional_libdir/lib$name.$shlibext"
9805 if test -f "$additional_libdir/lib$name.la"; then
9806 found_la="$additional_libdir/lib$name.la"
9807 fi
9808 else
9809 if test -f "$additional_libdir/lib$name.$libext"; then
9810 found_dir="$additional_libdir"
9811 found_a="$additional_libdir/lib$name.$libext"
9812 if test -f "$additional_libdir/lib$name.la"; then
9813 found_la="$additional_libdir/lib$name.la"
9814 fi
9815 fi
9816 fi
9817 fi
9818 if test "X$found_dir" = "X"; then
9819 for x in $LDFLAGS $LTLIBMPFR; do
9820
9821 acl_save_prefix="$prefix"
9822 prefix="$acl_final_prefix"
9823 acl_save_exec_prefix="$exec_prefix"
9824 exec_prefix="$acl_final_exec_prefix"
9825 eval x=\"$x\"
9826 exec_prefix="$acl_save_exec_prefix"
9827 prefix="$acl_save_prefix"
9828
9829 case "$x" in
9830 -L*)
9831 dir=`echo "X$x" | sed -e 's/^X-L//'`
9832 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9833 found_dir="$dir"
9834 found_so="$dir/lib$name.$shlibext"
9835 if test -f "$dir/lib$name.la"; then
9836 found_la="$dir/lib$name.la"
9837 fi
9838 else
9839 if test -f "$dir/lib$name.$libext"; then
9840 found_dir="$dir"
9841 found_a="$dir/lib$name.$libext"
9842 if test -f "$dir/lib$name.la"; then
9843 found_la="$dir/lib$name.la"
9844 fi
9845 fi
9846 fi
9847 ;;
9848 esac
9849 if test "X$found_dir" != "X"; then
9850 break
9851 fi
9852 done
9853 fi
9854 if test "X$found_dir" != "X"; then
9855 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
9856 if test "X$found_so" != "X"; then
9857 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9858 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9859 else
9860 haveit=
9861 for x in $ltrpathdirs; do
9862 if test "X$x" = "X$found_dir"; then
9863 haveit=yes
9864 break
9865 fi
9866 done
9867 if test -z "$haveit"; then
9868 ltrpathdirs="$ltrpathdirs $found_dir"
9869 fi
9870 if test "$hardcode_direct" = yes; then
9871 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9872 else
9873 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9874 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9875 haveit=
9876 for x in $rpathdirs; do
9877 if test "X$x" = "X$found_dir"; then
9878 haveit=yes
9879 break
9880 fi
9881 done
9882 if test -z "$haveit"; then
9883 rpathdirs="$rpathdirs $found_dir"
9884 fi
9885 else
9886 haveit=
9887 for x in $LDFLAGS $LIBMPFR; do
9888
9889 acl_save_prefix="$prefix"
9890 prefix="$acl_final_prefix"
9891 acl_save_exec_prefix="$exec_prefix"
9892 exec_prefix="$acl_final_exec_prefix"
9893 eval x=\"$x\"
9894 exec_prefix="$acl_save_exec_prefix"
9895 prefix="$acl_save_prefix"
9896
9897 if test "X$x" = "X-L$found_dir"; then
9898 haveit=yes
9899 break
9900 fi
9901 done
9902 if test -z "$haveit"; then
9903 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
9904 fi
9905 if test "$hardcode_minus_L" != no; then
9906 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9907 else
9908 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
9909 fi
9910 fi
9911 fi
9912 fi
9913 else
9914 if test "X$found_a" != "X"; then
9915 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
9916 else
9917 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
9918 fi
9919 fi
9920 additional_includedir=
9921 case "$found_dir" in
9922 */lib | */lib/)
9923 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9924 additional_includedir="$basedir/include"
9925 ;;
9926 esac
9927 if test "X$additional_includedir" != "X"; then
9928 if test "X$additional_includedir" != "X/usr/include"; then
9929 haveit=
9930 if test "X$additional_includedir" = "X/usr/local/include"; then
9931 if test -n "$GCC"; then
9932 case $host_os in
9933 linux*) haveit=yes;;
9934 esac
9935 fi
9936 fi
9937 if test -z "$haveit"; then
9938 for x in $CPPFLAGS $INCMPFR; do
9939
9940 acl_save_prefix="$prefix"
9941 prefix="$acl_final_prefix"
9942 acl_save_exec_prefix="$exec_prefix"
9943 exec_prefix="$acl_final_exec_prefix"
9944 eval x=\"$x\"
9945 exec_prefix="$acl_save_exec_prefix"
9946 prefix="$acl_save_prefix"
9947
9948 if test "X$x" = "X-I$additional_includedir"; then
9949 haveit=yes
9950 break
9951 fi
9952 done
9953 if test -z "$haveit"; then
9954 if test -d "$additional_includedir"; then
9955 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
9956 fi
9957 fi
9958 fi
9959 fi
9960 fi
9961 if test -n "$found_la"; then
9962 save_libdir="$libdir"
9963 case "$found_la" in
9964 */* | *\\*) . "$found_la" ;;
9965 *) . "./$found_la" ;;
9966 esac
9967 libdir="$save_libdir"
9968 for dep in $dependency_libs; do
9969 case "$dep" in
9970 -L*)
9971 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9972 if test "X$additional_libdir" != "X/usr/lib"; then
9973 haveit=
9974 if test "X$additional_libdir" = "X/usr/local/lib"; then
9975 if test -n "$GCC"; then
9976 case $host_os in
9977 linux*) haveit=yes;;
9978 esac
9979 fi
9980 fi
9981 if test -z "$haveit"; then
9982 haveit=
9983 for x in $LDFLAGS $LIBMPFR; do
9984
9985 acl_save_prefix="$prefix"
9986 prefix="$acl_final_prefix"
9987 acl_save_exec_prefix="$exec_prefix"
9988 exec_prefix="$acl_final_exec_prefix"
9989 eval x=\"$x\"
9990 exec_prefix="$acl_save_exec_prefix"
9991 prefix="$acl_save_prefix"
9992
9993 if test "X$x" = "X-L$additional_libdir"; then
9994 haveit=yes
9995 break
9996 fi
9997 done
9998 if test -z "$haveit"; then
9999 if test -d "$additional_libdir"; then
10000 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10001 fi
10002 fi
10003 haveit=
10004 for x in $LDFLAGS $LTLIBMPFR; do
10005
10006 acl_save_prefix="$prefix"
10007 prefix="$acl_final_prefix"
10008 acl_save_exec_prefix="$exec_prefix"
10009 exec_prefix="$acl_final_exec_prefix"
10010 eval x=\"$x\"
10011 exec_prefix="$acl_save_exec_prefix"
10012 prefix="$acl_save_prefix"
10013
10014 if test "X$x" = "X-L$additional_libdir"; then
10015 haveit=yes
10016 break
10017 fi
10018 done
10019 if test -z "$haveit"; then
10020 if test -d "$additional_libdir"; then
10021 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10022 fi
10023 fi
10024 fi
10025 fi
10026 ;;
10027 -R*)
10028 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10029 if test "$enable_rpath" != no; then
10030 haveit=
10031 for x in $rpathdirs; do
10032 if test "X$x" = "X$dir"; then
10033 haveit=yes
10034 break
10035 fi
10036 done
10037 if test -z "$haveit"; then
10038 rpathdirs="$rpathdirs $dir"
10039 fi
10040 haveit=
10041 for x in $ltrpathdirs; do
10042 if test "X$x" = "X$dir"; then
10043 haveit=yes
10044 break
10045 fi
10046 done
10047 if test -z "$haveit"; then
10048 ltrpathdirs="$ltrpathdirs $dir"
10049 fi
10050 fi
10051 ;;
10052 -l*)
10053 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10054 ;;
10055 *.la)
10056 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10057 ;;
10058 *)
10059 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10060 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10061 ;;
10062 esac
10063 done
10064 fi
10065 else
10066 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10067 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10068 fi
10069 fi
10070 fi
10071 done
10072 done
10073 if test "X$rpathdirs" != "X"; then
10074 if test -n "$hardcode_libdir_separator"; then
10075 alldirs=
10076 for found_dir in $rpathdirs; do
10077 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10078 done
10079 acl_save_libdir="$libdir"
10080 libdir="$alldirs"
10081 eval flag=\"$hardcode_libdir_flag_spec\"
10082 libdir="$acl_save_libdir"
10083 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10084 else
10085 for found_dir in $rpathdirs; do
10086 acl_save_libdir="$libdir"
10087 libdir="$found_dir"
10088 eval flag=\"$hardcode_libdir_flag_spec\"
10089 libdir="$acl_save_libdir"
10090 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10091 done
10092 fi
10093 fi
10094 if test "X$ltrpathdirs" != "X"; then
10095 for found_dir in $ltrpathdirs; do
10096 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10097 done
10098 fi
10099
10100
10101 ac_save_CPPFLAGS="$CPPFLAGS"
10102
10103 for element in $INCMPFR; do
10104 haveit=
10105 for x in $CPPFLAGS; do
10106
10107 acl_save_prefix="$prefix"
10108 prefix="$acl_final_prefix"
10109 acl_save_exec_prefix="$exec_prefix"
10110 exec_prefix="$acl_final_exec_prefix"
10111 eval x=\"$x\"
10112 exec_prefix="$acl_save_exec_prefix"
10113 prefix="$acl_save_prefix"
10114
10115 if test "X$x" = "X$element"; then
10116 haveit=yes
10117 break
10118 fi
10119 done
10120 if test -z "$haveit"; then
10121 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10122 fi
10123 done
10124
10125
10126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10127$as_echo_n "checking for libmpfr... " >&6; }
d0ac1c44 10128if ${ac_cv_libmpfr+:} false; then :
2400729e
UW
10129 $as_echo_n "(cached) " >&6
10130else
10131
10132 ac_save_LIBS="$LIBS"
10133 LIBS="$LIBS $LIBMPFR"
10134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10135/* end confdefs.h. */
10136#include <mpfr.h>
10137int
10138main ()
10139{
10140mpfr_exp_t exp; mpfr_t x;
10141 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10142 ;
10143 return 0;
10144}
10145_ACEOF
10146if ac_fn_c_try_link "$LINENO"; then :
10147 ac_cv_libmpfr=yes
10148else
10149 ac_cv_libmpfr=no
10150fi
10151rm -f core conftest.err conftest.$ac_objext \
10152 conftest$ac_exeext conftest.$ac_ext
10153 LIBS="$ac_save_LIBS"
10154
10155fi
10156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10157$as_echo "$ac_cv_libmpfr" >&6; }
10158 if test "$ac_cv_libmpfr" = yes; then
10159 HAVE_LIBMPFR=yes
10160
10161$as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10162
10163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10164$as_echo_n "checking how to link with libmpfr... " >&6; }
10165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10166$as_echo "$LIBMPFR" >&6; }
10167 else
10168 HAVE_LIBMPFR=no
10169 CPPFLAGS="$ac_save_CPPFLAGS"
10170 LIBMPFR=
10171 LTLIBMPFR=
10172 fi
10173
10174
10175
10176
10177
10178
10179 if test "$HAVE_LIBMPFR" != yes; then
10180 if test "$with_mpfr" = yes; then
d0ac1c44 10181 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
2400729e
UW
10182 else
10183 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10184$as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10185 fi
10186 fi
10187fi
10188
d344e670
DE
10189# --------------------- #
10190# Check for libpython. #
10191# --------------------- #
10192
a9322a30 10193
a9322a30
TT
10194
10195
ec685c5e 10196
0c4a4063 10197
81ecdfbb
RW
10198# Check whether --with-python was given.
10199if test "${with_python+set}" = set; then :
10200 withval=$with_python;
bec39cab 10201else
81ecdfbb 10202 with_python=auto
bec39cab 10203fi
bec39cab 10204
81ecdfbb
RW
10205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10206$as_echo_n "checking whether to use python... " >&6; }
10207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10208$as_echo "$with_python" >&6; }
9a156167 10209
81ecdfbb
RW
10210if test "${with_python}" = no; then
10211 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10212$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10213 have_libpython=no
bec39cab 10214else
81ecdfbb 10215 case "${with_python}" in
8c85a4e2 10216 [\\/]* | ?:[\\/]*)
ec685c5e
DE
10217 if test -d ${with_python}; then
10218 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10219 python_prog="${with_python}/bin/python"
0c4a4063 10220 python_prefix=
9c4ea6c5
JB
10221 # If python does not exit ${with_python}/bin, then try in
10222 # ${with_python}. On Windows/MinGW, this is where the Python
10223 # executable is.
10224 if test ! -x "${python_prog}"; then
10225 python_prog="${with_python}/python"
10226 python_prefix=
10227 fi
e7a30f46 10228 if test ! -x "${python_prog}"; then
ec685c5e
DE
10229 # Fall back to gdb 7.0/7.1 behaviour.
10230 python_prog=missing
0c4a4063 10231 python_prefix=${with_python}
ec685c5e 10232 fi
e7a30f46 10233 elif test -x "${with_python}"; then
ec685c5e
DE
10234 # While we can't run python compiled for $host (unless host == build),
10235 # the user could write a script that provides the needed information,
10236 # so we support that.
ec685c5e 10237 python_prog=${with_python}
0c4a4063 10238 python_prefix=
ec685c5e 10239 else
d0ac1c44 10240 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
ec685c5e 10241 fi
81ecdfbb 10242 ;;
ec685c5e
DE
10243 */*)
10244 # Disallow --with-python=foo/bar.
d0ac1c44 10245 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
81ecdfbb 10246 ;;
ec685c5e
DE
10247 *)
10248 # The user has either specified auto, yes, or the name of the python
10249 # program assumed to be in $PATH.
10250 python_prefix=
10251 case "${with_python}" in
10252 yes | auto)
10253 if test ${build} = ${host}; then
10254 # Extract the first word of "python", so it can be a program name with args.
10255set dummy python; ac_word=$2
10256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10257$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10258if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10259 $as_echo_n "(cached) " >&6
10260else
10261 case $python_prog_path in
10262 [\\/]* | ?:[\\/]*)
10263 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10264 ;;
10265 *)
10266 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10267for as_dir in $PATH
10268do
10269 IFS=$as_save_IFS
10270 test -z "$as_dir" && as_dir=.
10271 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10272 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10273 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10274 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10275 break 2
10276 fi
10277done
10278 done
10279IFS=$as_save_IFS
10280
10281 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10282 ;;
10283esac
10284fi
10285python_prog_path=$ac_cv_path_python_prog_path
10286if test -n "$python_prog_path"; then
10287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10288$as_echo "$python_prog_path" >&6; }
10289else
10290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10291$as_echo "no" >&6; }
10292fi
10293
10294
10295 if test "${python_prog_path}" = missing; then
10296 python_prog=missing
10297 else
10298 python_prog=${python_prog_path}
10299 fi
10300 else
10301 # Not much we can do except assume the cross-compiler will find the
10302 # right files.
10303 python_prog=missing
10304 fi
10305 ;;
10306 *)
10307 # While we can't run python compiled for $host (unless host == build),
10308 # the user could write a script that provides the needed information,
10309 # so we support that.
10310 python_prog="${with_python}"
10311 # Extract the first word of "${python_prog}", so it can be a program name with args.
10312set dummy ${python_prog}; ac_word=$2
10313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10314$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10315if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10316 $as_echo_n "(cached) " >&6
10317else
10318 case $python_prog_path in
10319 [\\/]* | ?:[\\/]*)
10320 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10321 ;;
10322 *)
10323 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10324for as_dir in $PATH
10325do
10326 IFS=$as_save_IFS
10327 test -z "$as_dir" && as_dir=.
10328 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10329 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10330 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10331 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10332 break 2
10333 fi
10334done
10335 done
10336IFS=$as_save_IFS
10337
10338 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10339 ;;
10340esac
10341fi
10342python_prog_path=$ac_cv_path_python_prog_path
10343if test -n "$python_prog_path"; then
10344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10345$as_echo "$python_prog_path" >&6; }
10346else
10347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10348$as_echo "no" >&6; }
10349fi
10350
10351
10352 if test "${python_prog_path}" = missing; then
d0ac1c44 10353 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
ec685c5e
DE
10354 fi
10355 ;;
10356 esac
81ecdfbb
RW
10357 esac
10358
ec685c5e 10359 if test "${python_prog}" != missing; then
e7a30f46
DE
10360 # We have a python program to use, but it may be too old.
10361 # Don't flag an error for --with-python=auto (the default).
10362 have_python_config=yes
ec685c5e
DE
10363 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10364 if test $? != 0; then
e7a30f46
DE
10365 have_python_config=failed
10366 if test "${with_python}" != auto; then
d0ac1c44 10367 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
e7a30f46 10368 fi
ec685c5e
DE
10369 fi
10370 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10371 if test $? != 0; then
e7a30f46
DE
10372 have_python_config=failed
10373 if test "${with_python}" != auto; then
d0ac1c44 10374 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
e7a30f46 10375 fi
ec685c5e 10376 fi
0c4a4063
DE
10377 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10378 if test $? != 0; then
e7a30f46
DE
10379 have_python_config=failed
10380 if test "${with_python}" != auto; then
d0ac1c44 10381 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
e7a30f46 10382 fi
0c4a4063 10383 fi
ec685c5e 10384 else
ac534cba
JB
10385 # We do not have a python executable we can use to determine where
10386 # to find the Python headers and libs. We cannot guess the include
10387 # path from the python_prefix either, because that include path
10388 # depends on the Python version. So, there is nothing much we can
10389 # do except assume that the compiler will be able to find those files.
10390 python_includes=
10391 python_libs=
0c4a4063 10392 have_python_config=no
ec685c5e 10393 fi
bec39cab 10394
ec685c5e
DE
10395 # If we have python-config, only try the configuration it provides.
10396 # Otherwise fallback on the old way of trying different versions of
10397 # python in turn.
81ecdfbb 10398
ec685c5e
DE
10399 have_libpython=no
10400 if test "${have_python_config}" = yes; then
c1039e3c
JB
10401 # Determine the Python version by extracting "-lpython<version>"
10402 # part of the python_libs. <version> is usually X.Y with X and Y
10403 # being decimal numbers, but can also be XY (seen on Windows).
10404 #
10405 # The extraction is performed using sed with a regular expression.
10406 # Initially, the regexp used was using the '?' quantifier to make
10407 # the dot in the version number optional. Unfortunately, this
10408 # does not work with non-GNU versions of sed because, because of
10409 # what looks like a limitation (the '?' quantifier does not work
10410 # with back-references). We work around this limitation by using
10411 # the '*' quantifier instead. It means that, in theory, we might
10412 # match unexpected version strings such as "-lpython2..7", but
10413 # this seems unlikely in practice. And even if that happens,
10414 # an error will be triggered later on, when checking that version
10415 # number.
ec685c5e 10416 python_version=`echo " ${python_libs} " \
c1039e3c 10417 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
10418 case "${python_version}" in
10419 python*)
ec685c5e
DE
10420
10421 version=${python_version}
10422
10423 new_CPPFLAGS=${python_includes}
10424 new_LIBS=${python_libs}
81ecdfbb
RW
10425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10426$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10427 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10428 save_LIBS=$LIBS
ec685c5e 10429 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10430 LIBS="$new_LIBS $LIBS"
ec685c5e 10431 found_usable_python=no
81ecdfbb 10432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10433/* end confdefs.h. */
ac534cba 10434#include "Python.h"
81ecdfbb
RW
10435int
10436main ()
10437{
10438Py_Initialize ();
10439 ;
10440 return 0;
10441}
bec39cab 10442_ACEOF
81ecdfbb 10443if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10444 have_libpython=${version}
10445 found_usable_python=yes
ac534cba
JB
10446 PYTHON_CPPFLAGS=$new_CPPFLAGS
10447 PYTHON_LIBS=$new_LIBS
9a156167 10448fi
81ecdfbb
RW
10449rm -f core conftest.err conftest.$ac_objext \
10450 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10451 CPPFLAGS=$save_CPPFLAGS
10452 LIBS=$save_LIBS
ec685c5e
DE
10453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10454$as_echo "${found_usable_python}" >&6; }
9a156167 10455
0c4a4063
DE
10456 ;;
10457 *)
d0ac1c44 10458 as_fn_error $? "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
10459 ;;
10460 esac
e7a30f46 10461 elif test "${have_python_config}" != failed; then
ec685c5e 10462 if test "${have_libpython}" = no; then
9a156167 10463
420697bb
TT
10464 version=python2.7
10465
10466 new_CPPFLAGS=${python_includes}
bf27f0e2 10467 new_LIBS="-lpython2.7 ${python_libs}"
420697bb
TT
10468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10469$as_echo_n "checking for ${version}... " >&6; }
10470 save_CPPFLAGS=$CPPFLAGS
10471 save_LIBS=$LIBS
10472 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10473 LIBS="$new_LIBS $LIBS"
420697bb
TT
10474 found_usable_python=no
10475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10476/* end confdefs.h. */
ac534cba 10477#include "Python.h"
420697bb
TT
10478int
10479main ()
10480{
10481Py_Initialize ();
10482 ;
10483 return 0;
10484}
10485_ACEOF
10486if ac_fn_c_try_link "$LINENO"; then :
10487 have_libpython=${version}
10488 found_usable_python=yes
ac534cba
JB
10489 PYTHON_CPPFLAGS=$new_CPPFLAGS
10490 PYTHON_LIBS=$new_LIBS
420697bb
TT
10491fi
10492rm -f core conftest.err conftest.$ac_objext \
10493 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10494 CPPFLAGS=$save_CPPFLAGS
10495 LIBS=$save_LIBS
420697bb
TT
10496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10497$as_echo "${found_usable_python}" >&6; }
10498
10499 fi
10500 if test "${have_libpython}" = no; then
10501
ec685c5e
DE
10502 version=python2.6
10503
10504 new_CPPFLAGS=${python_includes}
bf27f0e2 10505 new_LIBS="-lpython2.6 ${python_libs}"
ec685c5e
DE
10506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10507$as_echo_n "checking for ${version}... " >&6; }
10508 save_CPPFLAGS=$CPPFLAGS
10509 save_LIBS=$LIBS
10510 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10511 LIBS="$new_LIBS $LIBS"
ec685c5e
DE
10512 found_usable_python=no
10513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10514/* end confdefs.h. */
ac534cba 10515#include "Python.h"
ec685c5e
DE
10516int
10517main ()
10518{
10519Py_Initialize ();
10520 ;
10521 return 0;
10522}
10523_ACEOF
10524if ac_fn_c_try_link "$LINENO"; then :
10525 have_libpython=${version}
10526 found_usable_python=yes
ac534cba
JB
10527 PYTHON_CPPFLAGS=$new_CPPFLAGS
10528 PYTHON_LIBS=$new_LIBS
ec685c5e 10529fi
81ecdfbb
RW
10530rm -f core conftest.err conftest.$ac_objext \
10531 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10532 CPPFLAGS=$save_CPPFLAGS
10533 LIBS=$save_LIBS
ec685c5e
DE
10534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10535$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10536
ec685c5e
DE
10537 fi
10538 fi
9c4ea6c5 10539 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
10540
10541$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
10542
9c4ea6c5 10543 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
10544
10545$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
10546
81ecdfbb 10547 fi
ec685c5e
DE
10548
10549 if test "${have_libpython}" = no; then
81ecdfbb
RW
10550 case "${with_python}" in
10551 yes)
d0ac1c44 10552 as_fn_error $? "python is missing or unusable" "$LINENO" 5
81ecdfbb
RW
10553 ;;
10554 auto)
10555 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10556$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10557 ;;
10558 *)
d0ac1c44 10559 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
81ecdfbb
RW
10560 ;;
10561 esac
0c4a4063
DE
10562 else
10563 if test -n "${python_prefix}"; then
10564
10565cat >>confdefs.h <<_ACEOF
10566#define WITH_PYTHON_PATH "${python_prefix}"
10567_ACEOF
10568
10569
10570 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10571 if test "x$prefix" = xNONE; then
10572 test_prefix=/usr/local
10573 else
10574 test_prefix=$prefix
10575 fi
10576 else
10577 test_prefix=$exec_prefix
10578 fi
10579 value=0
10580 case ${python_prefix} in
10581 "${test_prefix}"|"${test_prefix}/"*|\
10582 '${exec_prefix}'|'${exec_prefix}/'*)
10583 value=1
10584 ;;
10585 esac
10586
10587cat >>confdefs.h <<_ACEOF
10588#define PYTHON_PATH_RELOCATABLE $value
10589_ACEOF
10590
10591
10592 fi
81ecdfbb 10593 fi
436868fb 10594fi
436868fb 10595
ec685c5e 10596if test "${have_libpython}" != no; then
436868fb 10597
81ecdfbb 10598$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 10599
81ecdfbb
RW
10600 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10601 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10602 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 10603 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 10604 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 10605
81ecdfbb
RW
10606 # Flags needed to compile Python code (taken from python-config --cflags).
10607 # We cannot call python-config directly because it will output whatever was
10608 # used when compiling the Python interpreter itself, including flags which
10609 # would make the python-related objects be compiled differently from the
10610 # rest of GDB (e.g., -O2 and -fPIC).
10611 if test "${GCC}" = yes; then
ae292b3a
TT
10612 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
10613 # Python headers recommend -DNDEBUG, but it's unclear if that just
10614 # refers to building Python itself. In release mode, though, it
10615 # doesn't hurt for the Python code in gdb to follow.
10616 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
81ecdfbb 10617 fi
436868fb 10618
81ecdfbb
RW
10619 if test "x${tentative_python_cflags}" != x; then
10620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10621$as_echo_n "checking compiler flags for python code... " >&6; }
10622 for flag in ${tentative_python_cflags}; do
10623 # Check that the compiler accepts it
10624 saved_CFLAGS="$CFLAGS"
10625 CFLAGS="$CFLAGS $flag"
10626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10627/* end confdefs.h. */
81ecdfbb 10628
a9322a30
TT
10629int
10630main ()
10631{
a9322a30
TT
10632
10633 ;
10634 return 0;
10635}
bec39cab 10636_ACEOF
81ecdfbb
RW
10637if ac_fn_c_try_compile "$LINENO"; then :
10638 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 10639fi
81ecdfbb
RW
10640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10641 CFLAGS="$saved_CFLAGS"
10642 done
10643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10644$as_echo "${PYTHON_CFLAGS}" >&6; }
10645 fi
043b6510 10646
c83393b9
JB
10647 # On x64 Windows, Python's include headers, and pyconfig.h in
10648 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10649 # version of Windows. Unfortunately, MS_WIN64 is only defined if
10650 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
10651 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10652 # The issue was reported to the Python community, but still isn't
10653 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10654
043b6510 10655 case "$gdb_host" in
c83393b9
JB
10656 mingw64)
10657 if test "${GCC}" = yes; then
10658 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10659 fi
10660 ;;
043b6510 10661 esac
a8db4212
YPK
10662
10663 # Note that "python -m threading" cannot be used to check for
10664 # threading support due to a bug in Python 2.7.3
10665 # (http://bugs.python.org/issue15567).
10666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
10667$as_echo_n "checking whether python supports threads... " >&6; }
10668 saved_CPPFLAGS="${CPPFLAGS}"
10669 CPPFLAGS="${PYTHON_CPPFLAGS}"
10670 # Note that the test is reversed so that python_has_threads=yes on
10671 # unexpected failures.
10672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10673/* end confdefs.h. */
10674
10675#include <Python.h>
10676#ifdef WITH_THREAD
10677# error
10678#endif
10679
10680_ACEOF
10681if ac_fn_c_try_cpp "$LINENO"; then :
10682 python_has_threads=no
10683else
10684 python_has_threads=yes
10685fi
d0ac1c44 10686rm -f conftest.err conftest.i conftest.$ac_ext
a8db4212
YPK
10687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
10688$as_echo "${python_has_threads}" >&6; }
10689 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 10690else
6dddc817
DE
10691 # Even if Python support is not compiled in, we need to have this file
10692 # included so that the "python" command, et.al., still exists.
8fd8d003 10693 CONFIG_OBS="$CONFIG_OBS python/python.o"
6dddc817 10694 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 10695fi
9a156167 10696
a4a1c157
PA
10697# Work around Python http://bugs.python.org/issue10112. See also
10698# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10699# no effect. Note that the only test after this that uses Python is
10700# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10701# run without -export-dynamic too.
10702PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10703
10704
ed3ef339
DE
10705
10706
4df42755
DE
10707 if test "${have_libpython}" != no; then
10708 HAVE_PYTHON_TRUE=
10709 HAVE_PYTHON_FALSE='#'
10710else
10711 HAVE_PYTHON_TRUE='#'
10712 HAVE_PYTHON_FALSE=
10713fi
10714
ed3ef339
DE
10715
10716# -------------------- #
10717# Check for libguile. #
10718# -------------------- #
10719
10720
e1402065
DE
10721
10722
10723
10724
10725# Check whether --with-guile was given.
10726if test "${with_guile+set}" = set; then :
10727 withval=$with_guile;
10728else
10729 with_guile=auto
10730fi
10731
10732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10733$as_echo_n "checking whether to use guile... " >&6; }
10734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10735$as_echo "$with_guile" >&6; }
10736
ed3ef339
DE
10737# Extract the first word of "pkg-config", so it can be a program name with args.
10738set dummy pkg-config; ac_word=$2
10739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10740$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10741if ${ac_cv_path_pkg_config_prog_path+:} false; then :
ed3ef339
DE
10742 $as_echo_n "(cached) " >&6
10743else
10744 case $pkg_config_prog_path in
10745 [\\/]* | ?:[\\/]*)
10746 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10747 ;;
10748 *)
10749 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10750for as_dir in $PATH
10751do
10752 IFS=$as_save_IFS
10753 test -z "$as_dir" && as_dir=.
10754 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10755 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ed3ef339
DE
10756 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10757 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10758 break 2
10759 fi
10760done
10761 done
10762IFS=$as_save_IFS
10763
10764 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10765 ;;
10766esac
10767fi
10768pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10769if test -n "$pkg_config_prog_path"; then
10770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10771$as_echo "$pkg_config_prog_path" >&6; }
10772else
10773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10774$as_echo "no" >&6; }
10775fi
10776
10777
10778
6e66f753 10779try_guile_versions="guile-2.0"
ed3ef339
DE
10780have_libguile=no
10781case "${with_guile}" in
10782no)
10783 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10784$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10785 ;;
10786auto)
e1402065
DE
10787 if test "${pkg_config_prog_path}" = "missing"; then
10788 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10789$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10790 else
ed3ef339
DE
10791
10792 pkg_config=${pkg_config_prog_path}
10793 guile_version_list=${try_guile_versions}
10794 flag_errors=no
10795
ed3ef339
DE
10796 found_usable_guile=checking
10797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10798$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10799 for guile_version in ${guile_version_list}; do
10800 ${pkg_config} --exists ${guile_version} 2>/dev/null
10801 if test $? != 0; then
10802 continue
10803 fi
10804 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10805 if test $? != 0; then
d0ac1c44 10806 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
10807 fi
10808 new_LIBS=`${pkg_config} --libs ${guile_version}`
10809 if test $? != 0; then
d0ac1c44 10810 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
10811 fi
10812 found_usable_guile=${guile_version}
10813 break
10814 done
10815 if test "${found_usable_guile}" = "checking"; then
10816 if test "${flag_errors}" = "yes"; then
d0ac1c44 10817 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
10818 else
10819 found_usable_guile=no
10820 fi
10821 fi
10822 if test "${found_usable_guile}" != no; then
10823 save_CPPFLAGS=$CPPFLAGS
10824 save_LIBS=$LIBS
10825 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10826 LIBS="$LIBS $new_LIBS"
10827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10828/* end confdefs.h. */
10829#include "libguile.h"
10830int
10831main ()
10832{
10833scm_init_guile ();
10834 ;
10835 return 0;
10836}
10837_ACEOF
10838if ac_fn_c_try_link "$LINENO"; then :
10839 have_libguile=yes
10840 GUILE_CPPFLAGS=$new_CPPFLAGS
10841 GUILE_LIBS=$new_LIBS
10842else
10843 found_usable_guile=no
10844fi
10845rm -f core conftest.err conftest.$ac_objext \
10846 conftest$ac_exeext conftest.$ac_ext
92fab5a6 10847 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 10848if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
10849
10850$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10851
10852
10853fi
10854
ed3ef339
DE
10855 CPPFLAGS=$save_CPPFLAGS
10856 LIBS=$save_LIBS
10857 if test "${found_usable_guile}" = no; then
10858 if test "${flag_errors}" = yes; then
10859 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10860$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
10861as_fn_error $? "linking guile version ${guile_version} test program failed
10862See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
10863 fi
10864 fi
10865 fi
10866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10867$as_echo "${found_usable_guile}" >&6; }
10868
e1402065 10869 fi
ed3ef339
DE
10870 ;;
10871yes)
e1402065 10872 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 10873 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 10874 fi
ed3ef339
DE
10875
10876 pkg_config=${pkg_config_prog_path}
10877 guile_version_list=${try_guile_versions}
10878 flag_errors=yes
10879
ed3ef339
DE
10880 found_usable_guile=checking
10881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10882$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10883 for guile_version in ${guile_version_list}; do
10884 ${pkg_config} --exists ${guile_version} 2>/dev/null
10885 if test $? != 0; then
10886 continue
10887 fi
10888 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10889 if test $? != 0; then
d0ac1c44 10890 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
10891 fi
10892 new_LIBS=`${pkg_config} --libs ${guile_version}`
10893 if test $? != 0; then
d0ac1c44 10894 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
10895 fi
10896 found_usable_guile=${guile_version}
10897 break
10898 done
10899 if test "${found_usable_guile}" = "checking"; then
10900 if test "${flag_errors}" = "yes"; then
d0ac1c44 10901 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
10902 else
10903 found_usable_guile=no
10904 fi
10905 fi
10906 if test "${found_usable_guile}" != no; then
10907 save_CPPFLAGS=$CPPFLAGS
10908 save_LIBS=$LIBS
10909 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10910 LIBS="$LIBS $new_LIBS"
10911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10912/* end confdefs.h. */
10913#include "libguile.h"
10914int
10915main ()
10916{
10917scm_init_guile ();
10918 ;
10919 return 0;
10920}
10921_ACEOF
10922if ac_fn_c_try_link "$LINENO"; then :
10923 have_libguile=yes
10924 GUILE_CPPFLAGS=$new_CPPFLAGS
10925 GUILE_LIBS=$new_LIBS
10926else
10927 found_usable_guile=no
10928fi
10929rm -f core conftest.err conftest.$ac_objext \
10930 conftest$ac_exeext conftest.$ac_ext
92fab5a6 10931 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 10932if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
10933
10934$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10935
10936
10937fi
10938
ed3ef339
DE
10939 CPPFLAGS=$save_CPPFLAGS
10940 LIBS=$save_LIBS
10941 if test "${found_usable_guile}" = no; then
10942 if test "${flag_errors}" = yes; then
10943 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10944$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
10945as_fn_error $? "linking guile version ${guile_version} test program failed
10946See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
10947 fi
10948 fi
10949 fi
10950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10951$as_echo "${found_usable_guile}" >&6; }
10952
10953 ;;
10954[\\/]* | ?:[\\/]*)
e1402065 10955 if test -x "${with_guile}"; then
ed3ef339
DE
10956
10957 pkg_config=${with_guile}
10958 guile_version_list=${try_guile_versions}
10959 flag_errors=yes
10960
ed3ef339
DE
10961 found_usable_guile=checking
10962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10963$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10964 for guile_version in ${guile_version_list}; do
10965 ${pkg_config} --exists ${guile_version} 2>/dev/null
10966 if test $? != 0; then
10967 continue
10968 fi
10969 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10970 if test $? != 0; then
d0ac1c44 10971 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
10972 fi
10973 new_LIBS=`${pkg_config} --libs ${guile_version}`
10974 if test $? != 0; then
d0ac1c44 10975 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
10976 fi
10977 found_usable_guile=${guile_version}
10978 break
10979 done
10980 if test "${found_usable_guile}" = "checking"; then
10981 if test "${flag_errors}" = "yes"; then
d0ac1c44 10982 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
10983 else
10984 found_usable_guile=no
10985 fi
10986 fi
10987 if test "${found_usable_guile}" != no; then
10988 save_CPPFLAGS=$CPPFLAGS
10989 save_LIBS=$LIBS
10990 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10991 LIBS="$LIBS $new_LIBS"
10992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10993/* end confdefs.h. */
10994#include "libguile.h"
10995int
10996main ()
10997{
10998scm_init_guile ();
10999 ;
11000 return 0;
11001}
11002_ACEOF
11003if ac_fn_c_try_link "$LINENO"; then :
11004 have_libguile=yes
11005 GUILE_CPPFLAGS=$new_CPPFLAGS
11006 GUILE_LIBS=$new_LIBS
11007else
11008 found_usable_guile=no
11009fi
11010rm -f core conftest.err conftest.$ac_objext \
11011 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11012 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11013if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11014
11015$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11016
11017
11018fi
11019
ed3ef339
DE
11020 CPPFLAGS=$save_CPPFLAGS
11021 LIBS=$save_LIBS
11022 if test "${found_usable_guile}" = no; then
11023 if test "${flag_errors}" = yes; then
11024 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11025$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11026as_fn_error $? "linking guile version ${guile_version} test program failed
11027See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11028 fi
11029 fi
11030 fi
11031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11032$as_echo "${found_usable_guile}" >&6; }
11033
e1402065 11034 else
d0ac1c44 11035 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
e1402065 11036 fi
ed3ef339
DE
11037 ;;
11038"" | */*)
11039 # Disallow --with=guile="" and --with-guile=foo/bar.
d0ac1c44 11040 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
ed3ef339
DE
11041 ;;
11042*)
11043 # A space separate list of guile versions to try, in order.
e1402065 11044 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11045 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11046 fi
ed3ef339
DE
11047
11048 pkg_config=${pkg_config_prog_path}
11049 guile_version_list=${with_guile}
11050 flag_errors=yes
11051
ed3ef339
DE
11052 found_usable_guile=checking
11053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11054$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11055 for guile_version in ${guile_version_list}; do
11056 ${pkg_config} --exists ${guile_version} 2>/dev/null
11057 if test $? != 0; then
11058 continue
11059 fi
11060 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11061 if test $? != 0; then
d0ac1c44 11062 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11063 fi
11064 new_LIBS=`${pkg_config} --libs ${guile_version}`
11065 if test $? != 0; then
d0ac1c44 11066 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11067 fi
11068 found_usable_guile=${guile_version}
11069 break
11070 done
11071 if test "${found_usable_guile}" = "checking"; then
11072 if test "${flag_errors}" = "yes"; then
d0ac1c44 11073 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11074 else
11075 found_usable_guile=no
11076 fi
11077 fi
11078 if test "${found_usable_guile}" != no; then
11079 save_CPPFLAGS=$CPPFLAGS
11080 save_LIBS=$LIBS
11081 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11082 LIBS="$LIBS $new_LIBS"
11083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11084/* end confdefs.h. */
11085#include "libguile.h"
11086int
11087main ()
11088{
11089scm_init_guile ();
11090 ;
11091 return 0;
11092}
11093_ACEOF
11094if ac_fn_c_try_link "$LINENO"; then :
11095 have_libguile=yes
11096 GUILE_CPPFLAGS=$new_CPPFLAGS
11097 GUILE_LIBS=$new_LIBS
11098else
11099 found_usable_guile=no
11100fi
11101rm -f core conftest.err conftest.$ac_objext \
11102 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11103 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11104if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11105
11106$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11107
11108
11109fi
11110
ed3ef339
DE
11111 CPPFLAGS=$save_CPPFLAGS
11112 LIBS=$save_LIBS
11113 if test "${found_usable_guile}" = no; then
11114 if test "${flag_errors}" = yes; then
11115 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11116$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11117as_fn_error $? "linking guile version ${guile_version} test program failed
11118See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11119 fi
11120 fi
11121 fi
11122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11123$as_echo "${found_usable_guile}" >&6; }
11124
11125 ;;
11126esac
11127
e76c5d17 11128if test "${have_libguile}" != no; then
d342a0da
DE
11129 case "${with_guile}" in
11130 [\\/]* | ?:[\\/]*)
e76c5d17
DE
11131
11132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11133$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11134if ${ac_cv_guild_program_name+:} false; then :
e76c5d17
DE
11135 $as_echo_n "(cached) " >&6
11136else
d342a0da 11137 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
11138
11139 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11140 # the 'guild' and 'bindir' variables. In that case, try to guess
11141 # what the program name is, at the risk of getting it wrong if
11142 # Guile was configured with '--program-suffix' or similar.
11143 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 11144 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
11145 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11146 fi
11147
11148fi
11149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11150$as_echo "$ac_cv_guild_program_name" >&6; }
11151
11152 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11153 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
e76c5d17
DE
11154 fi
11155
11156 GUILD="$ac_cv_guild_program_name"
11157
11158
d342a0da
DE
11159 ;;
11160 *)
11161
11162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11163$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11164if ${ac_cv_guild_program_name+:} false; then :
d342a0da
DE
11165 $as_echo_n "(cached) " >&6
11166else
11167 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11168
11169 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11170 # the 'guild' and 'bindir' variables. In that case, try to guess
11171 # what the program name is, at the risk of getting it wrong if
11172 # Guile was configured with '--program-suffix' or similar.
11173 if test "x$ac_cv_guild_program_name" = "x"; then
11174 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11175 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11176 fi
11177
11178fi
11179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11180$as_echo "$ac_cv_guild_program_name" >&6; }
11181
11182 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11183 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
d342a0da
DE
11184 fi
11185
11186 GUILD="$ac_cv_guild_program_name"
11187
11188
11189 ;;
11190 esac
e76c5d17
DE
11191
11192
11193 if test "$cross_compiling" = no; then
11194 GUILD_TARGET_FLAG=
11195 else
11196 GUILD_TARGET_FLAG="--target=$host"
11197 fi
11198
11199
11200
11201
11202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11203$as_echo_n "checking whether guild supports this host... " >&6; }
d0ac1c44 11204if ${ac_cv_guild_ok+:} false; then :
e76c5d17
DE
11205 $as_echo_n "(cached) " >&6
11206else
11207 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11208 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11209 ac_cv_guild_ok=yes
11210 else
11211 ac_cv_guild_ok=no
11212 fi
11213fi
11214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11215$as_echo "$ac_cv_guild_ok" >&6; }
11216
11217 if test "$ac_cv_guild_ok" = no; then
11218 have_libguile=no
11219 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11220$as_echo "$as_me: WARNING: disabling guile support" >&2;}
11221 fi
11222fi
11223
ed3ef339
DE
11224if test "${have_libguile}" != no; then
11225
11226$as_echo "#define HAVE_GUILE 1" >>confdefs.h
11227
11228 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11229 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11230 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11231 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11232 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
11233
11234 save_LIBS="$LIBS"
11235 save_CPPFLAGS="$CPPFLAGS"
11236 LIBS="$GUILE_LIBS"
11237 CPPFLAGS="$GUILE_CPPFLAGS"
11238 for ac_func in scm_new_smob
11239do :
11240 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
d0ac1c44 11241if test "x$ac_cv_func_scm_new_smob" = xyes; then :
16954d5d
LC
11242 cat >>confdefs.h <<_ACEOF
11243#define HAVE_SCM_NEW_SMOB 1
11244_ACEOF
11245
11246fi
11247done
11248
11249 LIBS="$save_LIBS"
11250 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
11251else
11252 # Even if Guile support is not compiled in, we need to have these files
11253 # included.
bd810fff 11254 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
ed3ef339
DE
11255 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11256fi
9a156167 11257
ac534cba 11258
4df42755
DE
11259 if test "${have_libguile}" != no; then
11260 HAVE_GUILE_TRUE=
11261 HAVE_GUILE_FALSE='#'
11262else
11263 HAVE_GUILE_TRUE='#'
11264 HAVE_GUILE_FALSE=
11265fi
11266
ac534cba 11267
62f29fda
TT
11268# ---------------------------- #
11269# Check for source highlight. #
11270# ---------------------------- #
11271
11272SRCHIGH_LIBS=
11273SRCHIGH_CFLAGS=
189b8c2e
ST
11274
11275# Check whether --enable-source-highlight was given.
11276if test "${enable_source_highlight+set}" = set; then :
11277 enableval=$enable_source_highlight; case "${enableval}" in
11278 yes) enable_source_highlight=yes ;;
11279 no) enable_source_highlight=no ;;
11280 *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;;
11281esac
11282else
11283 enable_source_highlight=auto
11284fi
11285
11286
11287if test "${enable_source_highlight}" != "no"; then
11288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
6c28e44a 11289$as_echo_n "checking for the source-highlight library... " >&6; }
189b8c2e
ST
11290 if test "${pkg_config_prog_path}" = "missing"; then
11291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
62f29fda 11292$as_echo "no - pkg-config not found" >&6; }
189b8c2e
ST
11293 if test "${enable_source_highlight}" = "yes"; then
11294 as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
11295 fi
11296 else
11297 if ${pkg_config_prog_path} --exists source-highlight; then
62f29fda
TT
11298 SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
11299 SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
11300
11301$as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
11302
11303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11304$as_echo "yes" >&6; }
189b8c2e 11305 else
62f29fda
TT
11306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11307$as_echo "no" >&6; }
189b8c2e
ST
11308 if test "${enable_source_highlight}" = "yes"; then
11309 as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
11310 fi
11311 fi
11312 fi
62f29fda
TT
11313fi
11314
11315
11316
58bfce93
MM
11317
11318# Check whether --with-intel_pt was given.
11319if test "${with_intel_pt+set}" = set; then :
11320 withval=$with_intel_pt;
11321else
11322 with_intel_pt=auto
11323fi
11324
11325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
11326$as_echo_n "checking whether to use intel pt... " >&6; }
11327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
11328$as_echo "$with_intel_pt" >&6; }
11329
11330if test "${with_intel_pt}" = no; then
bc504a31
PA
11331 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
11332$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
58bfce93
MM
11333 HAVE_LIBIPT=no
11334else
5599c404
MM
11335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11336/* end confdefs.h. */
11337
11338#include <linux/perf_event.h>
11339#ifndef PERF_ATTR_SIZE_VER5
11340# error
11341#endif
11342
11343_ACEOF
11344if ac_fn_c_try_cpp "$LINENO"; then :
11345 perf_event=yes
11346else
11347 perf_event=no
11348fi
d0ac1c44 11349rm -f conftest.err conftest.i conftest.$ac_ext
5599c404
MM
11350 if test "$perf_event" != yes; then
11351 if test "$with_intel_pt" = yes; then
d0ac1c44 11352 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
5599c404
MM
11353 else
11354 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
11355$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
11356 fi
11357 fi
11358
58bfce93
MM
11359
11360
11361
11362
11363
11364
11365
11366
11367 use_additional=yes
11368
11369 acl_save_prefix="$prefix"
11370 prefix="$acl_final_prefix"
11371 acl_save_exec_prefix="$exec_prefix"
11372 exec_prefix="$acl_final_exec_prefix"
11373
11374 eval additional_includedir=\"$includedir\"
11375 eval additional_libdir=\"$libdir\"
11376
11377 exec_prefix="$acl_save_exec_prefix"
11378 prefix="$acl_save_prefix"
11379
11380
11381# Check whether --with-libipt-prefix was given.
11382if test "${with_libipt_prefix+set}" = set; then :
11383 withval=$with_libipt_prefix;
11384 if test "X$withval" = "Xno"; then
11385 use_additional=no
11386 else
11387 if test "X$withval" = "X"; then
11388
11389 acl_save_prefix="$prefix"
11390 prefix="$acl_final_prefix"
11391 acl_save_exec_prefix="$exec_prefix"
11392 exec_prefix="$acl_final_exec_prefix"
11393
11394 eval additional_includedir=\"$includedir\"
11395 eval additional_libdir=\"$libdir\"
11396
11397 exec_prefix="$acl_save_exec_prefix"
11398 prefix="$acl_save_prefix"
11399
11400 else
11401 additional_includedir="$withval/include"
11402 additional_libdir="$withval/lib"
11403 fi
11404 fi
11405
11406fi
11407
11408 LIBIPT=
11409 LTLIBIPT=
11410 INCIPT=
11411 rpathdirs=
11412 ltrpathdirs=
11413 names_already_handled=
11414 names_next_round='ipt '
11415 while test -n "$names_next_round"; do
11416 names_this_round="$names_next_round"
11417 names_next_round=
11418 for name in $names_this_round; do
11419 already_handled=
11420 for n in $names_already_handled; do
11421 if test "$n" = "$name"; then
11422 already_handled=yes
11423 break
11424 fi
11425 done
11426 if test -z "$already_handled"; then
11427 names_already_handled="$names_already_handled $name"
11428 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11429 eval value=\"\$HAVE_LIB$uppername\"
11430 if test -n "$value"; then
11431 if test "$value" = yes; then
11432 eval value=\"\$LIB$uppername\"
11433 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
11434 eval value=\"\$LTLIB$uppername\"
11435 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
11436 else
11437 :
11438 fi
11439 else
11440 found_dir=
11441 found_la=
11442 found_so=
11443 found_a=
11444 if test $use_additional = yes; then
11445 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11446 found_dir="$additional_libdir"
11447 found_so="$additional_libdir/lib$name.$shlibext"
11448 if test -f "$additional_libdir/lib$name.la"; then
11449 found_la="$additional_libdir/lib$name.la"
11450 fi
11451 else
11452 if test -f "$additional_libdir/lib$name.$libext"; then
11453 found_dir="$additional_libdir"
11454 found_a="$additional_libdir/lib$name.$libext"
11455 if test -f "$additional_libdir/lib$name.la"; then
11456 found_la="$additional_libdir/lib$name.la"
11457 fi
11458 fi
11459 fi
11460 fi
11461 if test "X$found_dir" = "X"; then
11462 for x in $LDFLAGS $LTLIBIPT; do
11463
11464 acl_save_prefix="$prefix"
11465 prefix="$acl_final_prefix"
11466 acl_save_exec_prefix="$exec_prefix"
11467 exec_prefix="$acl_final_exec_prefix"
11468 eval x=\"$x\"
11469 exec_prefix="$acl_save_exec_prefix"
11470 prefix="$acl_save_prefix"
11471
11472 case "$x" in
11473 -L*)
11474 dir=`echo "X$x" | sed -e 's/^X-L//'`
11475 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11476 found_dir="$dir"
11477 found_so="$dir/lib$name.$shlibext"
11478 if test -f "$dir/lib$name.la"; then
11479 found_la="$dir/lib$name.la"
11480 fi
11481 else
11482 if test -f "$dir/lib$name.$libext"; then
11483 found_dir="$dir"
11484 found_a="$dir/lib$name.$libext"
11485 if test -f "$dir/lib$name.la"; then
11486 found_la="$dir/lib$name.la"
11487 fi
11488 fi
11489 fi
11490 ;;
11491 esac
11492 if test "X$found_dir" != "X"; then
11493 break
11494 fi
11495 done
11496 fi
11497 if test "X$found_dir" != "X"; then
11498 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
11499 if test "X$found_so" != "X"; then
11500 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11501 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11502 else
11503 haveit=
11504 for x in $ltrpathdirs; do
11505 if test "X$x" = "X$found_dir"; then
11506 haveit=yes
11507 break
11508 fi
11509 done
11510 if test -z "$haveit"; then
11511 ltrpathdirs="$ltrpathdirs $found_dir"
11512 fi
11513 if test "$hardcode_direct" = yes; then
11514 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11515 else
11516 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11517 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11518 haveit=
11519 for x in $rpathdirs; do
11520 if test "X$x" = "X$found_dir"; then
11521 haveit=yes
11522 break
11523 fi
11524 done
11525 if test -z "$haveit"; then
11526 rpathdirs="$rpathdirs $found_dir"
11527 fi
11528 else
11529 haveit=
11530 for x in $LDFLAGS $LIBIPT; do
11531
11532 acl_save_prefix="$prefix"
11533 prefix="$acl_final_prefix"
11534 acl_save_exec_prefix="$exec_prefix"
11535 exec_prefix="$acl_final_exec_prefix"
11536 eval x=\"$x\"
11537 exec_prefix="$acl_save_exec_prefix"
11538 prefix="$acl_save_prefix"
11539
11540 if test "X$x" = "X-L$found_dir"; then
11541 haveit=yes
11542 break
11543 fi
11544 done
11545 if test -z "$haveit"; then
11546 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
11547 fi
11548 if test "$hardcode_minus_L" != no; then
11549 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11550 else
11551 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11552 fi
11553 fi
11554 fi
11555 fi
11556 else
11557 if test "X$found_a" != "X"; then
11558 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
11559 else
11560 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
11561 fi
11562 fi
11563 additional_includedir=
11564 case "$found_dir" in
11565 */lib | */lib/)
11566 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11567 additional_includedir="$basedir/include"
11568 ;;
11569 esac
11570 if test "X$additional_includedir" != "X"; then
11571 if test "X$additional_includedir" != "X/usr/include"; then
11572 haveit=
11573 if test "X$additional_includedir" = "X/usr/local/include"; then
11574 if test -n "$GCC"; then
11575 case $host_os in
11576 linux*) haveit=yes;;
11577 esac
11578 fi
11579 fi
11580 if test -z "$haveit"; then
11581 for x in $CPPFLAGS $INCIPT; do
11582
11583 acl_save_prefix="$prefix"
11584 prefix="$acl_final_prefix"
11585 acl_save_exec_prefix="$exec_prefix"
11586 exec_prefix="$acl_final_exec_prefix"
11587 eval x=\"$x\"
11588 exec_prefix="$acl_save_exec_prefix"
11589 prefix="$acl_save_prefix"
11590
11591 if test "X$x" = "X-I$additional_includedir"; then
11592 haveit=yes
11593 break
11594 fi
11595 done
11596 if test -z "$haveit"; then
11597 if test -d "$additional_includedir"; then
11598 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
11599 fi
11600 fi
11601 fi
11602 fi
11603 fi
11604 if test -n "$found_la"; then
11605 save_libdir="$libdir"
11606 case "$found_la" in
11607 */* | *\\*) . "$found_la" ;;
11608 *) . "./$found_la" ;;
11609 esac
11610 libdir="$save_libdir"
11611 for dep in $dependency_libs; do
11612 case "$dep" in
11613 -L*)
11614 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11615 if test "X$additional_libdir" != "X/usr/lib"; then
11616 haveit=
11617 if test "X$additional_libdir" = "X/usr/local/lib"; then
11618 if test -n "$GCC"; then
11619 case $host_os in
11620 linux*) haveit=yes;;
11621 esac
11622 fi
11623 fi
11624 if test -z "$haveit"; then
11625 haveit=
11626 for x in $LDFLAGS $LIBIPT; do
11627
11628 acl_save_prefix="$prefix"
11629 prefix="$acl_final_prefix"
11630 acl_save_exec_prefix="$exec_prefix"
11631 exec_prefix="$acl_final_exec_prefix"
11632 eval x=\"$x\"
11633 exec_prefix="$acl_save_exec_prefix"
11634 prefix="$acl_save_prefix"
11635
11636 if test "X$x" = "X-L$additional_libdir"; then
11637 haveit=yes
11638 break
11639 fi
11640 done
11641 if test -z "$haveit"; then
11642 if test -d "$additional_libdir"; then
11643 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
11644 fi
11645 fi
11646 haveit=
11647 for x in $LDFLAGS $LTLIBIPT; do
11648
11649 acl_save_prefix="$prefix"
11650 prefix="$acl_final_prefix"
11651 acl_save_exec_prefix="$exec_prefix"
11652 exec_prefix="$acl_final_exec_prefix"
11653 eval x=\"$x\"
11654 exec_prefix="$acl_save_exec_prefix"
11655 prefix="$acl_save_prefix"
11656
11657 if test "X$x" = "X-L$additional_libdir"; then
11658 haveit=yes
11659 break
11660 fi
11661 done
11662 if test -z "$haveit"; then
11663 if test -d "$additional_libdir"; then
11664 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
11665 fi
11666 fi
11667 fi
11668 fi
11669 ;;
11670 -R*)
11671 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11672 if test "$enable_rpath" != no; then
11673 haveit=
11674 for x in $rpathdirs; do
11675 if test "X$x" = "X$dir"; then
11676 haveit=yes
11677 break
11678 fi
11679 done
11680 if test -z "$haveit"; then
11681 rpathdirs="$rpathdirs $dir"
11682 fi
11683 haveit=
11684 for x in $ltrpathdirs; do
11685 if test "X$x" = "X$dir"; then
11686 haveit=yes
11687 break
11688 fi
11689 done
11690 if test -z "$haveit"; then
11691 ltrpathdirs="$ltrpathdirs $dir"
11692 fi
11693 fi
11694 ;;
11695 -l*)
11696 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11697 ;;
11698 *.la)
11699 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11700 ;;
11701 *)
11702 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
11703 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
11704 ;;
11705 esac
11706 done
11707 fi
11708 else
11709 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11710 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
11711 fi
11712 fi
11713 fi
11714 done
11715 done
11716 if test "X$rpathdirs" != "X"; then
11717 if test -n "$hardcode_libdir_separator"; then
11718 alldirs=
11719 for found_dir in $rpathdirs; do
11720 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11721 done
11722 acl_save_libdir="$libdir"
11723 libdir="$alldirs"
11724 eval flag=\"$hardcode_libdir_flag_spec\"
11725 libdir="$acl_save_libdir"
11726 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11727 else
11728 for found_dir in $rpathdirs; do
11729 acl_save_libdir="$libdir"
11730 libdir="$found_dir"
11731 eval flag=\"$hardcode_libdir_flag_spec\"
11732 libdir="$acl_save_libdir"
11733 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11734 done
11735 fi
11736 fi
11737 if test "X$ltrpathdirs" != "X"; then
11738 for found_dir in $ltrpathdirs; do
11739 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
11740 done
11741 fi
11742
11743
11744 ac_save_CPPFLAGS="$CPPFLAGS"
11745
11746 for element in $INCIPT; do
11747 haveit=
11748 for x in $CPPFLAGS; do
11749
11750 acl_save_prefix="$prefix"
11751 prefix="$acl_final_prefix"
11752 acl_save_exec_prefix="$exec_prefix"
11753 exec_prefix="$acl_final_exec_prefix"
11754 eval x=\"$x\"
11755 exec_prefix="$acl_save_exec_prefix"
11756 prefix="$acl_save_prefix"
11757
11758 if test "X$x" = "X$element"; then
11759 haveit=yes
11760 break
11761 fi
11762 done
11763 if test -z "$haveit"; then
11764 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11765 fi
11766 done
11767
11768
11769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
11770$as_echo_n "checking for libipt... " >&6; }
d0ac1c44 11771if ${ac_cv_libipt+:} false; then :
58bfce93
MM
11772 $as_echo_n "(cached) " >&6
11773else
11774
11775 ac_save_LIBS="$LIBS"
11776 LIBS="$LIBS $LIBIPT"
11777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11778/* end confdefs.h. */
11779#include "intel-pt.h"
11780int
11781main ()
11782{
11783pt_insn_alloc_decoder (0);
11784 ;
11785 return 0;
11786}
11787_ACEOF
11788if ac_fn_c_try_link "$LINENO"; then :
11789 ac_cv_libipt=yes
11790else
11791 ac_cv_libipt=no
11792fi
11793rm -f core conftest.err conftest.$ac_objext \
11794 conftest$ac_exeext conftest.$ac_ext
11795 LIBS="$ac_save_LIBS"
11796
11797fi
11798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
11799$as_echo "$ac_cv_libipt" >&6; }
11800 if test "$ac_cv_libipt" = yes; then
11801 HAVE_LIBIPT=yes
11802
11803$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
11804
11805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
11806$as_echo_n "checking how to link with libipt... " >&6; }
11807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
11808$as_echo "$LIBIPT" >&6; }
11809 else
11810 HAVE_LIBIPT=no
11811 CPPFLAGS="$ac_save_CPPFLAGS"
11812 LIBIPT=
11813 LTLIBIPT=
11814 fi
11815
11816
11817
11818
11819
11820
11821 if test "$HAVE_LIBIPT" != yes; then
11822 if test "$with_intel_pt" = yes; then
d0ac1c44 11823 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
58bfce93
MM
11824 else
11825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
11826$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
11827 fi
c56ccc05
MM
11828 else
11829 save_LIBS=$LIBS
11830 LIBS="$LIBS $LIBIPT"
11831 for ac_func in pt_insn_event
11832do :
11833 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
d0ac1c44 11834if test "x$ac_cv_func_pt_insn_event" = xyes; then :
c56ccc05
MM
11835 cat >>confdefs.h <<_ACEOF
11836#define HAVE_PT_INSN_EVENT 1
11837_ACEOF
11838
11839fi
11840done
11841
11842 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
11843"
d0ac1c44 11844if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
c56ccc05
MM
11845
11846cat >>confdefs.h <<_ACEOF
11847#define HAVE_STRUCT_PT_INSN_ENABLED 1
11848_ACEOF
11849
11850
11851fi
11852ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
11853"
d0ac1c44 11854if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
c56ccc05
MM
11855
11856cat >>confdefs.h <<_ACEOF
11857#define HAVE_STRUCT_PT_INSN_RESYNCED 1
11858_ACEOF
11859
11860
11861fi
11862
11863 LIBS=$save_LIBS
58bfce93
MM
11864 fi
11865fi
11866
81ecdfbb
RW
11867# ------------------------- #
11868# Checks for header files. #
11869# ------------------------- #
c890192f 11870
81ecdfbb
RW
11871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11872$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 11873if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 11874 $as_echo_n "(cached) " >&6
bec39cab 11875else
81ecdfbb 11876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11877/* end confdefs.h. */
81ecdfbb
RW
11878#include <stdlib.h>
11879#include <stdarg.h>
11880#include <string.h>
11881#include <float.h>
11882
a9322a30
TT
11883int
11884main ()
11885{
a9322a30
TT
11886
11887 ;
11888 return 0;
11889}
bec39cab 11890_ACEOF
81ecdfbb
RW
11891if ac_fn_c_try_compile "$LINENO"; then :
11892 ac_cv_header_stdc=yes
bec39cab 11893else
81ecdfbb 11894 ac_cv_header_stdc=no
a9322a30 11895fi
81ecdfbb 11896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11897
81ecdfbb
RW
11898if test $ac_cv_header_stdc = yes; then
11899 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11901/* end confdefs.h. */
11902#include <string.h>
bec39cab 11903
81ecdfbb
RW
11904_ACEOF
11905if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11906 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 11907
bec39cab 11908else
81ecdfbb
RW
11909 ac_cv_header_stdc=no
11910fi
11911rm -f conftest*
11912
11913fi
11914
11915if test $ac_cv_header_stdc = yes; then
11916 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11918/* end confdefs.h. */
11919#include <stdlib.h>
11920
bec39cab 11921_ACEOF
81ecdfbb
RW
11922if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11923 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 11924
81ecdfbb
RW
11925else
11926 ac_cv_header_stdc=no
11927fi
11928rm -f conftest*
bec39cab 11929
bec39cab 11930fi
81ecdfbb
RW
11931
11932if test $ac_cv_header_stdc = yes; then
11933 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11934 if test "$cross_compiling" = yes; then :
11935 :
bec39cab 11936else
81ecdfbb 11937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11938/* end confdefs.h. */
81ecdfbb
RW
11939#include <ctype.h>
11940#include <stdlib.h>
11941#if ((' ' & 0x0FF) == 0x020)
11942# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11943# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11944#else
11945# define ISLOWER(c) \
11946 (('a' <= (c) && (c) <= 'i') \
11947 || ('j' <= (c) && (c) <= 'r') \
11948 || ('s' <= (c) && (c) <= 'z'))
11949# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11950#endif
11951
11952#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
11953int
11954main ()
11955{
81ecdfbb
RW
11956 int i;
11957 for (i = 0; i < 256; i++)
11958 if (XOR (islower (i), ISLOWER (i))
11959 || toupper (i) != TOUPPER (i))
11960 return 2;
a9322a30
TT
11961 return 0;
11962}
bec39cab 11963_ACEOF
81ecdfbb
RW
11964if ac_fn_c_try_run "$LINENO"; then :
11965
bec39cab 11966else
81ecdfbb
RW
11967 ac_cv_header_stdc=no
11968fi
11969rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11970 conftest.$ac_objext conftest.beam conftest.$ac_ext
11971fi
bec39cab 11972
bec39cab 11973fi
a9322a30 11974fi
81ecdfbb
RW
11975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11976$as_echo "$ac_cv_header_stdc" >&6; }
11977if test $ac_cv_header_stdc = yes; then
bec39cab 11978
81ecdfbb 11979$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 11980
81ecdfbb 11981fi
bec39cab 11982
81ecdfbb 11983# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 11984for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
43b7e92b 11985 thread_db.h linux/elf.h \
81ecdfbb
RW
11986 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11987 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
44122162 11988 sys/reg.h sys/debugreg.h sys/select.h \
726e1356 11989 termios.h elf_hp.h \
9467110b 11990 dlfcn.h
81ecdfbb
RW
11991do :
11992 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11993ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 11994if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 11995 cat >>confdefs.h <<_ACEOF
81ecdfbb 11996#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11997_ACEOF
c906108c 11998
bec39cab 11999fi
81ecdfbb
RW
12000
12001done
12002
81ecdfbb
RW
12003for ac_header in sys/user.h
12004do :
12005 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
12006# include <sys/param.h>
a9322a30
TT
12007#endif
12008
81ecdfbb 12009"
d0ac1c44 12010if test "x$ac_cv_header_sys_user_h" = xyes; then :
81ecdfbb
RW
12011 cat >>confdefs.h <<_ACEOF
12012#define HAVE_SYS_USER_H 1
bec39cab 12013_ACEOF
bec39cab 12014
a9322a30 12015fi
bec39cab 12016
81ecdfbb 12017done
5ee754fc 12018
5ee754fc 12019
5007d765 12020for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
81ecdfbb
RW
12021do :
12022 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12023ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 12024if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12025 cat >>confdefs.h <<_ACEOF
81ecdfbb 12026#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12027_ACEOF
5ee754fc
MK
12028
12029fi
12030
81ecdfbb 12031done
bec39cab 12032
81ecdfbb
RW
12033for ac_header in term.h
12034do :
12035 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
12036# include <curses.h>
12037#endif
bec39cab 12038
81ecdfbb 12039"
d0ac1c44 12040if test "x$ac_cv_header_term_h" = xyes; then :
81ecdfbb
RW
12041 cat >>confdefs.h <<_ACEOF
12042#define HAVE_TERM_H 1
a8111142 12043_ACEOF
a8111142 12044
a8111142 12045fi
a8111142 12046
81ecdfbb 12047done
a8111142
TT
12048
12049
81ecdfbb
RW
12050# ------------------------- #
12051# Checks for declarations. #
12052# ------------------------- #
a9322a30 12053
07697489
PA
12054
12055 # Check for presence and size of long long.
12056 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
d0ac1c44 12057if test "x$ac_cv_type_long_long" = xyes; then :
07697489
PA
12058
12059cat >>confdefs.h <<_ACEOF
12060#define HAVE_LONG_LONG 1
12061_ACEOF
12062
12063# The cast to long int works around a bug in the HP C Compiler
12064# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12065# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12066# This bug is HP SR number 8606223364.
12067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
12068$as_echo_n "checking size of long long... " >&6; }
d0ac1c44 12069if ${ac_cv_sizeof_long_long+:} false; then :
07697489
PA
12070 $as_echo_n "(cached) " >&6
12071else
12072 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
12073
12074else
12075 if test "$ac_cv_type_long_long" = yes; then
12076 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12077$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
12078as_fn_error 77 "cannot compute sizeof (long long)
12079See \`config.log' for more details" "$LINENO" 5; }
07697489
PA
12080 else
12081 ac_cv_sizeof_long_long=0
12082 fi
12083fi
12084
12085fi
12086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
12087$as_echo "$ac_cv_sizeof_long_long" >&6; }
12088
12089
12090
12091cat >>confdefs.h <<_ACEOF
12092#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12093_ACEOF
12094
12095
12096fi
12097
12098
d0ac1c44
SM
12099 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
12100ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
12101if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
07697489
PA
12102 ac_have_decl=1
12103else
12104 ac_have_decl=0
12105fi
12106
12107cat >>confdefs.h <<_ACEOF
12108#define HAVE_DECL_BASENAME $ac_have_decl
12109_ACEOF
12110ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
d0ac1c44 12111if test "x$ac_cv_have_decl_ffs" = xyes; then :
07697489
PA
12112 ac_have_decl=1
12113else
12114 ac_have_decl=0
12115fi
12116
12117cat >>confdefs.h <<_ACEOF
12118#define HAVE_DECL_FFS $ac_have_decl
12119_ACEOF
12120ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
d0ac1c44 12121if test "x$ac_cv_have_decl_asprintf" = xyes; then :
07697489
PA
12122 ac_have_decl=1
12123else
12124 ac_have_decl=0
12125fi
12126
12127cat >>confdefs.h <<_ACEOF
12128#define HAVE_DECL_ASPRINTF $ac_have_decl
12129_ACEOF
12130ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
d0ac1c44 12131if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
07697489
PA
12132 ac_have_decl=1
12133else
12134 ac_have_decl=0
12135fi
12136
12137cat >>confdefs.h <<_ACEOF
12138#define HAVE_DECL_VASPRINTF $ac_have_decl
12139_ACEOF
12140ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
d0ac1c44 12141if test "x$ac_cv_have_decl_snprintf" = xyes; then :
07697489
PA
12142 ac_have_decl=1
12143else
12144 ac_have_decl=0
12145fi
12146
12147cat >>confdefs.h <<_ACEOF
12148#define HAVE_DECL_SNPRINTF $ac_have_decl
12149_ACEOF
12150ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
d0ac1c44 12151if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
07697489
PA
12152 ac_have_decl=1
12153else
12154 ac_have_decl=0
12155fi
12156
12157cat >>confdefs.h <<_ACEOF
12158#define HAVE_DECL_VSNPRINTF $ac_have_decl
12159_ACEOF
12160
12161 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
d0ac1c44 12162if test "x$ac_cv_have_decl_strtol" = xyes; then :
07697489
PA
12163 ac_have_decl=1
12164else
12165 ac_have_decl=0
12166fi
12167
12168cat >>confdefs.h <<_ACEOF
12169#define HAVE_DECL_STRTOL $ac_have_decl
12170_ACEOF
12171ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
d0ac1c44 12172if test "x$ac_cv_have_decl_strtoul" = xyes; then :
07697489
PA
12173 ac_have_decl=1
12174else
12175 ac_have_decl=0
12176fi
12177
12178cat >>confdefs.h <<_ACEOF
12179#define HAVE_DECL_STRTOUL $ac_have_decl
12180_ACEOF
12181ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
d0ac1c44 12182if test "x$ac_cv_have_decl_strtoll" = xyes; then :
07697489
PA
12183 ac_have_decl=1
12184else
12185 ac_have_decl=0
12186fi
12187
12188cat >>confdefs.h <<_ACEOF
12189#define HAVE_DECL_STRTOLL $ac_have_decl
12190_ACEOF
12191ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
d0ac1c44 12192if test "x$ac_cv_have_decl_strtoull" = xyes; then :
07697489
PA
12193 ac_have_decl=1
12194else
12195 ac_have_decl=0
12196fi
12197
12198cat >>confdefs.h <<_ACEOF
12199#define HAVE_DECL_STRTOULL $ac_have_decl
12200_ACEOF
12201
12202 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
d0ac1c44 12203if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
07697489
PA
12204 ac_have_decl=1
12205else
12206 ac_have_decl=0
12207fi
12208
12209cat >>confdefs.h <<_ACEOF
12210#define HAVE_DECL_STRVERSCMP $ac_have_decl
12211_ACEOF
12212
12213
12214
81ecdfbb 12215ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
d0ac1c44 12216if test "x$ac_cv_have_decl_snprintf" = xyes; then :
81ecdfbb
RW
12217 ac_have_decl=1
12218else
12219 ac_have_decl=0
5ee754fc 12220fi
81ecdfbb
RW
12221
12222cat >>confdefs.h <<_ACEOF
12223#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 12224_ACEOF
5ee754fc 12225
5ee754fc 12226
81ecdfbb
RW
12227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12228$as_echo_n "checking for LC_MESSAGES... " >&6; }
d0ac1c44 12229if ${am_cv_val_LC_MESSAGES+:} false; then :
81ecdfbb 12230 $as_echo_n "(cached) " >&6
bec39cab 12231else
81ecdfbb 12232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12233/* end confdefs.h. */
81ecdfbb 12234#include <locale.h>
a9322a30
TT
12235int
12236main ()
12237{
81ecdfbb 12238return LC_MESSAGES
a9322a30
TT
12239 ;
12240 return 0;
12241}
bec39cab 12242_ACEOF
81ecdfbb
RW
12243if ac_fn_c_try_link "$LINENO"; then :
12244 am_cv_val_LC_MESSAGES=yes
bec39cab 12245else
81ecdfbb
RW
12246 am_cv_val_LC_MESSAGES=no
12247fi
12248rm -f core conftest.err conftest.$ac_objext \
12249 conftest$ac_exeext conftest.$ac_ext
12250fi
12251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12252$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12253 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 12254
81ecdfbb
RW
12255$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
12256
12257 fi
12258
12259
12260# ----------------------- #
12261# Checks for structures. #
12262# ----------------------- #
12263
12264ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
d0ac1c44 12265if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
81ecdfbb
RW
12266
12267cat >>confdefs.h <<_ACEOF
12268#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 12269_ACEOF
7eb368b3 12270
81ecdfbb 12271
7eb368b3 12272fi
81ecdfbb 12273ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
d0ac1c44 12274if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
7eb368b3 12275
a9322a30
TT
12276cat >>confdefs.h <<_ACEOF
12277#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
12278_ACEOF
12279
a9322a30 12280
7eb368b3
NR
12281fi
12282
7eb368b3 12283
a9322a30
TT
12284# ------------------ #
12285# Checks for types. #
12286# ------------------ #
7eb368b3 12287
81ecdfbb 12288ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
12289#include <sys/socket.h>
12290
81ecdfbb 12291"
d0ac1c44 12292if test "x$ac_cv_type_socklen_t" = xyes; then :
bec39cab 12293
a9322a30
TT
12294cat >>confdefs.h <<_ACEOF
12295#define HAVE_SOCKLEN_T 1
12296_ACEOF
12297
12298
12299fi
12300
12301
12302# ------------------------------------- #
12303# Checks for compiler characteristics. #
12304# ------------------------------------- #
12305
81ecdfbb
RW
12306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12307$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
d0ac1c44 12308if ${ac_cv_c_const+:} false; then :
81ecdfbb 12309 $as_echo_n "(cached) " >&6
a9322a30 12310else
81ecdfbb 12311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12312/* end confdefs.h. */
a9322a30
TT
12313
12314int
12315main ()
12316{
d0ac1c44 12317
a9322a30 12318#ifndef __cplusplus
d0ac1c44 12319 /* Ultrix mips cc rejects this sort of thing. */
a9322a30 12320 typedef int charset[2];
d0ac1c44 12321 const charset cs = { 0, 0 };
a9322a30 12322 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
12323 char const *const *pcpcc;
12324 char **ppc;
a9322a30
TT
12325 /* NEC SVR4.0.2 mips cc rejects this. */
12326 struct point {int x, y;};
12327 static struct point const zero = {0,0};
12328 /* AIX XL C 1.02.0.0 rejects this.
12329 It does not let you subtract one const X* pointer from another in
12330 an arm of an if-expression whose if-part is not a constant
12331 expression */
12332 const char *g = "string";
81ecdfbb 12333 pcpcc = &g + (g ? g-g : 0);
a9322a30 12334 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
12335 ++pcpcc;
12336 ppc = (char**) pcpcc;
12337 pcpcc = (char const *const *) ppc;
d0ac1c44
SM
12338 { /* SCO 3.2v4 cc rejects this sort of thing. */
12339 char tx;
12340 char *t = &tx;
a9322a30
TT
12341 char const *s = 0 ? (char *) 0 : (char const *) 0;
12342
12343 *t++ = 0;
81ecdfbb 12344 if (s) return 0;
a9322a30
TT
12345 }
12346 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12347 int x[] = {25, 17};
12348 const int *foo = &x[0];
12349 ++foo;
12350 }
12351 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12352 typedef const int *iptr;
12353 iptr p = 0;
12354 ++p;
12355 }
d0ac1c44 12356 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
a9322a30 12357 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
d0ac1c44
SM
12358 struct s { int j; const int *ap[3]; } bx;
12359 struct s *b = &bx; b->j = 5;
a9322a30
TT
12360 }
12361 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12362 const int foo = 10;
81ecdfbb 12363 if (!foo) return 0;
a9322a30 12364 }
81ecdfbb 12365 return !cs[0] && !zero.x;
a9322a30
TT
12366#endif
12367
12368 ;
12369 return 0;
12370}
bec39cab 12371_ACEOF
81ecdfbb 12372if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12373 ac_cv_c_const=yes
5ee754fc 12374else
81ecdfbb 12375 ac_cv_c_const=no
5ee754fc 12376fi
81ecdfbb 12377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 12378fi
81ecdfbb
RW
12379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12380$as_echo "$ac_cv_c_const" >&6; }
a9322a30 12381if test $ac_cv_c_const = no; then
bec39cab 12382
81ecdfbb 12383$as_echo "#define const /**/" >>confdefs.h
bec39cab 12384
5ee754fc 12385fi
bec39cab 12386
81ecdfbb
RW
12387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12388$as_echo_n "checking for inline... " >&6; }
d0ac1c44 12389if ${ac_cv_c_inline+:} false; then :
81ecdfbb 12390 $as_echo_n "(cached) " >&6
bec39cab 12391else
a9322a30
TT
12392 ac_cv_c_inline=no
12393for ac_kw in inline __inline__ __inline; do
81ecdfbb 12394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12395/* end confdefs.h. */
a9322a30
TT
12396#ifndef __cplusplus
12397typedef int foo_t;
12398static $ac_kw foo_t static_foo () {return 0; }
12399$ac_kw foo_t foo () {return 0; }
12400#endif
12401
bec39cab 12402_ACEOF
81ecdfbb
RW
12403if ac_fn_c_try_compile "$LINENO"; then :
12404 ac_cv_c_inline=$ac_kw
bec39cab 12405fi
81ecdfbb
RW
12406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12407 test "$ac_cv_c_inline" != no && break
a9322a30 12408done
bec39cab 12409
5ee754fc 12410fi
81ecdfbb
RW
12411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12412$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 12413
a9322a30
TT
12414case $ac_cv_c_inline in
12415 inline | yes) ;;
12416 *)
12417 case $ac_cv_c_inline in
12418 no) ac_val=;;
12419 *) ac_val=$ac_cv_c_inline;;
12420 esac
12421 cat >>confdefs.h <<_ACEOF
12422#ifndef __cplusplus
12423#define inline $ac_val
12424#endif
12425_ACEOF
bec39cab
AC
12426 ;;
12427esac
bec39cab 12428
81ecdfbb
RW
12429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12430$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
d0ac1c44 12431if ${ac_cv_c_bigendian+:} false; then :
81ecdfbb 12432 $as_echo_n "(cached) " >&6
bec39cab 12433else
81ecdfbb
RW
12434 ac_cv_c_bigendian=unknown
12435 # See if we're dealing with a universal compiler.
12436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12437/* end confdefs.h. */
12438#ifndef __APPLE_CC__
12439 not a universal capable compiler
12440 #endif
12441 typedef int dummy;
12442
12443_ACEOF
12444if ac_fn_c_try_compile "$LINENO"; then :
12445
12446 # Check for potential -arch flags. It is not universal unless
12447 # there are at least two -arch flags with different values.
12448 ac_arch=
12449 ac_prev=
12450 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12451 if test -n "$ac_prev"; then
12452 case $ac_word in
12453 i?86 | x86_64 | ppc | ppc64)
12454 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12455 ac_arch=$ac_word
12456 else
12457 ac_cv_c_bigendian=universal
12458 break
12459 fi
12460 ;;
12461 esac
12462 ac_prev=
12463 elif test "x$ac_word" = "x-arch"; then
12464 ac_prev=arch
12465 fi
12466 done
12467fi
12468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12469 if test $ac_cv_c_bigendian = unknown; then
12470 # See if sys/param.h defines the BYTE_ORDER macro.
12471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12472/* end confdefs.h. */
a9322a30 12473#include <sys/types.h>
81ecdfbb 12474 #include <sys/param.h>
a9322a30
TT
12475
12476int
12477main ()
12478{
81ecdfbb
RW
12479#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12480 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12481 && LITTLE_ENDIAN)
12482 bogus endian macros
12483 #endif
a9322a30
TT
12484
12485 ;
12486 return 0;
12487}
bec39cab 12488_ACEOF
81ecdfbb 12489if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12490 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 12491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12492/* end confdefs.h. */
a9322a30 12493#include <sys/types.h>
81ecdfbb 12494 #include <sys/param.h>
a9322a30
TT
12495
12496int
12497main ()
12498{
12499#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
12500 not big endian
12501 #endif
a9322a30
TT
12502
12503 ;
12504 return 0;
12505}
bec39cab 12506_ACEOF
81ecdfbb 12507if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12508 ac_cv_c_bigendian=yes
5ee754fc 12509else
81ecdfbb 12510 ac_cv_c_bigendian=no
5ee754fc 12511fi
81ecdfbb
RW
12512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12513fi
12514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12515 fi
12516 if test $ac_cv_c_bigendian = unknown; then
12517 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12519/* end confdefs.h. */
12520#include <limits.h>
bec39cab 12521
81ecdfbb
RW
12522int
12523main ()
12524{
12525#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12526 bogus endian macros
12527 #endif
12528
12529 ;
12530 return 0;
12531}
7eb368b3 12532_ACEOF
81ecdfbb
RW
12533if ac_fn_c_try_compile "$LINENO"; then :
12534 # It does; now see whether it defined to _BIG_ENDIAN or not.
12535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 12536/* end confdefs.h. */
81ecdfbb
RW
12537#include <limits.h>
12538
7eb368b3
NR
12539int
12540main ()
12541{
81ecdfbb
RW
12542#ifndef _BIG_ENDIAN
12543 not big endian
12544 #endif
12545
7eb368b3
NR
12546 ;
12547 return 0;
12548}
12549_ACEOF
81ecdfbb 12550if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12551 ac_cv_c_bigendian=yes
81ecdfbb
RW
12552else
12553 ac_cv_c_bigendian=no
a9322a30 12554fi
81ecdfbb 12555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 12556fi
81ecdfbb
RW
12557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12558 fi
12559 if test $ac_cv_c_bigendian = unknown; then
12560 # Compile a test program.
12561 if test "$cross_compiling" = yes; then :
12562 # Try to guess by grepping values from an object file.
12563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12564/* end confdefs.h. */
12565short int ascii_mm[] =
12566 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12567 short int ascii_ii[] =
12568 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12569 int use_ascii (int i) {
12570 return ascii_mm[i] + ascii_ii[i];
12571 }
12572 short int ebcdic_ii[] =
12573 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12574 short int ebcdic_mm[] =
12575 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12576 int use_ebcdic (int i) {
12577 return ebcdic_mm[i] + ebcdic_ii[i];
12578 }
12579 extern int foo;
7eb368b3 12580
81ecdfbb
RW
12581int
12582main ()
12583{
12584return use_ascii (foo) == use_ebcdic (foo);
12585 ;
12586 return 0;
12587}
12588_ACEOF
12589if ac_fn_c_try_compile "$LINENO"; then :
12590 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12591 ac_cv_c_bigendian=yes
12592 fi
12593 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12594 if test "$ac_cv_c_bigendian" = unknown; then
12595 ac_cv_c_bigendian=no
12596 else
12597 # finding both strings is unlikely to happen, but who knows?
12598 ac_cv_c_bigendian=unknown
12599 fi
12600 fi
7eb368b3 12601fi
81ecdfbb 12602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12603else
81ecdfbb 12604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12605/* end confdefs.h. */
81ecdfbb 12606$ac_includes_default
d3ea6809
MM
12607int
12608main ()
12609{
81ecdfbb
RW
12610
12611 /* Are we little or big endian? From Harbison&Steele. */
12612 union
12613 {
12614 long int l;
12615 char c[sizeof (long int)];
12616 } u;
12617 u.l = 1;
12618 return u.c[sizeof (long int) - 1] == 1;
12619
12620 ;
12621 return 0;
d3ea6809
MM
12622}
12623_ACEOF
81ecdfbb 12624if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12625 ac_cv_c_bigendian=no
d3ea6809 12626else
81ecdfbb 12627 ac_cv_c_bigendian=yes
d3ea6809 12628fi
81ecdfbb
RW
12629rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12630 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12631fi
a9322a30 12632
81ecdfbb
RW
12633 fi
12634fi
12635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12636$as_echo "$ac_cv_c_bigendian" >&6; }
12637 case $ac_cv_c_bigendian in #(
12638 yes)
12639 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12640;; #(
12641 no)
12642 ;; #(
12643 universal)
12644
12645$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12646
12647 ;; #(
12648 *)
d0ac1c44 12649 as_fn_error $? "unknown endianness
81ecdfbb
RW
12650 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12651 esac
d3ea6809
MM
12652
12653
a9322a30
TT
12654# ------------------------------ #
12655# Checks for library functions. #
12656# ------------------------------ #
d3ea6809 12657
d0ac1c44
SM
12658
12659
12660
12661 for ac_header in $ac_header_list
81ecdfbb
RW
12662do :
12663 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
d0ac1c44
SM
12664ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12665"
12666if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12667 cat >>confdefs.h <<_ACEOF
81ecdfbb 12668#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12669_ACEOF
b757528f 12670
b757528f 12671fi
bec39cab 12672
a9322a30 12673done
a3828db0 12674
d0ac1c44
SM
12675
12676
12677
12678
12679
12680
12681
a9322a30 12682for ac_func in getpagesize
81ecdfbb
RW
12683do :
12684 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
d0ac1c44 12685if test "x$ac_cv_func_getpagesize" = xyes; then :
bec39cab 12686 cat >>confdefs.h <<_ACEOF
81ecdfbb 12687#define HAVE_GETPAGESIZE 1
bec39cab 12688_ACEOF
bcb3dc3d 12689
bcb3dc3d
MK
12690fi
12691done
12692
81ecdfbb
RW
12693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12694$as_echo_n "checking for working mmap... " >&6; }
d0ac1c44 12695if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
81ecdfbb 12696 $as_echo_n "(cached) " >&6
a9322a30 12697else
81ecdfbb 12698 if test "$cross_compiling" = yes; then :
a9322a30 12699 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12700else
81ecdfbb 12701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12702/* end confdefs.h. */
a9322a30
TT
12703$ac_includes_default
12704/* malloc might have been renamed as rpl_malloc. */
12705#undef malloc
bec39cab 12706
a9322a30
TT
12707/* Thanks to Mike Haertel and Jim Avera for this test.
12708 Here is a matrix of mmap possibilities:
12709 mmap private not fixed
12710 mmap private fixed at somewhere currently unmapped
12711 mmap private fixed at somewhere already mapped
12712 mmap shared not fixed
12713 mmap shared fixed at somewhere currently unmapped
12714 mmap shared fixed at somewhere already mapped
12715 For private mappings, we should verify that changes cannot be read()
12716 back from the file, nor mmap's back from the file at a different
12717 address. (There have been systems where private was not correctly
12718 implemented like the infamous i386 svr4.0, and systems where the
12719 VM page cache was not coherent with the file system buffer cache
12720 like early versions of FreeBSD and possibly contemporary NetBSD.)
12721 For shared mappings, we should conversely verify that changes get
12722 propagated back to all the places they're supposed to be.
bec39cab 12723
a9322a30
TT
12724 Grep wants private fixed already mapped.
12725 The main things grep needs to know about mmap are:
12726 * does it exist and is it safe to write into the mmap'd area
12727 * how to use it (BSD variants) */
8b9cf735 12728
a9322a30
TT
12729#include <fcntl.h>
12730#include <sys/mman.h>
8b9cf735 12731
81ecdfbb 12732#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12733char *malloc ();
a3828db0
MK
12734#endif
12735
a9322a30 12736/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12737#ifndef HAVE_GETPAGESIZE
a9322a30
TT
12738# ifdef _SC_PAGESIZE
12739# define getpagesize() sysconf(_SC_PAGESIZE)
12740# else /* no _SC_PAGESIZE */
81ecdfbb 12741# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12742# include <sys/param.h>
12743# ifdef EXEC_PAGESIZE
12744# define getpagesize() EXEC_PAGESIZE
12745# else /* no EXEC_PAGESIZE */
12746# ifdef NBPG
12747# define getpagesize() NBPG * CLSIZE
12748# ifndef CLSIZE
12749# define CLSIZE 1
12750# endif /* no CLSIZE */
12751# else /* no NBPG */
12752# ifdef NBPC
12753# define getpagesize() NBPC
12754# else /* no NBPC */
12755# ifdef PAGESIZE
12756# define getpagesize() PAGESIZE
12757# endif /* PAGESIZE */
12758# endif /* no NBPC */
12759# endif /* no NBPG */
12760# endif /* no EXEC_PAGESIZE */
12761# else /* no HAVE_SYS_PARAM_H */
12762# define getpagesize() 8192 /* punt totally */
12763# endif /* no HAVE_SYS_PARAM_H */
12764# endif /* no _SC_PAGESIZE */
12765
12766#endif /* no HAVE_GETPAGESIZE */
12767
bec39cab
AC
12768int
12769main ()
12770{
a9322a30 12771 char *data, *data2, *data3;
d0ac1c44 12772 const char *cdata2;
a9322a30 12773 int i, pagesize;
d0ac1c44 12774 int fd, fd2;
a9322a30
TT
12775
12776 pagesize = getpagesize ();
12777
12778 /* First, make a file with some known garbage in it. */
12779 data = (char *) malloc (pagesize);
12780 if (!data)
81ecdfbb 12781 return 1;
a9322a30
TT
12782 for (i = 0; i < pagesize; ++i)
12783 *(data + i) = rand ();
12784 umask (0);
12785 fd = creat ("conftest.mmap", 0600);
12786 if (fd < 0)
d0ac1c44 12787 return 2;
a9322a30 12788 if (write (fd, data, pagesize) != pagesize)
d0ac1c44 12789 return 3;
a9322a30
TT
12790 close (fd);
12791
d0ac1c44
SM
12792 /* Next, check that the tail of a page is zero-filled. File must have
12793 non-zero length, otherwise we risk SIGBUS for entire page. */
12794 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
12795 if (fd2 < 0)
12796 return 4;
12797 cdata2 = "";
12798 if (write (fd2, cdata2, 1) != 1)
12799 return 5;
12800 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
12801 if (data2 == MAP_FAILED)
12802 return 6;
12803 for (i = 0; i < pagesize; ++i)
12804 if (*(data2 + i))
12805 return 7;
12806 close (fd2);
12807 if (munmap (data2, pagesize))
12808 return 8;
12809
a9322a30
TT
12810 /* Next, try to mmap the file at a fixed address which already has
12811 something else allocated at it. If we can, also make sure that
12812 we see the same garbage. */
12813 fd = open ("conftest.mmap", O_RDWR);
12814 if (fd < 0)
d0ac1c44 12815 return 9;
a9322a30
TT
12816 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12817 MAP_PRIVATE | MAP_FIXED, fd, 0L))
d0ac1c44 12818 return 10;
a9322a30
TT
12819 for (i = 0; i < pagesize; ++i)
12820 if (*(data + i) != *(data2 + i))
d0ac1c44 12821 return 11;
a9322a30
TT
12822
12823 /* Finally, make sure that changes to the mapped area do not
12824 percolate back to the file as seen by read(). (This is a bug on
12825 some variants of i386 svr4.0.) */
12826 for (i = 0; i < pagesize; ++i)
12827 *(data2 + i) = *(data2 + i) + 1;
12828 data3 = (char *) malloc (pagesize);
12829 if (!data3)
d0ac1c44 12830 return 12;
a9322a30 12831 if (read (fd, data3, pagesize) != pagesize)
d0ac1c44 12832 return 13;
a9322a30
TT
12833 for (i = 0; i < pagesize; ++i)
12834 if (*(data + i) != *(data3 + i))
d0ac1c44 12835 return 14;
a9322a30 12836 close (fd);
81ecdfbb 12837 return 0;
bec39cab
AC
12838}
12839_ACEOF
81ecdfbb 12840if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12841 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 12842else
81ecdfbb 12843 ac_cv_func_mmap_fixed_mapped=no
a3828db0 12844fi
81ecdfbb
RW
12845rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12846 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 12847fi
81ecdfbb 12848
a9322a30 12849fi
81ecdfbb
RW
12850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12851$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
12852if test $ac_cv_func_mmap_fixed_mapped = yes; then
12853
81ecdfbb 12854$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 12855
086ec9eb 12856fi
d0ac1c44 12857rm -f conftest.mmap conftest.txt
a3828db0 12858
81ecdfbb 12859ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
d0ac1c44 12860if test "x$ac_cv_type_pid_t" = xyes; then :
bec39cab 12861
a9322a30
TT
12862else
12863
12864cat >>confdefs.h <<_ACEOF
12865#define pid_t int
bec39cab 12866_ACEOF
086ec9eb
MK
12867
12868fi
12869
81ecdfbb
RW
12870for ac_header in vfork.h
12871do :
12872 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
d0ac1c44 12873if test "x$ac_cv_header_vfork_h" = xyes; then :
a3828db0 12874 cat >>confdefs.h <<_ACEOF
81ecdfbb 12875#define HAVE_VFORK_H 1
bec39cab 12876_ACEOF
c906108c
SS
12877
12878fi
a9322a30 12879
a3828db0 12880done
c906108c 12881
a9322a30 12882for ac_func in fork vfork
81ecdfbb
RW
12883do :
12884 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12885ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 12886if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
a3828db0 12887 cat >>confdefs.h <<_ACEOF
81ecdfbb 12888#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 12889_ACEOF
b83266a0 12890
97bf5e38 12891fi
a3828db0 12892done
b83266a0 12893
a9322a30 12894if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
12895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
12896$as_echo_n "checking for working fork... " >&6; }
d0ac1c44 12897if ${ac_cv_func_fork_works+:} false; then :
81ecdfbb 12898 $as_echo_n "(cached) " >&6
a9322a30 12899else
81ecdfbb 12900 if test "$cross_compiling" = yes; then :
a9322a30
TT
12901 ac_cv_func_fork_works=cross
12902else
81ecdfbb
RW
12903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12904/* end confdefs.h. */
12905$ac_includes_default
12906int
12907main ()
12908{
12909
12910 /* By Ruediger Kuhlmann. */
12911 return fork () < 0;
12912
12913 ;
12914 return 0;
12915}
a9322a30 12916_ACEOF
81ecdfbb 12917if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12918 ac_cv_func_fork_works=yes
12919else
81ecdfbb 12920 ac_cv_func_fork_works=no
a9322a30 12921fi
81ecdfbb
RW
12922rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12923 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12924fi
81ecdfbb 12925
a9322a30 12926fi
81ecdfbb
RW
12927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
12928$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
12929
12930else
12931 ac_cv_func_fork_works=$ac_cv_func_fork
12932fi
12933if test "x$ac_cv_func_fork_works" = xcross; then
12934 case $host in
12935 *-*-amigaos* | *-*-msdosdjgpp*)
12936 # Override, as these systems have only a dummy fork() stub
12937 ac_cv_func_fork_works=no
12938 ;;
12939 *)
12940 ac_cv_func_fork_works=yes
12941 ;;
12942 esac
81ecdfbb
RW
12943 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
12944$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12945fi
12946ac_cv_func_vfork_works=$ac_cv_func_vfork
12947if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
12948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
12949$as_echo_n "checking for working vfork... " >&6; }
d0ac1c44 12950if ${ac_cv_func_vfork_works+:} false; then :
81ecdfbb 12951 $as_echo_n "(cached) " >&6
a9322a30 12952else
81ecdfbb 12953 if test "$cross_compiling" = yes; then :
a9322a30
TT
12954 ac_cv_func_vfork_works=cross
12955else
81ecdfbb 12956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
12957/* end confdefs.h. */
12958/* Thanks to Paul Eggert for this test. */
81ecdfbb 12959$ac_includes_default
a9322a30 12960#include <sys/wait.h>
81ecdfbb 12961#ifdef HAVE_VFORK_H
a9322a30
TT
12962# include <vfork.h>
12963#endif
12964/* On some sparc systems, changes by the child to local and incoming
12965 argument registers are propagated back to the parent. The compiler
12966 is told about this with #include <vfork.h>, but some compilers
12967 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
12968 static variable whose address is put into a register that is
12969 clobbered by the vfork. */
12970static void
12971#ifdef __cplusplus
12972sparc_address_test (int arg)
12973# else
12974sparc_address_test (arg) int arg;
12975#endif
12976{
12977 static pid_t child;
12978 if (!child) {
12979 child = vfork ();
12980 if (child < 0) {
12981 perror ("vfork");
12982 _exit(2);
12983 }
12984 if (!child) {
12985 arg = getpid();
12986 write(-1, "", 0);
12987 _exit (arg);
12988 }
12989 }
12990}
12991
12992int
12993main ()
12994{
12995 pid_t parent = getpid ();
12996 pid_t child;
12997
12998 sparc_address_test (0);
12999
13000 child = vfork ();
13001
13002 if (child == 0) {
13003 /* Here is another test for sparc vfork register problems. This
13004 test uses lots of local variables, at least as many local
13005 variables as main has allocated so far including compiler
13006 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13007 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13008 reuse the register of parent for one of the local variables,
13009 since it will think that parent can't possibly be used any more
13010 in this routine. Assigning to the local variable will thus
13011 munge parent in the parent process. */
13012 pid_t
13013 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13014 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13015 /* Convince the compiler that p..p7 are live; otherwise, it might
13016 use the same hardware register for all 8 local variables. */
13017 if (p != p1 || p != p2 || p != p3 || p != p4
13018 || p != p5 || p != p6 || p != p7)
13019 _exit(1);
13020
13021 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13022 from child file descriptors. If the child closes a descriptor
13023 before it execs or exits, this munges the parent's descriptor
13024 as well. Test for this by closing stdout in the child. */
13025 _exit(close(fileno(stdout)) != 0);
13026 } else {
13027 int status;
13028 struct stat st;
13029
13030 while (wait(&status) != child)
13031 ;
81ecdfbb 13032 return (
a9322a30
TT
13033 /* Was there some problem with vforking? */
13034 child < 0
13035
13036 /* Did the child fail? (This shouldn't happen.) */
13037 || status
13038
13039 /* Did the vfork/compiler bug occur? */
13040 || parent != getpid()
13041
13042 /* Did the file descriptor bug occur? */
13043 || fstat(fileno(stdout), &st) != 0
13044 );
13045 }
13046}
13047_ACEOF
81ecdfbb 13048if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13049 ac_cv_func_vfork_works=yes
13050else
81ecdfbb 13051 ac_cv_func_vfork_works=no
a9322a30 13052fi
81ecdfbb
RW
13053rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13054 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13055fi
81ecdfbb 13056
a9322a30 13057fi
81ecdfbb
RW
13058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13059$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
13060
13061fi;
13062if test "x$ac_cv_func_fork_works" = xcross; then
13063 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
13064 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13065$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13066fi
13067
13068if test "x$ac_cv_func_vfork_works" = xyes; then
13069
81ecdfbb 13070$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
13071
13072else
13073
81ecdfbb 13074$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
13075
13076fi
13077if test "x$ac_cv_func_fork_works" = xyes; then
13078
81ecdfbb 13079$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
13080
13081fi
13082
cdf43629 13083for ac_func in getauxval getrusage getuid getgid \
bdca27a2 13084 pipe poll pread pread64 pwrite resize_term \
e671cd59 13085 sbrk getpgid setpgid setpgrp setsid \
9467110b 13086 sigaction sigprocmask sigsetmask socketpair \
110ed339 13087 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 13088 setrlimit getrlimit posix_madvise waitpid \
1d1d0bf7 13089 ptrace64 sigaltstack setns use_default_colors
81ecdfbb
RW
13090do :
13091 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13092ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13093if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6c7a06a3 13094 cat >>confdefs.h <<_ACEOF
81ecdfbb 13095#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
13096_ACEOF
13097
13098fi
13099done
13100
13101
81ecdfbb
RW
13102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13103$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 13104if ${am_cv_langinfo_codeset+:} false; then :
81ecdfbb 13105 $as_echo_n "(cached) " >&6
6c7a06a3 13106else
81ecdfbb 13107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
13108/* end confdefs.h. */
13109#include <langinfo.h>
13110int
13111main ()
13112{
13113char* cs = nl_langinfo(CODESET);
bec39cab
AC
13114 ;
13115 return 0;
13116}
13117_ACEOF
81ecdfbb 13118if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 13119 am_cv_langinfo_codeset=yes
a4db0f07 13120else
81ecdfbb 13121 am_cv_langinfo_codeset=no
a4db0f07 13122fi
81ecdfbb
RW
13123rm -f core conftest.err conftest.$ac_objext \
13124 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 13125
a4db0f07 13126fi
81ecdfbb
RW
13127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13128$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
13129 if test $am_cv_langinfo_codeset = yes; then
13130
81ecdfbb 13131$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 13132
6c7a06a3 13133 fi
c906108c 13134
d0ac1c44
SM
13135ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13136if test "x$ac_cv_type_size_t" = xyes; then :
13137
13138else
13139
13140cat >>confdefs.h <<_ACEOF
13141#define size_t unsigned int
13142_ACEOF
13143
13144fi
13145
06825bd1 13146
3266f10b
TT
13147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13148$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 13149if ${ac_cv_header_stdc+:} false; then :
3266f10b
TT
13150 $as_echo_n "(cached) " >&6
13151else
13152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13153/* end confdefs.h. */
13154#include <stdlib.h>
13155#include <stdarg.h>
13156#include <string.h>
13157#include <float.h>
13158
13159int
13160main ()
13161{
13162
13163 ;
13164 return 0;
13165}
13166_ACEOF
13167if ac_fn_c_try_compile "$LINENO"; then :
13168 ac_cv_header_stdc=yes
13169else
13170 ac_cv_header_stdc=no
13171fi
13172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13173
13174if test $ac_cv_header_stdc = yes; then
13175 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13177/* end confdefs.h. */
13178#include <string.h>
13179
13180_ACEOF
13181if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13182 $EGREP "memchr" >/dev/null 2>&1; then :
13183
13184else
13185 ac_cv_header_stdc=no
13186fi
13187rm -f conftest*
13188
13189fi
13190
13191if test $ac_cv_header_stdc = yes; then
13192 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13194/* end confdefs.h. */
13195#include <stdlib.h>
13196
13197_ACEOF
13198if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13199 $EGREP "free" >/dev/null 2>&1; then :
13200
13201else
13202 ac_cv_header_stdc=no
13203fi
13204rm -f conftest*
13205
13206fi
13207
13208if test $ac_cv_header_stdc = yes; then
13209 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13210 if test "$cross_compiling" = yes; then :
13211 :
13212else
13213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13214/* end confdefs.h. */
13215#include <ctype.h>
13216#include <stdlib.h>
13217#if ((' ' & 0x0FF) == 0x020)
13218# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13219# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13220#else
13221# define ISLOWER(c) \
13222 (('a' <= (c) && (c) <= 'i') \
13223 || ('j' <= (c) && (c) <= 'r') \
13224 || ('s' <= (c) && (c) <= 'z'))
13225# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13226#endif
13227
13228#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13229int
13230main ()
13231{
13232 int i;
13233 for (i = 0; i < 256; i++)
13234 if (XOR (islower (i), ISLOWER (i))
13235 || toupper (i) != TOUPPER (i))
13236 return 2;
13237 return 0;
13238}
13239_ACEOF
13240if ac_fn_c_try_run "$LINENO"; then :
13241
13242else
13243 ac_cv_header_stdc=no
13244fi
13245rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13246 conftest.$ac_objext conftest.beam conftest.$ac_ext
13247fi
13248
13249fi
13250fi
13251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
13252$as_echo "$ac_cv_header_stdc" >&6; }
13253if test $ac_cv_header_stdc = yes; then
13254
13255$as_echo "#define STDC_HEADERS 1" >>confdefs.h
13256
3266f10b
TT
13257fi
13258
13259 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13260# for constant arguments. Useless!
13261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13262$as_echo_n "checking for working alloca.h... " >&6; }
d0ac1c44 13263if ${ac_cv_working_alloca_h+:} false; then :
3266f10b
TT
13264 $as_echo_n "(cached) " >&6
13265else
13266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13267/* end confdefs.h. */
13268#include <alloca.h>
13269int
13270main ()
13271{
13272char *p = (char *) alloca (2 * sizeof (int));
13273 if (p) return 0;
13274 ;
13275 return 0;
13276}
13277_ACEOF
13278if ac_fn_c_try_link "$LINENO"; then :
13279 ac_cv_working_alloca_h=yes
13280else
13281 ac_cv_working_alloca_h=no
13282fi
13283rm -f core conftest.err conftest.$ac_objext \
13284 conftest$ac_exeext conftest.$ac_ext
13285fi
13286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13287$as_echo "$ac_cv_working_alloca_h" >&6; }
13288if test $ac_cv_working_alloca_h = yes; then
13289
13290$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
13291
13292fi
13293
13294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13295$as_echo_n "checking for alloca... " >&6; }
d0ac1c44 13296if ${ac_cv_func_alloca_works+:} false; then :
3266f10b
TT
13297 $as_echo_n "(cached) " >&6
13298else
13299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13300/* end confdefs.h. */
13301#ifdef __GNUC__
13302# define alloca __builtin_alloca
13303#else
13304# ifdef _MSC_VER
13305# include <malloc.h>
13306# define alloca _alloca
13307# else
13308# ifdef HAVE_ALLOCA_H
13309# include <alloca.h>
13310# else
13311# ifdef _AIX
13312 #pragma alloca
13313# else
13314# ifndef alloca /* predefined by HP cc +Olibcalls */
d0ac1c44 13315void *alloca (size_t);
3266f10b
TT
13316# endif
13317# endif
13318# endif
13319# endif
13320#endif
13321
13322int
13323main ()
13324{
13325char *p = (char *) alloca (1);
13326 if (p) return 0;
13327 ;
13328 return 0;
13329}
13330_ACEOF
13331if ac_fn_c_try_link "$LINENO"; then :
13332 ac_cv_func_alloca_works=yes
13333else
13334 ac_cv_func_alloca_works=no
13335fi
13336rm -f core conftest.err conftest.$ac_objext \
13337 conftest$ac_exeext conftest.$ac_ext
13338fi
13339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13340$as_echo "$ac_cv_func_alloca_works" >&6; }
13341
13342if test $ac_cv_func_alloca_works = yes; then
13343
13344$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13345
13346else
13347 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13348# that cause trouble. Some versions do not even contain alloca or
13349# contain a buggy version. If you still want to use their alloca,
13350# use ar to extract alloca.o from them instead of compiling alloca.c.
13351
13352ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
13353
13354$as_echo "#define C_ALLOCA 1" >>confdefs.h
13355
13356
13357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13358$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
d0ac1c44 13359if ${ac_cv_os_cray+:} false; then :
3266f10b
TT
13360 $as_echo_n "(cached) " >&6
13361else
13362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13363/* end confdefs.h. */
13364#if defined CRAY && ! defined CRAY2
13365webecray
13366#else
13367wenotbecray
13368#endif
13369
13370_ACEOF
13371if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13372 $EGREP "webecray" >/dev/null 2>&1; then :
13373 ac_cv_os_cray=yes
13374else
13375 ac_cv_os_cray=no
13376fi
13377rm -f conftest*
13378
13379fi
13380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13381$as_echo "$ac_cv_os_cray" >&6; }
13382if test $ac_cv_os_cray = yes; then
13383 for ac_func in _getb67 GETB67 getb67; do
13384 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13385ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13386if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
13387
13388cat >>confdefs.h <<_ACEOF
13389#define CRAY_STACKSEG_END $ac_func
13390_ACEOF
13391
13392 break
13393fi
13394
13395 done
13396fi
13397
13398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13399$as_echo_n "checking stack direction for C alloca... " >&6; }
d0ac1c44 13400if ${ac_cv_c_stack_direction+:} false; then :
3266f10b
TT
13401 $as_echo_n "(cached) " >&6
13402else
13403 if test "$cross_compiling" = yes; then :
13404 ac_cv_c_stack_direction=0
13405else
13406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13407/* end confdefs.h. */
13408$ac_includes_default
13409int
d0ac1c44 13410find_stack_direction (int *addr, int depth)
3266f10b 13411{
d0ac1c44
SM
13412 int dir, dummy = 0;
13413 if (! addr)
13414 addr = &dummy;
13415 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
13416 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
13417 return dir + dummy;
3266f10b
TT
13418}
13419
13420int
d0ac1c44 13421main (int argc, char **argv)
3266f10b 13422{
d0ac1c44 13423 return find_stack_direction (0, argc + !argv + 20) < 0;
3266f10b
TT
13424}
13425_ACEOF
13426if ac_fn_c_try_run "$LINENO"; then :
13427 ac_cv_c_stack_direction=1
13428else
13429 ac_cv_c_stack_direction=-1
13430fi
13431rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13432 conftest.$ac_objext conftest.beam conftest.$ac_ext
13433fi
13434
13435fi
13436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13437$as_echo "$ac_cv_c_stack_direction" >&6; }
13438cat >>confdefs.h <<_ACEOF
13439#define STACK_DIRECTION $ac_cv_c_stack_direction
13440_ACEOF
13441
13442
13443fi
13444
13445
13446
13447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13448$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 13449if ${am_cv_langinfo_codeset+:} false; then :
3266f10b
TT
13450 $as_echo_n "(cached) " >&6
13451else
13452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13453/* end confdefs.h. */
13454#include <langinfo.h>
13455int
13456main ()
13457{
13458char* cs = nl_langinfo(CODESET);
13459 ;
13460 return 0;
13461}
13462_ACEOF
13463if ac_fn_c_try_link "$LINENO"; then :
13464 am_cv_langinfo_codeset=yes
13465else
13466 am_cv_langinfo_codeset=no
13467fi
13468rm -f core conftest.err conftest.$ac_objext \
13469 conftest$ac_exeext conftest.$ac_ext
13470
13471fi
13472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13473$as_echo "$am_cv_langinfo_codeset" >&6; }
13474 if test $am_cv_langinfo_codeset = yes; then
13475
13476$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13477
13478 fi
13479
13480
44122162 13481 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
3266f10b
TT
13482do :
13483 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13484ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 13485if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3266f10b
TT
13486 cat >>confdefs.h <<_ACEOF
13487#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13488_ACEOF
13489
13490fi
13491
13492done
13493
13494
f348d89a 13495 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction
3266f10b
TT
13496do :
13497 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13498ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13499if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
13500 cat >>confdefs.h <<_ACEOF
13501#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13502_ACEOF
13503
13504fi
13505done
13506
13507
13508 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
d0ac1c44 13509if test "x$ac_cv_have_decl_strerror" = xyes; then :
3266f10b
TT
13510 ac_have_decl=1
13511else
13512 ac_have_decl=0
13513fi
13514
13515cat >>confdefs.h <<_ACEOF
13516#define HAVE_DECL_STRERROR $ac_have_decl
13517_ACEOF
13518ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
d0ac1c44 13519if test "x$ac_cv_have_decl_strstr" = xyes; then :
3266f10b
TT
13520 ac_have_decl=1
13521else
13522 ac_have_decl=0
13523fi
13524
13525cat >>confdefs.h <<_ACEOF
13526#define HAVE_DECL_STRSTR $ac_have_decl
13527_ACEOF
13528
13529
e9bcb658
GB
13530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13531$as_echo_n "checking for sigsetjmp... " >&6; }
d0ac1c44 13532if ${gdb_cv_func_sigsetjmp+:} false; then :
e9bcb658
GB
13533 $as_echo_n "(cached) " >&6
13534else
13535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13536/* end confdefs.h. */
13537
13538#include <setjmp.h>
13539
13540int
13541main ()
13542{
13543sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
13544 ;
13545 return 0;
13546}
13547_ACEOF
13548if ac_fn_c_try_compile "$LINENO"; then :
13549 gdb_cv_func_sigsetjmp=yes
13550else
13551 gdb_cv_func_sigsetjmp=no
13552fi
13553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13554fi
13555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13556$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
13557if test $gdb_cv_func_sigsetjmp = yes; then
13558
13559$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
13560
13561fi
13562
3266f10b 13563
54019719
PA
13564# Check the return and argument types of ptrace.
13565
13566
54019719
PA
13567for ac_header in sys/ptrace.h ptrace.h
13568do :
13569 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13570ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 13571if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
54019719
PA
13572 cat >>confdefs.h <<_ACEOF
13573#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13574_ACEOF
13575
13576fi
13577
13578done
13579
13580
a3828db0 13581gdb_ptrace_headers='
4ff70b84 13582#include <sys/types.h>
a3828db0
MK
13583#if HAVE_SYS_PTRACE_H
13584# include <sys/ptrace.h>
13585#endif
13586#if HAVE_UNISTD_H
13587# include <unistd.h>
13588#endif
13589'
13590# There is no point in checking if we don't have a prototype.
9b30624b 13591ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
81ecdfbb 13592"
d0ac1c44 13593if test "x$ac_cv_have_decl_ptrace" = xyes; then :
81ecdfbb 13594 ac_have_decl=1
06825bd1 13595else
81ecdfbb 13596 ac_have_decl=0
06825bd1 13597fi
06825bd1 13598
a3828db0 13599cat >>confdefs.h <<_ACEOF
81ecdfbb 13600#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 13601_ACEOF
81ecdfbb 13602if test $ac_have_decl = 1; then :
bec39cab 13603
a3828db0 13604else
a3828db0
MK
13605
13606 : ${gdb_cv_func_ptrace_ret='int'}
13607 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13608
06825bd1
MK
13609fi
13610
064ef605
DJ
13611# Check return type. Varargs (used on GNU/Linux) conflict with the
13612# empty argument list, so check for that explicitly.
81ecdfbb
RW
13613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
13614$as_echo_n "checking return type of ptrace... " >&6; }
d0ac1c44 13615if ${gdb_cv_func_ptrace_ret+:} false; then :
81ecdfbb 13616 $as_echo_n "(cached) " >&6
bec39cab 13617else
81ecdfbb 13618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13619/* end confdefs.h. */
a3828db0 13620$gdb_ptrace_headers
bec39cab
AC
13621int
13622main ()
13623{
064ef605
DJ
13624extern long ptrace (enum __ptrace_request, ...);
13625 ;
13626 return 0;
13627}
13628_ACEOF
9b30624b 13629if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
13630 gdb_cv_func_ptrace_ret='long'
13631else
81ecdfbb 13632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13633/* end confdefs.h. */
13634$gdb_ptrace_headers
13635int
13636main ()
13637{
a3828db0 13638extern int ptrace ();
bec39cab
AC
13639 ;
13640 return 0;
13641}
13642_ACEOF
9b30624b 13643if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13644 gdb_cv_func_ptrace_ret='int'
70f9f479 13645else
81ecdfbb 13646 gdb_cv_func_ptrace_ret='long'
70f9f479 13647fi
81ecdfbb 13648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 13649fi
81ecdfbb 13650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 13651fi
81ecdfbb
RW
13652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13653$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 13654
a3828db0
MK
13655cat >>confdefs.h <<_ACEOF
13656#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 13657_ACEOF
70f9f479 13658
a3828db0 13659# Check argument types.
81ecdfbb
RW
13660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13661$as_echo_n "checking types of arguments for ptrace... " >&6; }
d0ac1c44 13662if ${gdb_cv_func_ptrace_args+:} false; then :
81ecdfbb 13663 $as_echo_n "(cached) " >&6
bec39cab 13664else
a3828db0 13665
81ecdfbb 13666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13667/* end confdefs.h. */
13668$gdb_ptrace_headers
13669int
13670main ()
13671{
13672extern long ptrace (enum __ptrace_request, ...);
13673 ;
13674 return 0;
13675}
13676_ACEOF
9b30624b 13677if ac_fn_c_try_compile "$LINENO"; then :
54019719 13678 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
064ef605 13679else
064ef605 13680
a3828db0
MK
13681for gdb_arg1 in 'int' 'long'; do
13682 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 13683 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 13684 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 13685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13686/* end confdefs.h. */
a3828db0 13687$gdb_ptrace_headers
bec39cab
AC
13688int
13689main ()
13690{
a3828db0
MK
13691
13692extern $gdb_cv_func_ptrace_ret
13693 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13694
bec39cab
AC
13695 ;
13696 return 0;
13697}
13698_ACEOF
9b30624b 13699if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13700 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13701 break 4;
5c7f2947 13702fi
81ecdfbb 13703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 13704 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 13705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13706/* end confdefs.h. */
a3828db0 13707$gdb_ptrace_headers
bec39cab
AC
13708int
13709main ()
13710{
a3828db0
MK
13711
13712extern $gdb_cv_func_ptrace_ret
13713 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13714
bec39cab
AC
13715 ;
13716 return 0;
13717}
13718_ACEOF
9b30624b 13719if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13720
13721gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13722 break 5;
78434e59 13723fi
81ecdfbb 13724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
13725 done
13726 done
13727 done
13728 done
13729done
13730# Provide a safe default value.
13731: ${gdb_cv_func_ptrace_args='int,int,long,long'}
13732
064ef605 13733fi
81ecdfbb 13734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 13735fi
81ecdfbb
RW
13736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13737$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
13738ac_save_IFS=$IFS; IFS=','
13739set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13740IFS=$ac_save_IFS
13741shift
bec39cab 13742
54019719
PA
13743cat >>confdefs.h <<_ACEOF
13744#define PTRACE_TYPE_ARG1 $1
13745_ACEOF
13746
13747
a3828db0
MK
13748cat >>confdefs.h <<_ACEOF
13749#define PTRACE_TYPE_ARG3 $3
13750_ACEOF
13751
96d7229d
LM
13752
13753cat >>confdefs.h <<_ACEOF
13754#define PTRACE_TYPE_ARG4 $4
13755_ACEOF
13756
a3828db0
MK
13757if test -n "$5"; then
13758
13759cat >>confdefs.h <<_ACEOF
13760#define PTRACE_TYPE_ARG5 $5
bec39cab 13761_ACEOF
78434e59
MK
13762
13763fi
13764
54019719 13765
a3828db0 13766if test "$cross_compiling" = no; then
81ecdfbb
RW
13767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13768$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
d0ac1c44 13769if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 13770 $as_echo_n "(cached) " >&6
a3828db0 13771else
81ecdfbb 13772 if test "$cross_compiling" = yes; then :
d0ac1c44 13773 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 13774else
81ecdfbb 13775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13776/* end confdefs.h. */
81ecdfbb 13777$ac_includes_default
bec39cab
AC
13778int
13779main ()
13780{
a3828db0
MK
13781/* If this system has a BSD-style setpgrp which takes arguments,
13782 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
13783 exit successfully. */
81ecdfbb 13784 return setpgrp (1,1) != -1;
bec39cab
AC
13785 ;
13786 return 0;
13787}
13788_ACEOF
81ecdfbb 13789if ac_fn_c_try_run "$LINENO"; then :
a3828db0 13790 ac_cv_func_setpgrp_void=no
c906108c 13791else
81ecdfbb 13792 ac_cv_func_setpgrp_void=yes
c906108c 13793fi
81ecdfbb
RW
13794rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13795 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13796fi
81ecdfbb 13797
a3828db0 13798fi
81ecdfbb
RW
13799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13800$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
13801if test $ac_cv_func_setpgrp_void = yes; then
13802
81ecdfbb 13803$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
13804
13805fi
a3828db0
MK
13806
13807else
81ecdfbb
RW
13808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13809$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
d0ac1c44 13810if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 13811 $as_echo_n "(cached) " >&6
97bf5e38 13812else
81ecdfbb 13813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13814/* end confdefs.h. */
a3828db0
MK
13815
13816#include <unistd.h>
13817
bec39cab
AC
13818int
13819main ()
13820{
a3828db0
MK
13821
13822 if (setpgrp(1,1) == -1)
13823 exit (0);
13824 else
13825 exit (1);
13826
bec39cab
AC
13827 ;
13828 return 0;
13829}
13830_ACEOF
81ecdfbb 13831if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13832 ac_cv_func_setpgrp_void=no
c906108c 13833else
81ecdfbb 13834 ac_cv_func_setpgrp_void=yes
c906108c 13835fi
81ecdfbb 13836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13837fi
81ecdfbb
RW
13838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13839$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 13840if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 13841 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 13842
a3828db0 13843fi
c906108c
SS
13844fi
13845
db1ff28b
JK
13846# Assume we'll default to using the included libiberty regex.
13847gdb_use_included_regex=yes
13848
13849# However, if the system regex is GNU regex, then default to *not*
13850# using the included regex.
13851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
13852$as_echo_n "checking for GNU regex... " >&6; }
d0ac1c44 13853if ${gdb_cv_have_gnu_regex+:} false; then :
db1ff28b
JK
13854 $as_echo_n "(cached) " >&6
13855else
13856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13857/* end confdefs.h. */
13858#include <gnu-versions.h>
13859int
13860main ()
13861{
13862#define REGEX_INTERFACE_VERSION 1
13863#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
13864# error "Version mismatch"
13865#endif
13866 ;
13867 return 0;
13868}
13869_ACEOF
13870if ac_fn_c_try_compile "$LINENO"; then :
13871 gdb_cv_have_gnu_regex=yes
13872else
13873 gdb_cv_have_gnu_regex=no
13874fi
13875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13876fi
13877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
13878$as_echo "$gdb_cv_have_gnu_regex" >&6; }
13879if test $gdb_cv_have_gnu_regex = yes; then
13880 gdb_use_included_regex=no
13881fi
13882
13883
13884# Check whether --with-included-regex was given.
13885if test "${with_included_regex+set}" = set; then :
13886 withval=$with_included_regex; gdb_with_regex=$withval
13887else
13888 gdb_with_regex=$gdb_use_included_regex
13889fi
13890
13891if test "$gdb_with_regex" = yes; then
13892
13893$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
13894
13895fi
13896
81ecdfbb
RW
13897# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
13898ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
13899#include <sys/proc.h>
13900
13901"
d0ac1c44 13902if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
c906108c 13903
5c45e068 13904cat >>confdefs.h <<_ACEOF
a3828db0 13905#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 13906_ACEOF
c906108c 13907
5c45e068 13908
97bf5e38 13909fi
c906108c 13910
5c45e068 13911
a3828db0 13912# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
13913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
13914$as_echo_n "checking for struct lwp... " >&6; }
d0ac1c44 13915if ${gdb_cv_struct_lwp+:} false; then :
81ecdfbb 13916 $as_echo_n "(cached) " >&6
bec39cab 13917else
81ecdfbb 13918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13919/* end confdefs.h. */
a3828db0 13920#include <sys/param.h>
c49fbc6c 13921#define _KMEMUSER
a3828db0 13922#include <sys/lwp.h>
bec39cab
AC
13923int
13924main ()
13925{
a3828db0 13926struct lwp l;
bec39cab
AC
13927 ;
13928 return 0;
13929}
13930_ACEOF
81ecdfbb 13931if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13932 gdb_cv_struct_lwp=yes
c906108c 13933else
81ecdfbb 13934 gdb_cv_struct_lwp=no
c906108c 13935fi
81ecdfbb 13936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13937fi
81ecdfbb
RW
13938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
13939$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 13940if test $gdb_cv_struct_lwp = yes; then
c906108c 13941
81ecdfbb 13942$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 13943
97bf5e38 13944fi
c906108c 13945
a3828db0 13946# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
13947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
13948$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
d0ac1c44 13949if ${gdb_cv_struct_reg+:} false; then :
81ecdfbb 13950 $as_echo_n "(cached) " >&6
bec39cab 13951else
81ecdfbb 13952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13953/* end confdefs.h. */
a3828db0
MK
13954#include <sys/types.h>
13955#include <machine/reg.h>
bec39cab
AC
13956int
13957main ()
13958{
a3828db0 13959struct reg r;
bec39cab
AC
13960 ;
13961 return 0;
13962}
13963_ACEOF
81ecdfbb 13964if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13965 gdb_cv_struct_reg=yes
27ca5dad 13966else
81ecdfbb 13967 gdb_cv_struct_reg=no
27ca5dad 13968fi
81ecdfbb 13969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 13970fi
81ecdfbb
RW
13971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
13972$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 13973if test $gdb_cv_struct_reg = yes; then
bec39cab 13974
81ecdfbb 13975$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
13976
13977fi
97bf5e38 13978
a3828db0
MK
13979# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
13980# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
a6e69c1f
JB
13981ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
13982#include <machine/reg.h>
81ecdfbb 13983"
d0ac1c44 13984if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
5c45e068
MK
13985
13986cat >>confdefs.h <<_ACEOF
a3828db0 13987#define HAVE_STRUCT_REG_R_FS 1
bec39cab 13988_ACEOF
3862412b 13989
5c45e068 13990
97bf5e38 13991fi
a6e69c1f
JB
13992ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
13993#include <machine/reg.h>
81ecdfbb 13994"
d0ac1c44 13995if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
5c45e068
MK
13996
13997cat >>confdefs.h <<_ACEOF
a3828db0 13998#define HAVE_STRUCT_REG_R_GS 1
bec39cab 13999_ACEOF
3862412b 14000
5c45e068 14001
97bf5e38 14002fi
3862412b 14003
5c45e068 14004
6fea9e18
L
14005# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
14006# Older amd64 Linux's don't have the fs_base and gs_base members of
14007# `struct user_regs_struct'.
f517c180
EA
14008ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/types.h>
14009#include <sys/user.h>
6fea9e18 14010"
d0ac1c44 14011if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then :
6fea9e18
L
14012
14013cat >>confdefs.h <<_ACEOF
14014#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
14015_ACEOF
14016
14017
14018fi
f517c180
EA
14019ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/types.h>
14020#include <sys/user.h>
6fea9e18 14021"
d0ac1c44 14022if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then :
6fea9e18
L
14023
14024cat >>confdefs.h <<_ACEOF
14025#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
14026_ACEOF
14027
14028
14029fi
14030
14031
a3828db0 14032# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
14033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
14034$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
d0ac1c44 14035if ${gdb_cv_have_ptrace_getregs+:} false; then :
81ecdfbb 14036 $as_echo_n "(cached) " >&6
451928c5 14037else
81ecdfbb 14038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14039/* end confdefs.h. */
a3828db0 14040#include <sys/ptrace.h>
bec39cab
AC
14041int
14042main ()
14043{
a3828db0 14044PTRACE_GETREGS;
bec39cab
AC
14045 ;
14046 return 0;
14047}
14048_ACEOF
81ecdfbb 14049if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14050 gdb_cv_have_ptrace_getregs=yes
451928c5 14051else
81ecdfbb 14052 gdb_cv_have_ptrace_getregs=no
451928c5 14053fi
81ecdfbb 14054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14055fi
14056
81ecdfbb
RW
14057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
14058$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 14059if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 14060
81ecdfbb 14061$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 14062
97bf5e38 14063fi
451928c5 14064
a3828db0 14065# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
14066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
14067$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
d0ac1c44 14068if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
81ecdfbb 14069 $as_echo_n "(cached) " >&6
451928c5 14070else
81ecdfbb 14071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14072/* end confdefs.h. */
a3828db0 14073#include <sys/ptrace.h>
bec39cab
AC
14074int
14075main ()
14076{
a3828db0 14077PTRACE_GETFPXREGS;
bec39cab
AC
14078 ;
14079 return 0;
14080}
14081_ACEOF
81ecdfbb 14082if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14083 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 14084else
81ecdfbb 14085 gdb_cv_have_ptrace_getfpxregs=no
451928c5 14086fi
81ecdfbb 14087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14088fi
14089
81ecdfbb
RW
14090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
14091$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 14092if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 14093
81ecdfbb 14094$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 14095
97bf5e38 14096fi
451928c5 14097
a3828db0 14098# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
14099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
14100$as_echo_n "checking for PT_GETDBREGS... " >&6; }
d0ac1c44 14101if ${gdb_cv_have_pt_getdbregs+:} false; then :
81ecdfbb 14102 $as_echo_n "(cached) " >&6
3862412b 14103else
81ecdfbb 14104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14105/* end confdefs.h. */
a3828db0
MK
14106#include <sys/types.h>
14107#include <sys/ptrace.h>
bec39cab
AC
14108int
14109main ()
14110{
a3828db0 14111PT_GETDBREGS;
bec39cab
AC
14112 ;
14113 return 0;
14114}
14115_ACEOF
81ecdfbb 14116if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14117 gdb_cv_have_pt_getdbregs=yes
3862412b 14118else
81ecdfbb 14119 gdb_cv_have_pt_getdbregs=no
3862412b 14120fi
81ecdfbb 14121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14122fi
14123
81ecdfbb
RW
14124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
14125$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 14126if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 14127
81ecdfbb 14128$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 14129
97bf5e38 14130fi
3862412b 14131
a3828db0 14132# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
14133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
14134$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
d0ac1c44 14135if ${gdb_cv_have_pt_getxmmregs+:} false; then :
81ecdfbb 14136 $as_echo_n "(cached) " >&6
3862412b 14137else
81ecdfbb 14138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14139/* end confdefs.h. */
a3828db0
MK
14140#include <sys/types.h>
14141#include <sys/ptrace.h>
bec39cab
AC
14142int
14143main ()
14144{
a3828db0 14145PT_GETXMMREGS;
bec39cab
AC
14146 ;
14147 return 0;
14148}
14149_ACEOF
81ecdfbb 14150if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14151 gdb_cv_have_pt_getxmmregs=yes
3862412b 14152else
81ecdfbb 14153 gdb_cv_have_pt_getxmmregs=no
3862412b 14154fi
81ecdfbb 14155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14156fi
14157
81ecdfbb
RW
14158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
14159$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 14160if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 14161
81ecdfbb 14162$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 14163
97bf5e38 14164fi
3862412b 14165
6e9567fe
JB
14166# See if <sys/ptrace.h> supports LWP names on FreeBSD
14167# Older FreeBSD versions don't have the pl_tdname member of
14168# `struct ptrace_lwpinfo'.
14169ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
14170"
d0ac1c44 14171if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
6e9567fe
JB
14172
14173cat >>confdefs.h <<_ACEOF
14174#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
14175_ACEOF
14176
14177
14178fi
14179
14180
e6cdd38e
JB
14181# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
14182# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
14183# FreeBSD 10.3.
14184ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
14185"
d0ac1c44 14186if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
e6cdd38e
JB
14187
14188cat >>confdefs.h <<_ACEOF
14189#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
14190_ACEOF
14191
14192
14193fi
14194
6e9567fe 14195
97bf5e38 14196if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
14197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
14198$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14199 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
81ecdfbb 14200 $as_echo_n "(cached) " >&6
596c9d4b 14201else
81ecdfbb 14202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14203/* end confdefs.h. */
596c9d4b
KB
14204
14205#define _SYSCALL32
d30c5336
JK
14206/* Needed for new procfs interface on sparc-solaris. */
14207#define _STRUCTURED_PROC 1
596c9d4b 14208#include <sys/procfs.h>
bec39cab
AC
14209int
14210main ()
14211{
97bf5e38 14212gregset_t avar
bec39cab
AC
14213 ;
14214 return 0;
14215}
14216_ACEOF
81ecdfbb 14217if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14218 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 14219else
81ecdfbb 14220 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 14221
596c9d4b 14222fi
81ecdfbb 14223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
14224fi
14225
97bf5e38 14226 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 14227
81ecdfbb 14228$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
14229
14230 fi
81ecdfbb
RW
14231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14232$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 14233
81ecdfbb
RW
14234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
14235$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14236 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
81ecdfbb 14237 $as_echo_n "(cached) " >&6
d84dd0c5 14238else
81ecdfbb 14239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14240/* end confdefs.h. */
97bf5e38
MK
14241
14242#define _SYSCALL32
d30c5336
JK
14243/* Needed for new procfs interface on sparc-solaris. */
14244#define _STRUCTURED_PROC 1
d84dd0c5 14245#include <sys/procfs.h>
bec39cab
AC
14246int
14247main ()
14248{
97bf5e38 14249fpregset_t avar
bec39cab
AC
14250 ;
14251 return 0;
14252}
14253_ACEOF
81ecdfbb 14254if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14255 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 14256else
81ecdfbb 14257 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 14258
d84dd0c5 14259fi
81ecdfbb 14260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
14261fi
14262
97bf5e38 14263 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 14264
81ecdfbb 14265$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 14266
97bf5e38 14267 fi
81ecdfbb
RW
14268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14269$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 14270
81ecdfbb
RW
14271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
14272$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14273 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
81ecdfbb 14274 $as_echo_n "(cached) " >&6
c906108c 14275else
81ecdfbb 14276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14277/* end confdefs.h. */
c906108c 14278
97bf5e38 14279#define _SYSCALL32
d30c5336
JK
14280/* Needed for new procfs interface on sparc-solaris. */
14281#define _STRUCTURED_PROC 1
97bf5e38 14282#include <sys/procfs.h>
bec39cab
AC
14283int
14284main ()
14285{
97bf5e38 14286prgregset_t avar
bec39cab
AC
14287 ;
14288 return 0;
14289}
14290_ACEOF
81ecdfbb 14291if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14292 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 14293else
81ecdfbb 14294 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 14295
c906108c 14296fi
81ecdfbb 14297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14298fi
14299
97bf5e38 14300 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 14301
81ecdfbb 14302$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 14303
97bf5e38 14304 fi
81ecdfbb
RW
14305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14306$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 14307
81ecdfbb
RW
14308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
14309$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14310 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
81ecdfbb 14311 $as_echo_n "(cached) " >&6
d45fe813 14312else
81ecdfbb 14313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14314/* end confdefs.h. */
97bf5e38
MK
14315
14316#define _SYSCALL32
d30c5336
JK
14317/* Needed for new procfs interface on sparc-solaris. */
14318#define _STRUCTURED_PROC 1
97bf5e38 14319#include <sys/procfs.h>
bec39cab
AC
14320int
14321main ()
14322{
97bf5e38 14323prfpregset_t avar
bec39cab
AC
14324 ;
14325 return 0;
14326}
14327_ACEOF
81ecdfbb 14328if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14329 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 14330else
81ecdfbb 14331 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 14332
d45fe813 14333fi
81ecdfbb 14334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14335fi
14336
97bf5e38 14337 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 14338
81ecdfbb 14339$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 14340
97bf5e38 14341 fi
81ecdfbb
RW
14342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14343$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 14344
81ecdfbb
RW
14345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14346$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
d0ac1c44 14347 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
81ecdfbb 14348 $as_echo_n "(cached) " >&6
d45fe813 14349else
81ecdfbb 14350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14351/* end confdefs.h. */
97bf5e38
MK
14352
14353#define _SYSCALL32
d30c5336
JK
14354/* Needed for new procfs interface on sparc-solaris. */
14355#define _STRUCTURED_PROC 1
97bf5e38 14356#include <sys/procfs.h>
bec39cab
AC
14357int
14358main ()
14359{
97bf5e38 14360prgregset32_t avar
bec39cab
AC
14361 ;
14362 return 0;
14363}
14364_ACEOF
81ecdfbb 14365if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14366 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 14367else
81ecdfbb 14368 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 14369
d45fe813 14370fi
81ecdfbb 14371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14372fi
14373
97bf5e38 14374 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 14375
81ecdfbb 14376$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 14377
97bf5e38 14378 fi
81ecdfbb
RW
14379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14380$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 14381
81ecdfbb
RW
14382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14383$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
d0ac1c44 14384 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
81ecdfbb 14385 $as_echo_n "(cached) " >&6
d45fe813 14386else
81ecdfbb 14387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14388/* end confdefs.h. */
97bf5e38 14389
d45fe813 14390#define _SYSCALL32
d30c5336
JK
14391/* Needed for new procfs interface on sparc-solaris. */
14392#define _STRUCTURED_PROC 1
97bf5e38 14393#include <sys/procfs.h>
bec39cab
AC
14394int
14395main ()
14396{
97bf5e38 14397lwpid_t avar
bec39cab
AC
14398 ;
14399 return 0;
14400}
14401_ACEOF
81ecdfbb 14402if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14403 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 14404else
81ecdfbb 14405 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 14406
d45fe813 14407fi
81ecdfbb 14408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14409fi
14410
97bf5e38 14411 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 14412
81ecdfbb 14413$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 14414
97bf5e38 14415 fi
81ecdfbb
RW
14416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14417$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 14418
81ecdfbb
RW
14419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14420$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
d0ac1c44 14421 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
81ecdfbb 14422 $as_echo_n "(cached) " >&6
c906108c 14423else
81ecdfbb 14424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14425/* end confdefs.h. */
c906108c 14426
97bf5e38 14427#define _SYSCALL32
d30c5336
JK
14428/* Needed for new procfs interface on sparc-solaris. */
14429#define _STRUCTURED_PROC 1
97bf5e38 14430#include <sys/procfs.h>
bec39cab
AC
14431int
14432main ()
14433{
97bf5e38 14434psaddr_t avar
bec39cab
AC
14435 ;
14436 return 0;
14437}
14438_ACEOF
81ecdfbb 14439if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14440 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 14441else
81ecdfbb 14442 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 14443
c906108c 14444fi
81ecdfbb 14445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14446fi
14447
97bf5e38 14448 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 14449
81ecdfbb 14450$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 14451
97bf5e38 14452 fi
81ecdfbb
RW
14453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14454$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 14455
43b7e92b
GB
14456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
14457$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
14458 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
14459 $as_echo_n "(cached) " >&6
14460else
14461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14462/* end confdefs.h. */
14463
14464#define _SYSCALL32
14465/* Needed for new procfs interface on sparc-solaris. */
14466#define _STRUCTURED_PROC 1
14467#include <sys/procfs.h>
14468int
14469main ()
14470{
14471elf_fpregset_t avar
14472 ;
14473 return 0;
14474}
14475_ACEOF
14476if ac_fn_c_try_compile "$LINENO"; then :
14477 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
14478else
14479 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
14480
14481fi
14482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14483fi
14484
14485 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
14486
14487$as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
14488
14489 fi
14490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
14491$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
14492
c906108c 14493fi
c906108c 14494
bc8bcb4b 14495# Check if the compiler supports the `long long' type.
c906108c 14496
81ecdfbb
RW
14497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14498$as_echo_n "checking for long long support in compiler... " >&6; }
d0ac1c44 14499if ${gdb_cv_c_long_long+:} false; then :
81ecdfbb 14500 $as_echo_n "(cached) " >&6
97bf5e38 14501else
81ecdfbb 14502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14503/* end confdefs.h. */
bc8bcb4b 14504extern long long foo;
bec39cab
AC
14505int
14506main ()
14507{
bc8bcb4b 14508switch (foo & 2) { case 0: return 1; }
bec39cab
AC
14509 ;
14510 return 0;
14511}
14512_ACEOF
81ecdfbb 14513if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14514 gdb_cv_c_long_long=yes
14515else
81ecdfbb 14516 gdb_cv_c_long_long=no
97bf5e38 14517fi
81ecdfbb 14518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14519fi
81ecdfbb
RW
14520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14521$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
14522if test $gdb_cv_c_long_long != yes; then
14523 # libdecnumber requires long long.
d0ac1c44 14524 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
14525fi
14526
bc8bcb4b 14527# Check if the compiler and runtime support printing long longs.
97bf5e38 14528
81ecdfbb
RW
14529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14530$as_echo_n "checking for long long support in printf... " >&6; }
d0ac1c44 14531if ${gdb_cv_printf_has_long_long+:} false; then :
81ecdfbb 14532 $as_echo_n "(cached) " >&6
97bf5e38 14533else
81ecdfbb 14534 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14535 gdb_cv_printf_has_long_long=no
14536else
81ecdfbb 14537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14538/* end confdefs.h. */
bc8bcb4b
MK
14539$ac_includes_default
14540int
14541main ()
14542{
14543char buf[32];
97bf5e38
MK
14544 long long l = 0;
14545 l = (l << 16) + 0x0123;
14546 l = (l << 16) + 0x4567;
14547 l = (l << 16) + 0x89ab;
14548 l = (l << 16) + 0xcdef;
14549 sprintf (buf, "0x%016llx", l);
14550 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
14551 ;
14552 return 0;
c906108c 14553}
bec39cab 14554_ACEOF
81ecdfbb 14555if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14556 gdb_cv_printf_has_long_long=yes
14557else
81ecdfbb 14558 gdb_cv_printf_has_long_long=no
97bf5e38 14559fi
81ecdfbb
RW
14560rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14561 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14562fi
81ecdfbb 14563
97bf5e38 14564fi
81ecdfbb
RW
14565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14566$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 14567if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 14568
81ecdfbb 14569$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14570
14571fi
97bf5e38 14572
1a619819
LM
14573# Check if the compiler and runtime support printing decfloats.
14574
81ecdfbb
RW
14575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14576$as_echo_n "checking for decfloat support in printf... " >&6; }
d0ac1c44 14577if ${gdb_cv_printf_has_decfloat+:} false; then :
81ecdfbb 14578 $as_echo_n "(cached) " >&6
1a619819 14579else
81ecdfbb 14580 if test "$cross_compiling" = yes; then :
1a619819
LM
14581 gdb_cv_printf_has_decfloat=no
14582else
81ecdfbb 14583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
14584/* end confdefs.h. */
14585$ac_includes_default
14586int
14587main ()
14588{
14589char buf[64];
14590 _Decimal32 d32 = 1.2345df;
14591 _Decimal64 d64 = 1.2345dd;
14592 _Decimal128 d128 = 1.2345dl;
14593 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14594 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14595 ;
14596 return 0;
14597}
14598_ACEOF
81ecdfbb 14599if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
14600 gdb_cv_printf_has_decfloat=yes
14601else
81ecdfbb 14602 gdb_cv_printf_has_decfloat=no
1a619819 14603fi
81ecdfbb
RW
14604rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14605 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 14606fi
81ecdfbb 14607
1a619819 14608fi
81ecdfbb
RW
14609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14610$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
14611if test $gdb_cv_printf_has_decfloat = yes; then
14612
81ecdfbb 14613$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
14614
14615fi
14616
bc8bcb4b
MK
14617# Check if the compiler supports the `long double' type. We can't use
14618# AC_C_LONG_DOUBLE because that one does additional checks on the
14619# constants defined in <float.h> that fail on some systems,
14620# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 14621
81ecdfbb
RW
14622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14623$as_echo_n "checking for long double support in compiler... " >&6; }
d0ac1c44 14624if ${gdb_cv_c_long_double+:} false; then :
81ecdfbb 14625 $as_echo_n "(cached) " >&6
97bf5e38 14626else
81ecdfbb 14627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14628/* end confdefs.h. */
97bf5e38 14629long double foo;
bec39cab 14630_ACEOF
81ecdfbb 14631if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 14632 gdb_cv_c_long_double=yes
97bf5e38 14633else
81ecdfbb 14634 gdb_cv_c_long_double=no
97bf5e38 14635fi
81ecdfbb 14636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14637fi
81ecdfbb
RW
14638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14639$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 14640if test $gdb_cv_c_long_double = yes; then
c906108c 14641
81ecdfbb 14642$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14643
14644fi
14645
bc8bcb4b 14646# Check if the compiler and runtime support printing long doubles.
97bf5e38 14647
81ecdfbb
RW
14648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14649$as_echo_n "checking for long double support in printf... " >&6; }
d0ac1c44 14650if ${gdb_cv_printf_has_long_double+:} false; then :
81ecdfbb 14651 $as_echo_n "(cached) " >&6
97bf5e38 14652else
81ecdfbb 14653 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14654 gdb_cv_printf_has_long_double=no
14655else
81ecdfbb 14656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14657/* end confdefs.h. */
bc8bcb4b
MK
14658$ac_includes_default
14659int
14660main ()
14661{
14662char buf[16];
97bf5e38
MK
14663 long double f = 3.141592653;
14664 sprintf (buf, "%Lg", f);
14665 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
14666 ;
14667 return 0;
97bf5e38 14668}
bec39cab 14669_ACEOF
81ecdfbb 14670if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14671 gdb_cv_printf_has_long_double=yes
c906108c 14672else
81ecdfbb 14673 gdb_cv_printf_has_long_double=no
c906108c 14674fi
81ecdfbb
RW
14675rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14676 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14677fi
81ecdfbb 14678
c906108c 14679fi
81ecdfbb
RW
14680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14681$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 14682if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 14683
81ecdfbb 14684$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14685
14686fi
97bf5e38 14687
bc8bcb4b 14688# Check if the compiler and runtime support scanning long doubles.
97bf5e38 14689
81ecdfbb
RW
14690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14691$as_echo_n "checking for long double support in scanf... " >&6; }
d0ac1c44 14692if ${gdb_cv_scanf_has_long_double+:} false; then :
81ecdfbb 14693 $as_echo_n "(cached) " >&6
97bf5e38 14694else
81ecdfbb 14695 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14696 gdb_cv_scanf_has_long_double=no
14697else
81ecdfbb 14698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14699/* end confdefs.h. */
bc8bcb4b
MK
14700#include <stdio.h>
14701int
14702main ()
14703{
14704char *buf = "3.141592653";
97bf5e38
MK
14705 long double f = 0;
14706 sscanf (buf, "%Lg", &f);
14707 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
14708 ;
14709 return 0;
97bf5e38 14710}
bec39cab 14711_ACEOF
81ecdfbb 14712if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14713 gdb_cv_scanf_has_long_double=yes
14714else
81ecdfbb 14715 gdb_cv_scanf_has_long_double=no
97bf5e38 14716fi
81ecdfbb
RW
14717rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14718 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14719fi
81ecdfbb 14720
c906108c 14721fi
81ecdfbb
RW
14722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14723$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 14724if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 14725
81ecdfbb 14726$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14727
14728fi
c906108c 14729
438013df
AO
14730case ${host_os} in
14731aix*)
81ecdfbb
RW
14732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14733$as_echo_n "checking for -bbigtoc option... " >&6; }
d0ac1c44 14734if ${gdb_cv_bigtoc+:} false; then :
81ecdfbb 14735 $as_echo_n "(cached) " >&6
438013df 14736else
bec39cab 14737
438013df
AO
14738 SAVE_LDFLAGS=$LDFLAGS
14739
14740 case $GCC in
14741 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14742 *) gdb_cv_bigtoc=-bbigtoc ;;
14743 esac
14744
14745 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 14746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14747/* end confdefs.h. */
438013df 14748
bec39cab
AC
14749int
14750main ()
14751{
438013df 14752int i;
bec39cab
AC
14753 ;
14754 return 0;
14755}
14756_ACEOF
81ecdfbb 14757if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14758
81ecdfbb
RW
14759else
14760 gdb_cv_bigtoc=
438013df 14761fi
81ecdfbb
RW
14762rm -f core conftest.err conftest.$ac_objext \
14763 conftest$ac_exeext conftest.$ac_ext
ec76baa5 14764 LDFLAGS="${SAVE_LDFLAGS}"
438013df 14765
bec39cab 14766fi
81ecdfbb
RW
14767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
14768$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
14769 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
14770 ;;
14771esac
14772
38f6b338 14773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 14774$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
14775dynamic_list=false
14776if test "${gdb_native}" = yes; then
14777 # The dynamically loaded libthread_db needs access to symbols in the gdb
14778 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
14779 # may not be supported there.
14780 old_LDFLAGS="$LDFLAGS"
14781 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
14782 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
14783 LDFLAGS="$LDFLAGS $RDYNAMIC"
14784 if test "${have_libpython}" = no; then
14785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
14786/* end confdefs.h. */
14787
14788int
14789main ()
14790{
14791
14792 ;
14793 return 0;
14794}
14795_ACEOF
14796if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
14797 dynamic_list=true
14798fi
14799rm -f core conftest.err conftest.$ac_objext \
14800 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
14801 else
14802 # Workaround http://bugs.python.org/issue4434 where static
14803 # libpythonX.Y.a would get its symbols required for
14804 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
14805 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
14806
14807 # Note the workaround for Python
14808 # http://bugs.python.org/issue10112 earlier has removed
14809 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
14810 # here too, as otherwise it'd make this -Wl,--dynamic-list test
14811 # always pass.
38f6b338
JK
14812 old_CFLAGS="$CFLAGS"
14813 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
14814 old_LIBS="$LIBS"
14815 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
14816 old_CPPFLAGS="$CPPFLAGS"
14817 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 14818 if test "$cross_compiling" = yes; then :
3bebe2f2 14819 true
f6528abd 14820else
3bebe2f2
JK
14821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14822/* end confdefs.h. */
1b4f615e 14823#include "Python.h"
3bebe2f2
JK
14824int
14825main ()
14826{
14827int err;
38f6b338
JK
14828 Py_Initialize ();
14829 err = PyRun_SimpleString ("import itertools\n");
14830 Py_Finalize ();
14831 return err == 0 ? 0 : 1;
3bebe2f2
JK
14832 ;
14833 return 0;
14834}
14835_ACEOF
14836if ac_fn_c_try_run "$LINENO"; then :
14837 dynamic_list=true
14838fi
14839rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14840 conftest.$ac_objext conftest.beam conftest.$ac_ext
14841fi
14842
8c1fb155 14843 LIBS="$old_LIBS"
38f6b338 14844 CFLAGS="$old_CFLAGS"
1b4f615e 14845 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
14846 fi
14847 LDFLAGS="$old_LDFLAGS"
14848fi
14849if $dynamic_list; then
14850 found="-Wl,--dynamic-list"
14851 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 14852else
38f6b338
JK
14853 found="-rdynamic"
14854 RDYNAMIC="-rdynamic"
f6528abd 14855fi
f6528abd 14856
38f6b338 14857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 14858$as_echo "$found" >&6; }
0407b3f1 14859
f6528abd 14860
0407b3f1 14861if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 14862 case ${host_os} in
d92419e5 14863 aix*)
81ecdfbb
RW
14864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
14865$as_echo_n "checking for AiX thread debugging library... " >&6; }
d0ac1c44 14866 if ${gdb_cv_have_aix_thread_debug+:} false; then :
81ecdfbb 14867 $as_echo_n "(cached) " >&6
bec39cab 14868else
81ecdfbb 14869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14870/* end confdefs.h. */
d92419e5 14871#include <sys/pthdebug.h>
bec39cab
AC
14872int
14873main ()
14874{
d92419e5
JB
14875#ifndef PTHDB_VERSION_3
14876 #error
14877 #endif
bec39cab
AC
14878 ;
14879 return 0;
14880}
14881_ACEOF
81ecdfbb 14882if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
14883 gdb_cv_have_aix_thread_debug=yes
14884else
81ecdfbb 14885 gdb_cv_have_aix_thread_debug=no
d92419e5 14886fi
81ecdfbb 14887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
14888fi
14889
81ecdfbb
RW
14890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
14891$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
14892 if test $gdb_cv_have_aix_thread_debug = yes; then
14893 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 14894 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 14895 LIBS="$LIBS -lpthdebug"
d645e32e
JB
14896
14897 # Older versions of AIX do not provide the declaration for
14898 # the getthrds function (it appears that it was introduced
14899 # with AIX 6.x).
14900 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
14901"
d0ac1c44 14902if test "x$ac_cv_have_decl_getthrds" = xyes; then :
d645e32e
JB
14903 ac_have_decl=1
14904else
14905 ac_have_decl=0
14906fi
14907
14908cat >>confdefs.h <<_ACEOF
14909#define HAVE_DECL_GETTHRDS $ac_have_decl
14910_ACEOF
14911
d92419e5
JB
14912 fi
14913 ;;
c906108c 14914 esac
bec39cab 14915
c906108c
SS
14916fi
14917
3f47be5c 14918if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
14919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
14920$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
d0ac1c44 14921if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
81ecdfbb 14922 $as_echo_n "(cached) " >&6
bec39cab 14923else
81ecdfbb 14924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14925/* end confdefs.h. */
3f47be5c 14926#include <thread_db.h>
bec39cab
AC
14927int
14928main ()
14929{
3f47be5c 14930int i = TD_NOTALLOC;
bec39cab
AC
14931 ;
14932 return 0;
14933}
14934_ACEOF
81ecdfbb 14935if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
14936 gdb_cv_thread_db_h_has_td_notalloc=yes
14937else
81ecdfbb 14938 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 14939
3f47be5c 14940fi
81ecdfbb 14941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 14942
bec39cab 14943fi
81ecdfbb
RW
14944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
14945$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
14946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
14947$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
d0ac1c44 14948if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
81ecdfbb 14949 $as_echo_n "(cached) " >&6
59f80f10 14950else
81ecdfbb 14951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14952/* end confdefs.h. */
14953#include <thread_db.h>
14954int
14955main ()
14956{
14957int i = TD_VERSION;
14958 ;
14959 return 0;
14960}
14961_ACEOF
81ecdfbb 14962if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14963 gdb_cv_thread_db_h_has_td_version=yes
14964else
81ecdfbb 14965 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
14966
14967fi
81ecdfbb 14968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14969
14970fi
81ecdfbb
RW
14971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
14972$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
14973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
14974$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
d0ac1c44 14975if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
81ecdfbb 14976 $as_echo_n "(cached) " >&6
59f80f10 14977else
81ecdfbb 14978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14979/* end confdefs.h. */
14980#include <thread_db.h>
14981int
14982main ()
14983{
14984int i = TD_NOTLS;
14985 ;
14986 return 0;
14987}
14988_ACEOF
81ecdfbb 14989if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14990 gdb_cv_thread_db_h_has_td_notls=yes
14991else
81ecdfbb 14992 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
14993
14994fi
81ecdfbb 14995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14996
14997fi
81ecdfbb
RW
14998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
14999$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
15000fi
15001if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 15002
81ecdfbb 15003$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 15004
59f80f10
DJ
15005fi
15006if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
15007
81ecdfbb 15008$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
15009
15010fi
15011if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
15012
81ecdfbb 15013$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 15014
3f47be5c
EZ
15015fi
15016
81ecdfbb
RW
15017ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
15018"
d0ac1c44 15019if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
81ecdfbb 15020 ac_have_decl=1
10568435 15021else
81ecdfbb 15022 ac_have_decl=0
10568435 15023fi
10568435
JK
15024
15025cat >>confdefs.h <<_ACEOF
81ecdfbb 15026#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
15027_ACEOF
15028
15029
81ecdfbb
RW
15030if test "$cross_compiling" = yes; then :
15031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15032/* end confdefs.h. */
15033#include <sys/personality.h>
15034int
15035main ()
15036{
15037
15038# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15039# define ADDR_NO_RANDOMIZE 0x0040000
15040# endif
15041 /* Test the flag could be set and stays set. */
15042 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15043 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15044 return 1
15045 ;
15046 return 0;
15047}
15048_ACEOF
81ecdfbb 15049if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
15050 have_personality=true
15051else
81ecdfbb 15052 have_personality=false
10568435 15053fi
81ecdfbb
RW
15054rm -f core conftest.err conftest.$ac_objext \
15055 conftest$ac_exeext conftest.$ac_ext
10568435 15056else
81ecdfbb 15057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15058/* end confdefs.h. */
15059#include <sys/personality.h>
15060int
15061main ()
15062{
15063
15064# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15065# define ADDR_NO_RANDOMIZE 0x0040000
15066# endif
15067 /* Test the flag could be set and stays set. */
15068 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15069 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15070 return 1
15071 ;
15072 return 0;
15073}
15074_ACEOF
81ecdfbb 15075if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
15076 have_personality=true
15077else
81ecdfbb 15078 have_personality=false
10568435 15079fi
81ecdfbb
RW
15080rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15081 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 15082fi
81ecdfbb 15083
10568435
JK
15084if $have_personality
15085then
15086
81ecdfbb 15087$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
15088
15089fi
15090
e655c1a2
PA
15091case $host_os in
15092 go32* | *djgpp*)
15093 gdbinit=gdb.ini
15094 ;;
15095 *)
15096 gdbinit=.gdbinit
15097 ;;
15098esac
15099
15100cat >>confdefs.h <<_ACEOF
15101#define GDBINIT "$gdbinit"
15102_ACEOF
15103
15104
fb40c209 15105
f83d8a90
DE
15106# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
15107# except that the argument to --with-sysroot is optional.
15108# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
15109if test "x$with_sysroot" = xyes; then
15110 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
15111fi
bec39cab 15112
81ecdfbb
RW
15113# Check whether --with-sysroot was given.
15114if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
15115 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
15116else
15117 TARGET_SYSTEM_ROOT=
15118fi
030292b7 15119
030292b7 15120
f83d8a90
DE
15121 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15122 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15123 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
15124 ac_define_dir=`eval echo $ac_define_dir`
030292b7 15125
f83d8a90
DE
15126cat >>confdefs.h <<_ACEOF
15127#define TARGET_SYSTEM_ROOT "$ac_define_dir"
15128_ACEOF
bec39cab 15129
030292b7 15130
b14b1491 15131
f83d8a90
DE
15132
15133 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15134 if test "x$prefix" = xNONE; then
15135 test_prefix=/usr/local
15136 else
15137 test_prefix=$prefix
15138 fi
15139 else
15140 test_prefix=$exec_prefix
15141 fi
15142 value=0
15143 case ${ac_define_dir} in
15144 "${test_prefix}"|"${test_prefix}/"*|\
15145 '${exec_prefix}'|'${exec_prefix}/'*)
15146 value=1
15147 ;;
15148 esac
15149
15150cat >>confdefs.h <<_ACEOF
15151#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
15152_ACEOF
030292b7
DJ
15153
15154
15155
16e7150e 15156
16e7150e 15157
81ecdfbb
RW
15158# Check whether --with-system-gdbinit was given.
15159if test "${with_system_gdbinit+set}" = set; then :
15160 withval=$with_system_gdbinit;
b14b1491
TT
15161 SYSTEM_GDBINIT=$withval
15162else
15163 SYSTEM_GDBINIT=
81ecdfbb
RW
15164fi
15165
16e7150e
JG
15166
15167 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15168 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 15169 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
15170 ac_define_dir=`eval echo $ac_define_dir`
15171
15172cat >>confdefs.h <<_ACEOF
15173#define SYSTEM_GDBINIT "$ac_define_dir"
15174_ACEOF
15175
15176
15177
0c4a4063 15178
b14b1491
TT
15179 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15180 if test "x$prefix" = xNONE; then
15181 test_prefix=/usr/local
15182 else
15183 test_prefix=$prefix
15184 fi
15185 else
15186 test_prefix=$exec_prefix
15187 fi
15188 value=0
15189 case ${ac_define_dir} in
15190 "${test_prefix}"|"${test_prefix}/"*|\
15191 '${exec_prefix}'|'${exec_prefix}/'*)
15192 value=1
15193 ;;
15194 esac
16e7150e 15195
b14b1491
TT
15196cat >>confdefs.h <<_ACEOF
15197#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
15198_ACEOF
15199
b14b1491 15200
16e7150e 15201
0c4a4063 15202
b835bb52 15203
81ecdfbb
RW
15204# Check whether --enable-werror was given.
15205if test "${enable_werror+set}" = set; then :
15206 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
15207 yes | y) ERROR_ON_WARNING="yes" ;;
15208 no | n) ERROR_ON_WARNING="no" ;;
d0ac1c44 15209 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 15210 esac
81ecdfbb
RW
15211fi
15212
094a342e 15213
9a084706
PA
15214# Enable -Werror by default when using gcc. Turn it off for releases.
15215if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
15216 ERROR_ON_WARNING=yes
15217fi
15218
15219WERROR_CFLAGS=""
15220if test "${ERROR_ON_WARNING}" = yes ; then
15221 WERROR_CFLAGS="-Werror"
15222fi
15223
cf6de44d 15224# The options we'll try to enable.
aac331e4 15225build_warnings="-Wall -Wpointer-arith \
a0de763e 15226-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
aac331e4 15227-Wno-switch -Wno-char-subscripts \
cf6de44d 15228-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
d3d8724a 15229-Wno-sign-compare -Wno-error=maybe-uninitialized \
7f8a5d38 15230-Wno-mismatched-tags \
632e107b 15231-Wno-error=deprecated-register \
85e26832 15232-Wsuggest-override \
1a34f210 15233-Wimplicit-fallthrough=3 \
96643e35 15234-Wduplicated-cond \
33a6bc35
TT
15235-Wshadow=local \
15236-Wdeprecated-copy \
15237-Wdeprecated-copy-dtor \
15238-Wredundant-move"
3bc3d82a 15239
3526781e 15240case "${host}" in
4fa7574e
RO
15241 *-*-mingw32*)
15242 # Enable -Wno-format by default when using gcc on mingw since many
15243 # GCC versions complain about %I64.
15244 build_warnings="$build_warnings -Wno-format" ;;
15245 *-*-solaris*)
15246 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
15247 # doesn't understand.
15248 build_warnings="$build_warnings -Wno-unknown-pragmas"
15249 # Solaris 11 <unistd.h> marks vfork deprecated.
15250 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
f1628857
TT
15251 *)
15252 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
15253 # but there's a special case for this below.
15254 build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
15255esac
15256
81ecdfbb
RW
15257# Check whether --enable-build-warnings was given.
15258if test "${enable_build_warnings+set}" = set; then :
15259 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
15260 yes) ;;
15261 no) build_warnings="-w";;
15262 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15263 build_warnings="${build_warnings} ${t}";;
15264 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15265 build_warnings="${t} ${build_warnings}";;
15266 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15267esac
d4f3574e 15268if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 15269 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 15270fi
81ecdfbb
RW
15271fi
15272# Check whether --enable-gdb-build-warnings was given.
15273if test "${enable_gdb_build_warnings+set}" = set; then :
15274 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
15275 yes) ;;
15276 no) build_warnings="-w";;
15277 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15278 build_warnings="${build_warnings} ${t}";;
15279 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15280 build_warnings="${t} ${build_warnings}";;
15281 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15282esac
15283if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15284 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
15285fi
81ecdfbb 15286fi
3bc3d82a
PA
15287
15288# The set of warnings supported by a C++ compiler is not the same as
15289# of the C compiler.
cf6de44d 15290ac_ext=cpp
3bc3d82a
PA
15291ac_cpp='$CXXCPP $CPPFLAGS'
15292ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15293ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15294ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15295
3bc3d82a 15296
81ecdfbb 15297WARN_CFLAGS=""
c906108c
SS
15298if test "x${build_warnings}" != x -a "x$GCC" = xyes
15299then
81ecdfbb
RW
15300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
15301$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
15302 # Separate out the -Werror flag as some files just cannot be
15303 # compiled with it enabled.
15304 for w in ${build_warnings}; do
7544db95
PA
15305 # GCC does not complain about -Wno-unknown-warning. Invert
15306 # and test -Wunknown-warning instead.
15307 case $w in
15308 -Wno-*)
15309 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
f1628857
TT
15310 -Wformat-nonliteral)
15311 # gcc requires -Wformat before -Wformat-nonliteral
15312 # will work, so stick them together.
15313 w="-Wformat $w"
15314 wtest="$w"
15315 ;;
7544db95
PA
15316 *)
15317 wtest=$w ;;
15318 esac
15319
746a987d
AC
15320 case $w in
15321 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
15322 *)
15323 # Check whether GCC accepts it.
4536bbc6 15324 saved_CFLAGS="$CFLAGS"
3e019bdc 15325 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 15326 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 15327 CXXFLAGS="$CXXFLAGS -Werror $wtest"
a0de763e
TT
15328 if test "x$w" = "x-Wunused-variable"; then
15329 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
15330 # fixed in GCC 4.9. This test is derived from the gdb
15331 # source code that triggered this bug in GCC.
15332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15333/* end confdefs.h. */
15334struct scoped_restore_base {};
15335 struct scoped_restore_tmpl : public scoped_restore_base {
15336 ~scoped_restore_tmpl() {}
15337 };
15338int
15339main ()
15340{
15341const scoped_restore_base &b = scoped_restore_tmpl();
15342 ;
15343 return 0;
15344}
15345_ACEOF
15346if ac_fn_cxx_try_compile "$LINENO"; then :
15347 WARN_CFLAGS="${WARN_CFLAGS} $w"
15348fi
15349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15350 else
15351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15352/* end confdefs.h. */
4536bbc6 15353
bec39cab
AC
15354int
15355main ()
15356{
4536bbc6 15357
bec39cab
AC
15358 ;
15359 return 0;
15360}
15361_ACEOF
3bc3d82a 15362if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 15363 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 15364fi
81ecdfbb 15365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a0de763e 15366 fi
4536bbc6 15367 CFLAGS="$saved_CFLAGS"
3bc3d82a 15368 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
15369 esac
15370 done
81ecdfbb
RW
15371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
15372$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
15373fi
15374
15375
104c1213 15376
cf6de44d 15377ac_ext=c
3bc3d82a
PA
15378ac_cpp='$CPP $CPPFLAGS'
15379ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15380ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15381ac_compiler_gnu=$ac_cv_c_compiler_gnu
15382
3bc3d82a 15383
b835bb52 15384
f35d5ade
TT
15385# Check whether --enable-ubsan was given.
15386if test "${enable_ubsan+set}" = set; then :
15387 enableval=$enable_ubsan;
15388else
eff98030 15389 enable_ubsan=no
f35d5ade
TT
15390fi
15391
15392if test "x$enable_ubsan" = xauto; then
15393 if $development; then
15394 enable_ubsan=yes
15395 fi
15396fi
15397ac_ext=cpp
15398ac_cpp='$CXXCPP $CPPFLAGS'
15399ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15400ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15401ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15402
15403if test "x$enable_ubsan" = xyes; then
15404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
15405$as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
15406 saved_CXXFLAGS="$CXXFLAGS"
15407 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
15408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15409/* end confdefs.h. */
15410
15411int
15412main ()
15413{
15414
15415 ;
15416 return 0;
15417}
15418_ACEOF
15419if ac_fn_cxx_try_link "$LINENO"; then :
15420 enable_ubsan=yes
15421else
15422 enable_ubsan=no
15423fi
15424rm -f core conftest.err conftest.$ac_objext \
15425 conftest$ac_exeext conftest.$ac_ext
15426 CXXFLAGS="$saved_CXXFLAGS"
15427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
15428$as_echo "$enable_ubsan" >&6; }
15429 if test "x$enable_ubsan" = xyes; then
15430 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
15431 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
15432 fi
15433fi
15434ac_ext=c
15435ac_cpp='$CPP $CPPFLAGS'
15436ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15437ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15438ac_compiler_gnu=$ac_cv_c_compiler_gnu
15439
15440
15441
7a292a7a 15442# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
15443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
15444$as_echo_n "checking for cygwin... " >&6; }
d0ac1c44 15445if ${gdb_cv_os_cygwin+:} false; then :
81ecdfbb 15446 $as_echo_n "(cached) " >&6
bec39cab 15447else
81ecdfbb 15448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15449/* end confdefs.h. */
7a292a7a
SS
15450
15451#if defined (__CYGWIN__) || defined (__CYGWIN32__)
15452lose
15453#endif
bec39cab 15454_ACEOF
7a292a7a 15455if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 15456 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
15457 gdb_cv_os_cygwin=yes
15458else
7a292a7a
SS
15459 gdb_cv_os_cygwin=no
15460fi
15461rm -f conftest*
15462
15463fi
81ecdfbb
RW
15464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
15465$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 15466
aff38e61 15467
3eb25fda 15468SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 15469case ${host} in
95cbc983
AC
15470 *go32* ) SER_HARDWIRE=ser-go32.o ;;
15471 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 15472 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
c1168a2f 15473 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
aff38e61
AC
15474esac
15475
15476
cd0fc7c3
SS
15477# libreadline needs libuser32.a in a cygwin environment
15478WIN32LIBS=
15479if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
15480 WIN32LIBS="-luser32"
15481 case "${target}" in
15482 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15483 ;;
15484 esac
cd0fc7c3 15485fi
c906108c 15486
b4505029
MM
15487# The ser-tcp.c module requires sockets.
15488case ${host} in
15489 *mingw32*)
15490
81ecdfbb 15491$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
15492
15493 WIN32LIBS="$WIN32LIBS -lws2_32"
15494 ;;
15495esac
15496
7a292a7a 15497
31d99776 15498# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
15499
15500 OLD_CFLAGS=$CFLAGS
15501 OLD_LDFLAGS=$LDFLAGS
15502 OLD_LIBS=$LIBS
15503 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15504 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15505 # always want our bfd.
15506 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15507 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15508 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 15509 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15510 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 15511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb 15512$as_echo_n "checking for ELF support in BFD... " >&6; }
d0ac1c44 15513if ${gdb_cv_var_elf+:} false; then :
81ecdfbb 15514 $as_echo_n "(cached) " >&6
31d99776 15515else
81ecdfbb 15516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
15517/* end confdefs.h. */
15518#include <stdlib.h>
def63ff0
TT
15519 #include "bfd.h"
15520 #include "elf-bfd.h"
31d99776
DJ
15521
15522int
15523main ()
15524{
def63ff0 15525return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
15526 ;
15527 return 0;
15528}
15529_ACEOF
81ecdfbb 15530if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
15531 gdb_cv_var_elf=yes
15532else
81ecdfbb 15533 gdb_cv_var_elf=no
31d99776 15534fi
81ecdfbb
RW
15535rm -f core conftest.err conftest.$ac_objext \
15536 conftest$ac_exeext conftest.$ac_ext
31d99776 15537fi
81ecdfbb
RW
15538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15539$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
15540 CFLAGS=$OLD_CFLAGS
15541 LDFLAGS=$OLD_LDFLAGS
15542 LIBS=$OLD_LIBS
31d99776 15543if test $gdb_cv_var_elf = yes; then
d4777acb 15544 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 15545
81ecdfbb 15546$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 15547
075ff26d
JK
15548 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15549 if test "$plugins" = "yes"; then
a48b32c0
L
15550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
15551$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 15552if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15553 $as_echo_n "(cached) " >&6
15554else
15555 ac_func_search_save_LIBS=$LIBS
15556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15557/* end confdefs.h. */
15558
15559/* Override any GCC internal prototype to avoid an error.
15560 Use char because int might match the return type of a GCC
15561 builtin and then its argument prototype would still apply. */
15562#ifdef __cplusplus
15563extern "C"
15564#endif
15565char dlopen ();
15566int
15567main ()
15568{
15569return dlopen ();
15570 ;
15571 return 0;
15572}
15573_ACEOF
15574for ac_lib in '' dl; do
15575 if test -z "$ac_lib"; then
15576 ac_res="none required"
15577 else
15578 ac_res=-l$ac_lib
15579 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15580 fi
15581 if ac_fn_c_try_link "$LINENO"; then :
15582 ac_cv_search_dlopen=$ac_res
15583fi
15584rm -f core conftest.err conftest.$ac_objext \
15585 conftest$ac_exeext
d0ac1c44 15586 if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15587 break
15588fi
15589done
d0ac1c44 15590if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15591
15592else
15593 ac_cv_search_dlopen=no
15594fi
15595rm conftest.$ac_ext
15596LIBS=$ac_func_search_save_LIBS
15597fi
15598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
15599$as_echo "$ac_cv_search_dlopen" >&6; }
15600ac_res=$ac_cv_search_dlopen
15601if test "$ac_res" != no; then :
15602 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15603
15604fi
15605
075ff26d 15606 fi
31d99776 15607fi
31d99776 15608
4f05add4
TT
15609# Add macho support to GDB, but only if BFD includes it.
15610
15611 OLD_CFLAGS=$CFLAGS
15612 OLD_LDFLAGS=$LDFLAGS
15613 OLD_LIBS=$LIBS
15614 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15615 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15616 # always want our bfd.
15617 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15618 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15619 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 15620 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15621 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
15622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
15623$as_echo_n "checking for Mach-O support in BFD... " >&6; }
d0ac1c44 15624if ${gdb_cv_var_macho+:} false; then :
4f05add4
TT
15625 $as_echo_n "(cached) " >&6
15626else
15627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15628/* end confdefs.h. */
15629#include <stdlib.h>
15630 #include "bfd.h"
15631 #include "mach-o.h"
15632
15633int
15634main ()
15635{
15636return bfd_mach_o_lookup_command (NULL, 0, NULL);
15637 ;
15638 return 0;
15639}
15640_ACEOF
15641if ac_fn_c_try_link "$LINENO"; then :
15642 gdb_cv_var_macho=yes
15643else
15644 gdb_cv_var_macho=no
15645fi
15646rm -f core conftest.err conftest.$ac_objext \
15647 conftest$ac_exeext conftest.$ac_ext
15648fi
15649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
15650$as_echo "$gdb_cv_var_macho" >&6; }
15651 CFLAGS=$OLD_CFLAGS
15652 LDFLAGS=$OLD_LDFLAGS
15653 LIBS=$OLD_LIBS
15654if test $gdb_cv_var_macho = yes; then
15655 CONFIG_OBS="$CONFIG_OBS machoread.o"
15656fi
15657
121ce6e5
DJ
15658# Add any host-specific objects to GDB.
15659CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15660
608e2dbb
TT
15661# If building on ELF, look for lzma support for embedded compressed debug info.
15662if test $gdb_cv_var_elf = yes; then
15663
15664# Check whether --with-lzma was given.
15665if test "${with_lzma+set}" = set; then :
15666 withval=$with_lzma;
15667else
15668 with_lzma=auto
15669fi
15670
15671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
15672$as_echo_n "checking whether to use lzma... " >&6; }
15673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
15674$as_echo "$with_lzma" >&6; }
15675
15676 if test "${with_lzma}" != no; then
15677
15678
15679
15680
15681
15682
15683
15684
15685 use_additional=yes
15686
15687 acl_save_prefix="$prefix"
15688 prefix="$acl_final_prefix"
15689 acl_save_exec_prefix="$exec_prefix"
15690 exec_prefix="$acl_final_exec_prefix"
15691
15692 eval additional_includedir=\"$includedir\"
15693 eval additional_libdir=\"$libdir\"
15694
15695 exec_prefix="$acl_save_exec_prefix"
15696 prefix="$acl_save_prefix"
15697
15698
15699# Check whether --with-liblzma-prefix was given.
15700if test "${with_liblzma_prefix+set}" = set; then :
15701 withval=$with_liblzma_prefix;
15702 if test "X$withval" = "Xno"; then
15703 use_additional=no
15704 else
15705 if test "X$withval" = "X"; then
15706
15707 acl_save_prefix="$prefix"
15708 prefix="$acl_final_prefix"
15709 acl_save_exec_prefix="$exec_prefix"
15710 exec_prefix="$acl_final_exec_prefix"
15711
15712 eval additional_includedir=\"$includedir\"
15713 eval additional_libdir=\"$libdir\"
15714
15715 exec_prefix="$acl_save_exec_prefix"
15716 prefix="$acl_save_prefix"
15717
15718 else
15719 additional_includedir="$withval/include"
15720 additional_libdir="$withval/lib"
15721 fi
15722 fi
15723
15724fi
15725
15726 LIBLZMA=
15727 LTLIBLZMA=
15728 INCLZMA=
15729 rpathdirs=
15730 ltrpathdirs=
15731 names_already_handled=
15732 names_next_round='lzma '
15733 while test -n "$names_next_round"; do
15734 names_this_round="$names_next_round"
15735 names_next_round=
15736 for name in $names_this_round; do
15737 already_handled=
15738 for n in $names_already_handled; do
15739 if test "$n" = "$name"; then
15740 already_handled=yes
15741 break
15742 fi
15743 done
15744 if test -z "$already_handled"; then
15745 names_already_handled="$names_already_handled $name"
15746 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
15747 eval value=\"\$HAVE_LIB$uppername\"
15748 if test -n "$value"; then
15749 if test "$value" = yes; then
15750 eval value=\"\$LIB$uppername\"
15751 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
15752 eval value=\"\$LTLIB$uppername\"
15753 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
15754 else
15755 :
15756 fi
15757 else
15758 found_dir=
15759 found_la=
15760 found_so=
15761 found_a=
15762 if test $use_additional = yes; then
15763 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
15764 found_dir="$additional_libdir"
15765 found_so="$additional_libdir/lib$name.$shlibext"
15766 if test -f "$additional_libdir/lib$name.la"; then
15767 found_la="$additional_libdir/lib$name.la"
15768 fi
15769 else
15770 if test -f "$additional_libdir/lib$name.$libext"; then
15771 found_dir="$additional_libdir"
15772 found_a="$additional_libdir/lib$name.$libext"
15773 if test -f "$additional_libdir/lib$name.la"; then
15774 found_la="$additional_libdir/lib$name.la"
15775 fi
15776 fi
15777 fi
15778 fi
15779 if test "X$found_dir" = "X"; then
15780 for x in $LDFLAGS $LTLIBLZMA; do
15781
15782 acl_save_prefix="$prefix"
15783 prefix="$acl_final_prefix"
15784 acl_save_exec_prefix="$exec_prefix"
15785 exec_prefix="$acl_final_exec_prefix"
15786 eval x=\"$x\"
15787 exec_prefix="$acl_save_exec_prefix"
15788 prefix="$acl_save_prefix"
15789
15790 case "$x" in
15791 -L*)
15792 dir=`echo "X$x" | sed -e 's/^X-L//'`
15793 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
15794 found_dir="$dir"
15795 found_so="$dir/lib$name.$shlibext"
15796 if test -f "$dir/lib$name.la"; then
15797 found_la="$dir/lib$name.la"
15798 fi
15799 else
15800 if test -f "$dir/lib$name.$libext"; then
15801 found_dir="$dir"
15802 found_a="$dir/lib$name.$libext"
15803 if test -f "$dir/lib$name.la"; then
15804 found_la="$dir/lib$name.la"
15805 fi
15806 fi
15807 fi
15808 ;;
15809 esac
15810 if test "X$found_dir" != "X"; then
15811 break
15812 fi
15813 done
15814 fi
15815 if test "X$found_dir" != "X"; then
15816 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
15817 if test "X$found_so" != "X"; then
15818 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
15819 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15820 else
15821 haveit=
15822 for x in $ltrpathdirs; do
15823 if test "X$x" = "X$found_dir"; then
15824 haveit=yes
15825 break
15826 fi
15827 done
15828 if test -z "$haveit"; then
15829 ltrpathdirs="$ltrpathdirs $found_dir"
15830 fi
15831 if test "$hardcode_direct" = yes; then
15832 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15833 else
15834 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
15835 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15836 haveit=
15837 for x in $rpathdirs; do
15838 if test "X$x" = "X$found_dir"; then
15839 haveit=yes
15840 break
15841 fi
15842 done
15843 if test -z "$haveit"; then
15844 rpathdirs="$rpathdirs $found_dir"
15845 fi
15846 else
15847 haveit=
15848 for x in $LDFLAGS $LIBLZMA; do
15849
15850 acl_save_prefix="$prefix"
15851 prefix="$acl_final_prefix"
15852 acl_save_exec_prefix="$exec_prefix"
15853 exec_prefix="$acl_final_exec_prefix"
15854 eval x=\"$x\"
15855 exec_prefix="$acl_save_exec_prefix"
15856 prefix="$acl_save_prefix"
15857
15858 if test "X$x" = "X-L$found_dir"; then
15859 haveit=yes
15860 break
15861 fi
15862 done
15863 if test -z "$haveit"; then
15864 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
15865 fi
15866 if test "$hardcode_minus_L" != no; then
15867 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15868 else
15869 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
15870 fi
15871 fi
15872 fi
15873 fi
15874 else
15875 if test "X$found_a" != "X"; then
15876 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
15877 else
15878 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
15879 fi
15880 fi
15881 additional_includedir=
15882 case "$found_dir" in
15883 */lib | */lib/)
15884 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
15885 additional_includedir="$basedir/include"
15886 ;;
15887 esac
15888 if test "X$additional_includedir" != "X"; then
15889 if test "X$additional_includedir" != "X/usr/include"; then
15890 haveit=
15891 if test "X$additional_includedir" = "X/usr/local/include"; then
15892 if test -n "$GCC"; then
15893 case $host_os in
15894 linux*) haveit=yes;;
15895 esac
15896 fi
15897 fi
15898 if test -z "$haveit"; then
15899 for x in $CPPFLAGS $INCLZMA; do
15900
15901 acl_save_prefix="$prefix"
15902 prefix="$acl_final_prefix"
15903 acl_save_exec_prefix="$exec_prefix"
15904 exec_prefix="$acl_final_exec_prefix"
15905 eval x=\"$x\"
15906 exec_prefix="$acl_save_exec_prefix"
15907 prefix="$acl_save_prefix"
15908
15909 if test "X$x" = "X-I$additional_includedir"; then
15910 haveit=yes
15911 break
15912 fi
15913 done
15914 if test -z "$haveit"; then
15915 if test -d "$additional_includedir"; then
15916 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
15917 fi
15918 fi
15919 fi
15920 fi
15921 fi
15922 if test -n "$found_la"; then
15923 save_libdir="$libdir"
15924 case "$found_la" in
15925 */* | *\\*) . "$found_la" ;;
15926 *) . "./$found_la" ;;
15927 esac
15928 libdir="$save_libdir"
15929 for dep in $dependency_libs; do
15930 case "$dep" in
15931 -L*)
15932 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15933 if test "X$additional_libdir" != "X/usr/lib"; then
15934 haveit=
15935 if test "X$additional_libdir" = "X/usr/local/lib"; then
15936 if test -n "$GCC"; then
15937 case $host_os in
15938 linux*) haveit=yes;;
15939 esac
15940 fi
15941 fi
15942 if test -z "$haveit"; then
15943 haveit=
15944 for x in $LDFLAGS $LIBLZMA; do
15945
15946 acl_save_prefix="$prefix"
15947 prefix="$acl_final_prefix"
15948 acl_save_exec_prefix="$exec_prefix"
15949 exec_prefix="$acl_final_exec_prefix"
15950 eval x=\"$x\"
15951 exec_prefix="$acl_save_exec_prefix"
15952 prefix="$acl_save_prefix"
15953
15954 if test "X$x" = "X-L$additional_libdir"; then
15955 haveit=yes
15956 break
15957 fi
15958 done
15959 if test -z "$haveit"; then
15960 if test -d "$additional_libdir"; then
15961 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
15962 fi
15963 fi
15964 haveit=
15965 for x in $LDFLAGS $LTLIBLZMA; do
15966
15967 acl_save_prefix="$prefix"
15968 prefix="$acl_final_prefix"
15969 acl_save_exec_prefix="$exec_prefix"
15970 exec_prefix="$acl_final_exec_prefix"
15971 eval x=\"$x\"
15972 exec_prefix="$acl_save_exec_prefix"
15973 prefix="$acl_save_prefix"
15974
15975 if test "X$x" = "X-L$additional_libdir"; then
15976 haveit=yes
15977 break
15978 fi
15979 done
15980 if test -z "$haveit"; then
15981 if test -d "$additional_libdir"; then
15982 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
15983 fi
15984 fi
15985 fi
15986 fi
15987 ;;
15988 -R*)
15989 dir=`echo "X$dep" | sed -e 's/^X-R//'`
15990 if test "$enable_rpath" != no; then
15991 haveit=
15992 for x in $rpathdirs; do
15993 if test "X$x" = "X$dir"; then
15994 haveit=yes
15995 break
15996 fi
15997 done
15998 if test -z "$haveit"; then
15999 rpathdirs="$rpathdirs $dir"
16000 fi
16001 haveit=
16002 for x in $ltrpathdirs; do
16003 if test "X$x" = "X$dir"; then
16004 haveit=yes
16005 break
16006 fi
16007 done
16008 if test -z "$haveit"; then
16009 ltrpathdirs="$ltrpathdirs $dir"
16010 fi
16011 fi
16012 ;;
16013 -l*)
16014 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16015 ;;
16016 *.la)
16017 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16018 ;;
16019 *)
16020 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
16021 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
16022 ;;
16023 esac
16024 done
16025 fi
16026 else
16027 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16028 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
16029 fi
16030 fi
16031 fi
16032 done
16033 done
16034 if test "X$rpathdirs" != "X"; then
16035 if test -n "$hardcode_libdir_separator"; then
16036 alldirs=
16037 for found_dir in $rpathdirs; do
16038 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16039 done
16040 acl_save_libdir="$libdir"
16041 libdir="$alldirs"
16042 eval flag=\"$hardcode_libdir_flag_spec\"
16043 libdir="$acl_save_libdir"
16044 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16045 else
16046 for found_dir in $rpathdirs; do
16047 acl_save_libdir="$libdir"
16048 libdir="$found_dir"
16049 eval flag=\"$hardcode_libdir_flag_spec\"
16050 libdir="$acl_save_libdir"
16051 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16052 done
16053 fi
16054 fi
16055 if test "X$ltrpathdirs" != "X"; then
16056 for found_dir in $ltrpathdirs; do
16057 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
16058 done
16059 fi
16060
16061
16062 ac_save_CPPFLAGS="$CPPFLAGS"
16063
16064 for element in $INCLZMA; do
16065 haveit=
16066 for x in $CPPFLAGS; do
16067
16068 acl_save_prefix="$prefix"
16069 prefix="$acl_final_prefix"
16070 acl_save_exec_prefix="$exec_prefix"
16071 exec_prefix="$acl_final_exec_prefix"
16072 eval x=\"$x\"
16073 exec_prefix="$acl_save_exec_prefix"
16074 prefix="$acl_save_prefix"
16075
16076 if test "X$x" = "X$element"; then
16077 haveit=yes
16078 break
16079 fi
16080 done
16081 if test -z "$haveit"; then
16082 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16083 fi
16084 done
16085
16086
16087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
16088$as_echo_n "checking for liblzma... " >&6; }
d0ac1c44 16089if ${ac_cv_liblzma+:} false; then :
608e2dbb
TT
16090 $as_echo_n "(cached) " >&6
16091else
16092
16093 ac_save_LIBS="$LIBS"
16094 LIBS="$LIBS $LIBLZMA"
16095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16096/* end confdefs.h. */
16097#include "lzma.h"
16098int
16099main ()
16100{
16101lzma_index_iter iter;
16102 lzma_index_iter_init (&iter, 0);
16103 lzma_mf_is_supported (LZMA_MF_HC3);
16104 ;
16105 return 0;
16106}
16107_ACEOF
16108if ac_fn_c_try_link "$LINENO"; then :
16109 ac_cv_liblzma=yes
16110else
16111 ac_cv_liblzma=no
16112fi
16113rm -f core conftest.err conftest.$ac_objext \
16114 conftest$ac_exeext conftest.$ac_ext
16115 LIBS="$ac_save_LIBS"
16116
16117fi
16118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
16119$as_echo "$ac_cv_liblzma" >&6; }
16120 if test "$ac_cv_liblzma" = yes; then
16121 HAVE_LIBLZMA=yes
16122
16123$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
16124
16125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
16126$as_echo_n "checking how to link with liblzma... " >&6; }
16127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
16128$as_echo "$LIBLZMA" >&6; }
16129 else
16130 HAVE_LIBLZMA=no
16131 CPPFLAGS="$ac_save_CPPFLAGS"
16132 LIBLZMA=
16133 LTLIBLZMA=
16134 fi
16135
16136
16137
16138
16139
16140
16141 if test "$HAVE_LIBLZMA" != yes; then
16142 if test "$with_lzma" = yes; then
d0ac1c44 16143 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
608e2dbb
TT
16144 fi
16145 fi
16146 fi
16147fi
16148
3fc11d3e
JM
16149LIBGUI="../libgui/src/libgui.a"
16150GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
16151
16152
7a292a7a 16153
3fc11d3e
JM
16154WIN32LDAPP=
16155
16156
16157
d91670b9 16158case "${host}" in
686a5eed 16159*-*-cygwin* | *-*-mingw* )
d91670b9
CV
16160 configdir="win"
16161 ;;
16162*)
16163 configdir="unix"
16164 ;;
16165esac
3fc11d3e
JM
16166
16167GDBTKLIBS=
16168if test "${enable_gdbtk}" = "yes"; then
16169
d1c3b63a
KS
16170 # Gdbtk must have an absolute path to srcdir in order to run
16171 # properly when not installed.
16172 here=`pwd`
16173 cd ${srcdir}
16174 GDBTK_SRC_DIR=`pwd`
16175 cd $here
16176
bec39cab 16177
5062cc19
KS
16178 #
16179 # Ok, lets find the tcl configuration
16180 # First, look for one uninstalled.
16181 # the alternative search directory is invoked by --with-tcl
16182 #
3fc11d3e 16183
5062cc19
KS
16184 if test x"${no_tcl}" = x ; then
16185 # we reset no_tcl in case something fails here
16186 no_tcl=true
bec39cab 16187
81ecdfbb
RW
16188# Check whether --with-tcl was given.
16189if test "${with_tcl+set}" = set; then :
16190 withval=$with_tcl; with_tclconfig=${withval}
16191fi
16192
16193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
16194$as_echo_n "checking for Tcl configuration... " >&6; }
d0ac1c44 16195 if ${ac_cv_c_tclconfig+:} false; then :
81ecdfbb 16196 $as_echo_n "(cached) " >&6
3fc11d3e 16197else
bec39cab 16198
3fc11d3e 16199
5062cc19
KS
16200 # First check to see if --with-tcl was specified.
16201 case "${host}" in
16202 *-*-cygwin*) platDir="win" ;;
16203 *) platDir="unix" ;;
16204 esac
16205 if test x"${with_tclconfig}" != x ; then
16206 if test -f "${with_tclconfig}/tclConfig.sh" ; then
16207 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
16208 else
d0ac1c44 16209 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
16210 fi
16211 fi
16212
16213 # then check for a private Tcl installation
16214 if test x"${ac_cv_c_tclconfig}" = x ; then
16215 for i in \
16216 ../tcl \
16217 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16218 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
16219 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
16220 ../../tcl \
16221 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16222 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
16223 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
16224 ../../../tcl \
16225 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16226 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
16227 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
16228 if test -f "$i/$platDir/tclConfig.sh" ; then
16229 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16230 break
16231 fi
16232 done
16233 fi
16234
16235 # on Darwin, check in Framework installation locations
16236 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
16237 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16238 `ls -d /Library/Frameworks 2>/dev/null` \
16239 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16240 `ls -d /System/Library/Frameworks 2>/dev/null` \
16241 ; do
16242 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
16243 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
16244 break
16245 fi
16246 done
16247 fi
16248
16249 # check in a few common install locations
16250 if test x"${ac_cv_c_tclconfig}" = x ; then
16251 for i in `ls -d ${libdir} 2>/dev/null` \
16252 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16253 `ls -d ${prefix}/lib 2>/dev/null` \
16254 `ls -d /usr/local/lib 2>/dev/null` \
16255 `ls -d /usr/contrib/lib 2>/dev/null` \
16256 `ls -d /usr/lib 2>/dev/null` \
16257 ; do
16258 if test -f "$i/tclConfig.sh" ; then
16259 ac_cv_c_tclconfig=`(cd $i; pwd)`
16260 break
16261 fi
16262 done
16263 fi
3fc11d3e 16264
5062cc19
KS
16265 # check in a few other private locations
16266 if test x"${ac_cv_c_tclconfig}" = x ; then
16267 for i in \
16268 ${srcdir}/../tcl \
16269 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16270 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
16271 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
16272 if test -f "$i/$platDir/tclConfig.sh" ; then
16273 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16274 break
16275 fi
16276 done
16277 fi
bec39cab 16278
3fc11d3e
JM
16279fi
16280
5062cc19
KS
16281
16282 if test x"${ac_cv_c_tclconfig}" = x ; then
16283 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
16284 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
16285$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
16286 else
16287 no_tcl=
16288 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
16289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
16290$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
16291 fi
16292 fi
3fc11d3e 16293
bec39cab 16294
85541719
DE
16295 # If $no_tk is nonempty, then we can't do Tk, and there is no
16296 # point to doing Tcl.
bec39cab 16297
5062cc19
KS
16298 #
16299 # Ok, lets find the tk configuration
16300 # First, look for one uninstalled.
16301 # the alternative search directory is invoked by --with-tk
16302 #
3fc11d3e 16303
5062cc19
KS
16304 if test x"${no_tk}" = x ; then
16305 # we reset no_tk in case something fails here
16306 no_tk=true
bec39cab 16307
81ecdfbb
RW
16308# Check whether --with-tk was given.
16309if test "${with_tk+set}" = set; then :
16310 withval=$with_tk; with_tkconfig=${withval}
16311fi
16312
16313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
16314$as_echo_n "checking for Tk configuration... " >&6; }
d0ac1c44 16315 if ${ac_cv_c_tkconfig+:} false; then :
81ecdfbb 16316 $as_echo_n "(cached) " >&6
bec39cab 16317else
3fc11d3e
JM
16318
16319
5062cc19
KS
16320 # First check to see if --with-tkconfig was specified.
16321 if test x"${with_tkconfig}" != x ; then
16322 if test -f "${with_tkconfig}/tkConfig.sh" ; then
16323 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
16324 else
d0ac1c44 16325 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
16326 fi
16327 fi
3fc11d3e 16328
5062cc19
KS
16329 # then check for a private Tk library
16330 case "${host}" in
16331 *-*-cygwin*) platDir="win" ;;
16332 *) platDir="unix" ;;
16333 esac
16334 if test x"${ac_cv_c_tkconfig}" = x ; then
16335 for i in \
16336 ../tk \
16337 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16338 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
16339 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
16340 ../../tk \
16341 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16342 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
16343 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
16344 ../../../tk \
16345 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16346 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
16347 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
16348 if test -f "$i/$platDir/tkConfig.sh" ; then
16349 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16350 break
16351 fi
16352 done
16353 fi
16354
16355 # on Darwin, check in Framework installation locations
16356 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
16357 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16358 `ls -d /Library/Frameworks 2>/dev/null` \
16359 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16360 `ls -d /System/Library/Frameworks 2>/dev/null` \
16361 ; do
16362 if test -f "$i/Tk.framework/tkConfig.sh" ; then
16363 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
16364 break
16365 fi
16366 done
16367 fi
16368
16369 # check in a few common install locations
16370 if test x"${ac_cv_c_tkconfig}" = x ; then
16371 for i in `ls -d ${libdir} 2>/dev/null` \
16372 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16373 `ls -d ${prefix}/lib 2>/dev/null` \
16374 `ls -d /usr/local/lib 2>/dev/null` \
16375 `ls -d /usr/contrib/lib 2>/dev/null` \
16376 `ls -d /usr/lib 2>/dev/null` \
16377 ; do
16378 if test -f "$i/tkConfig.sh" ; then
16379 ac_cv_c_tkconfig=`(cd $i; pwd)`
16380 break
16381 fi
16382 done
16383 fi
16384 # check in a few other private locations
16385 if test x"${ac_cv_c_tkconfig}" = x ; then
16386 for i in \
16387 ${srcdir}/../tk \
16388 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16389 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
16390 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
16391 if test -f "$i/$platDir/tkConfig.sh" ; then
16392 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16393 break
16394 fi
16395 done
16396 fi
3fc11d3e 16397
3fc11d3e
JM
16398fi
16399
16400
5062cc19
KS
16401 if test x"${ac_cv_c_tkconfig}" = x ; then
16402 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
16403 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
16404$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
16405 else
16406 no_tk=
16407 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
16408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
16409$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 16410 fi
3fc11d3e 16411 fi
dd2504ab 16412
dd2504ab 16413
85541719
DE
16414 if test -z "${no_tcl}" -a -z "${no_tk}"; then
16415
81ecdfbb
RW
16416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
16417$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
16418
16419 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
16420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16421$as_echo "loading" >&6; }
85541719
DE
16422 . ${TCL_BIN_DIR}/tclConfig.sh
16423 else
81ecdfbb
RW
16424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
16425$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
16426 fi
16427
16428 # eval is required to do the TCL_DBGX substitution
16429 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
16430 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
16431
16432 # If the TCL_BIN_DIR is the build directory (not the install directory),
16433 # then set the common variable name to the value of the build variables.
16434 # For example, the variable TCL_LIB_SPEC will be set to the value
16435 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
16436 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
16437 # installed and uninstalled version of Tcl.
16438 if test -f "${TCL_BIN_DIR}/Makefile" ; then
16439 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
16440 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
16441 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
16442 elif test "`uname -s`" = "Darwin"; then
16443 # If Tcl was built as a framework, attempt to use the libraries
16444 # from the framework at the given location so that linking works
a68ffae9 16445 # against Tcl.framework installed in an arbitrary location.
85541719
DE
16446 case ${TCL_DEFS} in
16447 *TCL_FRAMEWORK*)
16448 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
16449 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
16450 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
16451 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
16452 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
16453 break
16454 fi
16455 done
16456 fi
16457 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
16458 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
16459 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
16460 fi
16461 ;;
16462 esac
16463 fi
16464
16465 # eval is required to do the TCL_DBGX substitution
16466 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
16467 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
16468 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
16469 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
16470
16471
16472
16473
16474
16475
16476
16477
16478
16479
16480
16481
16482
16483
16484
16485 # Check for in-tree tcl
16486 here=`pwd`
16487 cd ${srcdir}/..
16488 topdir=`pwd`
16489 cd ${here}
16490
16491 intree="no"
16492 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
16493 intree="yes"
16494 fi
16495
16496 # Find Tcl private headers
16497 if test x"${intree}" = xno; then
16498
81ecdfbb
RW
16499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
16500$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
16501 private_dir=""
16502 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
16503 if test -f ${dir}/tclInt.h ; then
16504 private_dir=${dir}
16505 fi
16506
16507 if test x"${private_dir}" = x; then
d0ac1c44 16508 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
85541719
DE
16509 else
16510 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16512$as_echo "${private_dir}" >&6; }
85541719
DE
16513 fi
16514
16515 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
16516 TCL_LIBRARY="${TCL_LIB_SPEC}"
16517 TCL_DEPS=""
16518 else
16519 # If building tcl in the same src tree, private headers
16520 # are not needed, but we need to be sure to use the right
16521 # headers library
16522 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
16523 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
16524 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
16525 fi
16526
16527
16528
16529
16530
81ecdfbb
RW
16531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
16532$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 16533
5062cc19 16534 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
16535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16536$as_echo "loading" >&6; }
5062cc19 16537 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 16538 else
81ecdfbb
RW
16539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
16540$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 16541 fi
bec39cab 16542
5062cc19
KS
16543 # eval is required to do the TK_DBGX substitution
16544 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
16545 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
16546
16547 # If the TK_BIN_DIR is the build directory (not the install directory),
16548 # then set the common variable name to the value of the build variables.
16549 # For example, the variable TK_LIB_SPEC will be set to the value
16550 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
16551 # instead of TK_BUILD_LIB_SPEC since it will work with both an
16552 # installed and uninstalled version of Tcl.
85541719 16553 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
16554 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
16555 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
16556 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
16557 elif test "`uname -s`" = "Darwin"; then
16558 # If Tk was built as a framework, attempt to use the libraries
16559 # from the framework at the given location so that linking works
a68ffae9 16560 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
16561 case ${TK_DEFS} in
16562 *TK_FRAMEWORK*)
85541719 16563 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
16564 for i in "`cd ${TK_BIN_DIR}; pwd`" \
16565 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
16566 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
16567 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
16568 break
16569 fi
16570 done
16571 fi
85541719 16572 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
16573 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
16574 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
16575 fi
16576 ;;
16577 esac
3fc11d3e
JM
16578 fi
16579
5062cc19
KS
16580 # eval is required to do the TK_DBGX substitution
16581 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
16582 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
16583 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
16584 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 16585
3fc11d3e
JM
16586
16587
bec39cab
AC
16588
16589
16590
16591
16592
16593
16594
3fc11d3e 16595
3fc11d3e 16596
bec39cab 16597
bec39cab 16598
85541719
DE
16599 # Check for in-tree Tk
16600 intree="no"
16601 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
16602 intree="yes"
16603 fi
3fc11d3e 16604
85541719
DE
16605 # Find Tk private headers
16606 if test x"${intree}" = xno; then
3fc11d3e 16607
81ecdfbb
RW
16608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
16609$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
16610 private_dir=""
16611 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
16612 if test -f ${dir}/tkInt.h; then
16613 private_dir=${dir}
3fc11d3e 16614 fi
bec39cab 16615
5062cc19 16616 if test x"${private_dir}" = x; then
d0ac1c44 16617 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
3fc11d3e 16618 else
5062cc19 16619 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16621$as_echo "${private_dir}" >&6; }
3fc11d3e 16622 fi
3fc11d3e 16623
85541719
DE
16624 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
16625 TK_LIBRARY=${TK_LIB_SPEC}
16626 TK_DEPS=""
16627 else
16628 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
16629 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
16630 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
16631 fi
3fc11d3e
JM
16632
16633
3fc11d3e
JM
16634
16635
3fc11d3e 16636
85541719 16637 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 16638
85541719
DE
16639 # Include some libraries that Tcl and Tk want.
16640 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
16641 # Yes, the ordering seems wrong here. But it isn't.
16642 # TK_LIBS is the list of libraries that need to be linked
16643 # after Tcl/Tk. Note that this isn't put into LIBS. If it
16644 # were in LIBS then any link tests after this point would
16645 # try to include things like `$(LIBGUI)', which wouldn't work.
16646 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 16647
85541719
DE
16648 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
16649 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
16650 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
16651 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
16652 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
16653 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
16654 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 16655
85541719
DE
16656 if test x$gdb_cv_os_cygwin = xyes; then
16657 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
16658 WIN32LDAPP="-Wl,--subsystem,console"
16659 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 16660 fi
ffc6a242 16661
81ecdfbb 16662 subdirs="$subdirs gdbtk"
3ace7edb 16663
85541719 16664 fi
3fc11d3e
JM
16665fi
16666
16667
16668
16669
16670
16671
16672
16673
81ecdfbb
RW
16674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
16675$as_echo_n "checking for X... " >&6; }
bec39cab 16676
c906108c 16677
81ecdfbb
RW
16678# Check whether --with-x was given.
16679if test "${with_x+set}" = set; then :
16680 withval=$with_x;
16681fi
c906108c
SS
16682
16683# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
16684if test "x$with_x" = xno; then
16685 # The user explicitly disabled X.
16686 have_x=disabled
16687else
81ecdfbb 16688 case $x_includes,$x_libraries in #(
d0ac1c44
SM
16689 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
16690 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
81ecdfbb 16691 $as_echo_n "(cached) " >&6
c906108c
SS
16692else
16693 # One or both of the vars are not set, and there is no cached value.
bec39cab 16694ac_x_includes=no ac_x_libraries=no
81ecdfbb 16695rm -f -r conftest.dir
bec39cab
AC
16696if mkdir conftest.dir; then
16697 cd conftest.dir
bec39cab 16698 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
16699incroot:
16700 @echo incroot='${INCROOT}'
16701usrlibdir:
16702 @echo usrlibdir='${USRLIBDIR}'
16703libdir:
16704 @echo libdir='${LIBDIR}'
16705_ACEOF
16706 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
d0ac1c44 16707 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
81ecdfbb
RW
16708 for ac_var in incroot usrlibdir libdir; do
16709 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
16710 done
c906108c 16711 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
16712 for ac_extension in a so sl dylib la dll; do
16713 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
16714 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 16715 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
16716 fi
16717 done
16718 # Screen out bogus values from the imake configuration. They are
16719 # bogus both because they are the default anyway, and because
16720 # using them would break gcc on systems where it needs fixed includes.
bec39cab 16721 case $ac_im_incroot in
81ecdfbb 16722 /usr/include) ac_x_includes= ;;
bec39cab 16723 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 16724 esac
bec39cab 16725 case $ac_im_usrlibdir in
81ecdfbb 16726 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 16727 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
16728 esac
16729 fi
16730 cd ..
81ecdfbb 16731 rm -f -r conftest.dir
c906108c
SS
16732fi
16733
bec39cab
AC
16734# Standard set of common directories for X headers.
16735# Check X11 before X11Rn because it is often a symlink to the current release.
16736ac_x_header_dirs='
16737/usr/X11/include
81ecdfbb 16738/usr/X11R7/include
bec39cab
AC
16739/usr/X11R6/include
16740/usr/X11R5/include
16741/usr/X11R4/include
16742
16743/usr/include/X11
81ecdfbb 16744/usr/include/X11R7
bec39cab
AC
16745/usr/include/X11R6
16746/usr/include/X11R5
16747/usr/include/X11R4
16748
16749/usr/local/X11/include
81ecdfbb 16750/usr/local/X11R7/include
bec39cab
AC
16751/usr/local/X11R6/include
16752/usr/local/X11R5/include
16753/usr/local/X11R4/include
16754
16755/usr/local/include/X11
81ecdfbb 16756/usr/local/include/X11R7
bec39cab
AC
16757/usr/local/include/X11R6
16758/usr/local/include/X11R5
16759/usr/local/include/X11R4
16760
16761/usr/X386/include
16762/usr/x386/include
16763/usr/XFree86/include/X11
16764
16765/usr/include
16766/usr/local/include
16767/usr/unsupported/include
16768/usr/athena/include
16769/usr/local/x11r5/include
16770/usr/lpp/Xamples/include
16771
16772/usr/openwin/include
16773/usr/openwin/share/include'
16774
16775if test "$ac_x_includes" = no; then
81ecdfbb 16776 # Guess where to find include files, by looking for Xlib.h.
c906108c 16777 # First, try using that file with no special directory specified.
81ecdfbb 16778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16779/* end confdefs.h. */
81ecdfbb 16780#include <X11/Xlib.h>
bec39cab 16781_ACEOF
81ecdfbb 16782if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
16783 # We can compile using X headers with no special include directory.
16784ac_x_includes=
16785else
bec39cab 16786 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 16787 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
16788 ac_x_includes=$ac_dir
16789 break
16790 fi
16791done
c906108c 16792fi
d0ac1c44 16793rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 16794fi # $ac_x_includes = no
c906108c 16795
bec39cab 16796if test "$ac_x_libraries" = no; then
c906108c 16797 # Check for the libraries.
c906108c
SS
16798 # See if we find them without any special options.
16799 # Don't add to $LIBS permanently.
bec39cab 16800 ac_save_LIBS=$LIBS
81ecdfbb
RW
16801 LIBS="-lX11 $LIBS"
16802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16803/* end confdefs.h. */
81ecdfbb 16804#include <X11/Xlib.h>
bec39cab
AC
16805int
16806main ()
16807{
81ecdfbb 16808XrmInitialize ()
bec39cab
AC
16809 ;
16810 return 0;
16811}
16812_ACEOF
81ecdfbb 16813if ac_fn_c_try_link "$LINENO"; then :
bec39cab 16814 LIBS=$ac_save_LIBS
c906108c
SS
16815# We can link X programs with no special library path.
16816ac_x_libraries=
16817else
81ecdfbb
RW
16818 LIBS=$ac_save_LIBS
16819for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 16820do
bec39cab 16821 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
16822 for ac_extension in a so sl dylib la dll; do
16823 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
16824 ac_x_libraries=$ac_dir
16825 break 2
16826 fi
16827 done
16828done
16829fi
81ecdfbb
RW
16830rm -f core conftest.err conftest.$ac_objext \
16831 conftest$ac_exeext conftest.$ac_ext
bec39cab 16832fi # $ac_x_libraries = no
c906108c 16833
81ecdfbb
RW
16834case $ac_x_includes,$ac_x_libraries in #(
16835 no,* | *,no | *\'*)
16836 # Didn't find X, or a directory has "'" in its name.
16837 ac_cv_have_x="have_x=no";; #(
16838 *)
16839 # Record where we found X for the cache.
16840 ac_cv_have_x="have_x=yes\
16841 ac_x_includes='$ac_x_includes'\
16842 ac_x_libraries='$ac_x_libraries'"
16843esac
c906108c 16844fi
81ecdfbb
RW
16845;; #(
16846 *) have_x=yes;;
16847 esac
c906108c
SS
16848 eval "$ac_cv_have_x"
16849fi # $with_x != no
16850
16851if test "$have_x" != yes; then
81ecdfbb
RW
16852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
16853$as_echo "$have_x" >&6; }
c906108c
SS
16854 no_x=yes
16855else
16856 # If each of the values was on the command line, it overrides each guess.
16857 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
16858 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
16859 # Update the cache value to reflect the command line values.
81ecdfbb
RW
16860 ac_cv_have_x="have_x=yes\
16861 ac_x_includes='$x_includes'\
16862 ac_x_libraries='$x_libraries'"
16863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
16864$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
16865fi
16866
16867
bec39cab 16868# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 16869# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
16870# This code just checks for a few cases where we'd like to ignore those
16871# definitions, even when they're present in the '.mt' file. These cases
16872# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 16873# not part of the source tree.
7a292a7a 16874#
81ecdfbb
RW
16875# Check whether --enable-sim was given.
16876if test "${enable_sim+set}" = set; then :
16877 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
16878 echo "enableval = ${enableval}";
16879 case "${enableval}" in
16880 yes) ignore_sim=false ;;
16881 no) ignore_sim=true ;;
16882 *) ignore_sim=false ;;
16883 esac
16884else
16885 ignore_sim=false
81ecdfbb
RW
16886fi
16887
7a292a7a
SS
16888
16889if test ! -d "${srcdir}/../sim"; then
16890 ignore_sim=true
16891fi
16892
9b624dbe
UW
16893SIM=
16894SIM_OBS=
16895if test "${ignore_sim}" = "false"; then
16896 if test x"${gdb_sim}" != x ; then
16897 SIM="${gdb_sim}"
16898 SIM_OBS="remote-sim.o"
60ca704f 16899
81ecdfbb 16900$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 16901
976102cd
PA
16902
16903 # Some tdep code should only be compiled in when the ppc sim is
16904 # built. PR sim/13418.
16905 case $target in
16906 powerpc*-*-*)
16907
16908$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
16909
16910 ;;
16911 esac
9b624dbe 16912 fi
7a292a7a
SS
16913fi
16914
16915
16916
c906108c
SS
16917
16918
16919
16920
16921
16922
dfcd3bfb 16923
e56ac5c3
AC
16924
16925
b3a90332
AC
16926
16927
c35f4ffc 16928# List of host floatformats.
bec39cab
AC
16929
16930cat >>confdefs.h <<_ACEOF
c35f4ffc 16931#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 16932_ACEOF
c35f4ffc 16933
bec39cab
AC
16934
16935cat >>confdefs.h <<_ACEOF
c35f4ffc 16936#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
16937_ACEOF
16938
c35f4ffc 16939
bec39cab 16940cat >>confdefs.h <<_ACEOF
c35f4ffc 16941#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 16942_ACEOF
c35f4ffc
AC
16943
16944
c906108c
SS
16945# target_subdir is used by the testsuite to find the target libraries.
16946target_subdir=
16947if test "${host}" != "${target}"; then
16948 target_subdir="${target_alias}/"
16949fi
16950
16951
21ea5acd 16952# Import nat definitions.
2b351b19 16953nat_makefile_frag=/dev/null
771b4502 16954if test "${gdb_native}" = "yes"; then
21ea5acd
SDJ
16955 . ${srcdir}/configure.nat
16956 nativefile=$NAT_FILE
c906108c 16957fi
c906108c 16958
c906108c
SS
16959
16960
16961
21ea5acd
SDJ
16962
16963
16964
16965
16966
c906108c
SS
16967
16968
b00a8037 16969if test x"${gdb_osabi}" != x ; then
bec39cab
AC
16970
16971cat >>confdefs.h <<_ACEOF
b00a8037 16972#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 16973_ACEOF
b00a8037
DJ
16974
16975fi
16976
496c0e1b
JB
16977# Check whether --enable-gdbserver was given.
16978if test "${enable_gdbserver+set}" = set; then :
16979 enableval=$enable_gdbserver; case "${enableval}" in
16980 yes| no|auto) ;;
d0ac1c44 16981 *) as_fn_error $? "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
496c0e1b
JB
16982esac
16983else
16984 enable_gdbserver=auto
16985fi
16986
16987
16988# We only build gdbserver automatically in a native configuration, and
16989# only if the user did not explicitly disable its build.
16990if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
16991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
16992$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 16993 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
16994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16995$as_echo "yes" >&6; }
16996 subdirs="$subdirs gdbserver"
3ace7edb 16997
496c0e1b 16998 gdbserver_build_enabled=yes
8dcde887 16999 else
81ecdfbb
RW
17000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17001$as_echo "no" >&6; }
8dcde887
MK
17002 fi
17003fi
17004
496c0e1b
JB
17005# If the user explicitly request the gdbserver to be built, verify that
17006# we were in fact able to enable it.
17007if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
d0ac1c44 17008 as_fn_error $? "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
496c0e1b
JB
17009fi
17010
393fd4c3
YQ
17011# Check for babeltrace and babeltrace-ctf
17012
17013# Check whether --with-babeltrace was given.
17014if test "${with_babeltrace+set}" = set; then :
17015 withval=$with_babeltrace;
17016else
17017 with_babeltrace=auto
17018fi
17019
17020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
17021$as_echo_n "checking whether to use babeltrace... " >&6; }
17022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
17023$as_echo "$with_babeltrace" >&6; }
17024
17025if test "x$with_babeltrace" = "xno"; then
17026 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
17027$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
17028else
17029 # Append -Werror to CFLAGS so that configure can catch the warning
17030 # "assignment from incompatible pointer type", which is related to
17031 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
17032 # in GDB, while babeltrace 1.0.3 is broken.
17033 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
17034 # safe to save and restore CFLAGS here.
17035 saved_CFLAGS=$CFLAGS
17036 CFLAGS="$CFLAGS -Werror"
17037
17038
17039
17040
17041
17042
17043
17044
17045 use_additional=yes
17046
17047 acl_save_prefix="$prefix"
17048 prefix="$acl_final_prefix"
17049 acl_save_exec_prefix="$exec_prefix"
17050 exec_prefix="$acl_final_exec_prefix"
17051
17052 eval additional_includedir=\"$includedir\"
17053 eval additional_libdir=\"$libdir\"
17054
17055 exec_prefix="$acl_save_exec_prefix"
17056 prefix="$acl_save_prefix"
17057
17058
17059# Check whether --with-libbabeltrace-prefix was given.
17060if test "${with_libbabeltrace_prefix+set}" = set; then :
17061 withval=$with_libbabeltrace_prefix;
17062 if test "X$withval" = "Xno"; then
17063 use_additional=no
17064 else
17065 if test "X$withval" = "X"; then
17066
17067 acl_save_prefix="$prefix"
17068 prefix="$acl_final_prefix"
17069 acl_save_exec_prefix="$exec_prefix"
17070 exec_prefix="$acl_final_exec_prefix"
17071
17072 eval additional_includedir=\"$includedir\"
17073 eval additional_libdir=\"$libdir\"
17074
17075 exec_prefix="$acl_save_exec_prefix"
17076 prefix="$acl_save_prefix"
17077
17078 else
17079 additional_includedir="$withval/include"
17080 additional_libdir="$withval/lib"
17081 fi
17082 fi
17083
17084fi
17085
17086 LIBBABELTRACE=
17087 LTLIBBABELTRACE=
17088 INCBABELTRACE=
17089 rpathdirs=
17090 ltrpathdirs=
17091 names_already_handled=
17092 names_next_round='babeltrace babeltrace-ctf'
17093 while test -n "$names_next_round"; do
17094 names_this_round="$names_next_round"
17095 names_next_round=
17096 for name in $names_this_round; do
17097 already_handled=
17098 for n in $names_already_handled; do
17099 if test "$n" = "$name"; then
17100 already_handled=yes
17101 break
17102 fi
17103 done
17104 if test -z "$already_handled"; then
17105 names_already_handled="$names_already_handled $name"
17106 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17107 eval value=\"\$HAVE_LIB$uppername\"
17108 if test -n "$value"; then
17109 if test "$value" = yes; then
17110 eval value=\"\$LIB$uppername\"
17111 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
17112 eval value=\"\$LTLIB$uppername\"
17113 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
17114 else
17115 :
17116 fi
17117 else
17118 found_dir=
17119 found_la=
17120 found_so=
17121 found_a=
17122 if test $use_additional = yes; then
17123 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
17124 found_dir="$additional_libdir"
17125 found_so="$additional_libdir/lib$name.$shlibext"
17126 if test -f "$additional_libdir/lib$name.la"; then
17127 found_la="$additional_libdir/lib$name.la"
17128 fi
17129 else
17130 if test -f "$additional_libdir/lib$name.$libext"; then
17131 found_dir="$additional_libdir"
17132 found_a="$additional_libdir/lib$name.$libext"
17133 if test -f "$additional_libdir/lib$name.la"; then
17134 found_la="$additional_libdir/lib$name.la"
17135 fi
17136 fi
17137 fi
17138 fi
17139 if test "X$found_dir" = "X"; then
17140 for x in $LDFLAGS $LTLIBBABELTRACE; do
17141
17142 acl_save_prefix="$prefix"
17143 prefix="$acl_final_prefix"
17144 acl_save_exec_prefix="$exec_prefix"
17145 exec_prefix="$acl_final_exec_prefix"
17146 eval x=\"$x\"
17147 exec_prefix="$acl_save_exec_prefix"
17148 prefix="$acl_save_prefix"
17149
17150 case "$x" in
17151 -L*)
17152 dir=`echo "X$x" | sed -e 's/^X-L//'`
17153 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
17154 found_dir="$dir"
17155 found_so="$dir/lib$name.$shlibext"
17156 if test -f "$dir/lib$name.la"; then
17157 found_la="$dir/lib$name.la"
17158 fi
17159 else
17160 if test -f "$dir/lib$name.$libext"; then
17161 found_dir="$dir"
17162 found_a="$dir/lib$name.$libext"
17163 if test -f "$dir/lib$name.la"; then
17164 found_la="$dir/lib$name.la"
17165 fi
17166 fi
17167 fi
17168 ;;
17169 esac
17170 if test "X$found_dir" != "X"; then
17171 break
17172 fi
17173 done
17174 fi
17175 if test "X$found_dir" != "X"; then
17176 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
17177 if test "X$found_so" != "X"; then
17178 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17179 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17180 else
17181 haveit=
17182 for x in $ltrpathdirs; do
17183 if test "X$x" = "X$found_dir"; then
17184 haveit=yes
17185 break
17186 fi
17187 done
17188 if test -z "$haveit"; then
17189 ltrpathdirs="$ltrpathdirs $found_dir"
17190 fi
17191 if test "$hardcode_direct" = yes; then
17192 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17193 else
17194 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17195 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17196 haveit=
17197 for x in $rpathdirs; do
17198 if test "X$x" = "X$found_dir"; then
17199 haveit=yes
17200 break
17201 fi
17202 done
17203 if test -z "$haveit"; then
17204 rpathdirs="$rpathdirs $found_dir"
17205 fi
17206 else
17207 haveit=
17208 for x in $LDFLAGS $LIBBABELTRACE; do
17209
17210 acl_save_prefix="$prefix"
17211 prefix="$acl_final_prefix"
17212 acl_save_exec_prefix="$exec_prefix"
17213 exec_prefix="$acl_final_exec_prefix"
17214 eval x=\"$x\"
17215 exec_prefix="$acl_save_exec_prefix"
17216 prefix="$acl_save_prefix"
17217
17218 if test "X$x" = "X-L$found_dir"; then
17219 haveit=yes
17220 break
17221 fi
17222 done
17223 if test -z "$haveit"; then
17224 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
17225 fi
17226 if test "$hardcode_minus_L" != no; then
17227 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17228 else
17229 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17230 fi
17231 fi
17232 fi
17233 fi
17234 else
17235 if test "X$found_a" != "X"; then
17236 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
17237 else
17238 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
17239 fi
17240 fi
17241 additional_includedir=
17242 case "$found_dir" in
17243 */lib | */lib/)
17244 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17245 additional_includedir="$basedir/include"
17246 ;;
17247 esac
17248 if test "X$additional_includedir" != "X"; then
17249 if test "X$additional_includedir" != "X/usr/include"; then
17250 haveit=
17251 if test "X$additional_includedir" = "X/usr/local/include"; then
17252 if test -n "$GCC"; then
17253 case $host_os in
17254 linux*) haveit=yes;;
17255 esac
17256 fi
17257 fi
17258 if test -z "$haveit"; then
17259 for x in $CPPFLAGS $INCBABELTRACE; do
17260
17261 acl_save_prefix="$prefix"
17262 prefix="$acl_final_prefix"
17263 acl_save_exec_prefix="$exec_prefix"
17264 exec_prefix="$acl_final_exec_prefix"
17265 eval x=\"$x\"
17266 exec_prefix="$acl_save_exec_prefix"
17267 prefix="$acl_save_prefix"
17268
17269 if test "X$x" = "X-I$additional_includedir"; then
17270 haveit=yes
17271 break
17272 fi
17273 done
17274 if test -z "$haveit"; then
17275 if test -d "$additional_includedir"; then
17276 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
17277 fi
17278 fi
17279 fi
17280 fi
17281 fi
17282 if test -n "$found_la"; then
17283 save_libdir="$libdir"
17284 case "$found_la" in
17285 */* | *\\*) . "$found_la" ;;
17286 *) . "./$found_la" ;;
17287 esac
17288 libdir="$save_libdir"
17289 for dep in $dependency_libs; do
17290 case "$dep" in
17291 -L*)
17292 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17293 if test "X$additional_libdir" != "X/usr/lib"; then
17294 haveit=
17295 if test "X$additional_libdir" = "X/usr/local/lib"; then
17296 if test -n "$GCC"; then
17297 case $host_os in
17298 linux*) haveit=yes;;
17299 esac
17300 fi
17301 fi
17302 if test -z "$haveit"; then
17303 haveit=
17304 for x in $LDFLAGS $LIBBABELTRACE; do
17305
17306 acl_save_prefix="$prefix"
17307 prefix="$acl_final_prefix"
17308 acl_save_exec_prefix="$exec_prefix"
17309 exec_prefix="$acl_final_exec_prefix"
17310 eval x=\"$x\"
17311 exec_prefix="$acl_save_exec_prefix"
17312 prefix="$acl_save_prefix"
17313
17314 if test "X$x" = "X-L$additional_libdir"; then
17315 haveit=yes
17316 break
17317 fi
17318 done
17319 if test -z "$haveit"; then
17320 if test -d "$additional_libdir"; then
17321 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
17322 fi
17323 fi
17324 haveit=
17325 for x in $LDFLAGS $LTLIBBABELTRACE; do
17326
17327 acl_save_prefix="$prefix"
17328 prefix="$acl_final_prefix"
17329 acl_save_exec_prefix="$exec_prefix"
17330 exec_prefix="$acl_final_exec_prefix"
17331 eval x=\"$x\"
17332 exec_prefix="$acl_save_exec_prefix"
17333 prefix="$acl_save_prefix"
17334
17335 if test "X$x" = "X-L$additional_libdir"; then
17336 haveit=yes
17337 break
17338 fi
17339 done
17340 if test -z "$haveit"; then
17341 if test -d "$additional_libdir"; then
17342 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
17343 fi
17344 fi
17345 fi
17346 fi
17347 ;;
17348 -R*)
17349 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17350 if test "$enable_rpath" != no; then
17351 haveit=
17352 for x in $rpathdirs; do
17353 if test "X$x" = "X$dir"; then
17354 haveit=yes
17355 break
17356 fi
17357 done
17358 if test -z "$haveit"; then
17359 rpathdirs="$rpathdirs $dir"
17360 fi
17361 haveit=
17362 for x in $ltrpathdirs; do
17363 if test "X$x" = "X$dir"; then
17364 haveit=yes
17365 break
17366 fi
17367 done
17368 if test -z "$haveit"; then
17369 ltrpathdirs="$ltrpathdirs $dir"
17370 fi
17371 fi
17372 ;;
17373 -l*)
17374 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17375 ;;
17376 *.la)
17377 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17378 ;;
17379 *)
17380 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
17381 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
17382 ;;
17383 esac
17384 done
17385 fi
17386 else
17387 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17388 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
17389 fi
17390 fi
17391 fi
17392 done
17393 done
17394 if test "X$rpathdirs" != "X"; then
17395 if test -n "$hardcode_libdir_separator"; then
17396 alldirs=
17397 for found_dir in $rpathdirs; do
17398 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17399 done
17400 acl_save_libdir="$libdir"
17401 libdir="$alldirs"
17402 eval flag=\"$hardcode_libdir_flag_spec\"
17403 libdir="$acl_save_libdir"
17404 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17405 else
17406 for found_dir in $rpathdirs; do
17407 acl_save_libdir="$libdir"
17408 libdir="$found_dir"
17409 eval flag=\"$hardcode_libdir_flag_spec\"
17410 libdir="$acl_save_libdir"
17411 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17412 done
17413 fi
17414 fi
17415 if test "X$ltrpathdirs" != "X"; then
17416 for found_dir in $ltrpathdirs; do
17417 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
17418 done
17419 fi
17420
17421
17422 ac_save_CPPFLAGS="$CPPFLAGS"
17423
17424 for element in $INCBABELTRACE; do
17425 haveit=
17426 for x in $CPPFLAGS; do
17427
17428 acl_save_prefix="$prefix"
17429 prefix="$acl_final_prefix"
17430 acl_save_exec_prefix="$exec_prefix"
17431 exec_prefix="$acl_final_exec_prefix"
17432 eval x=\"$x\"
17433 exec_prefix="$acl_save_exec_prefix"
17434 prefix="$acl_save_prefix"
17435
17436 if test "X$x" = "X$element"; then
17437 haveit=yes
17438 break
17439 fi
17440 done
17441 if test -z "$haveit"; then
17442 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17443 fi
17444 done
17445
17446
17447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
17448$as_echo_n "checking for libbabeltrace... " >&6; }
d0ac1c44 17449if ${ac_cv_libbabeltrace+:} false; then :
393fd4c3
YQ
17450 $as_echo_n "(cached) " >&6
17451else
17452
17453 ac_save_LIBS="$LIBS"
17454 LIBS="$LIBS $LIBBABELTRACE"
17455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17456/* end confdefs.h. */
17457#include <babeltrace/babeltrace.h>
17458 #include <babeltrace/ctf/events.h>
17459 #include <babeltrace/ctf/iterator.h>
17460int
17461main ()
17462{
17463struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
17464 struct bt_ctf_event *event = NULL;
17465 const struct bt_definition *scope;
17466
13cdc2af 17467 pos->type = BT_SEEK_BEGIN;
65c749e7 17468 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
17469 scope = bt_ctf_get_top_level_scope (event,
17470 BT_STREAM_EVENT_HEADER);
17471 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
17472
17473 ;
17474 return 0;
17475}
17476_ACEOF
17477if ac_fn_c_try_link "$LINENO"; then :
17478 ac_cv_libbabeltrace=yes
17479else
17480 ac_cv_libbabeltrace=no
17481fi
17482rm -f core conftest.err conftest.$ac_objext \
17483 conftest$ac_exeext conftest.$ac_ext
17484 LIBS="$ac_save_LIBS"
17485
17486fi
17487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
17488$as_echo "$ac_cv_libbabeltrace" >&6; }
17489 if test "$ac_cv_libbabeltrace" = yes; then
17490 HAVE_LIBBABELTRACE=yes
17491
17492$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
17493
17494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
17495$as_echo_n "checking how to link with libbabeltrace... " >&6; }
17496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
17497$as_echo "$LIBBABELTRACE" >&6; }
17498 else
17499 HAVE_LIBBABELTRACE=no
17500 CPPFLAGS="$ac_save_CPPFLAGS"
17501 LIBBABELTRACE=
17502 LTLIBBABELTRACE=
17503 fi
17504
17505
17506
17507
17508
17509
17510 CFLAGS=$saved_CFLAGS
17511
17512 if test "$HAVE_LIBBABELTRACE" != yes; then
17513 if test "$with_babeltrace" = yes; then
d0ac1c44 17514 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
393fd4c3
YQ
17515 else
17516 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
17517$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
17518 fi
17519 fi
17520fi
17521
21ea5acd
SDJ
17522# If nativefile (NAT_FILE) is not set in configure.nat, we link to an
17523# empty version.
c906108c
SS
17524
17525files=
17526links=
5a2402b8 17527
c906108c
SS
17528rm -f nm.h
17529if test "${nativefile}" != ""; then
0f475e27
AC
17530 case "${nativefile}" in
17531 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
17532 * ) GDB_NM_FILE="${nativefile}"
17533 esac
5a2402b8
AC
17534 files="${files} ${GDB_NM_FILE}"
17535 links="${links} nm.h"
60ca704f
SE
17536
17537cat >>confdefs.h <<_ACEOF
b78960be 17538#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 17539_ACEOF
5a2402b8 17540
c906108c 17541fi
5a2402b8
AC
17542
17543
e3487908
GKB
17544for ac_prog in xsltproc
17545do
17546 # Extract the first word of "$ac_prog", so it can be a program name with args.
17547set dummy $ac_prog; ac_word=$2
17548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17549$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 17550if ${ac_cv_path_XSLTPROC+:} false; then :
e3487908
GKB
17551 $as_echo_n "(cached) " >&6
17552else
17553 case $XSLTPROC in
17554 [\\/]* | ?:[\\/]*)
17555 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
17556 ;;
17557 *)
17558 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17559for as_dir in $PATH
17560do
17561 IFS=$as_save_IFS
17562 test -z "$as_dir" && as_dir=.
17563 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 17564 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e3487908
GKB
17565 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
17566 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17567 break 2
17568 fi
17569done
17570 done
17571IFS=$as_save_IFS
17572
17573 ;;
17574esac
17575fi
17576XSLTPROC=$ac_cv_path_XSLTPROC
17577if test -n "$XSLTPROC"; then
17578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
17579$as_echo "$XSLTPROC" >&6; }
17580else
17581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17582$as_echo "no" >&6; }
17583fi
17584
17585
17586 test -n "$XSLTPROC" && break
17587done
17588test -n "$XSLTPROC" || XSLTPROC="missing"
17589
17590if test "x$USE_MAINTAINER_MODE" = xyes; then
17591 if test "${XSLTPROC}" = missing; then
d0ac1c44 17592 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
e3487908
GKB
17593 fi
17594fi
17595
17596
bec39cab
AC
17597ac_sources="$files"
17598ac_dests="$links"
17599while test -n "$ac_sources"; do
17600 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
17601 set $ac_sources; ac_source=$1; shift; ac_sources=$*
17602 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
17603done
81ecdfbb 17604ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
17605
17606
c906108c
SS
17607
17608
c906108c 17609
81ecdfbb 17610$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 17611
bec39cab 17612
8ecfd7bd
SDJ
17613
17614# Check whether we will enable the inclusion of unit tests when
17615# compiling GDB.
17616#
17617# The default value of this option changes depending whether we're on
17618# development mode (in which case it's "true") or not (in which case
17619# it's "false").
17620# Check whether --enable-unit-tests was given.
17621if test "${enable_unit_tests+set}" = set; then :
17622 enableval=$enable_unit_tests; case "${enableval}" in
17623 yes) enable_unittests=true ;;
17624 no) enable_unittests=false ;;
17625 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
17626esac
17627else
17628 enable_unittests=$development
17629fi
17630
17631
17632if $enable_unittests; then
dcd1f979
TT
17633
17634$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
17635
8ecfd7bd 17636
268a13a5
TT
17637 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS) gdbsupport/selftest.o selftest-arch.o"
17638 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS) gdbsupport/selftest.c selftest-arch.c"
8ecfd7bd 17639
dcd1f979
TT
17640fi
17641
b292c783 17642
8ecfd7bd 17643
f6a88844
JM
17644 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17645 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
17646 if test "x$GDB_TRANSFORM_NAME" = x; then
17647 GDB_TRANSFORM_NAME=gdb
17648 fi
17649
17650
17651
17652 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17653 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
17654 if test "x$GCORE_TRANSFORM_NAME" = x; then
17655 GCORE_TRANSFORM_NAME=gcore
17656 fi
17657
b292c783
JK
17658
17659ac_config_files="$ac_config_files gcore"
17660
141ec9f6 17661ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
81ecdfbb 17662
89a34d1b 17663
bec39cab
AC
17664cat >confcache <<\_ACEOF
17665# This file is a shell script that caches the results of configure
17666# tests run on this system so they can be shared between configure
17667# scripts and configure runs, see configure's option --config-cache.
17668# It is not useful on other systems. If it contains results you don't
17669# want to keep, you may remove or edit it.
17670#
17671# config.status only pays attention to the cache file if you give it
17672# the --recheck option to rerun configure.
17673#
17674# `ac_cv_env_foo' variables (set or unset) will be overridden when
17675# loading this file, other *unset* `ac_cv_foo' will be assigned the
17676# following values.
17677
17678_ACEOF
17679
17680# The following way of writing the cache mishandles newlines in values,
17681# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 17682# So, we kill variables containing newlines.
bec39cab
AC
17683# Ultrix sh set writes to stderr and can't be redirected directly,
17684# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
17685(
17686 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17687 eval ac_val=\$$ac_var
17688 case $ac_val in #(
17689 *${as_nl}*)
17690 case $ac_var in #(
17691 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17692$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
17693 esac
17694 case $ac_var in #(
17695 _ | IFS | as_nl) ;; #(
17696 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17697 *) { eval $ac_var=; unset $ac_var;} ;;
17698 esac ;;
17699 esac
17700 done
17701
bec39cab 17702 (set) 2>&1 |
81ecdfbb
RW
17703 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17704 *${as_nl}ac_space=\ *)
17705 # `set' does not quote correctly, so add quotes: double-quote
17706 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
17707 sed -n \
17708 "s/'/'\\\\''/g;
17709 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 17710 ;; #(
bec39cab
AC
17711 *)
17712 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 17713 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 17714 ;;
81ecdfbb
RW
17715 esac |
17716 sort
17717) |
bec39cab 17718 sed '
81ecdfbb 17719 /^ac_cv_env_/b end
bec39cab 17720 t clear
81ecdfbb 17721 :clear
bec39cab
AC
17722 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17723 t end
81ecdfbb
RW
17724 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17725 :end' >>confcache
17726if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17727 if test -w "$cache_file"; then
d0ac1c44 17728 if test "x$cache_file" != "x/dev/null"; then
81ecdfbb
RW
17729 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17730$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
17731 if test ! -f "$cache_file" || test -h "$cache_file"; then
17732 cat confcache >"$cache_file"
17733 else
17734 case $cache_file in #(
17735 */* | ?:*)
17736 mv -f confcache "$cache_file"$$ &&
17737 mv -f "$cache_file"$$ "$cache_file" ;; #(
17738 *)
17739 mv -f confcache "$cache_file" ;;
17740 esac
17741 fi
17742 fi
bec39cab 17743 else
81ecdfbb
RW
17744 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17745$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
17746 fi
17747fi
17748rm -f confcache
17749
17750test "x$prefix" = xNONE && prefix=$ac_default_prefix
17751# Let make expand exec_prefix.
17752test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17753
bec39cab
AC
17754DEFS=-DHAVE_CONFIG_H
17755
17756ac_libobjs=
17757ac_ltlibobjs=
d0ac1c44 17758U=
bec39cab
AC
17759for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17760 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
17761 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
17762 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
17763 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17764 # will be set to the directory where LIBOBJS objects are built.
17765 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17766 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
17767done
17768LIBOBJS=$ac_libobjs
17769
17770LTLIBOBJS=$ac_ltlibobjs
17771
17772
85981d60 17773if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 17774 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
81ecdfbb 17775Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 17776fi
4df42755 17777if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
d0ac1c44 17778 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
4df42755
DE
17779Usually this means the macro was only invoked conditionally." "$LINENO" 5
17780fi
17781if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
d0ac1c44 17782 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
4df42755
DE
17783Usually this means the macro was only invoked conditionally." "$LINENO" 5
17784fi
81ecdfbb
RW
17785
17786
d0ac1c44 17787: "${CONFIG_STATUS=./config.status}"
81ecdfbb 17788ac_write_fail=0
bec39cab
AC
17789ac_clean_files_save=$ac_clean_files
17790ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
17791{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17792$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17793as_write_fail=0
17794cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
17795#! $SHELL
17796# Generated by $as_me.
17797# Run this file to recreate the current configuration.
17798# Compiler output produced by configure, useful for debugging
17799# configure, is in config.log if it exists.
17800
17801debug=false
17802ac_cs_recheck=false
17803ac_cs_silent=false
bec39cab 17804
81ecdfbb
RW
17805SHELL=\${CONFIG_SHELL-$SHELL}
17806export SHELL
17807_ASEOF
17808cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17809## -------------------- ##
17810## M4sh Initialization. ##
17811## -------------------- ##
17812
17813# Be more Bourne compatible
17814DUALCASE=1; export DUALCASE # for MKS sh
17815if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
17816 emulate sh
17817 NULLCMD=:
81ecdfbb 17818 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
17819 # is contrary to our usage. Disable this feature.
17820 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
17821 setopt NO_GLOB_SUBST
17822else
17823 case `(set -o) 2>/dev/null` in #(
17824 *posix*) :
17825 set -o posix ;; #(
17826 *) :
17827 ;;
17828esac
bec39cab 17829fi
bec39cab 17830
81ecdfbb
RW
17831
17832as_nl='
17833'
17834export as_nl
17835# Printing a long string crashes Solaris 7 /usr/bin/printf.
17836as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17837as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17838as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17839# Prefer a ksh shell builtin over an external printf program on Solaris,
17840# but without wasting forks for bash or zsh.
17841if test -z "$BASH_VERSION$ZSH_VERSION" \
17842 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17843 as_echo='print -r --'
17844 as_echo_n='print -rn --'
17845elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17846 as_echo='printf %s\n'
17847 as_echo_n='printf %s'
17848else
17849 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17850 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17851 as_echo_n='/usr/ucb/echo -n'
17852 else
17853 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17854 as_echo_n_body='eval
17855 arg=$1;
17856 case $arg in #(
17857 *"$as_nl"*)
17858 expr "X$arg" : "X\\(.*\\)$as_nl";
17859 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17860 esac;
17861 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17862 '
17863 export as_echo_n_body
17864 as_echo_n='sh -c $as_echo_n_body as_echo'
17865 fi
17866 export as_echo_body
17867 as_echo='sh -c $as_echo_body as_echo'
17868fi
17869
17870# The user is always right.
17871if test "${PATH_SEPARATOR+set}" != set; then
17872 PATH_SEPARATOR=:
17873 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17874 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17875 PATH_SEPARATOR=';'
17876 }
bec39cab
AC
17877fi
17878
17879
81ecdfbb
RW
17880# IFS
17881# We need space, tab and new line, in precisely that order. Quoting is
17882# there to prevent editors from complaining about space-tab.
17883# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17884# splitting by setting IFS to empty value.)
17885IFS=" "" $as_nl"
17886
17887# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 17888as_myself=
81ecdfbb
RW
17889case $0 in #((
17890 *[\\/]* ) as_myself=$0 ;;
17891 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17892for as_dir in $PATH
17893do
17894 IFS=$as_save_IFS
17895 test -z "$as_dir" && as_dir=.
17896 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17897 done
17898IFS=$as_save_IFS
17899
17900 ;;
17901esac
17902# We did not find ourselves, most probably we were run as `sh COMMAND'
17903# in which case we are not to be found in the path.
17904if test "x$as_myself" = x; then
17905 as_myself=$0
17906fi
17907if test ! -f "$as_myself"; then
17908 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17909 exit 1
17910fi
17911
17912# Unset variables that we do not need and which cause bugs (e.g. in
17913# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17914# suppresses any "Segmentation fault" message there. '((' could
17915# trigger a bug in pdksh 5.2.14.
17916for as_var in BASH_ENV ENV MAIL MAILPATH
17917do eval test x\${$as_var+set} = xset \
17918 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
17919done
bec39cab
AC
17920PS1='$ '
17921PS2='> '
17922PS4='+ '
17923
17924# NLS nuisances.
81ecdfbb
RW
17925LC_ALL=C
17926export LC_ALL
17927LANGUAGE=C
17928export LANGUAGE
17929
17930# CDPATH.
17931(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17932
17933
d0ac1c44
SM
17934# as_fn_error STATUS ERROR [LINENO LOG_FD]
17935# ----------------------------------------
81ecdfbb
RW
17936# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17937# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 17938# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
17939as_fn_error ()
17940{
d0ac1c44
SM
17941 as_status=$1; test $as_status -eq 0 && as_status=1
17942 if test "$4"; then
17943 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17944 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 17945 fi
d0ac1c44 17946 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
17947 as_fn_exit $as_status
17948} # as_fn_error
17949
17950
17951# as_fn_set_status STATUS
17952# -----------------------
17953# Set $? to STATUS, without forking.
17954as_fn_set_status ()
17955{
17956 return $1
17957} # as_fn_set_status
17958
17959# as_fn_exit STATUS
17960# -----------------
17961# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17962as_fn_exit ()
17963{
17964 set +e
17965 as_fn_set_status $1
17966 exit $1
17967} # as_fn_exit
17968
17969# as_fn_unset VAR
17970# ---------------
17971# Portably unset VAR.
17972as_fn_unset ()
17973{
17974 { eval $1=; unset $1;}
17975}
17976as_unset=as_fn_unset
17977# as_fn_append VAR VALUE
17978# ----------------------
17979# Append the text in VALUE to the end of the definition contained in VAR. Take
17980# advantage of any shell optimizations that allow amortized linear growth over
17981# repeated appends, instead of the typical quadratic growth present in naive
17982# implementations.
17983if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17984 eval 'as_fn_append ()
17985 {
17986 eval $1+=\$2
17987 }'
17988else
17989 as_fn_append ()
17990 {
17991 eval $1=\$$1\$2
17992 }
17993fi # as_fn_append
17994
17995# as_fn_arith ARG...
17996# ------------------
17997# Perform arithmetic evaluation on the ARGs, and store the result in the
17998# global $as_val. Take advantage of shells that can avoid forks. The arguments
17999# must be portable across $(()) and expr.
18000if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
18001 eval 'as_fn_arith ()
18002 {
18003 as_val=$(( $* ))
18004 }'
18005else
18006 as_fn_arith ()
18007 {
18008 as_val=`expr "$@" || test $? -eq 1`
18009 }
18010fi # as_fn_arith
bec39cab 18011
81ecdfbb
RW
18012
18013if expr a : '\(a\)' >/dev/null 2>&1 &&
18014 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
18015 as_expr=expr
18016else
18017 as_expr=false
18018fi
18019
81ecdfbb 18020if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
18021 as_basename=basename
18022else
18023 as_basename=false
18024fi
18025
81ecdfbb
RW
18026if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18027 as_dirname=dirname
18028else
18029 as_dirname=false
18030fi
bec39cab 18031
81ecdfbb 18032as_me=`$as_basename -- "$0" ||
bec39cab
AC
18033$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18034 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
18035 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
18036$as_echo X/"$0" |
18037 sed '/^.*\/\([^/][^/]*\)\/*$/{
18038 s//\1/
18039 q
18040 }
18041 /^X\/\(\/\/\)$/{
18042 s//\1/
18043 q
18044 }
18045 /^X\/\(\/\).*/{
18046 s//\1/
18047 q
18048 }
18049 s/.*/./; q'`
b4e70030 18050
b4e70030
JB
18051# Avoid depending upon Character Ranges.
18052as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18053as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18054as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18055as_cr_digits='0123456789'
18056as_cr_alnum=$as_cr_Letters$as_cr_digits
18057
81ecdfbb
RW
18058ECHO_C= ECHO_N= ECHO_T=
18059case `echo -n x` in #(((((
18060-n*)
18061 case `echo 'xy\c'` in
18062 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
18063 xy) ECHO_C='\c';;
18064 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18065 ECHO_T=' ';;
18066 esac;;
18067*)
18068 ECHO_N='-n';;
bec39cab
AC
18069esac
18070
81ecdfbb
RW
18071rm -f conf$$ conf$$.exe conf$$.file
18072if test -d conf$$.dir; then
18073 rm -f conf$$.dir/conf$$.file
bec39cab 18074else
81ecdfbb
RW
18075 rm -f conf$$.dir
18076 mkdir conf$$.dir 2>/dev/null
bec39cab 18077fi
81ecdfbb
RW
18078if (echo >conf$$.file) 2>/dev/null; then
18079 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 18080 as_ln_s='ln -s'
81ecdfbb
RW
18081 # ... but there are two gotchas:
18082 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18083 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 18084 # In both cases, we have to default to `cp -pR'.
81ecdfbb 18085 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 18086 as_ln_s='cp -pR'
81ecdfbb
RW
18087 elif ln conf$$.file conf$$ 2>/dev/null; then
18088 as_ln_s=ln
18089 else
d0ac1c44 18090 as_ln_s='cp -pR'
b4e70030 18091 fi
bec39cab 18092else
d0ac1c44 18093 as_ln_s='cp -pR'
bec39cab 18094fi
81ecdfbb
RW
18095rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18096rmdir conf$$.dir 2>/dev/null
18097
18098
18099# as_fn_mkdir_p
18100# -------------
18101# Create "$as_dir" as a directory, including parents if necessary.
18102as_fn_mkdir_p ()
18103{
18104
18105 case $as_dir in #(
18106 -*) as_dir=./$as_dir;;
18107 esac
18108 test -d "$as_dir" || eval $as_mkdir_p || {
18109 as_dirs=
18110 while :; do
18111 case $as_dir in #(
18112 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18113 *) as_qdir=$as_dir;;
18114 esac
18115 as_dirs="'$as_qdir' $as_dirs"
18116 as_dir=`$as_dirname -- "$as_dir" ||
18117$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18118 X"$as_dir" : 'X\(//\)[^/]' \| \
18119 X"$as_dir" : 'X\(//\)$' \| \
18120 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18121$as_echo X"$as_dir" |
18122 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18123 s//\1/
18124 q
18125 }
18126 /^X\(\/\/\)[^/].*/{
18127 s//\1/
18128 q
18129 }
18130 /^X\(\/\/\)$/{
18131 s//\1/
18132 q
18133 }
18134 /^X\(\/\).*/{
18135 s//\1/
18136 q
18137 }
18138 s/.*/./; q'`
18139 test -d "$as_dir" && break
18140 done
18141 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 18142 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb 18143
bec39cab 18144
81ecdfbb 18145} # as_fn_mkdir_p
bec39cab 18146if mkdir -p . 2>/dev/null; then
81ecdfbb 18147 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
18148else
18149 test -d ./-p && rmdir ./-p
18150 as_mkdir_p=false
18151fi
18152
d0ac1c44
SM
18153
18154# as_fn_executable_p FILE
18155# -----------------------
18156# Test if FILE is an executable regular file.
18157as_fn_executable_p ()
18158{
18159 test -f "$1" && test -x "$1"
18160} # as_fn_executable_p
18161as_test_x='test -x'
18162as_executable_p=as_fn_executable_p
bec39cab
AC
18163
18164# Sed expression to map a string onto a valid CPP name.
18165as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
18166
18167# Sed expression to map a string onto a valid variable name.
18168as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
18169
18170
bec39cab 18171exec 6>&1
81ecdfbb
RW
18172## ----------------------------------- ##
18173## Main body of $CONFIG_STATUS script. ##
18174## ----------------------------------- ##
18175_ASEOF
18176test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
18177
18178cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18179# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 18180# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
18181# values after options handling.
18182ac_log="
bec39cab 18183This file was extended by $as_me, which was
d0ac1c44 18184generated by GNU Autoconf 2.69. Invocation command line was
bec39cab
AC
18185
18186 CONFIG_FILES = $CONFIG_FILES
18187 CONFIG_HEADERS = $CONFIG_HEADERS
18188 CONFIG_LINKS = $CONFIG_LINKS
18189 CONFIG_COMMANDS = $CONFIG_COMMANDS
18190 $ $0 $@
18191
81ecdfbb
RW
18192on `(hostname || uname -n) 2>/dev/null | sed 1q`
18193"
18194
bec39cab
AC
18195_ACEOF
18196
81ecdfbb
RW
18197case $ac_config_files in *"
18198"*) set x $ac_config_files; shift; ac_config_files=$*;;
18199esac
234b45d4 18200
81ecdfbb
RW
18201case $ac_config_headers in *"
18202"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18203esac
b4e70030 18204
b4e70030 18205
81ecdfbb
RW
18206cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18207# Files that config.status was made for.
18208config_files="$ac_config_files"
18209config_headers="$ac_config_headers"
18210config_links="$ac_config_links"
18211config_commands="$ac_config_commands"
234b45d4 18212
81ecdfbb 18213_ACEOF
b4e70030 18214
81ecdfbb 18215cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 18216ac_cs_usage="\
81ecdfbb
RW
18217\`$as_me' instantiates files and other configuration actions
18218from templates according to the current configuration. Unless the files
18219and actions are specified as TAGs, all are instantiated by default.
234b45d4 18220
81ecdfbb 18221Usage: $0 [OPTION]... [TAG]...
234b45d4 18222
bec39cab 18223 -h, --help print this help, then exit
81ecdfbb 18224 -V, --version print version number and configuration settings, then exit
d0ac1c44 18225 --config print configuration, then exit
81ecdfbb
RW
18226 -q, --quiet, --silent
18227 do not print progress messages
bec39cab
AC
18228 -d, --debug don't remove temporary files
18229 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
18230 --file=FILE[:TEMPLATE]
18231 instantiate the configuration file FILE
18232 --header=FILE[:TEMPLATE]
18233 instantiate the configuration header FILE
234b45d4 18234
bec39cab
AC
18235Configuration files:
18236$config_files
234b45d4 18237
bec39cab
AC
18238Configuration headers:
18239$config_headers
234b45d4 18240
bec39cab
AC
18241Configuration links:
18242$config_links
234b45d4 18243
bec39cab
AC
18244Configuration commands:
18245$config_commands
18246
81ecdfbb 18247Report bugs to the package provider."
b4e70030 18248
81ecdfbb
RW
18249_ACEOF
18250cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 18251ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
bec39cab
AC
18252ac_cs_version="\\
18253config.status
d0ac1c44
SM
18254configured by $0, generated by GNU Autoconf 2.69,
18255 with options \\"\$ac_cs_config\\"
bec39cab 18256
d0ac1c44 18257Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
18258This config.status script is free software; the Free Software Foundation
18259gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
18260
18261ac_pwd='$ac_pwd'
18262srcdir='$srcdir'
18263INSTALL='$INSTALL'
81ecdfbb
RW
18264AWK='$AWK'
18265test -n "\$AWK" || AWK=awk
bec39cab
AC
18266_ACEOF
18267
81ecdfbb
RW
18268cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18269# The default lists apply if the user does not specify any file.
bec39cab
AC
18270ac_need_defaults=:
18271while test $# != 0
18272do
18273 case $1 in
d0ac1c44 18274 --*=?*)
81ecdfbb
RW
18275 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18276 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 18277 ac_shift=:
c906108c 18278 ;;
d0ac1c44
SM
18279 --*=)
18280 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18281 ac_optarg=
18282 ac_shift=:
18283 ;;
81ecdfbb 18284 *)
bec39cab
AC
18285 ac_option=$1
18286 ac_optarg=$2
18287 ac_shift=shift
c906108c 18288 ;;
bec39cab 18289 esac
c906108c 18290
bec39cab
AC
18291 case $ac_option in
18292 # Handling of the options.
bec39cab
AC
18293 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18294 ac_cs_recheck=: ;;
81ecdfbb
RW
18295 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
18296 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
18297 --config | --confi | --conf | --con | --co | --c )
18298 $as_echo "$ac_cs_config"; exit ;;
81ecdfbb 18299 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
18300 debug=: ;;
18301 --file | --fil | --fi | --f )
18302 $ac_shift
81ecdfbb
RW
18303 case $ac_optarg in
18304 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 18305 '') as_fn_error $? "missing file argument" ;;
81ecdfbb
RW
18306 esac
18307 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
18308 ac_need_defaults=false;;
18309 --header | --heade | --head | --hea )
18310 $ac_shift
81ecdfbb
RW
18311 case $ac_optarg in
18312 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18313 esac
18314 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 18315 ac_need_defaults=false;;
81ecdfbb
RW
18316 --he | --h)
18317 # Conflict between --help and --header
d0ac1c44 18318 as_fn_error $? "ambiguous option: \`$1'
81ecdfbb
RW
18319Try \`$0 --help' for more information.";;
18320 --help | --hel | -h )
18321 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
18322 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18323 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18324 ac_cs_silent=: ;;
c906108c 18325
bec39cab 18326 # This is an error.
d0ac1c44 18327 -*) as_fn_error $? "unrecognized option: \`$1'
81ecdfbb 18328Try \`$0 --help' for more information." ;;
c906108c 18329
81ecdfbb
RW
18330 *) as_fn_append ac_config_targets " $1"
18331 ac_need_defaults=false ;;
c906108c 18332
bec39cab
AC
18333 esac
18334 shift
18335done
c906108c 18336
bec39cab 18337ac_configure_extra_args=
c906108c 18338
bec39cab
AC
18339if $ac_cs_silent; then
18340 exec 6>/dev/null
18341 ac_configure_extra_args="$ac_configure_extra_args --silent"
18342fi
c906108c 18343
bec39cab 18344_ACEOF
81ecdfbb 18345cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 18346if \$ac_cs_recheck; then
d0ac1c44 18347 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
81ecdfbb
RW
18348 shift
18349 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18350 CONFIG_SHELL='$SHELL'
18351 export CONFIG_SHELL
18352 exec "\$@"
bec39cab
AC
18353fi
18354
18355_ACEOF
81ecdfbb
RW
18356cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18357exec 5>>config.log
18358{
18359 echo
18360 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18361## Running $as_me. ##
18362_ASBOX
18363 $as_echo "$ac_log"
18364} >&5
bec39cab 18365
81ecdfbb
RW
18366_ACEOF
18367cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 18368#
81ecdfbb 18369# INIT-COMMANDS
c906108c 18370#
a417dc56 18371ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 18372
bec39cab
AC
18373_ACEOF
18374
81ecdfbb 18375cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 18376
81ecdfbb 18377# Handling of arguments.
bec39cab 18378for ac_config_target in $ac_config_targets
c906108c 18379do
81ecdfbb
RW
18380 case $ac_config_target in
18381 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
18382 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 18383 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 18384 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 18385 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 18386 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 18387 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
141ec9f6 18388 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
5ae98d25 18389 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 18390 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb 18391
d0ac1c44 18392 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
18393 esac
18394done
18395
81ecdfbb 18396
bec39cab
AC
18397# If the user did not use the arguments to specify the items to instantiate,
18398# then the envvar interface is used. Set only those that are not.
18399# We use the long form for the default assignment because of an extremely
18400# bizarre bug on SunOS 4.1.3.
18401if $ac_need_defaults; then
18402 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18403 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18404 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
18405 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18406fi
18407
b4e70030 18408# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 18409# simply because there is no reason against having it here, and in addition,
b4e70030 18410# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
18411# Hook for its removal unless debugging.
18412# Note that there is a small window in which the directory will not be cleaned:
18413# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
18414$debug ||
18415{
d0ac1c44 18416 tmp= ac_tmp=
81ecdfbb 18417 trap 'exit_status=$?
d0ac1c44
SM
18418 : "${ac_tmp:=$tmp}"
18419 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
81ecdfbb
RW
18420' 0
18421 trap 'as_fn_exit 1' 1 2 13 15
18422}
18423# Create a (secure) tmp directory for tmp files.
18424
18425{
18426 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 18427 test -d "$tmp"
81ecdfbb
RW
18428} ||
18429{
18430 tmp=./conf$$-$RANDOM
18431 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
18432} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
18433ac_tmp=$tmp
81ecdfbb
RW
18434
18435# Set up the scripts for CONFIG_FILES section.
18436# No need to generate them if there are no CONFIG_FILES.
18437# This happens for instance with `./config.status config.h'.
18438if test -n "$CONFIG_FILES"; then
18439
18440if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
18441 ac_cs_awk_getline=:
18442 ac_cs_awk_pipe_init=
18443 ac_cs_awk_read_file='
18444 while ((getline aline < (F[key])) > 0)
18445 print(aline)
18446 close(F[key])'
18447 ac_cs_awk_pipe_fini=
18448else
18449 ac_cs_awk_getline=false
18450 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
18451 ac_cs_awk_read_file='
18452 print "|#_!!_#|"
18453 print "cat " F[key] " &&"
18454 '$ac_cs_awk_pipe_init
18455 # The final `:' finishes the AND list.
18456 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
18457fi
18458ac_cr=`echo X | tr X '\015'`
18459# On cygwin, bash can eat \r inside `` if the user requested igncr.
18460# But we know of no other shell where ac_cr would be empty at this
18461# point, so we can use a bashism as a fallback.
18462if test "x$ac_cr" = x; then
18463 eval ac_cr=\$\'\\r\'
18464fi
18465ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18466if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 18467 ac_cs_awk_cr='\\r'
81ecdfbb
RW
18468else
18469 ac_cs_awk_cr=$ac_cr
18470fi
18471
d0ac1c44 18472echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
81ecdfbb
RW
18473_ACEOF
18474
18475# Create commands to substitute file output variables.
18476{
18477 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
d0ac1c44 18478 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
81ecdfbb
RW
18479 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
18480 echo "_ACAWK" &&
18481 echo "_ACEOF"
18482} >conf$$files.sh &&
18483. ./conf$$files.sh ||
d0ac1c44 18484 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
18485rm -f conf$$files.sh
18486
18487{
18488 echo "cat >conf$$subs.awk <<_ACEOF" &&
18489 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18490 echo "_ACEOF"
18491} >conf$$subs.sh ||
d0ac1c44
SM
18492 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18493ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
81ecdfbb
RW
18494ac_delim='%!_!# '
18495for ac_last_try in false false false false false :; do
18496 . ./conf$$subs.sh ||
d0ac1c44 18497 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
18498
18499 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18500 if test $ac_delim_n = $ac_delim_num; then
18501 break
18502 elif $ac_last_try; then
d0ac1c44 18503 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
18504 else
18505 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18506 fi
18507done
18508rm -f conf$$subs.sh
18509
18510cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 18511cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
81ecdfbb
RW
18512_ACEOF
18513sed -n '
18514h
18515s/^/S["/; s/!.*/"]=/
18516p
18517g
18518s/^[^!]*!//
18519:repl
18520t repl
18521s/'"$ac_delim"'$//
18522t delim
18523:nl
18524h
d0ac1c44 18525s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
18526t more1
18527s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18528p
18529n
18530b repl
18531:more1
18532s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18533p
18534g
18535s/.\{148\}//
18536t nl
18537:delim
18538h
d0ac1c44 18539s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
18540t more2
18541s/["\\]/\\&/g; s/^/"/; s/$/"/
18542p
18543b
18544:more2
18545s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18546p
18547g
18548s/.\{148\}//
18549t delim
18550' <conf$$subs.awk | sed '
18551/^[^""]/{
18552 N
18553 s/\n//
18554}
18555' >>$CONFIG_STATUS || ac_write_fail=1
18556rm -f conf$$subs.awk
18557cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18558_ACAWK
d0ac1c44 18559cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
81ecdfbb
RW
18560 for (key in S) S_is_set[key] = 1
18561 FS = "\a"
18562 \$ac_cs_awk_pipe_init
18563}
18564{
18565 line = $ 0
18566 nfields = split(line, field, "@")
18567 substed = 0
18568 len = length(field[1])
18569 for (i = 2; i < nfields; i++) {
18570 key = field[i]
18571 keylen = length(key)
18572 if (S_is_set[key]) {
18573 value = S[key]
18574 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18575 len += length(value) + length(field[++i])
18576 substed = 1
18577 } else
18578 len += 1 + keylen
18579 }
18580 if (nfields == 3 && !substed) {
18581 key = field[2]
18582 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
18583 \$ac_cs_awk_read_file
18584 next
18585 }
18586 }
18587 print line
b4e70030 18588}
81ecdfbb
RW
18589\$ac_cs_awk_pipe_fini
18590_ACAWK
18591_ACEOF
18592cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18593if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18594 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18595else
18596 cat
d0ac1c44
SM
18597fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
18598 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
81ecdfbb
RW
18599_ACEOF
18600
d0ac1c44
SM
18601# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18602# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
81ecdfbb
RW
18603# trailing colons and then remove the whole line if VPATH becomes empty
18604# (actually we leave an empty line to preserve line numbers).
18605if test "x$srcdir" = x.; then
d0ac1c44
SM
18606 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18607h
18608s///
18609s/^/:/
18610s/[ ]*$/:/
18611s/:\$(srcdir):/:/g
18612s/:\${srcdir}:/:/g
18613s/:@srcdir@:/:/g
18614s/^:*//
81ecdfbb 18615s/:*$//
d0ac1c44
SM
18616x
18617s/\(=[ ]*\).*/\1/
18618G
18619s/\n//
81ecdfbb
RW
18620s/^[^=]*=[ ]*$//
18621}'
18622fi
18623
18624cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18625fi # test -n "$CONFIG_FILES"
18626
18627# Set up the scripts for CONFIG_HEADERS section.
18628# No need to generate them if there are no CONFIG_HEADERS.
18629# This happens for instance with `./config.status Makefile'.
18630if test -n "$CONFIG_HEADERS"; then
d0ac1c44 18631cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
81ecdfbb
RW
18632BEGIN {
18633_ACEOF
18634
18635# Transform confdefs.h into an awk script `defines.awk', embedded as
18636# here-document in config.status, that substitutes the proper values into
18637# config.h.in to produce config.h.
4e8d927d 18638
81ecdfbb
RW
18639# Create a delimiter string that does not exist in confdefs.h, to ease
18640# handling of long lines.
18641ac_delim='%!_!# '
18642for ac_last_try in false false :; do
d0ac1c44
SM
18643 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18644 if test -z "$ac_tt"; then
81ecdfbb
RW
18645 break
18646 elif $ac_last_try; then
d0ac1c44 18647 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
81ecdfbb
RW
18648 else
18649 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18650 fi
18651done
4e8d927d 18652
81ecdfbb
RW
18653# For the awk script, D is an array of macro values keyed by name,
18654# likewise P contains macro parameters if any. Preserve backslash
18655# newline sequences.
18656
18657ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18658sed -n '
18659s/.\{148\}/&'"$ac_delim"'/g
18660t rset
18661:rset
18662s/^[ ]*#[ ]*define[ ][ ]*/ /
18663t def
18664d
18665:def
18666s/\\$//
18667t bsnl
18668s/["\\]/\\&/g
18669s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18670D["\1"]=" \3"/p
18671s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18672d
18673:bsnl
18674s/["\\]/\\&/g
18675s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18676D["\1"]=" \3\\\\\\n"\\/p
18677t cont
18678s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18679t cont
18680d
18681:cont
18682n
18683s/.\{148\}/&'"$ac_delim"'/g
18684t clear
18685:clear
18686s/\\$//
18687t bsnlc
18688s/["\\]/\\&/g; s/^/"/; s/$/"/p
18689d
18690:bsnlc
18691s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18692b cont
18693' <confdefs.h | sed '
18694s/'"$ac_delim"'/"\\\
18695"/g' >>$CONFIG_STATUS || ac_write_fail=1
18696
18697cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18698 for (key in D) D_is_set[key] = 1
18699 FS = "\a"
18700}
18701/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18702 line = \$ 0
18703 split(line, arg, " ")
18704 if (arg[1] == "#") {
18705 defundef = arg[2]
18706 mac1 = arg[3]
18707 } else {
18708 defundef = substr(arg[1], 2)
18709 mac1 = arg[2]
18710 }
18711 split(mac1, mac2, "(") #)
18712 macro = mac2[1]
18713 prefix = substr(line, 1, index(line, defundef) - 1)
18714 if (D_is_set[macro]) {
18715 # Preserve the white space surrounding the "#".
18716 print prefix "define", macro P[macro] D[macro]
18717 next
18718 } else {
18719 # Replace #undef with comments. This is necessary, for example,
18720 # in the case of _POSIX_SOURCE, which is predefined and required
18721 # on some systems where configure will not decide to define it.
18722 if (defundef == "undef") {
18723 print "/*", prefix defundef, macro, "*/"
18724 next
18725 }
18726 }
b4e70030 18727}
81ecdfbb
RW
18728{ print }
18729_ACAWK
b4e70030 18730_ACEOF
81ecdfbb 18731cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 18732 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
81ecdfbb 18733fi # test -n "$CONFIG_HEADERS"
4e8d927d 18734
4e8d927d 18735
81ecdfbb
RW
18736eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
18737shift
18738for ac_tag
18739do
18740 case $ac_tag in
18741 :[FHLC]) ac_mode=$ac_tag; continue;;
18742 esac
18743 case $ac_mode$ac_tag in
18744 :[FHL]*:*);;
d0ac1c44 18745 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
81ecdfbb
RW
18746 :[FH]-) ac_tag=-:-;;
18747 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18748 esac
18749 ac_save_IFS=$IFS
18750 IFS=:
18751 set x $ac_tag
18752 IFS=$ac_save_IFS
18753 shift
18754 ac_file=$1
18755 shift
4e8d927d 18756
81ecdfbb
RW
18757 case $ac_mode in
18758 :L) ac_source=$1;;
18759 :[FH])
18760 ac_file_inputs=
18761 for ac_f
18762 do
18763 case $ac_f in
d0ac1c44 18764 -) ac_f="$ac_tmp/stdin";;
81ecdfbb
RW
18765 *) # Look for the file first in the build tree, then in the source tree
18766 # (if the path is not absolute). The absolute path cannot be DOS-style,
18767 # because $ac_f cannot contain `:'.
18768 test -f "$ac_f" ||
18769 case $ac_f in
18770 [\\/$]*) false;;
18771 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18772 esac ||
d0ac1c44 18773 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
81ecdfbb
RW
18774 esac
18775 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18776 as_fn_append ac_file_inputs " '$ac_f'"
18777 done
18778
18779 # Let's still pretend it is `configure' which instantiates (i.e., don't
18780 # use $as_me), people would be surprised to read:
18781 # /* config.h. Generated by config.status. */
18782 configure_input='Generated from '`
18783 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18784 `' by configure.'
18785 if test x"$ac_file" != x-; then
18786 configure_input="$ac_file. $configure_input"
18787 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18788$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 18789 fi
81ecdfbb
RW
18790 # Neutralize special characters interpreted by sed in replacement strings.
18791 case $configure_input in #(
18792 *\&* | *\|* | *\\* )
18793 ac_sed_conf_input=`$as_echo "$configure_input" |
18794 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18795 *) ac_sed_conf_input=$configure_input;;
18796 esac
4e8d927d 18797
81ecdfbb 18798 case $ac_tag in
d0ac1c44
SM
18799 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18800 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
81ecdfbb
RW
18801 esac
18802 ;;
c906108c
SS
18803 esac
18804
81ecdfbb 18805 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
18806$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18807 X"$ac_file" : 'X\(//\)[^/]' \| \
18808 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
18809 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
18810$as_echo X"$ac_file" |
18811 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18812 s//\1/
18813 q
18814 }
18815 /^X\(\/\/\)[^/].*/{
18816 s//\1/
18817 q
18818 }
18819 /^X\(\/\/\)$/{
18820 s//\1/
18821 q
18822 }
18823 /^X\(\/\).*/{
18824 s//\1/
18825 q
18826 }
18827 s/.*/./; q'`
18828 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
18829 ac_builddir=.
18830
81ecdfbb
RW
18831case "$ac_dir" in
18832.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18833*)
18834 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18835 # A ".." for each directory in $ac_dir_suffix.
18836 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18837 case $ac_top_builddir_sub in
18838 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18839 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18840 esac ;;
18841esac
18842ac_abs_top_builddir=$ac_pwd
18843ac_abs_builddir=$ac_pwd$ac_dir_suffix
18844# for backward compatibility:
18845ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
18846
18847case $srcdir in
81ecdfbb 18848 .) # We are building in place.
bec39cab 18849 ac_srcdir=.
81ecdfbb
RW
18850 ac_top_srcdir=$ac_top_builddir_sub
18851 ac_abs_top_srcdir=$ac_pwd ;;
18852 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 18853 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
18854 ac_top_srcdir=$srcdir
18855 ac_abs_top_srcdir=$srcdir ;;
18856 *) # Relative name.
18857 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18858 ac_top_srcdir=$ac_top_build_prefix$srcdir
18859 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 18860esac
81ecdfbb 18861ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 18862
c906108c 18863
81ecdfbb
RW
18864 case $ac_mode in
18865 :F)
18866 #
18867 # CONFIG_FILE
18868 #
c906108c 18869
bec39cab
AC
18870 case $INSTALL in
18871 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 18872 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 18873 esac
81ecdfbb 18874_ACEOF
121ce6e5 18875
81ecdfbb
RW
18876cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18877# If the template does not know about datarootdir, expand it.
18878# FIXME: This hack should be removed a few years after 2.60.
18879ac_datarootdir_hack=; ac_datarootdir_seen=
18880ac_sed_dataroot='
18881/datarootdir/ {
18882 p
18883 q
18884}
18885/@datadir@/p
18886/@docdir@/p
18887/@infodir@/p
18888/@localedir@/p
18889/@mandir@/p'
18890case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
18891*datarootdir*) ac_datarootdir_seen=yes;;
18892*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
18893 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18894$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
18895_ACEOF
18896cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18897 ac_datarootdir_hack='
18898 s&@datadir@&$datadir&g
18899 s&@docdir@&$docdir&g
18900 s&@infodir@&$infodir&g
18901 s&@localedir@&$localedir&g
18902 s&@mandir@&$mandir&g
18903 s&\\\${datarootdir}&$datarootdir&g' ;;
18904esac
4e8d927d 18905_ACEOF
81ecdfbb
RW
18906
18907# Neutralize VPATH when `$srcdir' = `.'.
18908# Shell code in configure.ac might set extrasub.
18909# FIXME: do we really want to maintain this feature?
18910cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18911ac_sed_extra="$ac_vpsub
bec39cab
AC
18912$extrasub
18913_ACEOF
81ecdfbb 18914cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
18915:t
18916/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
18917s|@configure_input@|$ac_sed_conf_input|;t t
18918s&@top_builddir@&$ac_top_builddir_sub&;t t
18919s&@top_build_prefix@&$ac_top_build_prefix&;t t
18920s&@srcdir@&$ac_srcdir&;t t
18921s&@abs_srcdir@&$ac_abs_srcdir&;t t
18922s&@top_srcdir@&$ac_top_srcdir&;t t
18923s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18924s&@builddir@&$ac_builddir&;t t
18925s&@abs_builddir@&$ac_abs_builddir&;t t
18926s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18927s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
18928$ac_datarootdir_hack
18929"
18930eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
18931if $ac_cs_awk_getline; then
d0ac1c44 18932 $AWK -f "$ac_tmp/subs.awk"
81ecdfbb 18933else
d0ac1c44
SM
18934 $AWK -f "$ac_tmp/subs.awk" | $SHELL
18935fi \
18936 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
18937
18938test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
18939 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18940 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18941 "$ac_tmp/out"`; test -z "$ac_out"; } &&
81ecdfbb 18942 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 18943which seems to be undefined. Please make sure it is defined" >&5
81ecdfbb 18944$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 18945which seems to be undefined. Please make sure it is defined" >&2;}
81ecdfbb 18946
d0ac1c44 18947 rm -f "$ac_tmp/stdin"
bec39cab 18948 case $ac_file in
d0ac1c44
SM
18949 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18950 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
81ecdfbb 18951 esac \
d0ac1c44 18952 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
18953 ;;
18954 :H)
18955 #
18956 # CONFIG_HEADER
18957 #
bec39cab 18958 if test x"$ac_file" != x-; then
81ecdfbb
RW
18959 {
18960 $as_echo "/* $configure_input */" \
d0ac1c44
SM
18961 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18962 } >"$ac_tmp/config.h" \
18963 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18964 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
81ecdfbb
RW
18965 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18966$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 18967 else
81ecdfbb 18968 rm -f "$ac_file"
d0ac1c44
SM
18969 mv "$ac_tmp/config.h" "$ac_file" \
18970 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
bec39cab
AC
18971 fi
18972 else
81ecdfbb 18973 $as_echo "/* $configure_input */" \
d0ac1c44
SM
18974 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
18975 || as_fn_error $? "could not create -" "$LINENO" 5
bec39cab 18976 fi
81ecdfbb
RW
18977 ;;
18978 :L)
18979 #
18980 # CONFIG_LINK
18981 #
c906108c 18982
81ecdfbb
RW
18983 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
18984 :
b4e70030 18985 else
81ecdfbb
RW
18986 # Prefer the file from the source tree if names are identical.
18987 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
18988 ac_source=$srcdir/$ac_source
18989 fi
b4e70030 18990
81ecdfbb
RW
18991 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
18992$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 18993
81ecdfbb 18994 if test ! -r "$ac_source"; then
d0ac1c44 18995 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
81ecdfbb
RW
18996 fi
18997 rm -f "$ac_file"
bec39cab 18998
81ecdfbb 18999 # Try a relative symlink, then a hard link, then a copy.
d0ac1c44 19000 case $ac_source in
81ecdfbb
RW
19001 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
19002 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
19003 esac
19004 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
19005 ln "$ac_source" "$ac_file" 2>/dev/null ||
19006 cp -p "$ac_source" "$ac_file" ||
d0ac1c44 19007 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
81ecdfbb
RW
19008 fi
19009 ;;
19010 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
19011$as_echo "$as_me: executing $ac_file commands" >&6;}
19012 ;;
c906108c 19013 esac
b4e70030 19014
bec39cab 19015
81ecdfbb
RW
19016 case $ac_file$ac_mode in
19017 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 19018 "gcore":F) chmod +x gcore ;;
1e94266c
SM
19019 "Makefile":F)
19020case x$CONFIG_HEADERS in
19021xconfig.h:config.in)
19022echo > stamp-h ;;
19023esac
19024 ;;
19025 "gdb-gdb.gdb":F)
19026case x$CONFIG_HEADERS in
19027xconfig.h:config.in)
19028echo > stamp-h ;;
141ec9f6
SM
19029esac
19030 ;;
19031 "gdb-gdb.py":F)
19032case x$CONFIG_HEADERS in
19033xconfig.h:config.in)
19034echo > stamp-h ;;
1e94266c
SM
19035esac
19036 ;;
19037 "doc/Makefile":F)
19038case x$CONFIG_HEADERS in
19039xconfig.h:config.in)
19040echo > stamp-h ;;
19041esac
19042 ;;
19043 "data-directory/Makefile":F)
c906108c
SS
19044case x$CONFIG_HEADERS in
19045xconfig.h:config.in)
19046echo > stamp-h ;;
19047esac
bec39cab 19048 ;;
81ecdfbb 19049
bec39cab 19050 esac
81ecdfbb 19051done # for ac_tag
c906108c 19052
bec39cab 19053
81ecdfbb 19054as_fn_exit 0
bec39cab 19055_ACEOF
bec39cab
AC
19056ac_clean_files=$ac_clean_files_save
19057
81ecdfbb 19058test $ac_write_fail = 0 ||
d0ac1c44 19059 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
81ecdfbb 19060
bec39cab
AC
19061
19062# configure is writing to config.log, and then calls config.status.
19063# config.status does its own redirection, appending to config.log.
19064# Unfortunately, on DOS this fails, as config.log is still kept open
19065# by configure, so config.status won't be able to write to it; its
19066# output is simply discarded. So we exec the FD to /dev/null,
19067# effectively closing config.log, so it can be properly (re)opened and
19068# appended to by config.status. When coming back to configure, we
19069# need to make the FD available again.
19070if test "$no_create" != yes; then
19071 ac_cs_success=:
19072 ac_config_status_args=
19073 test "$silent" = yes &&
19074 ac_config_status_args="$ac_config_status_args --quiet"
19075 exec 5>/dev/null
19076 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
19077 exec 5>>config.log
19078 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19079 # would make configure fail if this is the last instruction.
d0ac1c44 19080 $ac_cs_success || as_fn_exit 1
bec39cab 19081fi
c906108c 19082
bec39cab 19083#
81ecdfbb 19084# CONFIG_SUBDIRS section.
bec39cab 19085#
c906108c
SS
19086if test "$no_recursion" != yes; then
19087
81ecdfbb
RW
19088 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
19089 # so they do not pile up.
c906108c
SS
19090 ac_sub_configure_args=
19091 ac_prev=
fdc59709
PB
19092 eval "set x $ac_configure_args"
19093 shift
19094 for ac_arg
19095 do
c906108c
SS
19096 if test -n "$ac_prev"; then
19097 ac_prev=
19098 continue
19099 fi
bec39cab 19100 case $ac_arg in
c906108c
SS
19101 -cache-file | --cache-file | --cache-fil | --cache-fi \
19102 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
19103 ac_prev=cache_file ;;
19104 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
19105 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
19106 | --c=*)
19107 ;;
19108 --config-cache | -C)
c906108c
SS
19109 ;;
19110 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
19111 ac_prev=srcdir ;;
19112 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
19113 ;;
bec39cab
AC
19114 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
19115 ac_prev=prefix ;;
19116 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
19117 ;;
81ecdfbb
RW
19118 --disable-option-checking)
19119 ;;
fdc59709
PB
19120 *)
19121 case $ac_arg in
81ecdfbb 19122 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 19123 esac
81ecdfbb 19124 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
19125 esac
19126 done
19127
bec39cab
AC
19128 # Always prepend --prefix to ensure using the same prefix
19129 # in subdir configurations.
fdc59709
PB
19130 ac_arg="--prefix=$prefix"
19131 case $ac_arg in
81ecdfbb 19132 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 19133 esac
81ecdfbb
RW
19134 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
19135
19136 # Pass --silent
19137 if test "$silent" = yes; then
19138 ac_sub_configure_args="--silent $ac_sub_configure_args"
19139 fi
19140
19141 # Always prepend --disable-option-checking to silence warnings, since
19142 # different subdirs can have different --enable and --with options.
19143 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 19144
b4e70030 19145 ac_popdir=`pwd`
bec39cab 19146 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
19147
19148 # Do not complain, so a configure script can configure whichever
19149 # parts of a large source tree are present.
fdc59709 19150 test -d "$srcdir/$ac_dir" || continue
c906108c 19151
81ecdfbb
RW
19152 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
19153 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
19154 $as_echo "$ac_msg" >&6
19155 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
19156 ac_builddir=.
19157
81ecdfbb
RW
19158case "$ac_dir" in
19159.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19160*)
19161 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19162 # A ".." for each directory in $ac_dir_suffix.
19163 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19164 case $ac_top_builddir_sub in
19165 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19166 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19167 esac ;;
19168esac
19169ac_abs_top_builddir=$ac_pwd
19170ac_abs_builddir=$ac_pwd$ac_dir_suffix
19171# for backward compatibility:
19172ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
19173
19174case $srcdir in
81ecdfbb 19175 .) # We are building in place.
bec39cab 19176 ac_srcdir=.
81ecdfbb
RW
19177 ac_top_srcdir=$ac_top_builddir_sub
19178 ac_abs_top_srcdir=$ac_pwd ;;
19179 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 19180 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
19181 ac_top_srcdir=$srcdir
19182 ac_abs_top_srcdir=$srcdir ;;
19183 *) # Relative name.
19184 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19185 ac_top_srcdir=$ac_top_build_prefix$srcdir
19186 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 19187esac
81ecdfbb 19188ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 19189
c906108c 19190
fdc59709 19191 cd "$ac_dir"
c906108c
SS
19192
19193 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
19194 if test -f "$ac_srcdir/configure.gnu"; then
19195 ac_sub_configure=$ac_srcdir/configure.gnu
19196 elif test -f "$ac_srcdir/configure"; then
19197 ac_sub_configure=$ac_srcdir/configure
19198 elif test -f "$ac_srcdir/configure.in"; then
19199 # This should be Cygnus configure.
19200 ac_sub_configure=$ac_aux_dir/configure
c906108c 19201 else
81ecdfbb
RW
19202 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
19203$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
19204 ac_sub_configure=
19205 fi
19206
19207 # The recursion is here.
19208 if test -n "$ac_sub_configure"; then
c906108c 19209 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
19210 case $cache_file in
19211 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
19212 *) # Relative name.
19213 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 19214 esac
c906108c 19215
81ecdfbb
RW
19216 { $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
19217$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 19218 # The eval makes quoting arguments work.
fdc59709
PB
19219 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
19220 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 19221 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
19222 fi
19223
fdc59709 19224 cd "$ac_popdir"
c906108c
SS
19225 done
19226fi
81ecdfbb
RW
19227if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19228 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19229$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
19230fi
c906108c 19231
This page took 4.273448 seconds and 4 git commands to generate.