]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/configure
Add --enable-codesign to gdb's configure
[thirdparty/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
4df42755
DE
704HAVE_GUILE_FALSE
705HAVE_GUILE_TRUE
ed3ef339
DE
706GUILE_LIBS
707GUILE_CPPFLAGS
e76c5d17
DE
708GUILD_TARGET_FLAG
709GUILD
ed3ef339 710pkg_config_prog_path
4df42755
DE
711HAVE_PYTHON_FALSE
712HAVE_PYTHON_TRUE
ac534cba
JB
713PYTHON_LIBS
714PYTHON_CPPFLAGS
81ecdfbb 715PYTHON_CFLAGS
ec685c5e 716python_prog_path
2400729e
UW
717LTLIBMPFR
718LIBMPFR
719HAVE_LIBMPFR
81ecdfbb
RW
720LTLIBEXPAT
721LIBEXPAT
722HAVE_LIBEXPAT
b8e0a31c 723JIT_READER_DIR
f997c383 724TARGET_PTR
39037522 725READLINE_TEXI_INCFLAG
81ecdfbb
RW
726READLINE_CFLAGS
727READLINE_DEPS
728READLINE
016a3251
DD
729LTLIBICONV
730LIBICONV
711a72d3
L
731zlibinc
732zlibdir
81ecdfbb
RW
733MIG
734WINDRES
735DLLTOOL
c971b7fa 736AR
81ecdfbb
RW
737YFLAGS
738YACC
c971b7fa 739RANLIB
81ecdfbb 740LN_S
c971b7fa
PA
741INSTALL_DATA
742INSTALL_SCRIPT
743INSTALL_PROGRAM
744AWK
81ecdfbb
RW
745REPORT_BUGS_TEXI
746REPORT_BUGS_TO
747PKGVERSION
44cee4fd 748CODESIGN_CERT
b292c783 749HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
750TARGET_OBS
751subdirs
752GDB_DATADIR
753DEBUGDIR
5048e516
JK
754MAKEINFO_EXTRA_FLAGS
755MAKEINFOFLAGS
756MAKEINFO
81ecdfbb
RW
757PACKAGE
758GNULIB_STDINT_H
81ecdfbb
RW
759CATOBJEXT
760GENCAT
761INSTOBJEXT
762DATADIRNAME
763CATALOGS
764POSUB
765GMSGFMT
766XGETTEXT
767INCINTL
768LIBINTL_DEP
769LIBINTL
770USE_NLS
81ecdfbb
RW
771CCDEPMODE
772DEPDIR
773am__leading_dot
0bcda685
PA
774CXX_DIALECT
775HAVE_CXX11
4869db5e
RM
776INSTALL_STRIP_PROGRAM
777STRIP
778install_sh
81ecdfbb
RW
779target_os
780target_vendor
781target_cpu
782target
783host_os
784host_vendor
785host_cpu
786host
787build_os
788build_vendor
789build_cpu
790build
c971b7fa
PA
791EGREP
792GREP
793CPP
3bc3d82a
PA
794ac_ct_CXX
795CXXFLAGS
796CXX
81ecdfbb
RW
797OBJEXT
798EXEEXT
799ac_ct_CC
800CPPFLAGS
801LDFLAGS
802CFLAGS
803CC
804MAINT
805MAINTAINER_MODE_FALSE
806MAINTAINER_MODE_TRUE
807target_alias
808host_alias
809build_alias
810LIBS
811ECHO_T
812ECHO_N
813ECHO_C
814DEFS
815mandir
816localedir
817libdir
818psdir
819pdfdir
820dvidir
821htmldir
822infodir
823docdir
824oldincludedir
825includedir
826localstatedir
827sharedstatedir
828sysconfdir
829datadir
830datarootdir
831libexecdir
832sbindir
833bindir
834program_transform_name
835prefix
836exec_prefix
837PACKAGE_URL
838PACKAGE_BUGREPORT
839PACKAGE_STRING
840PACKAGE_VERSION
841PACKAGE_TARNAME
842PACKAGE_NAME
843PATH_SEPARATOR
844SHELL'
2b351b19 845ac_subst_files='nat_makefile_frag'
81ecdfbb
RW
846ac_user_opts='
847enable_option_checking
848enable_maintainer_mode
da2f07f1
JK
849enable_plugins
850enable_largefile
81ecdfbb
RW
851with_separate_debug_dir
852with_gdb_datadir
853with_relocated_sources
7349ff92 854with_auto_load_dir
bccbefd2 855with_auto_load_safe_path
81ecdfbb
RW
856enable_targets
857enable_64_bit_bfd
858enable_gdbcli
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
a8db4212 881enable_libmcheck
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
608e2dbb
TT
890with_lzma
891with_liblzma_prefix
81ecdfbb
RW
892with_tcl
893with_tk
894with_x
895enable_sim
896enable_multi_ice
496c0e1b 897enable_gdbserver
393fd4c3
YQ
898with_babeltrace
899with_libbabeltrace_prefix
81ecdfbb
RW
900'
901 ac_precious_vars='build_alias
902host_alias
903target_alias
904CC
905CFLAGS
906LDFLAGS
907LIBS
908CPPFLAGS
3bc3d82a
PA
909CXX
910CXXFLAGS
911CCC
81ecdfbb 912CPP
f06e05e0
JK
913MAKEINFO
914MAKEINFOFLAGS
81ecdfbb
RW
915YACC
916YFLAGS
917XMKMF'
5ae98d25 918ac_subdirs_all='testsuite
81ecdfbb
RW
919gdbtk
920multi-ice
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-gdbcli disable command-line interface (CLI)
1551 --disable-gdbmi disable machine-interface (MI)
1552 --enable-tui enable full-screen terminal user interface (TUI)
1553 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1554 --enable-profiling enable profiling of GDB
44cee4fd 1555 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
3841debe 1556 --disable-rpath do not hardcode runtime library paths
17ef446e 1557 --enable-libmcheck Try linking with -lmcheck if available
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
32c1c914 1563 --enable-sim link gdb with simulator
bec39cab 1564 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1565 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1566 is auto)
bec39cab
AC
1567
1568Optional Packages:
1569 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1570 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1571 --with-separate-debug-dir=PATH
32c1c914 1572 look for global separate debug info in this path
62e4f60c 1573 [LIBDIR/debug]
b14b1491
TT
1574 --with-gdb-datadir=PATH look for global separate data files in this path
1575 [DATADIR/gdb]
29b0e8a2 1576 --with-relocated-sources=PATH
32c1c914 1577 automatically relocate this path for source files
7349ff92 1578 --with-auto-load-dir=PATH
aff139ff 1579 directories from which to load auto-loaded scripts
1564a261 1580 [$debugdir:$datadir/auto-load]
bccbefd2 1581 --with-auto-load-safe-path=PATH
aff139ff 1582 directories safe to hold auto-loaded files
7349ff92 1583 [--with-auto-load-dir]
bccbefd2
JK
1584 --without-auto-load-safe-path
1585 do not restrict auto-loaded files locations
05e7c244 1586 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1587 --with-curses use the curses library instead of the termcap
1588 library
c16158bc
JM
1589 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1590 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1591 --with-system-zlib use installed libz
016a3251
DD
1592 --with-gnu-ld assume the C compiler uses GNU ld default=no
1593 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1594 --without-libiconv-prefix don't search for libiconv in includedir and libdir
478aac75 1595 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1596 --with-system-readline use installed readline library
b8e0a31c
SD
1597 --with-jit-reader-dir=PATH
1598 directory to load the JIT readers from
5c39566f 1599 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1600 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1601 --without-libexpat-prefix don't search for libexpat in includedir and libdir
2400729e
UW
1602 --with-mpfr include MPFR support (auto/yes/no)
1603 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1604 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
0c4a4063
DE
1605 --with-python[=PYTHON] include python support
1606 (auto/yes/no/<python-program>)
ed3ef339
DE
1607 --with-guile[=GUILE] include guile support
1608 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1609 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1610 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1611 --without-libipt-prefix don't search for libipt in includedir and libdir
a1220294
TT
1612 --without-included-regex
1613 don't use included regex; this is the default on
1614 systems with version 2 of the GNU C library (use
1615 with caution on other system)
81ecdfbb 1616 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1617 --with-system-gdbinit=PATH
32c1c914 1618 automatically load a system-wide gdbinit file
608e2dbb
TT
1619 --with-lzma support lzma compression (auto/yes/no)
1620 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1621 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1622 --with-tcl directory containing tcl configuration (tclConfig.sh)
1623 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1624 --with-x use the X Window System
393fd4c3
YQ
1625 --with-babeltrace include babeltrace support (auto/yes/no)
1626 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1627 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1628
1629Some influential environment variables:
1630 CC C compiler command
1631 CFLAGS C compiler flags
1632 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1633 nonstandard directory <lib dir>
81ecdfbb 1634 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 1635 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
81ecdfbb 1636 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1637 CXX C++ compiler command
1638 CXXFLAGS C++ compiler flags
bec39cab 1639 CPP C preprocessor
f06e05e0
JK
1640 MAKEINFO Parent configure detects if it is of sufficient version.
1641 MAKEINFOFLAGS
1642 Parameters for MAKEINFO.
d0ac1c44
SM
1643 YACC The `Yet Another Compiler Compiler' implementation to use.
1644 Defaults to the first program found out of: `bison -y', `byacc',
1645 `yacc'.
81ecdfbb
RW
1646 YFLAGS The list of arguments that will be passed by default to $YACC.
1647 This script will default YFLAGS to the empty string to avoid a
1648 default value of `-d' given by some make applications.
1649 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1650
1651Use these variables to override the choices made by `configure' or to help
1652it to find libraries and programs with nonstandard names/locations.
1653
81ecdfbb 1654Report bugs to the package provider.
bec39cab 1655_ACEOF
81ecdfbb 1656ac_status=$?
bec39cab
AC
1657fi
1658
1659if test "$ac_init_help" = "recursive"; then
1660 # If there are subdirs, report their specific --help.
bec39cab 1661 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1662 test -d "$ac_dir" ||
1663 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1664 continue
bec39cab
AC
1665 ac_builddir=.
1666
81ecdfbb
RW
1667case "$ac_dir" in
1668.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1669*)
1670 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1671 # A ".." for each directory in $ac_dir_suffix.
1672 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1673 case $ac_top_builddir_sub in
1674 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1675 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1676 esac ;;
1677esac
1678ac_abs_top_builddir=$ac_pwd
1679ac_abs_builddir=$ac_pwd$ac_dir_suffix
1680# for backward compatibility:
1681ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1682
1683case $srcdir in
81ecdfbb 1684 .) # We are building in place.
bec39cab 1685 ac_srcdir=.
81ecdfbb
RW
1686 ac_top_srcdir=$ac_top_builddir_sub
1687 ac_abs_top_srcdir=$ac_pwd ;;
1688 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1689 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1690 ac_top_srcdir=$srcdir
1691 ac_abs_top_srcdir=$srcdir ;;
1692 *) # Relative name.
1693 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1694 ac_top_srcdir=$ac_top_build_prefix$srcdir
1695 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1696esac
81ecdfbb 1697ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1698
81ecdfbb
RW
1699 cd "$ac_dir" || { ac_status=$?; continue; }
1700 # Check for guested configure.
1701 if test -f "$ac_srcdir/configure.gnu"; then
1702 echo &&
1703 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1704 elif test -f "$ac_srcdir/configure"; then
1705 echo &&
1706 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1707 else
81ecdfbb
RW
1708 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1709 fi || ac_status=$?
1710 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1711 done
1712fi
1713
81ecdfbb 1714test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1715if $ac_init_version; then
1716 cat <<\_ACEOF
81ecdfbb 1717configure
d0ac1c44 1718generated by GNU Autoconf 2.69
bec39cab 1719
d0ac1c44 1720Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
1721This configure script is free software; the Free Software Foundation
1722gives unlimited permission to copy, distribute and modify it.
1723_ACEOF
81ecdfbb 1724 exit
bec39cab 1725fi
bec39cab 1726
81ecdfbb
RW
1727## ------------------------ ##
1728## Autoconf initialization. ##
1729## ------------------------ ##
bec39cab 1730
81ecdfbb
RW
1731# ac_fn_c_try_compile LINENO
1732# --------------------------
1733# Try to compile conftest.$ac_ext, and return whether this succeeded.
1734ac_fn_c_try_compile ()
1735{
1736 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1737 rm -f conftest.$ac_objext
1738 if { { ac_try="$ac_compile"
1739case "(($ac_try" in
1740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1741 *) ac_try_echo=$ac_try;;
1742esac
1743eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1744$as_echo "$ac_try_echo"; } >&5
1745 (eval "$ac_compile") 2>conftest.err
1746 ac_status=$?
1747 if test -s conftest.err; then
1748 grep -v '^ *+' conftest.err >conftest.er1
1749 cat conftest.er1 >&5
1750 mv -f conftest.er1 conftest.err
1751 fi
1752 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1753 test $ac_status = 0; } && {
1754 test -z "$ac_c_werror_flag" ||
1755 test ! -s conftest.err
1756 } && test -s conftest.$ac_objext; then :
1757 ac_retval=0
1758else
1759 $as_echo "$as_me: failed program was:" >&5
1760sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1761
81ecdfbb
RW
1762 ac_retval=1
1763fi
d0ac1c44
SM
1764 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1765 as_fn_set_status $ac_retval
81ecdfbb
RW
1766
1767} # ac_fn_c_try_compile
1768
3bc3d82a
PA
1769# ac_fn_cxx_try_compile LINENO
1770# ----------------------------
1771# Try to compile conftest.$ac_ext, and return whether this succeeded.
1772ac_fn_cxx_try_compile ()
1773{
1774 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1775 rm -f conftest.$ac_objext
1776 if { { ac_try="$ac_compile"
1777case "(($ac_try" in
1778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1779 *) ac_try_echo=$ac_try;;
1780esac
1781eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1782$as_echo "$ac_try_echo"; } >&5
1783 (eval "$ac_compile") 2>conftest.err
1784 ac_status=$?
1785 if test -s conftest.err; then
1786 grep -v '^ *+' conftest.err >conftest.er1
1787 cat conftest.er1 >&5
1788 mv -f conftest.er1 conftest.err
1789 fi
1790 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1791 test $ac_status = 0; } && {
1792 test -z "$ac_cxx_werror_flag" ||
1793 test ! -s conftest.err
1794 } && test -s conftest.$ac_objext; then :
1795 ac_retval=0
1796else
1797 $as_echo "$as_me: failed program was:" >&5
1798sed 's/^/| /' conftest.$ac_ext >&5
1799
1800 ac_retval=1
1801fi
d0ac1c44
SM
1802 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1803 as_fn_set_status $ac_retval
3bc3d82a
PA
1804
1805} # ac_fn_cxx_try_compile
1806
81ecdfbb
RW
1807# ac_fn_c_try_cpp LINENO
1808# ----------------------
1809# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1810ac_fn_c_try_cpp ()
bec39cab 1811{
81ecdfbb
RW
1812 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1813 if { { ac_try="$ac_cpp conftest.$ac_ext"
1814case "(($ac_try" in
1815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1816 *) ac_try_echo=$ac_try;;
1817esac
1818eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1819$as_echo "$ac_try_echo"; } >&5
1820 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1821 ac_status=$?
1822 if test -s conftest.err; then
1823 grep -v '^ *+' conftest.err >conftest.er1
1824 cat conftest.er1 >&5
1825 mv -f conftest.er1 conftest.err
1826 fi
1827 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 1828 test $ac_status = 0; } > conftest.i && {
81ecdfbb
RW
1829 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1830 test ! -s conftest.err
1831 }; then :
1832 ac_retval=0
1833else
1834 $as_echo "$as_me: failed program was:" >&5
1835sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1836
81ecdfbb
RW
1837 ac_retval=1
1838fi
d0ac1c44
SM
1839 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1840 as_fn_set_status $ac_retval
bec39cab 1841
81ecdfbb 1842} # ac_fn_c_try_cpp
bec39cab 1843
81ecdfbb
RW
1844# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1845# -------------------------------------------------------
1846# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1847# the include files in INCLUDES and setting the cache variable VAR
1848# accordingly.
1849ac_fn_c_check_header_mongrel ()
1850{
1851 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 1852 if eval \${$3+:} false; then :
81ecdfbb
RW
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1854$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1855if eval \${$3+:} false; then :
81ecdfbb
RW
1856 $as_echo_n "(cached) " >&6
1857fi
1858eval ac_res=\$$3
1859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1860$as_echo "$ac_res" >&6; }
1861else
1862 # Is the header compilable?
1863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1864$as_echo_n "checking $2 usability... " >&6; }
1865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1866/* end confdefs.h. */
1867$4
1868#include <$2>
1869_ACEOF
1870if ac_fn_c_try_compile "$LINENO"; then :
1871 ac_header_compiler=yes
1872else
1873 ac_header_compiler=no
1874fi
1875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1877$as_echo "$ac_header_compiler" >&6; }
bec39cab 1878
81ecdfbb
RW
1879# Is the header present?
1880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1881$as_echo_n "checking $2 presence... " >&6; }
1882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1883/* end confdefs.h. */
1884#include <$2>
1885_ACEOF
1886if ac_fn_c_try_cpp "$LINENO"; then :
1887 ac_header_preproc=yes
1888else
1889 ac_header_preproc=no
1890fi
d0ac1c44 1891rm -f conftest.err conftest.i conftest.$ac_ext
81ecdfbb
RW
1892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1893$as_echo "$ac_header_preproc" >&6; }
bec39cab 1894
81ecdfbb
RW
1895# So? What about this header?
1896case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1897 yes:no: )
1898 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1899$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1900 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1901$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1902 ;;
1903 no:yes:* )
1904 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1905$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1907$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1908 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1909$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1910 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1911$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1912 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1913$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1914 ;;
1915esac
1916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1917$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1918if eval \${$3+:} false; then :
81ecdfbb
RW
1919 $as_echo_n "(cached) " >&6
1920else
1921 eval "$3=\$ac_header_compiler"
1922fi
1923eval ac_res=\$$3
1924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1925$as_echo "$ac_res" >&6; }
1926fi
d0ac1c44 1927 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 1928
81ecdfbb 1929} # ac_fn_c_check_header_mongrel
bec39cab 1930
81ecdfbb
RW
1931# ac_fn_c_try_run LINENO
1932# ----------------------
1933# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1934# that executables *can* be run.
1935ac_fn_c_try_run ()
1936{
1937 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1938 if { { ac_try="$ac_link"
1939case "(($ac_try" in
1940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1941 *) ac_try_echo=$ac_try;;
1942esac
1943eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1944$as_echo "$ac_try_echo"; } >&5
1945 (eval "$ac_link") 2>&5
1946 ac_status=$?
1947 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1948 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1949 { { case "(($ac_try" in
1950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1951 *) ac_try_echo=$ac_try;;
1952esac
1953eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1954$as_echo "$ac_try_echo"; } >&5
1955 (eval "$ac_try") 2>&5
1956 ac_status=$?
1957 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1958 test $ac_status = 0; }; }; then :
1959 ac_retval=0
1960else
1961 $as_echo "$as_me: program exited with status $ac_status" >&5
1962 $as_echo "$as_me: failed program was:" >&5
1963sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1964
81ecdfbb
RW
1965 ac_retval=$ac_status
1966fi
1967 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
1968 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1969 as_fn_set_status $ac_retval
bec39cab 1970
81ecdfbb 1971} # ac_fn_c_try_run
bec39cab 1972
81ecdfbb
RW
1973# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1974# -------------------------------------------------------
1975# Tests whether HEADER exists and can be compiled using the include files in
1976# INCLUDES, setting the cache variable VAR accordingly.
1977ac_fn_c_check_header_compile ()
1978{
1979 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1981$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1982if eval \${$3+:} false; then :
81ecdfbb
RW
1983 $as_echo_n "(cached) " >&6
1984else
1985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1986/* end confdefs.h. */
1987$4
1988#include <$2>
bec39cab 1989_ACEOF
81ecdfbb
RW
1990if ac_fn_c_try_compile "$LINENO"; then :
1991 eval "$3=yes"
1992else
1993 eval "$3=no"
1994fi
1995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1996fi
1997eval ac_res=\$$3
1998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1999$as_echo "$ac_res" >&6; }
d0ac1c44 2000 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 2001
81ecdfbb 2002} # ac_fn_c_check_header_compile
bec39cab 2003
2974be62
AM
2004# ac_fn_c_try_link LINENO
2005# -----------------------
2006# Try to link conftest.$ac_ext, and return whether this succeeded.
2007ac_fn_c_try_link ()
2008{
2009 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2010 rm -f conftest.$ac_objext conftest$ac_exeext
2011 if { { ac_try="$ac_link"
2012case "(($ac_try" in
2013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2014 *) ac_try_echo=$ac_try;;
2015esac
2016eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2017$as_echo "$ac_try_echo"; } >&5
2018 (eval "$ac_link") 2>conftest.err
2019 ac_status=$?
2020 if test -s conftest.err; then
2021 grep -v '^ *+' conftest.err >conftest.er1
2022 cat conftest.er1 >&5
2023 mv -f conftest.er1 conftest.err
2024 fi
2025 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2026 test $ac_status = 0; } && {
2027 test -z "$ac_c_werror_flag" ||
2028 test ! -s conftest.err
2029 } && test -s conftest$ac_exeext && {
2030 test "$cross_compiling" = yes ||
d0ac1c44 2031 test -x conftest$ac_exeext
2974be62
AM
2032 }; then :
2033 ac_retval=0
2034else
2035 $as_echo "$as_me: failed program was:" >&5
2036sed 's/^/| /' conftest.$ac_ext >&5
2037
2038 ac_retval=1
2039fi
2040 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2041 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2042 # interfere with the next link command; also delete a directory that is
2043 # left behind by Apple's compiler. We do this before executing the actions.
2044 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2045 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2046 as_fn_set_status $ac_retval
2974be62
AM
2047
2048} # ac_fn_c_try_link
2049
81ecdfbb
RW
2050# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2051# --------------------------------------------
2052# Tries to find the compile-time value of EXPR in a program that includes
2053# INCLUDES, setting VAR accordingly. Returns whether the value could be
2054# computed
2055ac_fn_c_compute_int ()
2056{
2057 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2058 if test "$cross_compiling" = yes; then
2059 # Depending upon the size, compute the lo and hi bounds.
2060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2061/* end confdefs.h. */
2062$4
2063int
2064main ()
2065{
2066static int test_array [1 - 2 * !(($2) >= 0)];
d0ac1c44
SM
2067test_array [0] = 0;
2068return test_array [0];
bec39cab 2069
81ecdfbb
RW
2070 ;
2071 return 0;
2072}
2073_ACEOF
2074if ac_fn_c_try_compile "$LINENO"; then :
2075 ac_lo=0 ac_mid=0
2076 while :; do
2077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2078/* end confdefs.h. */
2079$4
2080int
2081main ()
2082{
2083static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2084test_array [0] = 0;
2085return test_array [0];
bec39cab 2086
81ecdfbb
RW
2087 ;
2088 return 0;
2089}
2090_ACEOF
2091if ac_fn_c_try_compile "$LINENO"; then :
2092 ac_hi=$ac_mid; break
2093else
2094 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2095 if test $ac_lo -le $ac_mid; then
2096 ac_lo= ac_hi=
2097 break
2098 fi
2099 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2100fi
81ecdfbb
RW
2101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2102 done
c906108c 2103else
81ecdfbb
RW
2104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2105/* end confdefs.h. */
2106$4
2107int
2108main ()
2109{
2110static int test_array [1 - 2 * !(($2) < 0)];
d0ac1c44
SM
2111test_array [0] = 0;
2112return test_array [0];
bec39cab 2113
81ecdfbb
RW
2114 ;
2115 return 0;
2116}
2117_ACEOF
2118if ac_fn_c_try_compile "$LINENO"; then :
2119 ac_hi=-1 ac_mid=-1
2120 while :; do
2121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122/* end confdefs.h. */
2123$4
2124int
2125main ()
2126{
2127static int test_array [1 - 2 * !(($2) >= $ac_mid)];
d0ac1c44
SM
2128test_array [0] = 0;
2129return test_array [0];
bec39cab 2130
81ecdfbb
RW
2131 ;
2132 return 0;
2133}
2134_ACEOF
2135if ac_fn_c_try_compile "$LINENO"; then :
2136 ac_lo=$ac_mid; break
2137else
2138 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2139 if test $ac_mid -le $ac_hi; then
2140 ac_lo= ac_hi=
2141 break
2142 fi
2143 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2144fi
2145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2146 done
2147else
2148 ac_lo= ac_hi=
2149fi
2150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2151fi
2152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2153# Binary search between lo and hi bounds.
2154while test "x$ac_lo" != "x$ac_hi"; do
2155 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2157/* end confdefs.h. */
2158$4
2159int
2160main ()
2161{
2162static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2163test_array [0] = 0;
2164return test_array [0];
bec39cab 2165
81ecdfbb
RW
2166 ;
2167 return 0;
2168}
2169_ACEOF
2170if ac_fn_c_try_compile "$LINENO"; then :
2171 ac_hi=$ac_mid
2172else
2173 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2174fi
2175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2176done
2177case $ac_lo in #((
2178?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2179'') ac_retval=1 ;;
2180esac
2181 else
2182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2183/* end confdefs.h. */
2184$4
2185static long int longval () { return $2; }
2186static unsigned long int ulongval () { return $2; }
2187#include <stdio.h>
2188#include <stdlib.h>
2189int
2190main ()
2191{
bec39cab 2192
81ecdfbb
RW
2193 FILE *f = fopen ("conftest.val", "w");
2194 if (! f)
2195 return 1;
2196 if (($2) < 0)
2197 {
2198 long int i = longval ();
2199 if (i != ($2))
2200 return 1;
2201 fprintf (f, "%ld", i);
2202 }
2203 else
2204 {
2205 unsigned long int i = ulongval ();
2206 if (i != ($2))
2207 return 1;
2208 fprintf (f, "%lu", i);
2209 }
2210 /* Do not output a trailing newline, as this causes \r\n confusion
2211 on some platforms. */
2212 return ferror (f) || fclose (f) != 0;
bec39cab 2213
81ecdfbb
RW
2214 ;
2215 return 0;
2216}
2217_ACEOF
2218if ac_fn_c_try_run "$LINENO"; then :
2219 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2220else
2221 ac_retval=1
2222fi
2223rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2224 conftest.$ac_objext conftest.beam conftest.$ac_ext
2225rm -f conftest.val
bec39cab 2226
81ecdfbb 2227 fi
d0ac1c44
SM
2228 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2229 as_fn_set_status $ac_retval
bec39cab 2230
81ecdfbb 2231} # ac_fn_c_compute_int
bec39cab 2232
55a8c076
YQ
2233# ac_fn_c_check_func LINENO FUNC VAR
2234# ----------------------------------
2235# Tests whether FUNC exists, setting the cache variable VAR accordingly
2236ac_fn_c_check_func ()
81ecdfbb
RW
2237{
2238 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2240$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2241if eval \${$3+:} false; then :
81ecdfbb
RW
2242 $as_echo_n "(cached) " >&6
2243else
81ecdfbb
RW
2244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2245/* end confdefs.h. */
55a8c076
YQ
2246/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2247 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2248#define $2 innocuous_$2
2249
2250/* System header to define __stub macros and hopefully few prototypes,
2251 which can conflict with char $2 (); below.
2252 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2253 <limits.h> exists even on freestanding compilers. */
2254
2255#ifdef __STDC__
2256# include <limits.h>
2257#else
2258# include <assert.h>
2259#endif
2260
2261#undef $2
2262
2263/* Override any GCC internal prototype to avoid an error.
2264 Use char because int might match the return type of a GCC
2265 builtin and then its argument prototype would still apply. */
2266#ifdef __cplusplus
2267extern "C"
2268#endif
2269char $2 ();
2270/* The GNU C library defines this for functions which it implements
2271 to always fail with ENOSYS. Some functions are actually named
2272 something starting with __ and the normal name is an alias. */
2273#if defined __stub_$2 || defined __stub___$2
2274choke me
2275#endif
2276
2277int
2278main ()
2279{
2280return $2 ();
2281 ;
2282 return 0;
2283}
2284_ACEOF
2285if ac_fn_c_try_link "$LINENO"; then :
2286 eval "$3=yes"
2287else
2288 eval "$3=no"
2289fi
2290rm -f core conftest.err conftest.$ac_objext \
2291 conftest$ac_exeext conftest.$ac_ext
2292fi
2293eval ac_res=\$$3
2294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2295$as_echo "$ac_res" >&6; }
d0ac1c44 2296 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
55a8c076
YQ
2297
2298} # ac_fn_c_check_func
2299
c56ccc05
MM
2300# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2301# ----------------------------------------------------
2302# Tries to find if the field MEMBER exists in type AGGR, after including
2303# INCLUDES, setting cache variable VAR accordingly.
2304ac_fn_c_check_member ()
2305{
2306 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2308$as_echo_n "checking for $2.$3... " >&6; }
d0ac1c44 2309if eval \${$4+:} false; then :
c56ccc05
MM
2310 $as_echo_n "(cached) " >&6
2311else
2312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2313/* end confdefs.h. */
2314$5
2315int
2316main ()
2317{
2318static $2 ac_aggr;
2319if (ac_aggr.$3)
2320return 0;
2321 ;
2322 return 0;
2323}
2324_ACEOF
2325if ac_fn_c_try_compile "$LINENO"; then :
2326 eval "$4=yes"
2327else
2328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2329/* end confdefs.h. */
2330$5
2331int
2332main ()
2333{
2334static $2 ac_aggr;
2335if (sizeof ac_aggr.$3)
2336return 0;
2337 ;
2338 return 0;
2339}
2340_ACEOF
2341if ac_fn_c_try_compile "$LINENO"; then :
2342 eval "$4=yes"
2343else
2344 eval "$4=no"
2345fi
2346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2347fi
2348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2349fi
2350eval ac_res=\$$4
2351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2352$as_echo "$ac_res" >&6; }
d0ac1c44 2353 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
c56ccc05
MM
2354
2355} # ac_fn_c_check_member
2356
07697489
PA
2357# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2358# -------------------------------------------
2359# Tests whether TYPE exists after having included INCLUDES, setting cache
2360# variable VAR accordingly.
2361ac_fn_c_check_type ()
2362{
2363 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2365$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2366if eval \${$3+:} false; then :
07697489
PA
2367 $as_echo_n "(cached) " >&6
2368else
2369 eval "$3=no"
2370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2371/* end confdefs.h. */
2372$4
2373int
2374main ()
2375{
2376if (sizeof ($2))
2377 return 0;
2378 ;
2379 return 0;
2380}
2381_ACEOF
2382if ac_fn_c_try_compile "$LINENO"; then :
2383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2384/* end confdefs.h. */
2385$4
2386int
2387main ()
2388{
2389if (sizeof (($2)))
2390 return 0;
2391 ;
2392 return 0;
2393}
2394_ACEOF
2395if ac_fn_c_try_compile "$LINENO"; then :
2396
2397else
2398 eval "$3=yes"
2399fi
2400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2401fi
2402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2403fi
2404eval ac_res=\$$3
2405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2406$as_echo "$ac_res" >&6; }
d0ac1c44 2407 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
07697489
PA
2408
2409} # ac_fn_c_check_type
2410
d0ac1c44
SM
2411# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2412# ---------------------------------------------
2413# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2414# accordingly.
770d76d7
PA
2415ac_fn_c_check_decl ()
2416{
2417 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2418 as_decl_name=`echo $2|sed 's/ *(.*//'`
2419 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2421$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
d0ac1c44 2422if eval \${$3+:} false; then :
770d76d7
PA
2423 $as_echo_n "(cached) " >&6
2424else
2425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2426/* end confdefs.h. */
2427$4
2428int
2429main ()
2430{
2431#ifndef $as_decl_name
2432#ifdef __cplusplus
2433 (void) $as_decl_use;
2434#else
2435 (void) $as_decl_name;
2436#endif
2437#endif
2438
2439 ;
2440 return 0;
2441}
2442_ACEOF
2443if ac_fn_c_try_compile "$LINENO"; then :
2444 eval "$3=yes"
2445else
2446 eval "$3=no"
2447fi
2448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2449fi
2450eval ac_res=\$$3
2451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2452$as_echo "$ac_res" >&6; }
d0ac1c44 2453 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
770d76d7
PA
2454
2455} # ac_fn_c_check_decl
81ecdfbb
RW
2456cat >config.log <<_ACEOF
2457This file contains any messages produced by compilers while
2458running configure, to aid debugging if configure makes a mistake.
d5af19ba 2459
81ecdfbb 2460It was created by $as_me, which was
d0ac1c44 2461generated by GNU Autoconf 2.69. Invocation command line was
b4e70030 2462
81ecdfbb 2463 $ $0 $@
413ccac7 2464
81ecdfbb
RW
2465_ACEOF
2466exec 5>>config.log
2467{
2468cat <<_ASUNAME
2469## --------- ##
2470## Platform. ##
2471## --------- ##
413ccac7 2472
81ecdfbb
RW
2473hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2474uname -m = `(uname -m) 2>/dev/null || echo unknown`
2475uname -r = `(uname -r) 2>/dev/null || echo unknown`
2476uname -s = `(uname -s) 2>/dev/null || echo unknown`
2477uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2478
81ecdfbb
RW
2479/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2480/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2481
81ecdfbb
RW
2482/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2483/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2484/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2485/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2486/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2487/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2488/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2489
81ecdfbb 2490_ASUNAME
bec39cab 2491
bec39cab
AC
2492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2493for as_dir in $PATH
2494do
2495 IFS=$as_save_IFS
2496 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2497 $as_echo "PATH: $as_dir"
2498 done
2499IFS=$as_save_IFS
bec39cab 2500
81ecdfbb 2501} >&5
bec39cab 2502
81ecdfbb 2503cat >&5 <<_ACEOF
bec39cab 2504
bec39cab 2505
81ecdfbb
RW
2506## ----------- ##
2507## Core tests. ##
2508## ----------- ##
2509
2510_ACEOF
2511
2512
2513# Keep a trace of the command line.
2514# Strip out --no-create and --no-recursion so they do not pile up.
2515# Strip out --silent because we don't want to record it for future runs.
2516# Also quote any args containing shell meta-characters.
2517# Make two passes to allow for proper duplicate-argument suppression.
2518ac_configure_args=
2519ac_configure_args0=
2520ac_configure_args1=
2521ac_must_keep_next=false
2522for ac_pass in 1 2
2523do
2524 for ac_arg
2525 do
2526 case $ac_arg in
2527 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2528 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2529 | -silent | --silent | --silen | --sile | --sil)
2530 continue ;;
2531 *\'*)
2532 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2533 esac
2534 case $ac_pass in
2535 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2536 2)
2537 as_fn_append ac_configure_args1 " '$ac_arg'"
2538 if test $ac_must_keep_next = true; then
2539 ac_must_keep_next=false # Got value, back to normal.
2540 else
2541 case $ac_arg in
2542 *=* | --config-cache | -C | -disable-* | --disable-* \
2543 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2544 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2545 | -with-* | --with-* | -without-* | --without-* | --x)
2546 case "$ac_configure_args0 " in
2547 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2548 esac
2549 ;;
2550 -* ) ac_must_keep_next=true ;;
2551 esac
2552 fi
2553 as_fn_append ac_configure_args " '$ac_arg'"
2554 ;;
2555 esac
2556 done
2557done
2558{ ac_configure_args0=; unset ac_configure_args0;}
2559{ ac_configure_args1=; unset ac_configure_args1;}
2560
2561# When interrupted or exit'd, cleanup temporary files, and complete
2562# config.log. We remove comments because anyway the quotes in there
2563# would cause problems or look ugly.
2564# WARNING: Use '\'' to represent an apostrophe within the trap.
2565# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2566trap 'exit_status=$?
2567 # Save into config.log some information that might help in debugging.
2568 {
2569 echo
2570
d0ac1c44 2571 $as_echo "## ---------------- ##
81ecdfbb 2572## Cache variables. ##
d0ac1c44 2573## ---------------- ##"
81ecdfbb
RW
2574 echo
2575 # The following way of writing the cache mishandles newlines in values,
2576(
2577 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2578 eval ac_val=\$$ac_var
2579 case $ac_val in #(
2580 *${as_nl}*)
2581 case $ac_var in #(
2582 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2583$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2584 esac
2585 case $ac_var in #(
2586 _ | IFS | as_nl) ;; #(
2587 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2588 *) { eval $ac_var=; unset $ac_var;} ;;
2589 esac ;;
2590 esac
2591 done
2592 (set) 2>&1 |
2593 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2594 *${as_nl}ac_space=\ *)
2595 sed -n \
2596 "s/'\''/'\''\\\\'\'''\''/g;
2597 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2598 ;; #(
2599 *)
2600 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2601 ;;
2602 esac |
2603 sort
2604)
2605 echo
2606
d0ac1c44 2607 $as_echo "## ----------------- ##
81ecdfbb 2608## Output variables. ##
d0ac1c44 2609## ----------------- ##"
81ecdfbb
RW
2610 echo
2611 for ac_var in $ac_subst_vars
2612 do
2613 eval ac_val=\$$ac_var
2614 case $ac_val in
2615 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2616 esac
2617 $as_echo "$ac_var='\''$ac_val'\''"
2618 done | sort
2619 echo
2620
2621 if test -n "$ac_subst_files"; then
d0ac1c44 2622 $as_echo "## ------------------- ##
81ecdfbb 2623## File substitutions. ##
d0ac1c44 2624## ------------------- ##"
81ecdfbb
RW
2625 echo
2626 for ac_var in $ac_subst_files
2627 do
2628 eval ac_val=\$$ac_var
2629 case $ac_val in
2630 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2631 esac
2632 $as_echo "$ac_var='\''$ac_val'\''"
2633 done | sort
2634 echo
2635 fi
2636
2637 if test -s confdefs.h; then
d0ac1c44 2638 $as_echo "## ----------- ##
81ecdfbb 2639## confdefs.h. ##
d0ac1c44 2640## ----------- ##"
81ecdfbb
RW
2641 echo
2642 cat confdefs.h
2643 echo
2644 fi
2645 test "$ac_signal" != 0 &&
2646 $as_echo "$as_me: caught signal $ac_signal"
2647 $as_echo "$as_me: exit $exit_status"
2648 } >&5
2649 rm -f core *.core core.conftest.* &&
2650 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2651 exit $exit_status
2652' 0
2653for ac_signal in 1 2 13 15; do
2654 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2655done
2656ac_signal=0
2657
2658# confdefs.h avoids OS command line length limits that DEFS can exceed.
2659rm -f -r conftest* confdefs.h
2660
2661$as_echo "/* confdefs.h */" > confdefs.h
2662
2663# Predefined preprocessor variables.
2664
2665cat >>confdefs.h <<_ACEOF
2666#define PACKAGE_NAME "$PACKAGE_NAME"
2667_ACEOF
2668
2669cat >>confdefs.h <<_ACEOF
2670#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2671_ACEOF
2672
2673cat >>confdefs.h <<_ACEOF
2674#define PACKAGE_VERSION "$PACKAGE_VERSION"
2675_ACEOF
2676
2677cat >>confdefs.h <<_ACEOF
2678#define PACKAGE_STRING "$PACKAGE_STRING"
2679_ACEOF
2680
2681cat >>confdefs.h <<_ACEOF
2682#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2683_ACEOF
2684
2685cat >>confdefs.h <<_ACEOF
2686#define PACKAGE_URL "$PACKAGE_URL"
2687_ACEOF
2688
2689
2690# Let the site file select an alternate cache file if it wants to.
2691# Prefer an explicitly selected file to automatically selected ones.
2692ac_site_file1=NONE
2693ac_site_file2=NONE
2694if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
2695 # We do not want a PATH search for config.site.
2696 case $CONFIG_SITE in #((
2697 -*) ac_site_file1=./$CONFIG_SITE;;
2698 */*) ac_site_file1=$CONFIG_SITE;;
2699 *) ac_site_file1=./$CONFIG_SITE;;
2700 esac
81ecdfbb
RW
2701elif test "x$prefix" != xNONE; then
2702 ac_site_file1=$prefix/share/config.site
2703 ac_site_file2=$prefix/etc/config.site
2704else
2705 ac_site_file1=$ac_default_prefix/share/config.site
2706 ac_site_file2=$ac_default_prefix/etc/config.site
2707fi
2708for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2709do
2710 test "x$ac_site_file" = xNONE && continue
d0ac1c44 2711 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
81ecdfbb
RW
2712 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2713$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2714 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
2715 . "$ac_site_file" \
2716 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2717$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2718as_fn_error $? "failed to load site script $ac_site_file
2719See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
2720 fi
2721done
2722
2723if test -r "$cache_file"; then
d0ac1c44
SM
2724 # Some versions of bash will fail to source /dev/null (special files
2725 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2726 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
81ecdfbb
RW
2727 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2728$as_echo "$as_me: loading cache $cache_file" >&6;}
2729 case $cache_file in
2730 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2731 *) . "./$cache_file";;
2732 esac
2733 fi
2734else
2735 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2736$as_echo "$as_me: creating cache $cache_file" >&6;}
2737 >$cache_file
bec39cab
AC
2738fi
2739
d0ac1c44
SM
2740as_fn_append ac_header_list " stdlib.h"
2741as_fn_append ac_header_list " unistd.h"
2742as_fn_append ac_header_list " sys/param.h"
81ecdfbb
RW
2743# Check that the precious variables saved in the cache have kept the same
2744# value.
2745ac_cache_corrupted=false
2746for ac_var in $ac_precious_vars; do
2747 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2748 eval ac_new_set=\$ac_env_${ac_var}_set
2749 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2750 eval ac_new_val=\$ac_env_${ac_var}_value
2751 case $ac_old_set,$ac_new_set in
2752 set,)
2753 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2754$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2755 ac_cache_corrupted=: ;;
2756 ,set)
2757 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2758$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2759 ac_cache_corrupted=: ;;
2760 ,);;
2761 *)
2762 if test "x$ac_old_val" != "x$ac_new_val"; then
2763 # differences in whitespace do not lead to failure.
2764 ac_old_val_w=`echo x $ac_old_val`
2765 ac_new_val_w=`echo x $ac_new_val`
2766 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2767 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2768$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2769 ac_cache_corrupted=:
2770 else
2771 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2772$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2773 eval $ac_var=\$ac_old_val
2774 fi
2775 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2776$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2777 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2778$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2779 fi;;
2780 esac
2781 # Pass precious variables to config.status.
2782 if test "$ac_new_set" = set; then
2783 case $ac_new_val in
2784 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2785 *) ac_arg=$ac_var=$ac_new_val ;;
2786 esac
2787 case " $ac_configure_args " in
2788 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2789 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2790 esac
2791 fi
2792done
2793if $ac_cache_corrupted; then
2794 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2795$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2796 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2797$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 2798 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
81ecdfbb
RW
2799fi
2800## -------------------- ##
2801## Main body of script. ##
2802## -------------------- ##
2803
2804ac_ext=c
2805ac_cpp='$CPP $CPPFLAGS'
2806ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2807ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2808ac_compiler_gnu=$ac_cv_c_compiler_gnu
2809
2810
2811
2812
2813
2814ac_config_headers="$ac_config_headers config.h:config.in"
2815
2816
2817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2818$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2819 # Check whether --enable-maintainer-mode was given.
2820if test "${enable_maintainer_mode+set}" = set; then :
2821 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2822else
2823 USE_MAINTAINER_MODE=no
2824fi
2825
2826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2827$as_echo "$USE_MAINTAINER_MODE" >&6; }
2828 if test $USE_MAINTAINER_MODE = yes; then
2829 MAINTAINER_MODE_TRUE=
2830 MAINTAINER_MODE_FALSE='#'
2831else
2832 MAINTAINER_MODE_TRUE='#'
2833 MAINTAINER_MODE_FALSE=
2834fi
2835
2836 MAINT=$MAINTAINER_MODE_TRUE
2837
2838
2839
17ef446e 2840# Set the 'development' global.
270c9937 2841. $srcdir/../bfd/development.sh
f5f1cdb6 2842
81ecdfbb
RW
2843ac_ext=c
2844ac_cpp='$CPP $CPPFLAGS'
2845ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2846ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2847ac_compiler_gnu=$ac_cv_c_compiler_gnu
2848if test -n "$ac_tool_prefix"; then
2849 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2850set dummy ${ac_tool_prefix}gcc; ac_word=$2
2851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2852$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2853if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2854 $as_echo_n "(cached) " >&6
c906108c
SS
2855else
2856 if test -n "$CC"; then
2857 ac_cv_prog_CC="$CC" # Let the user override the test.
2858else
bec39cab
AC
2859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2860for as_dir in $PATH
2861do
2862 IFS=$as_save_IFS
2863 test -z "$as_dir" && as_dir=.
81ecdfbb 2864 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2865 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2866 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2867 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2868 break 2
2869 fi
2870done
81ecdfbb
RW
2871 done
2872IFS=$as_save_IFS
bec39cab 2873
c906108c
SS
2874fi
2875fi
bec39cab 2876CC=$ac_cv_prog_CC
c906108c 2877if test -n "$CC"; then
81ecdfbb
RW
2878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2879$as_echo "$CC" >&6; }
c906108c 2880else
81ecdfbb
RW
2881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2882$as_echo "no" >&6; }
c906108c
SS
2883fi
2884
81ecdfbb 2885
b4e70030
JB
2886fi
2887if test -z "$ac_cv_prog_CC"; then
2888 ac_ct_CC=$CC
81ecdfbb
RW
2889 # Extract the first word of "gcc", so it can be a program name with args.
2890set dummy gcc; ac_word=$2
2891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2892$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2893if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 2894 $as_echo_n "(cached) " >&6
b4e70030
JB
2895else
2896 if test -n "$ac_ct_CC"; then
2897 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2898else
2899as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2900for as_dir in $PATH
2901do
2902 IFS=$as_save_IFS
2903 test -z "$as_dir" && as_dir=.
81ecdfbb 2904 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2905 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2906 ac_cv_prog_ac_ct_CC="gcc"
2907 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2908 break 2
4e8d927d 2909 fi
b4e70030 2910done
81ecdfbb
RW
2911 done
2912IFS=$as_save_IFS
b4e70030
JB
2913
2914fi
2915fi
2916ac_ct_CC=$ac_cv_prog_ac_ct_CC
2917if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2919$as_echo "$ac_ct_CC" >&6; }
b4e70030 2920else
81ecdfbb
RW
2921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2922$as_echo "no" >&6; }
b4e70030
JB
2923fi
2924
81ecdfbb
RW
2925 if test "x$ac_ct_CC" = x; then
2926 CC=""
2927 else
2928 case $cross_compiling:$ac_tool_warned in
2929yes:)
2930{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2931$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2932ac_tool_warned=yes ;;
2933esac
2934 CC=$ac_ct_CC
2935 fi
b4e70030
JB
2936else
2937 CC="$ac_cv_prog_CC"
2938fi
2939
c906108c 2940if test -z "$CC"; then
81ecdfbb
RW
2941 if test -n "$ac_tool_prefix"; then
2942 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2943set dummy ${ac_tool_prefix}cc; ac_word=$2
2944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2945$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2946if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2947 $as_echo_n "(cached) " >&6
c906108c
SS
2948else
2949 if test -n "$CC"; then
2950 ac_cv_prog_CC="$CC" # Let the user override the test.
2951else
bec39cab
AC
2952as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2953for as_dir in $PATH
2954do
2955 IFS=$as_save_IFS
2956 test -z "$as_dir" && as_dir=.
81ecdfbb 2957 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2958 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2959 ac_cv_prog_CC="${ac_tool_prefix}cc"
2960 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2961 break 2
2962 fi
2963done
81ecdfbb
RW
2964 done
2965IFS=$as_save_IFS
2966
2967fi
2968fi
2969CC=$ac_cv_prog_CC
2970if test -n "$CC"; then
2971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2972$as_echo "$CC" >&6; }
2973else
2974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2975$as_echo "no" >&6; }
2976fi
2977
2978
2979 fi
2980fi
2981if test -z "$CC"; then
2982 # Extract the first word of "cc", so it can be a program name with args.
2983set dummy cc; ac_word=$2
2984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2985$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2986if ${ac_cv_prog_CC+:} false; then :
81ecdfbb
RW
2987 $as_echo_n "(cached) " >&6
2988else
2989 if test -n "$CC"; then
2990 ac_cv_prog_CC="$CC" # Let the user override the test.
2991else
2992 ac_prog_rejected=no
2993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2994for as_dir in $PATH
2995do
2996 IFS=$as_save_IFS
2997 test -z "$as_dir" && as_dir=.
2998 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2999 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3000 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3001 ac_prog_rejected=yes
3002 continue
3003 fi
3004 ac_cv_prog_CC="cc"
3005 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3006 break 2
3007 fi
3008done
3009 done
3010IFS=$as_save_IFS
bec39cab 3011
c906108c
SS
3012if test $ac_prog_rejected = yes; then
3013 # We found a bogon in the path, so make sure we never use it.
3014 set dummy $ac_cv_prog_CC
3015 shift
bec39cab 3016 if test $# != 0; then
c906108c
SS
3017 # We chose a different compiler from the bogus one.
3018 # However, it has the same basename, so the bogon will be chosen
3019 # first if we set CC to just the basename; use the full file name.
3020 shift
bec39cab 3021 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3022 fi
3023fi
3024fi
3025fi
bec39cab 3026CC=$ac_cv_prog_CC
c906108c 3027if test -n "$CC"; then
81ecdfbb
RW
3028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3029$as_echo "$CC" >&6; }
c906108c 3030else
81ecdfbb
RW
3031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3032$as_echo "no" >&6; }
c906108c
SS
3033fi
3034
81ecdfbb 3035
bec39cab
AC
3036fi
3037if test -z "$CC"; then
3038 if test -n "$ac_tool_prefix"; then
81ecdfbb 3039 for ac_prog in cl.exe
bec39cab
AC
3040 do
3041 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3042set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3044$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3045if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3046 $as_echo_n "(cached) " >&6
c906108c
SS
3047else
3048 if test -n "$CC"; then
3049 ac_cv_prog_CC="$CC" # Let the user override the test.
3050else
bec39cab
AC
3051as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3052for as_dir in $PATH
3053do
3054 IFS=$as_save_IFS
3055 test -z "$as_dir" && as_dir=.
81ecdfbb 3056 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3057 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3058 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3059 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3060 break 2
3061 fi
3062done
81ecdfbb
RW
3063 done
3064IFS=$as_save_IFS
bec39cab 3065
c906108c
SS
3066fi
3067fi
bec39cab 3068CC=$ac_cv_prog_CC
c906108c 3069if test -n "$CC"; then
81ecdfbb
RW
3070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3071$as_echo "$CC" >&6; }
c906108c 3072else
81ecdfbb
RW
3073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3074$as_echo "no" >&6; }
c906108c 3075fi
bec39cab 3076
81ecdfbb 3077
bec39cab
AC
3078 test -n "$CC" && break
3079 done
3080fi
3081if test -z "$CC"; then
3082 ac_ct_CC=$CC
81ecdfbb 3083 for ac_prog in cl.exe
bec39cab
AC
3084do
3085 # Extract the first word of "$ac_prog", so it can be a program name with args.
3086set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3088$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3089if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3090 $as_echo_n "(cached) " >&6
bec39cab
AC
3091else
3092 if test -n "$ac_ct_CC"; then
3093 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3094else
3095as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3096for as_dir in $PATH
3097do
3098 IFS=$as_save_IFS
3099 test -z "$as_dir" && as_dir=.
81ecdfbb 3100 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3101 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3102 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3103 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3104 break 2
c906108c 3105 fi
bec39cab 3106done
81ecdfbb
RW
3107 done
3108IFS=$as_save_IFS
bec39cab
AC
3109
3110fi
3111fi
3112ac_ct_CC=$ac_cv_prog_ac_ct_CC
3113if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3115$as_echo "$ac_ct_CC" >&6; }
bec39cab 3116else
81ecdfbb
RW
3117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3118$as_echo "no" >&6; }
c906108c
SS
3119fi
3120
81ecdfbb 3121
bec39cab
AC
3122 test -n "$ac_ct_CC" && break
3123done
c906108c 3124
81ecdfbb
RW
3125 if test "x$ac_ct_CC" = x; then
3126 CC=""
3127 else
3128 case $cross_compiling:$ac_tool_warned in
3129yes:)
3130{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3131$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3132ac_tool_warned=yes ;;
3133esac
3134 CC=$ac_ct_CC
3135 fi
bec39cab
AC
3136fi
3137
3138fi
3139
3140
81ecdfbb
RW
3141test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3142$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3143as_fn_error $? "no acceptable C compiler found in \$PATH
3144See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3145
3146# Provide some information about the compiler.
81ecdfbb
RW
3147$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3148set X $ac_compile
3149ac_compiler=$2
3150for ac_option in --version -v -V -qversion; do
3151 { { ac_try="$ac_compiler $ac_option >&5"
3152case "(($ac_try" in
3153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3154 *) ac_try_echo=$ac_try;;
3155esac
3156eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3157$as_echo "$ac_try_echo"; } >&5
3158 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3159 ac_status=$?
81ecdfbb
RW
3160 if test -s conftest.err; then
3161 sed '10a\
3162... rest of stderr output deleted ...
3163 10q' conftest.err >conftest.er1
3164 cat conftest.er1 >&5
81ecdfbb 3165 fi
d0ac1c44 3166 rm -f conftest.er1 conftest.err
81ecdfbb
RW
3167 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3168 test $ac_status = 0; }
3169done
bec39cab 3170
81ecdfbb 3171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3172/* end confdefs.h. */
3173
3174int
3175main ()
3176{
3177
3178 ;
3179 return 0;
3180}
3181_ACEOF
3182ac_clean_files_save=$ac_clean_files
d0ac1c44 3183ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
bec39cab
AC
3184# Try to create an executable without -o first, disregard a.out.
3185# It will help us diagnose broken compilers, and finding out an intuition
3186# of exeext.
d0ac1c44
SM
3187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3188$as_echo_n "checking whether the C compiler works... " >&6; }
81ecdfbb
RW
3189ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3190
3191# The possible output files:
3192ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3193
3194ac_rmfiles=
3195for ac_file in $ac_files
3196do
3197 case $ac_file in
3198 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3199 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3200 esac
3201done
3202rm -f $ac_rmfiles
3203
3204if { { ac_try="$ac_link_default"
3205case "(($ac_try" in
3206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3207 *) ac_try_echo=$ac_try;;
3208esac
3209eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3210$as_echo "$ac_try_echo"; } >&5
3211 (eval "$ac_link_default") 2>&5
3212 ac_status=$?
3213 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3214 test $ac_status = 0; }; then :
3215 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3216# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3217# in a Makefile. We should not override ac_cv_exeext if it was cached,
3218# so that the user can short-circuit this test for compilers unknown to
3219# Autoconf.
3220for ac_file in $ac_files ''
bec39cab
AC
3221do
3222 test -f "$ac_file" || continue
3223 case $ac_file in
81ecdfbb 3224 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3225 ;;
3226 [ab].out )
3227 # We found the default executable, but exeext='' is most
3228 # certainly right.
3229 break;;
3230 *.* )
81ecdfbb
RW
3231 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3232 then :; else
3233 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3234 fi
3235 # We set ac_cv_exeext here because the later test for it is not
3236 # safe: cross compilers may not add the suffix if given an `-o'
3237 # argument, so we may need to know it at that point already.
3238 # Even if this section looks crufty: it has the advantage of
3239 # actually working.
b4e70030
JB
3240 break;;
3241 * )
3242 break;;
bec39cab
AC
3243 esac
3244done
81ecdfbb
RW
3245test "$ac_cv_exeext" = no && ac_cv_exeext=
3246
bec39cab 3247else
81ecdfbb
RW
3248 ac_file=''
3249fi
81ecdfbb 3250if test -z "$ac_file"; then :
d0ac1c44
SM
3251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3252$as_echo "no" >&6; }
3253$as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3254sed 's/^/| /' conftest.$ac_ext >&5
3255
81ecdfbb
RW
3256{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3257$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3258as_fn_error 77 "C compiler cannot create executables
3259See \`config.log' for more details" "$LINENO" 5; }
3260else
3261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3262$as_echo "yes" >&6; }
bec39cab 3263fi
d0ac1c44
SM
3264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3265$as_echo_n "checking for C compiler default output file name... " >&6; }
3266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3267$as_echo "$ac_file" >&6; }
b4e70030 3268ac_exeext=$ac_cv_exeext
b4e70030 3269
d0ac1c44 3270rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
b4e70030 3271ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3273$as_echo_n "checking for suffix of executables... " >&6; }
3274if { { ac_try="$ac_link"
3275case "(($ac_try" in
3276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3277 *) ac_try_echo=$ac_try;;
3278esac
3279eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3280$as_echo "$ac_try_echo"; } >&5
3281 (eval "$ac_link") 2>&5
bec39cab 3282 ac_status=$?
81ecdfbb
RW
3283 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3284 test $ac_status = 0; }; then :
b4e70030
JB
3285 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3286# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3287# work properly (i.e., refer to `conftest.exe'), while it won't with
3288# `rm'.
3289for ac_file in conftest.exe conftest conftest.*; do
3290 test -f "$ac_file" || continue
3291 case $ac_file in
81ecdfbb 3292 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3293 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3294 break;;
3295 * ) break;;
3296 esac
3297done
c906108c 3298else
81ecdfbb
RW
3299 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3300$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3301as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3302See \`config.log' for more details" "$LINENO" 5; }
c906108c 3303fi
d0ac1c44 3304rm -f conftest conftest$ac_cv_exeext
81ecdfbb
RW
3305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3306$as_echo "$ac_cv_exeext" >&6; }
c906108c 3307
b4e70030 3308rm -f conftest.$ac_ext
bec39cab
AC
3309EXEEXT=$ac_cv_exeext
3310ac_exeext=$EXEEXT
d0ac1c44
SM
3311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3312/* end confdefs.h. */
3313#include <stdio.h>
3314int
3315main ()
3316{
3317FILE *f = fopen ("conftest.out", "w");
3318 return ferror (f) || fclose (f) != 0;
3319
3320 ;
3321 return 0;
3322}
3323_ACEOF
3324ac_clean_files="$ac_clean_files conftest.out"
3325# Check that the compiler produces executables we can run. If not, either
3326# the compiler is broken, or we cross compile.
3327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3328$as_echo_n "checking whether we are cross compiling... " >&6; }
3329if test "$cross_compiling" != yes; then
3330 { { ac_try="$ac_link"
3331case "(($ac_try" in
3332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3333 *) ac_try_echo=$ac_try;;
3334esac
3335eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3336$as_echo "$ac_try_echo"; } >&5
3337 (eval "$ac_link") 2>&5
3338 ac_status=$?
3339 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3340 test $ac_status = 0; }
3341 if { ac_try='./conftest$ac_cv_exeext'
3342 { { case "(($ac_try" in
3343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3344 *) ac_try_echo=$ac_try;;
3345esac
3346eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3347$as_echo "$ac_try_echo"; } >&5
3348 (eval "$ac_try") 2>&5
3349 ac_status=$?
3350 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3351 test $ac_status = 0; }; }; then
3352 cross_compiling=no
3353 else
3354 if test "$cross_compiling" = maybe; then
3355 cross_compiling=yes
3356 else
3357 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3358$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3359as_fn_error $? "cannot run C compiled programs.
3360If you meant to cross compile, use \`--host'.
3361See \`config.log' for more details" "$LINENO" 5; }
3362 fi
3363 fi
3364fi
3365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3366$as_echo "$cross_compiling" >&6; }
3367
3368rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3369ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3371$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 3372if ${ac_cv_objext+:} false; then :
81ecdfbb 3373 $as_echo_n "(cached) " >&6
bec39cab 3374else
81ecdfbb 3375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3376/* end confdefs.h. */
3377
3378int
3379main ()
3380{
3381
3382 ;
3383 return 0;
3384}
3385_ACEOF
3386rm -f conftest.o conftest.obj
81ecdfbb
RW
3387if { { ac_try="$ac_compile"
3388case "(($ac_try" in
3389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3390 *) ac_try_echo=$ac_try;;
3391esac
3392eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3393$as_echo "$ac_try_echo"; } >&5
3394 (eval "$ac_compile") 2>&5
3395 ac_status=$?
3396 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3397 test $ac_status = 0; }; then :
3398 for ac_file in conftest.o conftest.obj conftest.*; do
3399 test -f "$ac_file" || continue;
bec39cab 3400 case $ac_file in
81ecdfbb 3401 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3402 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3403 break;;
3404 esac
3405done
c906108c 3406else
81ecdfbb 3407 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3408sed 's/^/| /' conftest.$ac_ext >&5
3409
81ecdfbb
RW
3410{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3411$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3412as_fn_error $? "cannot compute suffix of object files: cannot compile
3413See \`config.log' for more details" "$LINENO" 5; }
c906108c 3414fi
b4e70030 3415rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3416fi
81ecdfbb
RW
3417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3418$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3419OBJEXT=$ac_cv_objext
3420ac_objext=$OBJEXT
81ecdfbb
RW
3421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3422$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 3423if ${ac_cv_c_compiler_gnu+:} false; then :
81ecdfbb 3424 $as_echo_n "(cached) " >&6
c906108c 3425else
81ecdfbb 3426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3427/* end confdefs.h. */
3428
3429int
3430main ()
3431{
3432#ifndef __GNUC__
3433 choke me
3434#endif
3435
3436 ;
3437 return 0;
3438}
3439_ACEOF
81ecdfbb 3440if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3441 ac_compiler_gnu=yes
3442else
81ecdfbb 3443 ac_compiler_gnu=no
bec39cab 3444fi
81ecdfbb 3445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3446ac_cv_c_compiler_gnu=$ac_compiler_gnu
3447
3448fi
81ecdfbb
RW
3449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3450$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3451if test $ac_compiler_gnu = yes; then
3452 GCC=yes
3453else
3454 GCC=
3455fi
bec39cab
AC
3456ac_test_CFLAGS=${CFLAGS+set}
3457ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3459$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 3460if ${ac_cv_prog_cc_g+:} false; then :
81ecdfbb 3461 $as_echo_n "(cached) " >&6
bec39cab 3462else
81ecdfbb
RW
3463 ac_save_c_werror_flag=$ac_c_werror_flag
3464 ac_c_werror_flag=yes
3465 ac_cv_prog_cc_g=no
3466 CFLAGS="-g"
3467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3468/* end confdefs.h. */
3469
3470int
3471main ()
3472{
3473
3474 ;
3475 return 0;
3476}
3477_ACEOF
81ecdfbb 3478if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3479 ac_cv_prog_cc_g=yes
3480else
81ecdfbb
RW
3481 CFLAGS=""
3482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3483/* end confdefs.h. */
3484
3485int
3486main ()
3487{
3488
3489 ;
3490 return 0;
3491}
3492_ACEOF
3493if ac_fn_c_try_compile "$LINENO"; then :
3494
3495else
3496 ac_c_werror_flag=$ac_save_c_werror_flag
3497 CFLAGS="-g"
3498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3499/* end confdefs.h. */
3500
3501int
3502main ()
3503{
c906108c 3504
81ecdfbb
RW
3505 ;
3506 return 0;
3507}
3508_ACEOF
3509if ac_fn_c_try_compile "$LINENO"; then :
3510 ac_cv_prog_cc_g=yes
3511fi
3512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3513fi
3514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3515fi
81ecdfbb
RW
3516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3517 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3518fi
81ecdfbb
RW
3519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3520$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3521if test "$ac_test_CFLAGS" = set; then
bec39cab 3522 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3523elif test $ac_cv_prog_cc_g = yes; then
3524 if test "$GCC" = yes; then
3525 CFLAGS="-g -O2"
3526 else
3527 CFLAGS="-g"
3528 fi
3529else
3530 if test "$GCC" = yes; then
3531 CFLAGS="-O2"
3532 else
3533 CFLAGS=
3534 fi
3535fi
81ecdfbb
RW
3536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3537$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
d0ac1c44 3538if ${ac_cv_prog_cc_c89+:} false; then :
81ecdfbb 3539 $as_echo_n "(cached) " >&6
bec39cab 3540else
81ecdfbb 3541 ac_cv_prog_cc_c89=no
bec39cab 3542ac_save_CC=$CC
81ecdfbb 3543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3544/* end confdefs.h. */
c906108c
SS
3545#include <stdarg.h>
3546#include <stdio.h>
d0ac1c44 3547struct stat;
c906108c
SS
3548/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3549struct buf { int x; };
3550FILE * (*rcsopen) (struct buf *, struct stat *, int);
3551static char *e (p, i)
3552 char **p;
3553 int i;
3554{
3555 return p[i];
3556}
3557static char *f (char * (*g) (char **, int), char **p, ...)
3558{
3559 char *s;
3560 va_list v;
3561 va_start (v,p);
3562 s = g (p, va_arg (v,int));
3563 va_end (v);
3564 return s;
3565}
bec39cab
AC
3566
3567/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3568 function prototypes and stuff, but not '\xHH' hex character constants.
3569 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3570 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3571 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3572 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3573 that's true only with -std. */
bec39cab
AC
3574int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3575
81ecdfbb
RW
3576/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3577 inside strings and character constants. */
3578#define FOO(x) 'x'
3579int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3580
c906108c
SS
3581int test (int i, double x);
3582struct s1 {int (*f) (int a);};
3583struct s2 {int (*f) (double a);};
3584int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3585int argc;
3586char **argv;
bec39cab
AC
3587int
3588main ()
3589{
c906108c 3590return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3591 ;
3592 return 0;
3593}
3594_ACEOF
81ecdfbb
RW
3595for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3596 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3597do
3598 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3599 if ac_fn_c_try_compile "$LINENO"; then :
3600 ac_cv_prog_cc_c89=$ac_arg
c906108c 3601fi
81ecdfbb
RW
3602rm -f core conftest.err conftest.$ac_objext
3603 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3604done
81ecdfbb 3605rm -f conftest.$ac_ext
bec39cab 3606CC=$ac_save_CC
c906108c
SS
3607
3608fi
81ecdfbb
RW
3609# AC_CACHE_VAL
3610case "x$ac_cv_prog_cc_c89" in
3611 x)
3612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3613$as_echo "none needed" >&6; } ;;
3614 xno)
3615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3616$as_echo "unsupported" >&6; } ;;
bec39cab 3617 *)
81ecdfbb
RW
3618 CC="$CC $ac_cv_prog_cc_c89"
3619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3620$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3621esac
81ecdfbb 3622if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3623
b4e70030
JB
3624fi
3625
bec39cab
AC
3626ac_ext=c
3627ac_cpp='$CPP $CPPFLAGS'
3628ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3629ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3630ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3631
3bc3d82a
PA
3632ac_ext=cpp
3633ac_cpp='$CXXCPP $CPPFLAGS'
3634ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3635ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3636ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3637if test -z "$CXX"; then
3638 if test -n "$CCC"; then
3639 CXX=$CCC
3640 else
3641 if test -n "$ac_tool_prefix"; then
3642 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3643 do
3644 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3645set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3647$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3648if ${ac_cv_prog_CXX+:} false; then :
3bc3d82a
PA
3649 $as_echo_n "(cached) " >&6
3650else
3651 if test -n "$CXX"; then
3652 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3653else
3654as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3655for as_dir in $PATH
3656do
3657 IFS=$as_save_IFS
3658 test -z "$as_dir" && as_dir=.
3659 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3660 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3661 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3662 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3663 break 2
3664 fi
3665done
3666 done
3667IFS=$as_save_IFS
3668
3669fi
3670fi
3671CXX=$ac_cv_prog_CXX
3672if test -n "$CXX"; then
3673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3674$as_echo "$CXX" >&6; }
3675else
3676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3677$as_echo "no" >&6; }
3678fi
3679
3680
3681 test -n "$CXX" && break
3682 done
3683fi
3684if test -z "$CXX"; then
3685 ac_ct_CXX=$CXX
3686 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3687do
3688 # Extract the first word of "$ac_prog", so it can be a program name with args.
3689set dummy $ac_prog; ac_word=$2
3690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3691$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3692if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3bc3d82a
PA
3693 $as_echo_n "(cached) " >&6
3694else
3695 if test -n "$ac_ct_CXX"; then
3696 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3697else
3698as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3699for as_dir in $PATH
3700do
3701 IFS=$as_save_IFS
3702 test -z "$as_dir" && as_dir=.
3703 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3704 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3705 ac_cv_prog_ac_ct_CXX="$ac_prog"
3706 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3707 break 2
3708 fi
3709done
3710 done
3711IFS=$as_save_IFS
3712
3713fi
3714fi
3715ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3716if test -n "$ac_ct_CXX"; then
3717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3718$as_echo "$ac_ct_CXX" >&6; }
3719else
3720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3721$as_echo "no" >&6; }
3722fi
3723
3724
3725 test -n "$ac_ct_CXX" && break
3726done
3727
3728 if test "x$ac_ct_CXX" = x; then
3729 CXX="g++"
3730 else
3731 case $cross_compiling:$ac_tool_warned in
3732yes:)
3733{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3734$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3735ac_tool_warned=yes ;;
3736esac
3737 CXX=$ac_ct_CXX
3738 fi
3739fi
3740
3741 fi
3742fi
3743# Provide some information about the compiler.
3744$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3745set X $ac_compile
3746ac_compiler=$2
3747for ac_option in --version -v -V -qversion; do
3748 { { ac_try="$ac_compiler $ac_option >&5"
3749case "(($ac_try" in
3750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3751 *) ac_try_echo=$ac_try;;
3752esac
3753eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3754$as_echo "$ac_try_echo"; } >&5
3755 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3756 ac_status=$?
3757 if test -s conftest.err; then
3758 sed '10a\
3759... rest of stderr output deleted ...
3760 10q' conftest.err >conftest.er1
3761 cat conftest.er1 >&5
3bc3d82a 3762 fi
d0ac1c44 3763 rm -f conftest.er1 conftest.err
3bc3d82a
PA
3764 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3765 test $ac_status = 0; }
3766done
3767
3768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3769$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
d0ac1c44 3770if ${ac_cv_cxx_compiler_gnu+:} false; then :
3bc3d82a
PA
3771 $as_echo_n "(cached) " >&6
3772else
3773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3774/* end confdefs.h. */
3775
3776int
3777main ()
3778{
3779#ifndef __GNUC__
3780 choke me
3781#endif
3782
3783 ;
3784 return 0;
3785}
3786_ACEOF
3787if ac_fn_cxx_try_compile "$LINENO"; then :
3788 ac_compiler_gnu=yes
3789else
3790 ac_compiler_gnu=no
3791fi
3792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3793ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3794
3795fi
3796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3797$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3798if test $ac_compiler_gnu = yes; then
3799 GXX=yes
3800else
3801 GXX=
3802fi
3803ac_test_CXXFLAGS=${CXXFLAGS+set}
3804ac_save_CXXFLAGS=$CXXFLAGS
3805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3806$as_echo_n "checking whether $CXX accepts -g... " >&6; }
d0ac1c44 3807if ${ac_cv_prog_cxx_g+:} false; then :
3bc3d82a
PA
3808 $as_echo_n "(cached) " >&6
3809else
3810 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3811 ac_cxx_werror_flag=yes
3812 ac_cv_prog_cxx_g=no
3813 CXXFLAGS="-g"
3814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3815/* end confdefs.h. */
3816
3817int
3818main ()
3819{
3820
3821 ;
3822 return 0;
3823}
3824_ACEOF
3825if ac_fn_cxx_try_compile "$LINENO"; then :
3826 ac_cv_prog_cxx_g=yes
3827else
3828 CXXFLAGS=""
3829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3830/* end confdefs.h. */
3831
3832int
3833main ()
3834{
3835
3836 ;
3837 return 0;
3838}
3839_ACEOF
3840if ac_fn_cxx_try_compile "$LINENO"; then :
3841
3842else
3843 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3844 CXXFLAGS="-g"
3845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3846/* end confdefs.h. */
3847
3848int
3849main ()
3850{
3851
3852 ;
3853 return 0;
3854}
3855_ACEOF
3856if ac_fn_cxx_try_compile "$LINENO"; then :
3857 ac_cv_prog_cxx_g=yes
3858fi
3859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3860fi
3861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862fi
3863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3864 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3865fi
3866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3867$as_echo "$ac_cv_prog_cxx_g" >&6; }
3868if test "$ac_test_CXXFLAGS" = set; then
3869 CXXFLAGS=$ac_save_CXXFLAGS
3870elif test $ac_cv_prog_cxx_g = yes; then
3871 if test "$GXX" = yes; then
3872 CXXFLAGS="-g -O2"
3873 else
3874 CXXFLAGS="-g"
3875 fi
3876else
3877 if test "$GXX" = yes; then
3878 CXXFLAGS="-O2"
3879 else
3880 CXXFLAGS=
3881 fi
3882fi
3883ac_ext=c
3884ac_cpp='$CPP $CPPFLAGS'
3885ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3886ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3887ac_compiler_gnu=$ac_cv_c_compiler_gnu
3888
3889
60ca704f 3890
bec39cab
AC
3891ac_ext=c
3892ac_cpp='$CPP $CPPFLAGS'
3893ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3894ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3895ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3897$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3898# On Suns, sometimes $CPP names a directory.
3899if test -n "$CPP" && test -d "$CPP"; then
3900 CPP=
8bb2c122 3901fi
bec39cab 3902if test -z "$CPP"; then
d0ac1c44 3903 if ${ac_cv_prog_CPP+:} false; then :
81ecdfbb 3904 $as_echo_n "(cached) " >&6
bec39cab
AC
3905else
3906 # Double quotes because CPP needs to be expanded
3907 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3908 do
3909 ac_preproc_ok=false
3910for ac_c_preproc_warn_flag in '' yes
3911do
3912 # Use a header file that comes with gcc, so configuring glibc
3913 # with a fresh cross-compiler works.
3914 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3915 # <limits.h> exists even on freestanding compilers.
3916 # On the NeXT, cc -E runs the code through the compiler's parser,
3917 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3919/* end confdefs.h. */
3920#ifdef __STDC__
3921# include <limits.h>
3922#else
3923# include <assert.h>
3924#endif
3925 Syntax error
3926_ACEOF
81ecdfbb 3927if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3928
81ecdfbb 3929else
bec39cab
AC
3930 # Broken: fails on valid input.
3931continue
3932fi
d0ac1c44 3933rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 3934
81ecdfbb 3935 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3936 # can be detected and how.
81ecdfbb 3937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3938/* end confdefs.h. */
3939#include <ac_nonexistent.h>
3940_ACEOF
81ecdfbb 3941if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3942 # Broken: success on invalid input.
3943continue
8bb2c122 3944else
bec39cab
AC
3945 # Passes both tests.
3946ac_preproc_ok=:
3947break
8bb2c122 3948fi
d0ac1c44 3949rm -f conftest.err conftest.i conftest.$ac_ext
8bb2c122 3950
bec39cab
AC
3951done
3952# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 3953rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb 3954if $ac_preproc_ok; then :
bec39cab
AC
3955 break
3956fi
8bb2c122 3957
bec39cab
AC
3958 done
3959 ac_cv_prog_CPP=$CPP
ddc9cd0f 3960
c906108c 3961fi
bec39cab
AC
3962 CPP=$ac_cv_prog_CPP
3963else
3964 ac_cv_prog_CPP=$CPP
c906108c 3965fi
81ecdfbb
RW
3966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3967$as_echo "$CPP" >&6; }
bec39cab
AC
3968ac_preproc_ok=false
3969for ac_c_preproc_warn_flag in '' yes
3970do
3971 # Use a header file that comes with gcc, so configuring glibc
3972 # with a fresh cross-compiler works.
3973 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3974 # <limits.h> exists even on freestanding compilers.
3975 # On the NeXT, cc -E runs the code through the compiler's parser,
3976 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3978/* end confdefs.h. */
3979#ifdef __STDC__
3980# include <limits.h>
3981#else
3982# include <assert.h>
3983#endif
3984 Syntax error
3985_ACEOF
81ecdfbb 3986if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3987
81ecdfbb 3988else
bec39cab
AC
3989 # Broken: fails on valid input.
3990continue
3991fi
d0ac1c44 3992rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 3993
81ecdfbb 3994 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3995 # can be detected and how.
81ecdfbb 3996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3997/* end confdefs.h. */
3998#include <ac_nonexistent.h>
3999_ACEOF
81ecdfbb 4000if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4001 # Broken: success on invalid input.
4002continue
c906108c 4003else
bec39cab
AC
4004 # Passes both tests.
4005ac_preproc_ok=:
4006break
c906108c 4007fi
d0ac1c44 4008rm -f conftest.err conftest.i conftest.$ac_ext
c906108c 4009
bec39cab
AC
4010done
4011# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4012rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb
RW
4013if $ac_preproc_ok; then :
4014
c906108c 4015else
81ecdfbb
RW
4016 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4017$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4018as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4019See \`config.log' for more details" "$LINENO" 5; }
c906108c 4020fi
c906108c 4021
bec39cab
AC
4022ac_ext=c
4023ac_cpp='$CPP $CPPFLAGS'
4024ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4025ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4026ac_compiler_gnu=$ac_cv_c_compiler_gnu
4027
4028
81ecdfbb
RW
4029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4030$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 4031if ${ac_cv_path_GREP+:} false; then :
81ecdfbb 4032 $as_echo_n "(cached) " >&6
4e8d927d 4033else
81ecdfbb
RW
4034 if test -z "$GREP"; then
4035 ac_path_GREP_found=false
4036 # Loop through the user's path and test for each of PROGNAME-LIST
4037 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4038for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4039do
4040 IFS=$as_save_IFS
4041 test -z "$as_dir" && as_dir=.
4042 for ac_prog in grep ggrep; do
4043 for ac_exec_ext in '' $ac_executable_extensions; do
4044 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4045 as_fn_executable_p "$ac_path_GREP" || continue
81ecdfbb
RW
4046# Check for GNU ac_path_GREP and select it if it is found.
4047 # Check for GNU $ac_path_GREP
4048case `"$ac_path_GREP" --version 2>&1` in
4049*GNU*)
4050 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4051*)
4052 ac_count=0
4053 $as_echo_n 0123456789 >"conftest.in"
4054 while :
4055 do
4056 cat "conftest.in" "conftest.in" >"conftest.tmp"
4057 mv "conftest.tmp" "conftest.in"
4058 cp "conftest.in" "conftest.nl"
4059 $as_echo 'GREP' >> "conftest.nl"
4060 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4061 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4062 as_fn_arith $ac_count + 1 && ac_count=$as_val
4063 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4064 # Best one so far, save it but keep looking for a better one
4065 ac_cv_path_GREP="$ac_path_GREP"
4066 ac_path_GREP_max=$ac_count
bec39cab 4067 fi
81ecdfbb
RW
4068 # 10*(2^10) chars as input seems more than enough
4069 test $ac_count -gt 10 && break
4070 done
4071 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4072esac
bec39cab 4073
81ecdfbb
RW
4074 $ac_path_GREP_found && break 3
4075 done
4076 done
4077 done
4078IFS=$as_save_IFS
4079 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 4080 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
81ecdfbb 4081 fi
c906108c 4082else
81ecdfbb 4083 ac_cv_path_GREP=$GREP
c906108c 4084fi
c906108c 4085
81ecdfbb
RW
4086fi
4087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4088$as_echo "$ac_cv_path_GREP" >&6; }
4089 GREP="$ac_cv_path_GREP"
c906108c 4090
c906108c 4091
81ecdfbb
RW
4092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4093$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 4094if ${ac_cv_path_EGREP+:} false; then :
81ecdfbb 4095 $as_echo_n "(cached) " >&6
783e057b 4096else
81ecdfbb
RW
4097 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4098 then ac_cv_path_EGREP="$GREP -E"
4099 else
4100 if test -z "$EGREP"; then
4101 ac_path_EGREP_found=false
4102 # Loop through the user's path and test for each of PROGNAME-LIST
4103 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4104for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4105do
4106 IFS=$as_save_IFS
4107 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4108 for ac_prog in egrep; do
4109 for ac_exec_ext in '' $ac_executable_extensions; do
4110 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4111 as_fn_executable_p "$ac_path_EGREP" || continue
81ecdfbb
RW
4112# Check for GNU ac_path_EGREP and select it if it is found.
4113 # Check for GNU $ac_path_EGREP
4114case `"$ac_path_EGREP" --version 2>&1` in
4115*GNU*)
4116 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4117*)
4118 ac_count=0
4119 $as_echo_n 0123456789 >"conftest.in"
4120 while :
4121 do
4122 cat "conftest.in" "conftest.in" >"conftest.tmp"
4123 mv "conftest.tmp" "conftest.in"
4124 cp "conftest.in" "conftest.nl"
4125 $as_echo 'EGREP' >> "conftest.nl"
4126 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4127 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4128 as_fn_arith $ac_count + 1 && ac_count=$as_val
4129 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4130 # Best one so far, save it but keep looking for a better one
4131 ac_cv_path_EGREP="$ac_path_EGREP"
4132 ac_path_EGREP_max=$ac_count
4133 fi
4134 # 10*(2^10) chars as input seems more than enough
4135 test $ac_count -gt 10 && break
4136 done
4137 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4138esac
bec39cab 4139
81ecdfbb
RW
4140 $ac_path_EGREP_found && break 3
4141 done
4142 done
4143 done
4144IFS=$as_save_IFS
4145 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4146 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4147 fi
783e057b 4148else
81ecdfbb 4149 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4150fi
4151
81ecdfbb 4152 fi
783e057b 4153fi
81ecdfbb
RW
4154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4155$as_echo "$ac_cv_path_EGREP" >&6; }
4156 EGREP="$ac_cv_path_EGREP"
4157
783e057b 4158
81ecdfbb
RW
4159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4160$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4161if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 4162 $as_echo_n "(cached) " >&6
783e057b 4163else
81ecdfbb 4164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4165/* end confdefs.h. */
783e057b 4166#include <stdlib.h>
bec39cab 4167#include <stdarg.h>
783e057b
DJ
4168#include <string.h>
4169#include <float.h>
c906108c 4170
bec39cab
AC
4171int
4172main ()
4173{
c906108c 4174
bec39cab
AC
4175 ;
4176 return 0;
4177}
4178_ACEOF
81ecdfbb 4179if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4180 ac_cv_header_stdc=yes
c906108c 4181else
81ecdfbb 4182 ac_cv_header_stdc=no
c906108c 4183fi
81ecdfbb 4184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4185
783e057b
DJ
4186if test $ac_cv_header_stdc = yes; then
4187 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4189/* end confdefs.h. */
4190#include <string.h>
c906108c 4191
783e057b
DJ
4192_ACEOF
4193if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4194 $EGREP "memchr" >/dev/null 2>&1; then :
4195
c906108c 4196else
783e057b 4197 ac_cv_header_stdc=no
c906108c 4198fi
783e057b 4199rm -f conftest*
c906108c
SS
4200
4201fi
4202
783e057b
DJ
4203if test $ac_cv_header_stdc = yes; then
4204 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4206/* end confdefs.h. */
4207#include <stdlib.h>
bec39cab 4208
783e057b
DJ
4209_ACEOF
4210if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4211 $EGREP "free" >/dev/null 2>&1; then :
4212
bec39cab 4213else
783e057b 4214 ac_cv_header_stdc=no
bec39cab 4215fi
783e057b 4216rm -f conftest*
bec39cab
AC
4217
4218fi
bec39cab 4219
783e057b
DJ
4220if test $ac_cv_header_stdc = yes; then
4221 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4222 if test "$cross_compiling" = yes; then :
783e057b 4223 :
bec39cab 4224else
81ecdfbb 4225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4226/* end confdefs.h. */
4227#include <ctype.h>
81ecdfbb 4228#include <stdlib.h>
783e057b
DJ
4229#if ((' ' & 0x0FF) == 0x020)
4230# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4231# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4232#else
4233# define ISLOWER(c) \
4234 (('a' <= (c) && (c) <= 'i') \
4235 || ('j' <= (c) && (c) <= 'r') \
4236 || ('s' <= (c) && (c) <= 'z'))
4237# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4238#endif
4239
4240#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4241int
4242main ()
4243{
4244 int i;
4245 for (i = 0; i < 256; i++)
4246 if (XOR (islower (i), ISLOWER (i))
4247 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4248 return 2;
4249 return 0;
783e057b
DJ
4250}
4251_ACEOF
81ecdfbb 4252if ac_fn_c_try_run "$LINENO"; then :
783e057b 4253
81ecdfbb
RW
4254else
4255 ac_cv_header_stdc=no
783e057b 4256fi
81ecdfbb
RW
4257rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4258 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4259fi
81ecdfbb 4260
783e057b
DJ
4261fi
4262fi
81ecdfbb
RW
4263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4264$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4265if test $ac_cv_header_stdc = yes; then
4266
81ecdfbb 4267$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4268
4269fi
4270
4271# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4272for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4273 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4274do :
4275 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4276ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4277"
d0ac1c44 4278if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
783e057b 4279 cat >>confdefs.h <<_ACEOF
81ecdfbb 4280#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4281_ACEOF
4282
4283fi
4284
4285done
4286
4287
4288
81ecdfbb 4289 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4290if test "x$ac_cv_header_minix_config_h" = xyes; then :
783e057b
DJ
4291 MINIX=yes
4292else
4293 MINIX=
4294fi
4295
4296
4297 if test "$MINIX" = yes; then
4298
81ecdfbb 4299$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4300
4301
81ecdfbb 4302$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4303
4304
81ecdfbb 4305$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4306
4307 fi
4308
4309
81ecdfbb
RW
4310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4311$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4312if ${ac_cv_safe_to_define___extensions__+:} false; then :
81ecdfbb 4313 $as_echo_n "(cached) " >&6
783e057b 4314else
81ecdfbb 4315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4316/* end confdefs.h. */
4317
d0ac1c44
SM
4318# define __EXTENSIONS__ 1
4319 $ac_includes_default
783e057b
DJ
4320int
4321main ()
4322{
4323
4324 ;
4325 return 0;
4326}
4327_ACEOF
81ecdfbb 4328if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4329 ac_cv_safe_to_define___extensions__=yes
4330else
81ecdfbb 4331 ac_cv_safe_to_define___extensions__=no
783e057b 4332fi
81ecdfbb 4333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4334fi
81ecdfbb
RW
4335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4336$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4337 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4338 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4339
81ecdfbb 4340 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4341
81ecdfbb 4342 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4343
81ecdfbb 4344 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4345
81ecdfbb 4346 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4347
4348
c971b7fa
PA
4349ac_aux_dir=
4350for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
d0ac1c44
SM
4351 if test -f "$ac_dir/install-sh"; then
4352 ac_aux_dir=$ac_dir
4353 ac_install_sh="$ac_aux_dir/install-sh -c"
4354 break
4355 elif test -f "$ac_dir/install.sh"; then
4356 ac_aux_dir=$ac_dir
4357 ac_install_sh="$ac_aux_dir/install.sh -c"
4358 break
4359 elif test -f "$ac_dir/shtool"; then
4360 ac_aux_dir=$ac_dir
4361 ac_install_sh="$ac_aux_dir/shtool install -c"
4362 break
4363 fi
c971b7fa
PA
4364done
4365if test -z "$ac_aux_dir"; then
d0ac1c44 4366 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
c971b7fa 4367fi
770d76d7 4368
c971b7fa
PA
4369# These three variables are undocumented and unsupported,
4370# and are intended to be withdrawn in a future Autoconf release.
4371# They can cause serious problems if a builder's source tree is in a directory
4372# whose full name contains unusual characters.
4373ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4374ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4375ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4376
770d76d7 4377
c971b7fa
PA
4378# Make sure we can run config.sub.
4379$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 4380 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4381
c971b7fa
PA
4382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4383$as_echo_n "checking build system type... " >&6; }
d0ac1c44 4384if ${ac_cv_build+:} false; then :
c971b7fa 4385 $as_echo_n "(cached) " >&6
770d76d7 4386else
c971b7fa
PA
4387 ac_build_alias=$build_alias
4388test "x$ac_build_alias" = x &&
4389 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4390test "x$ac_build_alias" = x &&
d0ac1c44 4391 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
c971b7fa 4392ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 4393 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
c971b7fa 4394
770d76d7 4395fi
c971b7fa
PA
4396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4397$as_echo "$ac_cv_build" >&6; }
4398case $ac_cv_build in
4399*-*-*) ;;
d0ac1c44 4400*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4401esac
c971b7fa
PA
4402build=$ac_cv_build
4403ac_save_IFS=$IFS; IFS='-'
4404set x $ac_cv_build
4405shift
4406build_cpu=$1
4407build_vendor=$2
4408shift; shift
4409# Remember, the first character of IFS is used to create $*,
4410# except with old shells:
4411build_os=$*
4412IFS=$ac_save_IFS
4413case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4414
4415
c971b7fa
PA
4416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4417$as_echo_n "checking host system type... " >&6; }
d0ac1c44 4418if ${ac_cv_host+:} false; then :
81ecdfbb
RW
4419 $as_echo_n "(cached) " >&6
4420else
c971b7fa
PA
4421 if test "x$host_alias" = x; then
4422 ac_cv_host=$ac_cv_build
81ecdfbb 4423else
c971b7fa 4424 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 4425 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4426fi
81ecdfbb
RW
4427
4428fi
c971b7fa
PA
4429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4430$as_echo "$ac_cv_host" >&6; }
4431case $ac_cv_host in
4432*-*-*) ;;
d0ac1c44 4433*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4434esac
c971b7fa
PA
4435host=$ac_cv_host
4436ac_save_IFS=$IFS; IFS='-'
4437set x $ac_cv_host
4438shift
4439host_cpu=$1
4440host_vendor=$2
4441shift; shift
4442# Remember, the first character of IFS is used to create $*,
4443# except with old shells:
4444host_os=$*
4445IFS=$ac_save_IFS
4446case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4447
4448
4449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4450$as_echo_n "checking target system type... " >&6; }
d0ac1c44 4451if ${ac_cv_target+:} false; then :
3388710e
JM
4452 $as_echo_n "(cached) " >&6
4453else
4454 if test "x$target_alias" = x; then
4455 ac_cv_target=$ac_cv_host
4456else
4457 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
d0ac1c44 4458 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
3388710e
JM
4459fi
4460
4461fi
4462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4463$as_echo "$ac_cv_target" >&6; }
4464case $ac_cv_target in
4465*-*-*) ;;
d0ac1c44 4466*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
3388710e
JM
4467esac
4468target=$ac_cv_target
4469ac_save_IFS=$IFS; IFS='-'
4470set x $ac_cv_target
4471shift
4472target_cpu=$1
4473target_vendor=$2
4474shift; shift
4475# Remember, the first character of IFS is used to create $*,
4476# except with old shells:
4477target_os=$*
4478IFS=$ac_save_IFS
4479case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4480
4481
4482# The aliases save the names the user supplied, while $host etc.
4483# will get canonicalized.
4484test -n "$target_alias" &&
4485 test "$program_prefix$program_suffix$program_transform_name" = \
4486 NONENONEs,x,x, &&
4487 program_prefix=${target_alias}-
4488
4489# The tests for host and target for $enable_largefile require
4490# canonical names.
4491
4492
81ecdfbb 4493
da2f07f1
JK
4494# As the $enable_largefile decision depends on --enable-plugins we must set it
4495# even in directories otherwise not depending on the $plugins option.
4496
4497
2974be62
AM
4498 maybe_plugins=no
4499 for ac_header in dlfcn.h
4500do :
4501 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4502"
d0ac1c44 4503if test "x$ac_cv_header_dlfcn_h" = xyes; then :
2974be62
AM
4504 cat >>confdefs.h <<_ACEOF
4505#define HAVE_DLFCN_H 1
4506_ACEOF
4507 maybe_plugins=yes
4508fi
4509
4510done
4511
4512 for ac_header in windows.h
4513do :
4514 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4515"
d0ac1c44 4516if test "x$ac_cv_header_windows_h" = xyes; then :
2974be62
AM
4517 cat >>confdefs.h <<_ACEOF
4518#define HAVE_WINDOWS_H 1
4519_ACEOF
4520 maybe_plugins=yes
4521fi
4522
4523done
4524
4525
4526 # Check whether --enable-plugins was given.
da2f07f1
JK
4527if test "${enable_plugins+set}" = set; then :
4528 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4529 no) plugins=no ;;
4530 *) plugins=yes
4531 if test "$maybe_plugins" != "yes" ; then
d0ac1c44 4532 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
2974be62
AM
4533 fi ;;
4534 esac
da2f07f1 4535else
2974be62
AM
4536 plugins=$maybe_plugins
4537
da2f07f1
JK
4538fi
4539
2974be62 4540 if test "$plugins" = "yes"; then
458412c3
TT
4541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4542$as_echo_n "checking for library containing dlsym... " >&6; }
d0ac1c44 4543if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4544 $as_echo_n "(cached) " >&6
4545else
4546 ac_func_search_save_LIBS=$LIBS
4547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4548/* end confdefs.h. */
4549
4550/* Override any GCC internal prototype to avoid an error.
4551 Use char because int might match the return type of a GCC
4552 builtin and then its argument prototype would still apply. */
4553#ifdef __cplusplus
4554extern "C"
4555#endif
458412c3 4556char dlsym ();
2974be62
AM
4557int
4558main ()
4559{
458412c3 4560return dlsym ();
2974be62
AM
4561 ;
4562 return 0;
4563}
4564_ACEOF
4565for ac_lib in '' dl; do
4566 if test -z "$ac_lib"; then
4567 ac_res="none required"
4568 else
4569 ac_res=-l$ac_lib
4570 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4571 fi
4572 if ac_fn_c_try_link "$LINENO"; then :
458412c3 4573 ac_cv_search_dlsym=$ac_res
2974be62
AM
4574fi
4575rm -f core conftest.err conftest.$ac_objext \
4576 conftest$ac_exeext
d0ac1c44 4577 if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4578 break
4579fi
4580done
d0ac1c44 4581if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4582
4583else
458412c3 4584 ac_cv_search_dlsym=no
2974be62
AM
4585fi
4586rm conftest.$ac_ext
4587LIBS=$ac_func_search_save_LIBS
4588fi
458412c3
TT
4589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4590$as_echo "$ac_cv_search_dlsym" >&6; }
4591ac_res=$ac_cv_search_dlsym
2974be62
AM
4592if test "$ac_res" != no; then :
4593 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4594
4595fi
4596
4597 fi
da2f07f1
JK
4598
4599
4600case "${host}" in
4601 sparc-*-solaris*|i[3-7]86-*-solaris*)
4602 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4603 # are mutually exclusive; and without procfs support, the bfd/ elf module
4604 # cannot provide certain routines such as elfcore_write_prpsinfo
4605 # or elfcore_write_prstatus. So unless the user explicitly requested
4606 # large-file support through the --enable-largefile switch, disable
4607 # large-file support in favor of procfs support.
4608 test "${target}" = "${host}" -a "x$plugins" = xno \
4609 && : ${enable_largefile="no"}
4610 ;;
4611esac
4612
4613# Check whether --enable-largefile was given.
4614if test "${enable_largefile+set}" = set; then :
4615 enableval=$enable_largefile;
4616fi
4617
4618if test "$enable_largefile" != no; then
4619
4620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4621$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 4622if ${ac_cv_sys_largefile_CC+:} false; then :
da2f07f1
JK
4623 $as_echo_n "(cached) " >&6
4624else
4625 ac_cv_sys_largefile_CC=no
4626 if test "$GCC" != yes; then
4627 ac_save_CC=$CC
4628 while :; do
4629 # IRIX 6.2 and later do not support large files by default,
4630 # so use the C compiler's -n32 option if that helps.
4631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4632/* end confdefs.h. */
4633#include <sys/types.h>
4634 /* Check that off_t can represent 2**63 - 1 correctly.
4635 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4636 since some C++ compilers masquerading as C compilers
4637 incorrectly reject 9223372036854775807. */
4638#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4639 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4640 && LARGE_OFF_T % 2147483647 == 1)
4641 ? 1 : -1];
4642int
4643main ()
4644{
4645
4646 ;
4647 return 0;
4648}
4649_ACEOF
4650 if ac_fn_c_try_compile "$LINENO"; then :
4651 break
4652fi
4653rm -f core conftest.err conftest.$ac_objext
4654 CC="$CC -n32"
4655 if ac_fn_c_try_compile "$LINENO"; then :
4656 ac_cv_sys_largefile_CC=' -n32'; break
4657fi
4658rm -f core conftest.err conftest.$ac_objext
4659 break
4660 done
4661 CC=$ac_save_CC
4662 rm -f conftest.$ac_ext
4663 fi
4664fi
4665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4666$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4667 if test "$ac_cv_sys_largefile_CC" != no; then
4668 CC=$CC$ac_cv_sys_largefile_CC
4669 fi
4670
4671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4672$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 4673if ${ac_cv_sys_file_offset_bits+:} false; then :
da2f07f1
JK
4674 $as_echo_n "(cached) " >&6
4675else
4676 while :; do
4677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4678/* end confdefs.h. */
4679#include <sys/types.h>
4680 /* Check that off_t can represent 2**63 - 1 correctly.
4681 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4682 since some C++ compilers masquerading as C compilers
4683 incorrectly reject 9223372036854775807. */
4684#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4685 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4686 && LARGE_OFF_T % 2147483647 == 1)
4687 ? 1 : -1];
4688int
4689main ()
4690{
4691
4692 ;
4693 return 0;
4694}
4695_ACEOF
4696if ac_fn_c_try_compile "$LINENO"; then :
4697 ac_cv_sys_file_offset_bits=no; break
4698fi
4699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4701/* end confdefs.h. */
4702#define _FILE_OFFSET_BITS 64
4703#include <sys/types.h>
4704 /* Check that off_t can represent 2**63 - 1 correctly.
4705 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4706 since some C++ compilers masquerading as C compilers
4707 incorrectly reject 9223372036854775807. */
4708#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4709 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4710 && LARGE_OFF_T % 2147483647 == 1)
4711 ? 1 : -1];
4712int
4713main ()
4714{
4715
4716 ;
4717 return 0;
4718}
4719_ACEOF
4720if ac_fn_c_try_compile "$LINENO"; then :
4721 ac_cv_sys_file_offset_bits=64; break
4722fi
4723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4724 ac_cv_sys_file_offset_bits=unknown
4725 break
4726done
4727fi
4728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4729$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4730case $ac_cv_sys_file_offset_bits in #(
4731 no | unknown) ;;
4732 *)
4733cat >>confdefs.h <<_ACEOF
4734#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4735_ACEOF
4736;;
4737esac
4738rm -rf conftest*
4739 if test $ac_cv_sys_file_offset_bits = unknown; then
4740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4741$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 4742if ${ac_cv_sys_large_files+:} false; then :
da2f07f1
JK
4743 $as_echo_n "(cached) " >&6
4744else
4745 while :; do
4746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4747/* end confdefs.h. */
4748#include <sys/types.h>
4749 /* Check that off_t can represent 2**63 - 1 correctly.
4750 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4751 since some C++ compilers masquerading as C compilers
4752 incorrectly reject 9223372036854775807. */
4753#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4754 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4755 && LARGE_OFF_T % 2147483647 == 1)
4756 ? 1 : -1];
4757int
4758main ()
4759{
4760
4761 ;
4762 return 0;
4763}
4764_ACEOF
4765if ac_fn_c_try_compile "$LINENO"; then :
4766 ac_cv_sys_large_files=no; break
4767fi
4768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4770/* end confdefs.h. */
4771#define _LARGE_FILES 1
4772#include <sys/types.h>
4773 /* Check that off_t can represent 2**63 - 1 correctly.
4774 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4775 since some C++ compilers masquerading as C compilers
4776 incorrectly reject 9223372036854775807. */
4777#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4778 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4779 && LARGE_OFF_T % 2147483647 == 1)
4780 ? 1 : -1];
4781int
4782main ()
4783{
4784
4785 ;
4786 return 0;
4787}
4788_ACEOF
4789if ac_fn_c_try_compile "$LINENO"; then :
4790 ac_cv_sys_large_files=1; break
4791fi
4792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4793 ac_cv_sys_large_files=unknown
4794 break
4795done
4796fi
4797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4798$as_echo "$ac_cv_sys_large_files" >&6; }
4799case $ac_cv_sys_large_files in #(
4800 no | unknown) ;;
4801 *)
4802cat >>confdefs.h <<_ACEOF
4803#define _LARGE_FILES $ac_cv_sys_large_files
4804_ACEOF
4805;;
4806esac
4807rm -rf conftest*
4808 fi
d0ac1c44
SM
4809
4810
da2f07f1
JK
4811fi
4812
4813
4814
81ecdfbb
RW
4815
4816
4817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4818$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
d0ac1c44 4819if ${am_cv_prog_cc_stdc+:} false; then :
81ecdfbb
RW
4820 $as_echo_n "(cached) " >&6
4821else
4822 am_cv_prog_cc_stdc=no
4823ac_save_CC="$CC"
4824# Don't try gcc -ansi; that turns off useful extensions and
4825# breaks some systems' header files.
4826# AIX -qlanglvl=ansi
4827# Ultrix and OSF/1 -std1
4828# HP-UX 10.20 and later -Ae
4829# HP-UX older versions -Aa -D_HPUX_SOURCE
4830# SVR4 -Xc -D__EXTENSIONS__
4831for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4832do
783e057b 4833 CC="$ac_save_CC $ac_arg"
81ecdfbb 4834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4835/* end confdefs.h. */
4836#include <stdarg.h>
4837#include <stdio.h>
4838#include <sys/types.h>
4839#include <sys/stat.h>
4840/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4841struct buf { int x; };
4842FILE * (*rcsopen) (struct buf *, struct stat *, int);
4843static char *e (p, i)
4844 char **p;
4845 int i;
4846{
4847 return p[i];
4848}
4849static char *f (char * (*g) (char **, int), char **p, ...)
4850{
4851 char *s;
4852 va_list v;
4853 va_start (v,p);
4854 s = g (p, va_arg (v,int));
4855 va_end (v);
4856 return s;
4857}
4858int test (int i, double x);
4859struct s1 {int (*f) (int a);};
4860struct s2 {int (*f) (double a);};
4861int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4862int argc;
4863char **argv;
4864
4865int
4866main ()
4867{
4868
4869return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4870
4871 ;
4872 return 0;
4873}
4874_ACEOF
81ecdfbb 4875if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4876 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4877fi
81ecdfbb 4878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4879done
4880CC="$ac_save_CC"
4881
4882fi
4883
4884if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4886$as_echo "none needed" >&6; }
783e057b 4887else
81ecdfbb
RW
4888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4889$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4890fi
4891case "x$am_cv_prog_cc_stdc" in
4892 x|xno) ;;
4893 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4894esac
4895
d0ac1c44
SM
4896# Expand $ac_aux_dir to an absolute path.
4897am_aux_dir=`cd "$ac_aux_dir" && pwd`
4869db5e 4898
d0ac1c44 4899if test x"${install_sh+set}" != xset; then
4869db5e
RM
4900 case $am_aux_dir in
4901 *\ * | *\ *)
4902 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4903 *)
4904 install_sh="\${SHELL} $am_aux_dir/install-sh"
4905 esac
4906fi
4907
d0ac1c44
SM
4908# Installed binaries are usually stripped using 'strip' when the user
4909# run "make install-strip". However 'strip' might not be the right
4869db5e 4910# tool to use in cross-compilation environments, therefore Automake
d0ac1c44 4911# will honor the 'STRIP' environment variable to overrule this program.
4869db5e
RM
4912if test "$cross_compiling" != no; then
4913 if test -n "$ac_tool_prefix"; then
4914 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4915set dummy ${ac_tool_prefix}strip; ac_word=$2
4916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4917$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4918if ${ac_cv_prog_STRIP+:} false; then :
4869db5e
RM
4919 $as_echo_n "(cached) " >&6
4920else
4921 if test -n "$STRIP"; then
4922 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4923else
4924as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4925for as_dir in $PATH
4926do
4927 IFS=$as_save_IFS
4928 test -z "$as_dir" && as_dir=.
4929 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4930 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
4931 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4932 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4933 break 2
4934 fi
4935done
4936 done
4937IFS=$as_save_IFS
4938
4939fi
4940fi
4941STRIP=$ac_cv_prog_STRIP
4942if test -n "$STRIP"; then
4943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4944$as_echo "$STRIP" >&6; }
4945else
4946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4947$as_echo "no" >&6; }
4948fi
4949
4950
4951fi
4952if test -z "$ac_cv_prog_STRIP"; then
4953 ac_ct_STRIP=$STRIP
4954 # Extract the first word of "strip", so it can be a program name with args.
4955set dummy strip; ac_word=$2
4956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4957$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4958if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4869db5e
RM
4959 $as_echo_n "(cached) " >&6
4960else
4961 if test -n "$ac_ct_STRIP"; then
4962 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4963else
4964as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4965for as_dir in $PATH
4966do
4967 IFS=$as_save_IFS
4968 test -z "$as_dir" && as_dir=.
4969 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4970 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
4971 ac_cv_prog_ac_ct_STRIP="strip"
4972 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4973 break 2
4974 fi
4975done
4976 done
4977IFS=$as_save_IFS
4978
4979fi
4980fi
4981ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4982if test -n "$ac_ct_STRIP"; then
4983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4984$as_echo "$ac_ct_STRIP" >&6; }
4985else
4986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4987$as_echo "no" >&6; }
4988fi
4989
4990 if test "x$ac_ct_STRIP" = x; then
4991 STRIP=":"
4992 else
4993 case $cross_compiling:$ac_tool_warned in
4994yes:)
4995{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4996$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4997ac_tool_warned=yes ;;
4998esac
4999 STRIP=$ac_ct_STRIP
5000 fi
5001else
5002 STRIP="$ac_cv_prog_STRIP"
5003fi
5004
5005fi
5006INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5007
783e057b
DJ
5008
5009ac_aux_dir=
81ecdfbb 5010for ac_dir in .. "$srcdir"/..; do
d0ac1c44
SM
5011 if test -f "$ac_dir/install-sh"; then
5012 ac_aux_dir=$ac_dir
5013 ac_install_sh="$ac_aux_dir/install-sh -c"
5014 break
5015 elif test -f "$ac_dir/install.sh"; then
5016 ac_aux_dir=$ac_dir
5017 ac_install_sh="$ac_aux_dir/install.sh -c"
5018 break
5019 elif test -f "$ac_dir/shtool"; then
5020 ac_aux_dir=$ac_dir
5021 ac_install_sh="$ac_aux_dir/shtool install -c"
5022 break
5023 fi
783e057b
DJ
5024done
5025if test -z "$ac_aux_dir"; then
d0ac1c44 5026 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 5027fi
81ecdfbb
RW
5028
5029# These three variables are undocumented and unsupported,
5030# and are intended to be withdrawn in a future Autoconf release.
5031# They can cause serious problems if a builder's source tree is in a directory
5032# whose full name contains unusual characters.
5033ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5034ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5035ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5036
783e057b 5037
783e057b 5038
9009e1ae
MR
5039test "$program_prefix" != NONE &&
5040 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5041# Use a double $ so make ignores it.
5042test "$program_suffix" != NONE &&
5043 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5044# Double any \ or $.
5045# By default was `s,x,x', remove it if useless.
5046ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5047program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5048
81ecdfbb 5049
0bcda685
PA
5050# We require a C++11 compiler. Check if one is available, and if
5051# necessary, set CXX_DIALECT to some -std=xxx switch.
5052
41260ac2 5053 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
0bcda685
PA
5054 ac_ext=cpp
5055ac_cpp='$CXXCPP $CPPFLAGS'
5056ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5057ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5058ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5059 CXX_DIALECT=""
5060 ac_success=no
5061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5062$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
d0ac1c44 5063if ${ax_cv_cxx_compile_cxx11+:} false; then :
0bcda685
PA
5064 $as_echo_n "(cached) " >&6
5065else
5066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5067/* end confdefs.h. */
5068
5069
5070// If the compiler admits that it is not ready for C++11, why torture it?
5071// Hopefully, this will speed up the test.
5072
5073#ifndef __cplusplus
5074
5075#error "This is not a C++ compiler"
5076
5077#elif __cplusplus < 201103L
5078
5079#error "This is not a C++11 compiler"
5080
5081#else
5082
5083namespace cxx11
5084{
5085
5086 namespace test_static_assert
5087 {
5088
5089 template <typename T>
5090 struct check
5091 {
5092 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5093 };
5094
5095 }
5096
5097 namespace test_final_override
5098 {
5099
5100 struct Base
5101 {
5102 virtual void f() {}
5103 };
5104
5105 struct Derived : public Base
5106 {
5107 virtual void f() override {}
5108 };
5109
5110 }
5111
5112 namespace test_double_right_angle_brackets
5113 {
5114
5115 template < typename T >
5116 struct check {};
5117
5118 typedef check<void> single_type;
5119 typedef check<check<void>> double_type;
5120 typedef check<check<check<void>>> triple_type;
5121 typedef check<check<check<check<void>>>> quadruple_type;
5122
5123 }
5124
5125 namespace test_decltype
5126 {
5127
5128 int
5129 f()
5130 {
5131 int a = 1;
5132 decltype(a) b = 2;
5133 return a + b;
5134 }
5135
5136 }
5137
5138 namespace test_type_deduction
5139 {
5140
5141 template < typename T1, typename T2 >
5142 struct is_same
5143 {
5144 static const bool value = false;
5145 };
5146
5147 template < typename T >
5148 struct is_same<T, T>
5149 {
5150 static const bool value = true;
5151 };
5152
5153 template < typename T1, typename T2 >
5154 auto
5155 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5156 {
5157 return a1 + a2;
5158 }
5159
5160 int
5161 test(const int c, volatile int v)
5162 {
5163 static_assert(is_same<int, decltype(0)>::value == true, "");
5164 static_assert(is_same<int, decltype(c)>::value == false, "");
5165 static_assert(is_same<int, decltype(v)>::value == false, "");
5166 auto ac = c;
5167 auto av = v;
5168 auto sumi = ac + av + 'x';
5169 auto sumf = ac + av + 1.0;
5170 static_assert(is_same<int, decltype(ac)>::value == true, "");
5171 static_assert(is_same<int, decltype(av)>::value == true, "");
5172 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5173 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5174 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5175 return (sumf > 0.0) ? sumi : add(c, v);
5176 }
5177
5178 }
5179
5180 namespace test_noexcept
5181 {
5182
5183 int f() { return 0; }
5184 int g() noexcept { return 0; }
5185
5186 static_assert(noexcept(f()) == false, "");
5187 static_assert(noexcept(g()) == true, "");
5188
5189 }
5190
5191 namespace test_constexpr
5192 {
5193
5194 template < typename CharT >
5195 unsigned long constexpr
5196 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5197 {
5198 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5199 }
5200
5201 template < typename CharT >
5202 unsigned long constexpr
5203 strlen_c(const CharT *const s) noexcept
5204 {
5205 return strlen_c_r(s, 0UL);
5206 }
5207
5208 static_assert(strlen_c("") == 0UL, "");
5209 static_assert(strlen_c("1") == 1UL, "");
5210 static_assert(strlen_c("example") == 7UL, "");
5211 static_assert(strlen_c("another\0example") == 7UL, "");
5212
5213 }
5214
5215 namespace test_rvalue_references
5216 {
5217
5218 template < int N >
5219 struct answer
5220 {
5221 static constexpr int value = N;
5222 };
5223
5224 answer<1> f(int&) { return answer<1>(); }
5225 answer<2> f(const int&) { return answer<2>(); }
5226 answer<3> f(int&&) { return answer<3>(); }
5227
5228 void
5229 test()
5230 {
5231 int i = 0;
5232 const int c = 0;
5233 static_assert(decltype(f(i))::value == 1, "");
5234 static_assert(decltype(f(c))::value == 2, "");
5235 static_assert(decltype(f(0))::value == 3, "");
5236 }
5237
5238 }
5239
5240 namespace test_uniform_initialization
5241 {
5242
5243 struct test
5244 {
5245 static const int zero {};
5246 static const int one {1};
5247 };
5248
5249 static_assert(test::zero == 0, "");
5250 static_assert(test::one == 1, "");
5251
5252 }
5253
5254 namespace test_lambdas
5255 {
5256
5257 void
5258 test1()
5259 {
5260 auto lambda1 = [](){};
5261 auto lambda2 = lambda1;
5262 lambda1();
5263 lambda2();
5264 }
5265
5266 int
5267 test2()
5268 {
5269 auto a = [](int i, int j){ return i + j; }(1, 2);
5270 auto b = []() -> int { return '0'; }();
5271 auto c = [=](){ return a + b; }();
5272 auto d = [&](){ return c; }();
5273 auto e = [a, &b](int x) mutable {
5274 const auto identity = [](int y){ return y; };
5275 for (auto i = 0; i < a; ++i)
5276 a += b--;
5277 return x + identity(a + b);
5278 }(0);
5279 return a + b + c + d + e;
5280 }
5281
5282 int
5283 test3()
5284 {
5285 const auto nullary = [](){ return 0; };
5286 const auto unary = [](int x){ return x; };
5287 using nullary_t = decltype(nullary);
5288 using unary_t = decltype(unary);
5289 const auto higher1st = [](nullary_t f){ return f(); };
5290 const auto higher2nd = [unary](nullary_t f1){
5291 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5292 };
5293 return higher1st(nullary) + higher2nd(nullary)(unary);
5294 }
5295
5296 }
5297
5298 namespace test_variadic_templates
5299 {
5300
5301 template <int...>
5302 struct sum;
5303
5304 template <int N0, int... N1toN>
5305 struct sum<N0, N1toN...>
5306 {
5307 static constexpr auto value = N0 + sum<N1toN...>::value;
5308 };
5309
5310 template <>
5311 struct sum<>
5312 {
5313 static constexpr auto value = 0;
5314 };
5315
5316 static_assert(sum<>::value == 0, "");
5317 static_assert(sum<1>::value == 1, "");
5318 static_assert(sum<23>::value == 23, "");
5319 static_assert(sum<1, 2>::value == 3, "");
5320 static_assert(sum<5, 5, 11>::value == 21, "");
5321 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5322
5323 }
5324
5325 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5326 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5327 // because of this.
5328 namespace test_template_alias_sfinae
5329 {
5330
5331 struct foo {};
5332
5333 template<typename T>
5334 using member = typename T::member_type;
5335
5336 template<typename T>
5337 void func(...) {}
5338
5339 template<typename T>
5340 void func(member<T>*) {}
5341
5342 void test();
5343
5344 void test() { func<foo>(0); }
5345
5346 }
5347
5348} // namespace cxx11
5349
5350#endif // __cplusplus >= 201103L
5351
5352
5353
5354_ACEOF
5355if ac_fn_cxx_try_compile "$LINENO"; then :
5356 ax_cv_cxx_compile_cxx11=yes
5357else
5358 ax_cv_cxx_compile_cxx11=no
5359fi
5360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5361fi
5362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5363$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5364 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5365 ac_success=yes
5366 fi
5367
5368 if test x$ac_success = xno; then
41260ac2
SM
5369 for alternative in ${ax_cxx_compile_alternatives}; do
5370 switch="-std=gnu++${alternative}"
0bcda685
PA
5371 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5373$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5374if eval \${$cachevar+:} false; then :
0bcda685
PA
5375 $as_echo_n "(cached) " >&6
5376else
5377 ac_save_CXX="$CXX"
5378 CXX="$CXX $switch"
5379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5380/* end confdefs.h. */
5381
5382
5383// If the compiler admits that it is not ready for C++11, why torture it?
5384// Hopefully, this will speed up the test.
5385
5386#ifndef __cplusplus
5387
5388#error "This is not a C++ compiler"
5389
5390#elif __cplusplus < 201103L
5391
5392#error "This is not a C++11 compiler"
5393
5394#else
5395
5396namespace cxx11
5397{
5398
5399 namespace test_static_assert
5400 {
5401
5402 template <typename T>
5403 struct check
5404 {
5405 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5406 };
5407
5408 }
5409
5410 namespace test_final_override
5411 {
5412
5413 struct Base
5414 {
5415 virtual void f() {}
5416 };
5417
5418 struct Derived : public Base
5419 {
5420 virtual void f() override {}
5421 };
5422
5423 }
5424
5425 namespace test_double_right_angle_brackets
5426 {
5427
5428 template < typename T >
5429 struct check {};
5430
5431 typedef check<void> single_type;
5432 typedef check<check<void>> double_type;
5433 typedef check<check<check<void>>> triple_type;
5434 typedef check<check<check<check<void>>>> quadruple_type;
5435
5436 }
5437
5438 namespace test_decltype
5439 {
5440
5441 int
5442 f()
5443 {
5444 int a = 1;
5445 decltype(a) b = 2;
5446 return a + b;
5447 }
5448
5449 }
5450
5451 namespace test_type_deduction
5452 {
5453
5454 template < typename T1, typename T2 >
5455 struct is_same
5456 {
5457 static const bool value = false;
5458 };
5459
5460 template < typename T >
5461 struct is_same<T, T>
5462 {
5463 static const bool value = true;
5464 };
5465
5466 template < typename T1, typename T2 >
5467 auto
5468 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5469 {
5470 return a1 + a2;
5471 }
5472
5473 int
5474 test(const int c, volatile int v)
5475 {
5476 static_assert(is_same<int, decltype(0)>::value == true, "");
5477 static_assert(is_same<int, decltype(c)>::value == false, "");
5478 static_assert(is_same<int, decltype(v)>::value == false, "");
5479 auto ac = c;
5480 auto av = v;
5481 auto sumi = ac + av + 'x';
5482 auto sumf = ac + av + 1.0;
5483 static_assert(is_same<int, decltype(ac)>::value == true, "");
5484 static_assert(is_same<int, decltype(av)>::value == true, "");
5485 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5486 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5487 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5488 return (sumf > 0.0) ? sumi : add(c, v);
5489 }
5490
5491 }
5492
5493 namespace test_noexcept
5494 {
5495
5496 int f() { return 0; }
5497 int g() noexcept { return 0; }
5498
5499 static_assert(noexcept(f()) == false, "");
5500 static_assert(noexcept(g()) == true, "");
5501
5502 }
5503
5504 namespace test_constexpr
5505 {
5506
5507 template < typename CharT >
5508 unsigned long constexpr
5509 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5510 {
5511 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5512 }
5513
5514 template < typename CharT >
5515 unsigned long constexpr
5516 strlen_c(const CharT *const s) noexcept
5517 {
5518 return strlen_c_r(s, 0UL);
5519 }
5520
5521 static_assert(strlen_c("") == 0UL, "");
5522 static_assert(strlen_c("1") == 1UL, "");
5523 static_assert(strlen_c("example") == 7UL, "");
5524 static_assert(strlen_c("another\0example") == 7UL, "");
5525
5526 }
5527
5528 namespace test_rvalue_references
5529 {
5530
5531 template < int N >
5532 struct answer
5533 {
5534 static constexpr int value = N;
5535 };
5536
5537 answer<1> f(int&) { return answer<1>(); }
5538 answer<2> f(const int&) { return answer<2>(); }
5539 answer<3> f(int&&) { return answer<3>(); }
5540
5541 void
5542 test()
5543 {
5544 int i = 0;
5545 const int c = 0;
5546 static_assert(decltype(f(i))::value == 1, "");
5547 static_assert(decltype(f(c))::value == 2, "");
5548 static_assert(decltype(f(0))::value == 3, "");
5549 }
5550
5551 }
5552
5553 namespace test_uniform_initialization
5554 {
5555
5556 struct test
5557 {
5558 static const int zero {};
5559 static const int one {1};
5560 };
5561
5562 static_assert(test::zero == 0, "");
5563 static_assert(test::one == 1, "");
5564
5565 }
5566
5567 namespace test_lambdas
5568 {
5569
5570 void
5571 test1()
5572 {
5573 auto lambda1 = [](){};
5574 auto lambda2 = lambda1;
5575 lambda1();
5576 lambda2();
5577 }
5578
5579 int
5580 test2()
5581 {
5582 auto a = [](int i, int j){ return i + j; }(1, 2);
5583 auto b = []() -> int { return '0'; }();
5584 auto c = [=](){ return a + b; }();
5585 auto d = [&](){ return c; }();
5586 auto e = [a, &b](int x) mutable {
5587 const auto identity = [](int y){ return y; };
5588 for (auto i = 0; i < a; ++i)
5589 a += b--;
5590 return x + identity(a + b);
5591 }(0);
5592 return a + b + c + d + e;
5593 }
5594
5595 int
5596 test3()
5597 {
5598 const auto nullary = [](){ return 0; };
5599 const auto unary = [](int x){ return x; };
5600 using nullary_t = decltype(nullary);
5601 using unary_t = decltype(unary);
5602 const auto higher1st = [](nullary_t f){ return f(); };
5603 const auto higher2nd = [unary](nullary_t f1){
5604 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5605 };
5606 return higher1st(nullary) + higher2nd(nullary)(unary);
5607 }
5608
5609 }
5610
5611 namespace test_variadic_templates
5612 {
5613
5614 template <int...>
5615 struct sum;
5616
5617 template <int N0, int... N1toN>
5618 struct sum<N0, N1toN...>
5619 {
5620 static constexpr auto value = N0 + sum<N1toN...>::value;
5621 };
5622
5623 template <>
5624 struct sum<>
5625 {
5626 static constexpr auto value = 0;
5627 };
5628
5629 static_assert(sum<>::value == 0, "");
5630 static_assert(sum<1>::value == 1, "");
5631 static_assert(sum<23>::value == 23, "");
5632 static_assert(sum<1, 2>::value == 3, "");
5633 static_assert(sum<5, 5, 11>::value == 21, "");
5634 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5635
5636 }
5637
5638 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5639 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5640 // because of this.
5641 namespace test_template_alias_sfinae
5642 {
5643
5644 struct foo {};
5645
5646 template<typename T>
5647 using member = typename T::member_type;
5648
5649 template<typename T>
5650 void func(...) {}
5651
5652 template<typename T>
5653 void func(member<T>*) {}
5654
5655 void test();
5656
5657 void test() { func<foo>(0); }
5658
5659 }
5660
5661} // namespace cxx11
5662
5663#endif // __cplusplus >= 201103L
5664
5665
5666
5667_ACEOF
5668if ac_fn_cxx_try_compile "$LINENO"; then :
5669 eval $cachevar=yes
5670else
5671 eval $cachevar=no
5672fi
5673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5674 CXX="$ac_save_CXX"
5675fi
5676eval ac_res=\$$cachevar
5677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5678$as_echo "$ac_res" >&6; }
5679 if eval test x\$$cachevar = xyes; then
5680 CXX_DIALECT="$switch"
5681 ac_success=yes
5682 break
5683 fi
5684 done
5685 fi
5686
5687 if test x$ac_success = xno; then
41260ac2
SM
5688 for alternative in ${ax_cxx_compile_alternatives}; do
5689 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5690 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
0bcda685 5692$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5693if eval \${$cachevar+:} false; then :
0bcda685
PA
5694 $as_echo_n "(cached) " >&6
5695else
5696 ac_save_CXX="$CXX"
41260ac2
SM
5697 CXX="$CXX $switch"
5698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0bcda685
PA
5699/* end confdefs.h. */
5700
5701
5702// If the compiler admits that it is not ready for C++11, why torture it?
5703// Hopefully, this will speed up the test.
5704
5705#ifndef __cplusplus
5706
5707#error "This is not a C++ compiler"
5708
5709#elif __cplusplus < 201103L
5710
5711#error "This is not a C++11 compiler"
5712
5713#else
5714
5715namespace cxx11
5716{
5717
5718 namespace test_static_assert
5719 {
5720
5721 template <typename T>
5722 struct check
5723 {
5724 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5725 };
5726
5727 }
5728
5729 namespace test_final_override
5730 {
5731
5732 struct Base
5733 {
5734 virtual void f() {}
5735 };
5736
5737 struct Derived : public Base
5738 {
5739 virtual void f() override {}
5740 };
5741
5742 }
5743
5744 namespace test_double_right_angle_brackets
5745 {
5746
5747 template < typename T >
5748 struct check {};
5749
5750 typedef check<void> single_type;
5751 typedef check<check<void>> double_type;
5752 typedef check<check<check<void>>> triple_type;
5753 typedef check<check<check<check<void>>>> quadruple_type;
5754
5755 }
5756
5757 namespace test_decltype
5758 {
5759
5760 int
5761 f()
5762 {
5763 int a = 1;
5764 decltype(a) b = 2;
5765 return a + b;
5766 }
5767
5768 }
5769
5770 namespace test_type_deduction
5771 {
5772
5773 template < typename T1, typename T2 >
5774 struct is_same
5775 {
5776 static const bool value = false;
5777 };
5778
5779 template < typename T >
5780 struct is_same<T, T>
5781 {
5782 static const bool value = true;
5783 };
5784
5785 template < typename T1, typename T2 >
5786 auto
5787 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5788 {
5789 return a1 + a2;
5790 }
5791
5792 int
5793 test(const int c, volatile int v)
5794 {
5795 static_assert(is_same<int, decltype(0)>::value == true, "");
5796 static_assert(is_same<int, decltype(c)>::value == false, "");
5797 static_assert(is_same<int, decltype(v)>::value == false, "");
5798 auto ac = c;
5799 auto av = v;
5800 auto sumi = ac + av + 'x';
5801 auto sumf = ac + av + 1.0;
5802 static_assert(is_same<int, decltype(ac)>::value == true, "");
5803 static_assert(is_same<int, decltype(av)>::value == true, "");
5804 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5805 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5806 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5807 return (sumf > 0.0) ? sumi : add(c, v);
5808 }
5809
5810 }
5811
5812 namespace test_noexcept
5813 {
5814
5815 int f() { return 0; }
5816 int g() noexcept { return 0; }
5817
5818 static_assert(noexcept(f()) == false, "");
5819 static_assert(noexcept(g()) == true, "");
5820
5821 }
5822
5823 namespace test_constexpr
5824 {
5825
5826 template < typename CharT >
5827 unsigned long constexpr
5828 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5829 {
5830 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5831 }
5832
5833 template < typename CharT >
5834 unsigned long constexpr
5835 strlen_c(const CharT *const s) noexcept
5836 {
5837 return strlen_c_r(s, 0UL);
5838 }
5839
5840 static_assert(strlen_c("") == 0UL, "");
5841 static_assert(strlen_c("1") == 1UL, "");
5842 static_assert(strlen_c("example") == 7UL, "");
5843 static_assert(strlen_c("another\0example") == 7UL, "");
5844
5845 }
5846
5847 namespace test_rvalue_references
5848 {
5849
5850 template < int N >
5851 struct answer
5852 {
5853 static constexpr int value = N;
5854 };
5855
5856 answer<1> f(int&) { return answer<1>(); }
5857 answer<2> f(const int&) { return answer<2>(); }
5858 answer<3> f(int&&) { return answer<3>(); }
5859
5860 void
5861 test()
5862 {
5863 int i = 0;
5864 const int c = 0;
5865 static_assert(decltype(f(i))::value == 1, "");
5866 static_assert(decltype(f(c))::value == 2, "");
5867 static_assert(decltype(f(0))::value == 3, "");
5868 }
5869
5870 }
5871
5872 namespace test_uniform_initialization
5873 {
5874
5875 struct test
5876 {
5877 static const int zero {};
5878 static const int one {1};
5879 };
5880
5881 static_assert(test::zero == 0, "");
5882 static_assert(test::one == 1, "");
5883
5884 }
5885
5886 namespace test_lambdas
5887 {
5888
5889 void
5890 test1()
5891 {
5892 auto lambda1 = [](){};
5893 auto lambda2 = lambda1;
5894 lambda1();
5895 lambda2();
5896 }
5897
5898 int
5899 test2()
5900 {
5901 auto a = [](int i, int j){ return i + j; }(1, 2);
5902 auto b = []() -> int { return '0'; }();
5903 auto c = [=](){ return a + b; }();
5904 auto d = [&](){ return c; }();
5905 auto e = [a, &b](int x) mutable {
5906 const auto identity = [](int y){ return y; };
5907 for (auto i = 0; i < a; ++i)
5908 a += b--;
5909 return x + identity(a + b);
5910 }(0);
5911 return a + b + c + d + e;
5912 }
5913
5914 int
5915 test3()
5916 {
5917 const auto nullary = [](){ return 0; };
5918 const auto unary = [](int x){ return x; };
5919 using nullary_t = decltype(nullary);
5920 using unary_t = decltype(unary);
5921 const auto higher1st = [](nullary_t f){ return f(); };
5922 const auto higher2nd = [unary](nullary_t f1){
5923 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5924 };
5925 return higher1st(nullary) + higher2nd(nullary)(unary);
5926 }
5927
5928 }
5929
5930 namespace test_variadic_templates
5931 {
5932
5933 template <int...>
5934 struct sum;
5935
5936 template <int N0, int... N1toN>
5937 struct sum<N0, N1toN...>
5938 {
5939 static constexpr auto value = N0 + sum<N1toN...>::value;
5940 };
5941
5942 template <>
5943 struct sum<>
5944 {
5945 static constexpr auto value = 0;
5946 };
5947
5948 static_assert(sum<>::value == 0, "");
5949 static_assert(sum<1>::value == 1, "");
5950 static_assert(sum<23>::value == 23, "");
5951 static_assert(sum<1, 2>::value == 3, "");
5952 static_assert(sum<5, 5, 11>::value == 21, "");
5953 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5954
5955 }
5956
5957 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5958 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5959 // because of this.
5960 namespace test_template_alias_sfinae
5961 {
5962
5963 struct foo {};
5964
5965 template<typename T>
5966 using member = typename T::member_type;
5967
5968 template<typename T>
5969 void func(...) {}
5970
5971 template<typename T>
5972 void func(member<T>*) {}
5973
5974 void test();
5975
5976 void test() { func<foo>(0); }
5977
5978 }
5979
5980} // namespace cxx11
5981
5982#endif // __cplusplus >= 201103L
5983
5984
5985
5986_ACEOF
5987if ac_fn_cxx_try_compile "$LINENO"; then :
5988 eval $cachevar=yes
5989else
5990 eval $cachevar=no
5991fi
5992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41260ac2 5993 CXX="$ac_save_CXX"
0bcda685
PA
5994fi
5995eval ac_res=\$$cachevar
5996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5997$as_echo "$ac_res" >&6; }
41260ac2
SM
5998 if eval test x\$$cachevar = xyes; then
5999 CXX_DIALECT="$switch"
6000 ac_success=yes
6001 break
6002 fi
6003 done
6004 if test x$ac_success = xyes; then
0bcda685
PA
6005 break
6006 fi
6007 done
6008 fi
6009 ac_ext=c
6010ac_cpp='$CPP $CPPFLAGS'
6011ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6012ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6013ac_compiler_gnu=$ac_cv_c_compiler_gnu
6014
6015 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6016 if test x$ac_success = xno; then
d0ac1c44 6017 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
0bcda685
PA
6018 fi
6019 fi
6020 if test x$ac_success = xno; then
6021 HAVE_CXX11=0
6022 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6023$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6024 else
6025 HAVE_CXX11=1
6026
6027$as_echo "#define HAVE_CXX11 1" >>confdefs.h
6028
6029 fi
6030
6031
6032
6033
a417dc56
RW
6034# Dependency checking.
6035rm -rf .tst 2>/dev/null
6036mkdir .tst 2>/dev/null
6037if test -d .tst; then
6038 am__leading_dot=.
6039else
6040 am__leading_dot=_
6041fi
6042rmdir .tst 2>/dev/null
6043
6044DEPDIR="${am__leading_dot}deps"
6045
81ecdfbb 6046ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
6047
6048
6049depcc="$CC" am_compiler_list=
6050
6051am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
6052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6053$as_echo_n "checking dependency style of $depcc... " >&6; }
d0ac1c44 6054if ${am_cv_CC_dependencies_compiler_type+:} false; then :
81ecdfbb 6055 $as_echo_n "(cached) " >&6
a417dc56
RW
6056else
6057 if test -f "$am_depcomp"; then
6058 # We make a subdir and do the tests there. Otherwise we can end up
6059 # making bogus files that we don't know about and never remove. For
6060 # instance it was reported that on HP-UX the gcc test will end up
6061 # making a dummy file named `D' -- because `-MD' means `put the output
6062 # in D'.
6063 mkdir conftest.dir
6064 # Copy depcomp to subdir because otherwise we won't find it if we're
6065 # using a relative directory.
6066 cp "$am_depcomp" conftest.dir
6067 cd conftest.dir
6068 # We will build objects and dependencies in a subdirectory because
6069 # it helps to detect inapplicable dependency modes. For instance
6070 # both Tru64's cc and ICC support -MD to output dependencies as a
6071 # side effect of compilation, but ICC will put the dependencies in
6072 # the current directory while Tru64 will put them in the object
6073 # directory.
6074 mkdir sub
6075
6076 am_cv_CC_dependencies_compiler_type=none
6077 if test "$am_compiler_list" = ""; then
6078 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6079 fi
6080 for depmode in $am_compiler_list; do
6081 if test $depmode = none; then break; fi
6082
81ecdfbb 6083 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
6084 # Setup a source with many dependencies, because some compilers
6085 # like to wrap large dependency lists on column 80 (with \), and
6086 # we should not choose a depcomp mode which is confused by this.
6087 #
6088 # We need to recreate these files for each test, as the compiler may
6089 # overwrite some of them when testing with obscure command lines.
6090 # This happens at least with the AIX C compiler.
6091 : > sub/conftest.c
6092 for i in 1 2 3 4 5 6; do
6093 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6094 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6095 # Solaris 8's {/usr,}/bin/sh.
6096 touch sub/conftst$i.h
6097 done
6098 echo "include sub/conftest.Po" > confmf
6099
6100 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6101 # mode. It turns out that the SunPro C++ compiler does not properly
6102 # handle `-M -o', and we need to detect this.
6103 depcmd="depmode=$depmode \
6104 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6105 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6106 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6107 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6108 if env $depcmd > conftest.err 2>&1 &&
6109 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6110 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6111 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6112 # icc doesn't choke on unknown options, it will just issue warnings
6113 # or remarks (even with -Werror). So we grep stderr for any message
6114 # that says an option was ignored or not supported.
6115 # When given -MP, icc 7.0 and 7.1 complain thusly:
6116 # icc: Command line warning: ignoring option '-M'; no argument required
6117 # The diagnosis changed in icc 8.0:
6118 # icc: Command line remark: option '-MP' not supported
6119 if (grep 'ignoring option' conftest.err ||
6120 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6121 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 6122 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
6123 break
6124 fi
6125 fi
81ecdfbb 6126 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
6127 sed -e 's/^/| /' < conftest.err >&5
6128 done
6129
6130 cd ..
6131 rm -rf conftest.dir
6132else
6133 am_cv_CC_dependencies_compiler_type=none
6134fi
6135
6136fi
81ecdfbb
RW
6137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6138$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 6139if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
d0ac1c44 6140then as_fn_error $? "no usable dependency style found" "$LINENO" 5
a417dc56
RW
6141else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6142
6143fi
6144
6145
648d586d
JB
6146gnulib_extra_configure_args=
6147# If large-file support is disabled, make sure gnulib does the same.
6148if test "$enable_largefile" = no; then
6149gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
6150fi
6151
c971b7fa
PA
6152# Configure gnulib. We need to build gnulib under some other
6153# directory not "gnulib", to avoid the problem of both GDB and
6154# GDBserver wanting to build it in the same directory, when building
6155# in the source dir.
783e057b 6156
c971b7fa
PA
6157 in_src="gnulib"
6158 in_build="build-gnulib"
648d586d 6159 in_extra_args="$gnulib_extra_configure_args"
c971b7fa
PA
6160
6161 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
6162 # so they do not pile up.
6163 ac_sub_configure_args=
6164 ac_prev=
6165 eval "set x $ac_configure_args"
6166 shift
6167 for ac_arg
6168 do
6169 if test -n "$ac_prev"; then
6170 ac_prev=
6171 continue
6172 fi
6173 case $ac_arg in
6174 -cache-file | --cache-file | --cache-fil | --cache-fi \
6175 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6176 ac_prev=cache_file ;;
6177 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6178 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
6179 | --c=*)
6180 ;;
6181 --config-cache | -C)
6182 ;;
6183 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6184 ac_prev=srcdir ;;
6185 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6186 ;;
6187 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
6188 ac_prev=prefix ;;
6189 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
6190 ;;
6191 --disable-option-checking)
6192 ;;
6193 *)
6194 case $ac_arg in
6195 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6196 esac
6197 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
6198 esac
6199 done
6200
6201 # Always prepend --prefix to ensure using the same prefix
6202 # in subdir configurations.
6203 ac_arg="--prefix=$prefix"
6204 case $ac_arg in
6205 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6206 esac
6207 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
6208
6209 # Pass --silent
6210 if test "$silent" = yes; then
6211 ac_sub_configure_args="--silent $ac_sub_configure_args"
6212 fi
6213
6214 # Always prepend --disable-option-checking to silence warnings, since
6215 # different subdirs can have different --enable and --with options.
6216 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
6217
6218 ac_popdir=`pwd`
6219 ac_dir=$in_build
6220
6221 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
6222 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
6223 $as_echo "$ac_msg" >&6
6224 as_dir="$ac_dir"; as_fn_mkdir_p
6225
38ea300a
PA
6226 case $srcdir in
6227 [\\/]* | ?:[\\/]* )
6228 ac_srcdir=$srcdir/$in_src ;;
6229 *) # Relative name.
6230 ac_srcdir=../$srcdir/$in_src ;;
6231 esac
c971b7fa
PA
6232
6233 cd "$ac_dir"
6234
6235 ac_sub_configure=$ac_srcdir/configure
6236
6237 # Make the cache file name correct relative to the subdirectory.
6238 case $cache_file in
6239 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
6240 *) # Relative name.
6241 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
6242 esac
6243
648d586d
JB
6244 if test -n "$in_extra_args"; then
6245 # Add the extra args at the end.
6246 ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
6247 fi
6248
c971b7fa
PA
6249 { $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
6250$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
6251 # The eval makes quoting arguments work.
6252 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
6253 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 6254 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c971b7fa
PA
6255
6256 cd "$ac_popdir"
783e057b 6257
c971b7fa
PA
6258
6259
6260CONFIG_OBS=
6261CONFIG_DEPS=
6262CONFIG_SRCS=
6263ENABLE_CFLAGS=
6264
6265CONFIG_ALL=
6266CONFIG_CLEAN=
6267CONFIG_INSTALL=
6268CONFIG_UNINSTALL=
6269
6270# If we haven't got the data from the intl directory,
6271# assume NLS is disabled.
6272USE_NLS=no
6273LIBINTL=
6274LIBINTL_DEP=
6275INCINTL=
6276XGETTEXT=
6277GMSGFMT=
6278POSUB=
783e057b
DJ
6279
6280if test -f ../intl/config.intl; then
6281 . ../intl/config.intl
6282fi
81ecdfbb
RW
6283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6284$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 6285if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
6286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6287$as_echo "no" >&6; }
783e057b 6288else
81ecdfbb
RW
6289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6290$as_echo "yes" >&6; }
783e057b 6291
81ecdfbb 6292$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
6293
6294
81ecdfbb
RW
6295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6296$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
6297 # Look for .po and .gmo files in the source directory.
6298 CATALOGS=
6299 XLINGUAS=
6300 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6301 # If there aren't any .gmo files the shell will give us the
6302 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6303 # weeded out.
6304 case "$cat" in *\**)
6305 continue;;
6306 esac
6307 # The quadruple backslash is collapsed to a double backslash
6308 # by the backticks, then collapsed again by the double quotes,
6309 # leaving us with one backslash in the sed expression (right
6310 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
6311 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6312 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6313 # The user is allowed to set LINGUAS to a list of languages to
6314 # install catalogs for. If it's empty that means "all of them."
6315 if test "x$LINGUAS" = x; then
6316 CATALOGS="$CATALOGS $cat"
6317 XLINGUAS="$XLINGUAS $lang"
6318 else
6319 case "$LINGUAS" in *$lang*)
6320 CATALOGS="$CATALOGS $cat"
6321 XLINGUAS="$XLINGUAS $lang"
6322 ;;
6323 esac
e28b3332
DJ
6324 fi
6325 done
c971b7fa
PA
6326 LINGUAS="$XLINGUAS"
6327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6328$as_echo "$LINGUAS" >&6; }
6329
6330
6331 DATADIRNAME=share
6332
6333 INSTOBJEXT=.mo
6334
6335 GENCAT=gencat
6336
6337 CATOBJEXT=.gmo
e28b3332 6338
e28b3332
DJ
6339fi
6340
c971b7fa
PA
6341localedir='${datadir}/locale'
6342
6343
6344if test x"$USE_NLS" = xyes; then
6345 CONFIG_ALL="$CONFIG_ALL all-po"
6346 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6347 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6348 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 6349fi
e28b3332 6350
c971b7fa
PA
6351GNULIB=build-gnulib/import
6352
6353# For Makefile dependencies.
6354GNULIB_STDINT_H=
6355if test x"$STDINT_H" != x; then
6356 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
6357fi
6358
6359
c971b7fa
PA
6360PACKAGE=gdb
6361
6362cat >>confdefs.h <<_ACEOF
6363#define PACKAGE "$PACKAGE"
6364_ACEOF
6365
6366
6367
6368# We never need to detect it in this sub-configure.
6369# But preserve it for config.status --recheck.
6370
6371
6372
6373MAKEINFO_EXTRA_FLAGS=""
6374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6375$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
d0ac1c44 6376if ${gdb_cv_have_makeinfo_click+:} false; then :
c971b7fa
PA
6377 $as_echo_n "(cached) " >&6
6378else
6379 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6380 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6381 gdb_cv_have_makeinfo_click=yes
6382 else
6383 gdb_cv_have_makeinfo_click=no
6384 fi
6385fi
6386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6387$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6388if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6389 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6390fi
e28b3332
DJ
6391
6392
bec39cab
AC
6393
6394
81ecdfbb
RW
6395# Check whether --with-separate-debug-dir was given.
6396if test "${with_separate_debug_dir+set}" = set; then :
6397 withval=$with_separate_debug_dir;
b14b1491
TT
6398 DEBUGDIR=$withval
6399else
6400 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
6401fi
6402
20e95c23 6403
783e057b
DJ
6404 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6405 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 6406 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 6407 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 6408
783e057b
DJ
6409cat >>confdefs.h <<_ACEOF
6410#define DEBUGDIR "$ac_define_dir"
20e95c23 6411_ACEOF
20e95c23 6412
20e95c23 6413
20e95c23 6414
0c4a4063 6415
b14b1491
TT
6416 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6417 if test "x$prefix" = xNONE; then
6418 test_prefix=/usr/local
6419 else
6420 test_prefix=$prefix
6421 fi
783e057b 6422 else
b14b1491 6423 test_prefix=$exec_prefix
783e057b 6424 fi
b14b1491
TT
6425 value=0
6426 case ${ac_define_dir} in
6427 "${test_prefix}"|"${test_prefix}/"*|\
6428 '${exec_prefix}'|'${exec_prefix}/'*)
6429 value=1
6430 ;;
6431 esac
6432
6433cat >>confdefs.h <<_ACEOF
6434#define DEBUGDIR_RELOCATABLE $value
6435_ACEOF
6436
6437
6438
0c4a4063 6439
f83d8a90
DE
6440# We can't pass paths as command line arguments.
6441# Mingw32 tries to be clever and will convert the paths for us.
6442# For example -DBINDIR="/usr/local/bin" passed on the command line may get
6443# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6444# This breaks GDB's relocatable path conversions since paths passed in
6445# config.h would not get so translated, the path prefixes no longer match.
6446
6447 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6448 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6449 ac_define_dir=`eval echo $bindir`
6450 ac_define_dir=`eval echo $ac_define_dir`
6451
6452cat >>confdefs.h <<_ACEOF
6453#define BINDIR "$ac_define_dir"
6454_ACEOF
6455
6456
6457
b14b1491
TT
6458# GDB's datadir relocation
6459
6460
6461
81ecdfbb
RW
6462# Check whether --with-gdb-datadir was given.
6463if test "${with_gdb_datadir+set}" = set; then :
6464 withval=$with_gdb_datadir;
b14b1491 6465 GDB_DATADIR=$withval
20e95c23 6466else
b14b1491 6467 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
6468fi
6469
20e95c23 6470
b14b1491
TT
6471 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6472 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6473 ac_define_dir=`eval echo $GDB_DATADIR`
6474 ac_define_dir=`eval echo $ac_define_dir`
6475
6476cat >>confdefs.h <<_ACEOF
6477#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
6478_ACEOF
6479
b14b1491
TT
6480
6481
0c4a4063 6482
b14b1491
TT
6483 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6484 if test "x$prefix" = xNONE; then
6485 test_prefix=/usr/local
6486 else
6487 test_prefix=$prefix
6488 fi
6489 else
6490 test_prefix=$exec_prefix
6491 fi
6492 value=0
6493 case ${ac_define_dir} in
6494 "${test_prefix}"|"${test_prefix}/"*|\
6495 '${exec_prefix}'|'${exec_prefix}/'*)
6496 value=1
6497 ;;
6498 esac
6499
6500cat >>confdefs.h <<_ACEOF
6501#define GDB_DATADIR_RELOCATABLE $value
6502_ACEOF
6503
6504
783e057b 6505
20e95c23 6506
0c4a4063 6507
81ecdfbb
RW
6508# Check whether --with-relocated-sources was given.
6509if test "${with_relocated_sources+set}" = set; then :
6510 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
6511
6512 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6513 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6514 ac_define_dir=`eval echo $reloc_srcdir`
6515 ac_define_dir=`eval echo $ac_define_dir`
6516
6517cat >>confdefs.h <<_ACEOF
6518#define RELOC_SRCDIR "$ac_define_dir"
6519_ACEOF
6520
6521
6522
81ecdfbb
RW
6523fi
6524
29b0e8a2 6525
7349ff92
JK
6526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6527$as_echo_n "checking for default auto-load directory... " >&6; }
6528
6529# Check whether --with-auto-load-dir was given.
6530if test "${with_auto_load_dir+set}" = set; then :
6531 withval=$with_auto_load_dir;
6532else
1564a261 6533 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
6534fi
6535
1564a261 6536escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
6537
6538 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6539 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6540 ac_define_dir=`eval echo $escape_dir`
6541 ac_define_dir=`eval echo $ac_define_dir`
6542
6543cat >>confdefs.h <<_ACEOF
6544#define AUTO_LOAD_DIR "$ac_define_dir"
6545_ACEOF
6546
6547
6548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6549$as_echo "$with_auto_load_dir" >&6; }
6550
bccbefd2
JK
6551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6552$as_echo_n "checking for default auto-load safe-path... " >&6; }
6553
6554# Check whether --with-auto-load-safe-path was given.
6555if test "${with_auto_load_safe_path+set}" = set; then :
6556 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
6557 with_auto_load_safe_path="/"
6558 fi
bccbefd2 6559else
7349ff92 6560 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
6561fi
6562
1564a261 6563escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
6564
6565 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6566 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 6567 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
6568 ac_define_dir=`eval echo $ac_define_dir`
6569
6570cat >>confdefs.h <<_ACEOF
6dea1fbd 6571#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
6572_ACEOF
6573
6574
6575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6576$as_echo "$with_auto_load_safe_path" >&6; }
6577
29b0e8a2 6578
20e95c23 6579
5ae98d25 6580subdirs="$subdirs testsuite"
20e95c23
DJ
6581
6582
783e057b 6583# Check whether to support alternative target configurations
81ecdfbb
RW
6584# Check whether --enable-targets was given.
6585if test "${enable_targets+set}" = set; then :
6586 enableval=$enable_targets; case "${enableval}" in
d0ac1c44 6587 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
6588 ;;
6589 no) enable_targets= ;;
6590 *) enable_targets=$enableval ;;
6591esac
81ecdfbb
RW
6592fi
6593
20e95c23 6594
783e057b 6595# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
6596# Check whether --enable-64-bit-bfd was given.
6597if test "${enable_64_bit_bfd+set}" = set; then :
6598 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
6599 yes) want64=true ;;
6600 no) want64=false ;;
d0ac1c44 6601 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
6602esac
6603else
6604 want64=false
81ecdfbb
RW
6605fi
6606
783e057b
DJ
6607# Provide defaults for some variables set by the per-host and per-target
6608# configuration.
6609gdb_host_obs=posix-hdep.o
20e95c23 6610
783e057b
DJ
6611if test "${target}" = "${host}"; then
6612 gdb_native=yes
6613else
6614 gdb_native=no
6615fi
20e95c23 6616
783e057b 6617. $srcdir/configure.host
20e95c23 6618
fb23d554
SDJ
6619# Add in the common host objects.
6620. $srcdir/common/common.host
6621gdb_host_obs="$gdb_host_obs $common_host_obs"
6622
783e057b 6623# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 6624
783e057b
DJ
6625TARGET_OBS=
6626all_targets=
b292c783 6627HAVE_NATIVE_GCORE_TARGET=
20e95c23 6628
783e057b 6629for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 6630do
783e057b
DJ
6631 if test "$targ_alias" = "all"; then
6632 all_targets=true
6633 else
6634 # Canonicalize the secondary target names.
6635 result=`$ac_config_sub $targ_alias 2>/dev/null`
6636 if test -n "$result"; then
6637 targ=$result
6638 else
6639 targ=$targ_alias
6640 fi
20e95c23 6641
783e057b 6642 . ${srcdir}/configure.tgt
20e95c23 6643
bf307134 6644 if test -z "${gdb_target_obs}"; then :
d0ac1c44 6645 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
bf307134
JB
6646fi
6647
783e057b
DJ
6648 # Target-specific object files
6649 for i in ${gdb_target_obs}; do
6650 case " $TARGET_OBS " in
6651 *" ${i} "*) ;;
6652 *)
6653 TARGET_OBS="$TARGET_OBS ${i}"
6654 ;;
6655 esac
6656 done
20e95c23 6657
783e057b
DJ
6658 # Check whether this target needs 64-bit CORE_ADDR
6659 if test x${want64} = xfalse; then
6660 . ${srcdir}/../bfd/config.bfd
6661 fi
b292c783
JK
6662
6663 # Check whether this target is native and supports gcore.
6664 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6665 && $gdb_have_gcore; then
6666 HAVE_NATIVE_GCORE_TARGET=1
6667 fi
783e057b 6668 fi
20e95c23
DJ
6669done
6670
783e057b
DJ
6671if test x${all_targets} = xtrue; then
6672
6673 # We want all 64-bit targets if we either:
6674 # - run on a 64-bit host or
6675 # - already require 64-bit support for some other target or
6676 # - the --enable-64-bit-bfd option was supplied
6677 # Otherwise we only support all 32-bit targets.
6678 #
6679 # NOTE: This test must be in sync with the corresponding
6680 # tests in BFD!
20e95c23 6681
783e057b 6682 if test x${want64} = xfalse; then
81ecdfbb
RW
6683 # The cast to long int works around a bug in the HP C Compiler
6684# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6685# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6686# This bug is HP SR number 8606223364.
6687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6688$as_echo_n "checking size of long... " >&6; }
d0ac1c44 6689if ${ac_cv_sizeof_long+:} false; then :
81ecdfbb 6690 $as_echo_n "(cached) " >&6
c0993dbe 6691else
81ecdfbb 6692 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 6693
81ecdfbb
RW
6694else
6695 if test "$ac_cv_type_long" = yes; then
6696 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6697$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
6698as_fn_error 77 "cannot compute sizeof (long)
6699See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
6700 else
6701 ac_cv_sizeof_long=0
6702 fi
c0993dbe 6703fi
81ecdfbb 6704
c0993dbe 6705fi
81ecdfbb
RW
6706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6707$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 6708
c0993dbe 6709
c0993dbe 6710
c0993dbe
UW
6711cat >>confdefs.h <<_ACEOF
6712#define SIZEOF_LONG $ac_cv_sizeof_long
6713_ACEOF
6714
6715
6716 if test "x${ac_cv_sizeof_long}" = "x8"; then
6717 want64=true
6718 fi
6719 fi
6720 if test x${want64} = xtrue; then
6721 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6722 else
6723 TARGET_OBS='$(ALL_TARGET_OBS)'
6724 fi
6725fi
6726
6727
6728
b292c783 6729
c0993dbe
UW
6730# For other settings, only the main target counts.
6731gdb_sim=
6732gdb_osabi=
6733build_gdbserver=
6734targ=$target; . ${srcdir}/configure.tgt
6735
6736# Fetch the default architecture and default target vector from BFD.
6737targ=$target; . $srcdir/../bfd/config.bfd
6738
6739# We only want the first architecture, so strip off the others if
6740# there is more than one.
6741targ_archs=`echo $targ_archs | sed 's/ .*//'`
6742
6743if test "x$targ_archs" != x; then
6744
6745cat >>confdefs.h <<_ACEOF
6746#define DEFAULT_BFD_ARCH $targ_archs
6747_ACEOF
6748
6749fi
6750if test "x$targ_defvec" != x; then
6751
6752cat >>confdefs.h <<_ACEOF
6753#define DEFAULT_BFD_VEC $targ_defvec
6754_ACEOF
6755
6756fi
6757
c0993dbe
UW
6758# The CLI cannot be disabled yet, but may be in the future.
6759
6760# Enable CLI.
81ecdfbb
RW
6761# Check whether --enable-gdbcli was given.
6762if test "${enable_gdbcli+set}" = set; then :
6763 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
6764 yes)
6765 ;;
6766 no)
d0ac1c44 6767 as_fn_error $? "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 6768 *)
d0ac1c44 6769 as_fn_error $? "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
6770 esac
6771else
6772 enable_gdbcli=yes
81ecdfbb
RW
6773fi
6774
c0993dbe
UW
6775if test x"$enable_gdbcli" = xyes; then
6776 if test -d $srcdir/cli; then
6777 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
6778 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
6779 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
6780 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
6781 fi
6782fi
6783
6784# Enable MI.
81ecdfbb
RW
6785# Check whether --enable-gdbmi was given.
6786if test "${enable_gdbmi+set}" = set; then :
6787 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
6788 yes | no)
6789 ;;
6790 *)
d0ac1c44 6791 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
6792 esac
6793else
6794 enable_gdbmi=yes
81ecdfbb
RW
6795fi
6796
c0993dbe
UW
6797if test x"$enable_gdbmi" = xyes; then
6798 if test -d $srcdir/mi; then
6799 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6800 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6801 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6802 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6803 fi
6804fi
6805
6806# Enable TUI.
81ecdfbb
RW
6807# Check whether --enable-tui was given.
6808if test "${enable_tui+set}" = set; then :
6809 enableval=$enable_tui; case $enableval in
3ca64bd3 6810 yes | no | auto)
c0993dbe
UW
6811 ;;
6812 *)
d0ac1c44 6813 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
6814 esac
6815else
3ca64bd3 6816 enable_tui=auto
81ecdfbb
RW
6817fi
6818
c0993dbe
UW
6819
6820# Enable gdbtk.
81ecdfbb
RW
6821# Check whether --enable-gdbtk was given.
6822if test "${enable_gdbtk+set}" = set; then :
6823 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
6824 yes | no)
6825 ;;
6826 *)
d0ac1c44 6827 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
6828 esac
6829else
5062cc19 6830 if test -d $srcdir/gdbtk; then
c0993dbe
UW
6831 enable_gdbtk=yes
6832 else
6833 enable_gdbtk=no
6834 fi
81ecdfbb
RW
6835fi
6836
c0993dbe
UW
6837# We unconditionally disable gdbtk tests on selected platforms.
6838case $host_os in
6839 go32* | windows*)
81ecdfbb
RW
6840 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6841$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
6842 enable_gdbtk=no ;;
6843esac
6844
05e7c244 6845# Libunwind support for ia64.
bec39cab 6846
05e7c244
JK
6847
6848# Check whether --with-libunwind-ia64 was given.
6849if test "${with_libunwind_ia64+set}" = set; then :
6850 withval=$with_libunwind_ia64;
bec39cab 6851else
05e7c244
JK
6852 with_libunwind_ia64=auto
6853fi
bec39cab 6854
05e7c244
JK
6855
6856# Backward compatibility option.
6857if test "${with_libunwind+set}" = set; then
6858 if test x"$with_libunwind_ia64" != xauto; then
d0ac1c44 6859 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
05e7c244
JK
6860 fi
6861 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6862$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6863 with_libunwind_ia64="$with_libunwind"
6864fi
6865
6866case "$with_libunwind_ia64" in
6867 yes | no)
6868 ;;
6869 auto)
6870 for ac_header in libunwind-ia64.h
81ecdfbb 6871do :
b54a8fd7 6872 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 6873if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6874 cat >>confdefs.h <<_ACEOF
b54a8fd7 6875#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6876_ACEOF
6877
6878fi
6879
6880done
6881
05e7c244
JK
6882 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6883 ;;
6884 *)
d0ac1c44 6885 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
05e7c244
JK
6886 ;;
6887esac
bec39cab 6888
05e7c244 6889if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 6890 for ac_header in libunwind-ia64.h
81ecdfbb 6891do :
b54a8fd7 6892 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 6893if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6894 cat >>confdefs.h <<_ACEOF
b54a8fd7 6895#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6896_ACEOF
6897
6898fi
6899
6900done
6901
05e7c244 6902 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
d0ac1c44 6903 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
05e7c244
JK
6904 fi
6905 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6906 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6907 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
6908fi
6909
cb01cfba
JB
6910opt_curses=no
6911
81ecdfbb
RW
6912# Check whether --with-curses was given.
6913if test "${with_curses+set}" = set; then :
6914 withval=$with_curses; opt_curses=$withval
6915fi
6916
cb01cfba 6917
76a39ba7 6918prefer_curses=no
cb01cfba 6919if test "$opt_curses" = "yes"; then
76a39ba7 6920 prefer_curses=yes
cb01cfba
JB
6921fi
6922
a9322a30 6923# Profiling support.
81ecdfbb
RW
6924# Check whether --enable-profiling was given.
6925if test "${enable_profiling+set}" = set; then :
6926 enableval=$enable_profiling; case $enableval in
a9322a30
TT
6927 yes | no)
6928 ;;
6929 *)
d0ac1c44 6930 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
6931 esac
6932else
6933 enable_profiling=no
81ecdfbb 6934fi
bec39cab 6935
a9322a30
TT
6936
6937for ac_func in monstartup _mcleanup
81ecdfbb
RW
6938do :
6939 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6940ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 6941if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
81ecdfbb
RW
6942 cat >>confdefs.h <<_ACEOF
6943#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 6944_ACEOF
a9322a30 6945
81ecdfbb
RW
6946fi
6947done
a9322a30 6948
81ecdfbb
RW
6949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6950$as_echo_n "checking for _etext... " >&6; }
d0ac1c44 6951if ${ac_cv_var__etext+:} false; then :
81ecdfbb
RW
6952 $as_echo_n "(cached) " >&6
6953else
6954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6955/* end confdefs.h. */
6956#include <stdlib.h>
6957extern char _etext;
a9322a30
TT
6958
6959int
6960main ()
6961{
6962free (&_etext);
6963 ;
6964 return 0;
6965}
bec39cab 6966_ACEOF
81ecdfbb 6967if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6968 ac_cv_var__etext=yes
bec39cab 6969else
81ecdfbb 6970 ac_cv_var__etext=no
bec39cab 6971fi
81ecdfbb
RW
6972rm -f core conftest.err conftest.$ac_objext \
6973 conftest$ac_exeext conftest.$ac_ext
bec39cab 6974fi
81ecdfbb
RW
6975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6976$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 6977if test $ac_cv_var__etext = yes; then
60ca704f 6978
81ecdfbb 6979$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 6980
bec39cab 6981fi
81ecdfbb
RW
6982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6983$as_echo_n "checking for etext... " >&6; }
d0ac1c44 6984if ${ac_cv_var_etext+:} false; then :
81ecdfbb 6985 $as_echo_n "(cached) " >&6
bec39cab 6986else
81ecdfbb 6987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6988/* end confdefs.h. */
a9322a30
TT
6989#include <stdlib.h>
6990extern char etext;
bec39cab
AC
6991
6992int
6993main ()
6994{
a9322a30 6995free (&etext);
bec39cab
AC
6996 ;
6997 return 0;
6998}
6999_ACEOF
81ecdfbb 7000if ac_fn_c_try_link "$LINENO"; then :
a9322a30 7001 ac_cv_var_etext=yes
bec39cab 7002else
81ecdfbb 7003 ac_cv_var_etext=no
bec39cab 7004fi
81ecdfbb
RW
7005rm -f core conftest.err conftest.$ac_objext \
7006 conftest$ac_exeext conftest.$ac_ext
bec39cab 7007fi
81ecdfbb
RW
7008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7009$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
7010if test $ac_cv_var_etext = yes; then
7011
81ecdfbb 7012$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
7013
7014fi
a9322a30
TT
7015if test "$enable_profiling" = yes ; then
7016 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
d0ac1c44 7017 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
7018 fi
7019 PROFILE_CFLAGS=-pg
7020 OLD_CFLAGS="$CFLAGS"
7021 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 7022
81ecdfbb
RW
7023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7024$as_echo_n "checking whether $CC supports -pg... " >&6; }
d0ac1c44 7025if ${ac_cv_cc_supports_pg+:} false; then :
81ecdfbb 7026 $as_echo_n "(cached) " >&6
bec39cab 7027else
81ecdfbb 7028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7029/* end confdefs.h. */
bec39cab
AC
7030
7031int
7032main ()
7033{
a9322a30 7034int x;
bec39cab
AC
7035 ;
7036 return 0;
7037}
7038_ACEOF
81ecdfbb 7039if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 7040 ac_cv_cc_supports_pg=yes
bec39cab 7041else
81ecdfbb 7042 ac_cv_cc_supports_pg=no
bec39cab 7043fi
81ecdfbb 7044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 7045fi
81ecdfbb
RW
7046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7047$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 7048
a9322a30 7049 if test $ac_cv_cc_supports_pg = no; then
d0ac1c44 7050 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 7051 fi
bec39cab 7052
a9322a30 7053 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
7054fi
7055
44cee4fd
TT
7056CODESIGN_CERT=
7057# Check whether --enable-codesign was given.
7058if test "${enable_codesign+set}" = set; then :
7059 enableval=$enable_codesign; CODESIGN_CERT=$enableval
7060fi
7061
7062
7063
c16158bc
JM
7064
7065
81ecdfbb
RW
7066# Check whether --with-pkgversion was given.
7067if test "${with_pkgversion+set}" = set; then :
7068 withval=$with_pkgversion; case "$withval" in
d0ac1c44 7069 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
7070 no) PKGVERSION= ;;
7071 *) PKGVERSION="($withval) " ;;
7072 esac
7073else
7074 PKGVERSION="(GDB) "
7075
81ecdfbb 7076fi
c16158bc
JM
7077
7078
7079
7080
81ecdfbb
RW
7081
7082# Check whether --with-bugurl was given.
7083if test "${with_bugurl+set}" = set; then :
7084 withval=$with_bugurl; case "$withval" in
d0ac1c44 7085 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
7086 no) BUGURL=
7087 ;;
7088 *) BUGURL="$withval"
7089 ;;
7090 esac
7091else
7092 BUGURL="http://www.gnu.org/software/gdb/bugs/"
7093
81ecdfbb
RW
7094fi
7095
c16158bc
JM
7096 case ${BUGURL} in
7097 "")
7098 REPORT_BUGS_TO=
7099 REPORT_BUGS_TEXI=
7100 ;;
7101 *)
7102 REPORT_BUGS_TO="<$BUGURL>"
7103 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7104 ;;
7105 esac;
7106
7107
7108
7109
7110cat >>confdefs.h <<_ACEOF
7111#define PKGVERSION "$PKGVERSION"
7112_ACEOF
7113
7114
7115cat >>confdefs.h <<_ACEOF
7116#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7117_ACEOF
7118
7119
bec39cab
AC
7120# --------------------- #
7121# Checks for programs. #
7122# --------------------- #
7123
7124for ac_prog in gawk mawk nawk awk
7125do
7126 # Extract the first word of "$ac_prog", so it can be a program name with args.
7127set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7129$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7130if ${ac_cv_prog_AWK+:} false; then :
81ecdfbb 7131 $as_echo_n "(cached) " >&6
bec39cab
AC
7132else
7133 if test -n "$AWK"; then
7134 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7135else
7136as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7137for as_dir in $PATH
7138do
7139 IFS=$as_save_IFS
7140 test -z "$as_dir" && as_dir=.
81ecdfbb 7141 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7142 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7143 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7144 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7145 break 2
7146 fi
7147done
81ecdfbb
RW
7148 done
7149IFS=$as_save_IFS
bec39cab
AC
7150
7151fi
7152fi
7153AWK=$ac_cv_prog_AWK
7154if test -n "$AWK"; then
81ecdfbb
RW
7155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7156$as_echo "$AWK" >&6; }
bec39cab 7157else
81ecdfbb
RW
7158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7159$as_echo "no" >&6; }
bec39cab
AC
7160fi
7161
bec39cab 7162
81ecdfbb 7163 test -n "$AWK" && break
bec39cab
AC
7164done
7165
c971b7fa
PA
7166# Find a good install program. We prefer a C program (faster),
7167# so one script is as good as another. But avoid the broken or
7168# incompatible versions:
7169# SysV /etc/install, /usr/sbin/install
7170# SunOS /usr/etc/install
7171# IRIX /sbin/install
7172# AIX /bin/install
7173# AmigaOS /C/install, which installs bootblocks on floppy discs
7174# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7175# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7176# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7177# OS/2's system install, which has a completely different semantic
7178# ./install, which can be erroneously created by make from ./install.sh.
7179# Reject install programs that cannot install multiple files.
7180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7181$as_echo_n "checking for a BSD-compatible install... " >&6; }
7182if test -z "$INSTALL"; then
d0ac1c44 7183if ${ac_cv_path_install+:} false; then :
c971b7fa
PA
7184 $as_echo_n "(cached) " >&6
7185else
7186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7187for as_dir in $PATH
7188do
7189 IFS=$as_save_IFS
7190 test -z "$as_dir" && as_dir=.
7191 # Account for people who put trailing slashes in PATH elements.
7192case $as_dir/ in #((
7193 ./ | .// | /[cC]/* | \
7194 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7195 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7196 /usr/ucb/* ) ;;
7197 *)
7198 # OSF1 and SCO ODT 3.0 have their own names for install.
7199 # Don't use installbsd from OSF since it installs stuff as root
7200 # by default.
7201 for ac_prog in ginstall scoinst install; do
7202 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7203 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
c971b7fa
PA
7204 if test $ac_prog = install &&
7205 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7206 # AIX install. It has an incompatible calling convention.
7207 :
7208 elif test $ac_prog = install &&
7209 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7210 # program-specific install script used by HP pwplus--don't use.
7211 :
7212 else
7213 rm -rf conftest.one conftest.two conftest.dir
7214 echo one > conftest.one
7215 echo two > conftest.two
7216 mkdir conftest.dir
7217 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7218 test -s conftest.one && test -s conftest.two &&
7219 test -s conftest.dir/conftest.one &&
7220 test -s conftest.dir/conftest.two
7221 then
7222 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7223 break 3
7224 fi
7225 fi
7226 fi
7227 done
7228 done
7229 ;;
7230esac
7231
7232 done
7233IFS=$as_save_IFS
7234
7235rm -rf conftest.one conftest.two conftest.dir
7236
7237fi
7238 if test "${ac_cv_path_install+set}" = set; then
7239 INSTALL=$ac_cv_path_install
7240 else
7241 # As a last resort, use the slow shell script. Don't cache a
7242 # value for INSTALL within a source directory, because that will
7243 # break other packages using the cache if that directory is
7244 # removed, or if the value is a relative name.
7245 INSTALL=$ac_install_sh
7246 fi
7247fi
7248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7249$as_echo "$INSTALL" >&6; }
7250
7251# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7252# It thinks the first close brace ends the variable substitution.
7253test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7254
7255test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7256
7257test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 7258
81ecdfbb
RW
7259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7260$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
7261LN_S=$as_ln_s
7262if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
7263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7264$as_echo "yes" >&6; }
bec39cab 7265else
81ecdfbb
RW
7266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7267$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
7268fi
7269
7270if test -n "$ac_tool_prefix"; then
7271 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7272set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
7273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7274$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7275if ${ac_cv_prog_RANLIB+:} false; then :
81ecdfbb 7276 $as_echo_n "(cached) " >&6
bec39cab
AC
7277else
7278 if test -n "$RANLIB"; then
7279 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7280else
7281as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7282for as_dir in $PATH
7283do
7284 IFS=$as_save_IFS
7285 test -z "$as_dir" && as_dir=.
81ecdfbb 7286 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7287 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7288 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 7289 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7290 break 2
7291 fi
7292done
81ecdfbb
RW
7293 done
7294IFS=$as_save_IFS
bec39cab
AC
7295
7296fi
7297fi
7298RANLIB=$ac_cv_prog_RANLIB
7299if test -n "$RANLIB"; then
81ecdfbb
RW
7300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7301$as_echo "$RANLIB" >&6; }
bec39cab 7302else
81ecdfbb
RW
7303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7304$as_echo "no" >&6; }
bec39cab
AC
7305fi
7306
81ecdfbb 7307
bec39cab
AC
7308fi
7309if test -z "$ac_cv_prog_RANLIB"; then
7310 ac_ct_RANLIB=$RANLIB
7311 # Extract the first word of "ranlib", so it can be a program name with args.
7312set dummy ranlib; ac_word=$2
81ecdfbb
RW
7313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7314$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7315if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
81ecdfbb 7316 $as_echo_n "(cached) " >&6
bec39cab
AC
7317else
7318 if test -n "$ac_ct_RANLIB"; then
7319 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7320else
7321as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7322for as_dir in $PATH
7323do
7324 IFS=$as_save_IFS
7325 test -z "$as_dir" && as_dir=.
81ecdfbb 7326 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7327 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7328 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 7329 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7330 break 2
7331 fi
7332done
81ecdfbb
RW
7333 done
7334IFS=$as_save_IFS
bec39cab 7335
bec39cab
AC
7336fi
7337fi
7338ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7339if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
7340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7341$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 7342else
81ecdfbb
RW
7343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7344$as_echo "no" >&6; }
bec39cab
AC
7345fi
7346
81ecdfbb
RW
7347 if test "x$ac_ct_RANLIB" = x; then
7348 RANLIB=":"
7349 else
7350 case $cross_compiling:$ac_tool_warned in
7351yes:)
7352{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7353$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7354ac_tool_warned=yes ;;
7355esac
7356 RANLIB=$ac_ct_RANLIB
7357 fi
bec39cab
AC
7358else
7359 RANLIB="$ac_cv_prog_RANLIB"
7360fi
7361
7362for ac_prog in 'bison -y' byacc
7363do
7364 # Extract the first word of "$ac_prog", so it can be a program name with args.
7365set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7367$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7368if ${ac_cv_prog_YACC+:} false; then :
81ecdfbb 7369 $as_echo_n "(cached) " >&6
bec39cab
AC
7370else
7371 if test -n "$YACC"; then
7372 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7373else
7374as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7375for as_dir in $PATH
7376do
7377 IFS=$as_save_IFS
7378 test -z "$as_dir" && as_dir=.
81ecdfbb 7379 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7380 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7381 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 7382 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7383 break 2
7384 fi
7385done
81ecdfbb
RW
7386 done
7387IFS=$as_save_IFS
bec39cab
AC
7388
7389fi
7390fi
7391YACC=$ac_cv_prog_YACC
7392if test -n "$YACC"; then
81ecdfbb
RW
7393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7394$as_echo "$YACC" >&6; }
bec39cab 7395else
81ecdfbb
RW
7396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7397$as_echo "no" >&6; }
bec39cab
AC
7398fi
7399
81ecdfbb 7400
bec39cab
AC
7401 test -n "$YACC" && break
7402done
7403test -n "$YACC" || YACC="yacc"
7404
7405
7406if test -n "$ac_tool_prefix"; then
7407 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7408set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
7409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7410$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7411if ${ac_cv_prog_AR+:} false; then :
81ecdfbb 7412 $as_echo_n "(cached) " >&6
bec39cab
AC
7413else
7414 if test -n "$AR"; then
7415 ac_cv_prog_AR="$AR" # Let the user override the test.
7416else
7417as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7418for as_dir in $PATH
7419do
7420 IFS=$as_save_IFS
7421 test -z "$as_dir" && as_dir=.
81ecdfbb 7422 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7423 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7424 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 7425 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7426 break 2
7427 fi
7428done
81ecdfbb
RW
7429 done
7430IFS=$as_save_IFS
bec39cab
AC
7431
7432fi
7433fi
7434AR=$ac_cv_prog_AR
7435if test -n "$AR"; then
81ecdfbb
RW
7436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7437$as_echo "$AR" >&6; }
bec39cab 7438else
81ecdfbb
RW
7439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7440$as_echo "no" >&6; }
bec39cab
AC
7441fi
7442
81ecdfbb 7443
bec39cab
AC
7444fi
7445if test -z "$ac_cv_prog_AR"; then
7446 ac_ct_AR=$AR
7447 # Extract the first word of "ar", so it can be a program name with args.
7448set dummy ar; ac_word=$2
81ecdfbb
RW
7449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7450$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7451if ${ac_cv_prog_ac_ct_AR+:} false; then :
81ecdfbb 7452 $as_echo_n "(cached) " >&6
bec39cab
AC
7453else
7454 if test -n "$ac_ct_AR"; then
7455 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7456else
7457as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7458for as_dir in $PATH
7459do
7460 IFS=$as_save_IFS
7461 test -z "$as_dir" && as_dir=.
81ecdfbb 7462 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7463 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7464 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 7465 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7466 break 2
7467 fi
7468done
81ecdfbb
RW
7469 done
7470IFS=$as_save_IFS
bec39cab
AC
7471
7472fi
7473fi
7474ac_ct_AR=$ac_cv_prog_ac_ct_AR
7475if test -n "$ac_ct_AR"; then
81ecdfbb
RW
7476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7477$as_echo "$ac_ct_AR" >&6; }
bec39cab 7478else
81ecdfbb
RW
7479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7480$as_echo "no" >&6; }
bec39cab
AC
7481fi
7482
81ecdfbb
RW
7483 if test "x$ac_ct_AR" = x; then
7484 AR=""
7485 else
7486 case $cross_compiling:$ac_tool_warned in
7487yes:)
7488{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7489$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7490ac_tool_warned=yes ;;
7491esac
7492 AR=$ac_ct_AR
7493 fi
bec39cab
AC
7494else
7495 AR="$ac_cv_prog_AR"
7496fi
7497
7498if test -n "$ac_tool_prefix"; then
7499 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7500set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
7501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7502$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7503if ${ac_cv_prog_DLLTOOL+:} false; then :
81ecdfbb 7504 $as_echo_n "(cached) " >&6
bec39cab
AC
7505else
7506 if test -n "$DLLTOOL"; then
7507 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7508else
7509as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7510for as_dir in $PATH
7511do
7512 IFS=$as_save_IFS
7513 test -z "$as_dir" && as_dir=.
81ecdfbb 7514 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7515 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7516 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 7517 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7518 break 2
7519 fi
7520done
81ecdfbb
RW
7521 done
7522IFS=$as_save_IFS
bec39cab
AC
7523
7524fi
7525fi
7526DLLTOOL=$ac_cv_prog_DLLTOOL
7527if test -n "$DLLTOOL"; then
81ecdfbb
RW
7528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7529$as_echo "$DLLTOOL" >&6; }
bec39cab 7530else
81ecdfbb
RW
7531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7532$as_echo "no" >&6; }
bec39cab
AC
7533fi
7534
81ecdfbb 7535
bec39cab
AC
7536fi
7537if test -z "$ac_cv_prog_DLLTOOL"; then
7538 ac_ct_DLLTOOL=$DLLTOOL
7539 # Extract the first word of "dlltool", so it can be a program name with args.
7540set dummy dlltool; ac_word=$2
81ecdfbb
RW
7541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7542$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7543if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
81ecdfbb 7544 $as_echo_n "(cached) " >&6
bec39cab
AC
7545else
7546 if test -n "$ac_ct_DLLTOOL"; then
7547 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7548else
7549as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7550for as_dir in $PATH
7551do
7552 IFS=$as_save_IFS
7553 test -z "$as_dir" && as_dir=.
81ecdfbb 7554 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7555 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7556 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 7557 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7558 break 2
7559 fi
7560done
81ecdfbb
RW
7561 done
7562IFS=$as_save_IFS
bec39cab
AC
7563
7564fi
7565fi
7566ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7567if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
7568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7569$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 7570else
81ecdfbb
RW
7571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7572$as_echo "no" >&6; }
bec39cab
AC
7573fi
7574
81ecdfbb
RW
7575 if test "x$ac_ct_DLLTOOL" = x; then
7576 DLLTOOL=""
7577 else
7578 case $cross_compiling:$ac_tool_warned in
7579yes:)
7580{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7581$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7582ac_tool_warned=yes ;;
7583esac
7584 DLLTOOL=$ac_ct_DLLTOOL
7585 fi
bec39cab
AC
7586else
7587 DLLTOOL="$ac_cv_prog_DLLTOOL"
7588fi
7589
7590if test -n "$ac_tool_prefix"; then
7591 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7592set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
7593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7594$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7595if ${ac_cv_prog_WINDRES+:} false; then :
81ecdfbb 7596 $as_echo_n "(cached) " >&6
bec39cab
AC
7597else
7598 if test -n "$WINDRES"; then
7599 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7600else
7601as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7602for as_dir in $PATH
7603do
7604 IFS=$as_save_IFS
7605 test -z "$as_dir" && as_dir=.
81ecdfbb 7606 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7607 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7608 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 7609 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7610 break 2
7611 fi
7612done
81ecdfbb
RW
7613 done
7614IFS=$as_save_IFS
bec39cab
AC
7615
7616fi
7617fi
7618WINDRES=$ac_cv_prog_WINDRES
7619if test -n "$WINDRES"; then
81ecdfbb
RW
7620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7621$as_echo "$WINDRES" >&6; }
bec39cab 7622else
81ecdfbb
RW
7623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7624$as_echo "no" >&6; }
bec39cab
AC
7625fi
7626
81ecdfbb 7627
bec39cab
AC
7628fi
7629if test -z "$ac_cv_prog_WINDRES"; then
7630 ac_ct_WINDRES=$WINDRES
7631 # Extract the first word of "windres", so it can be a program name with args.
7632set dummy windres; ac_word=$2
81ecdfbb
RW
7633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7634$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7635if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
81ecdfbb 7636 $as_echo_n "(cached) " >&6
bec39cab
AC
7637else
7638 if test -n "$ac_ct_WINDRES"; then
7639 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7640else
7641as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7642for as_dir in $PATH
7643do
7644 IFS=$as_save_IFS
7645 test -z "$as_dir" && as_dir=.
81ecdfbb 7646 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7647 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7648 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 7649 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7650 break 2
7651 fi
7652done
81ecdfbb
RW
7653 done
7654IFS=$as_save_IFS
bec39cab
AC
7655
7656fi
7657fi
7658ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7659if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
7660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7661$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 7662else
81ecdfbb
RW
7663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7664$as_echo "no" >&6; }
c906108c 7665fi
bec39cab 7666
81ecdfbb
RW
7667 if test "x$ac_ct_WINDRES" = x; then
7668 WINDRES=""
7669 else
7670 case $cross_compiling:$ac_tool_warned in
7671yes:)
7672{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7673$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7674ac_tool_warned=yes ;;
7675esac
7676 WINDRES=$ac_ct_WINDRES
7677 fi
c906108c 7678else
bec39cab 7679 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
7680fi
7681
bec39cab 7682
036c3acb
TS
7683case $host_os in
7684 gnu*)
7685 # Needed for GNU Hurd hosts.
7686 if test -n "$ac_tool_prefix"; then
bec39cab
AC
7687 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7688set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
7689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7690$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7691if ${ac_cv_prog_MIG+:} false; then :
81ecdfbb 7692 $as_echo_n "(cached) " >&6
c906108c 7693else
bec39cab
AC
7694 if test -n "$MIG"; then
7695 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7696else
7697as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7698for as_dir in $PATH
7699do
7700 IFS=$as_save_IFS
7701 test -z "$as_dir" && as_dir=.
81ecdfbb 7702 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7703 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7704 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 7705 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7706 break 2
7707 fi
7708done
81ecdfbb
RW
7709 done
7710IFS=$as_save_IFS
bec39cab 7711
c906108c 7712fi
bec39cab
AC
7713fi
7714MIG=$ac_cv_prog_MIG
7715if test -n "$MIG"; then
81ecdfbb
RW
7716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7717$as_echo "$MIG" >&6; }
c906108c 7718else
81ecdfbb
RW
7719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7720$as_echo "no" >&6; }
c906108c
SS
7721fi
7722
81ecdfbb 7723
bec39cab
AC
7724fi
7725if test -z "$ac_cv_prog_MIG"; then
7726 ac_ct_MIG=$MIG
7727 # Extract the first word of "mig", so it can be a program name with args.
7728set dummy mig; ac_word=$2
81ecdfbb
RW
7729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7730$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7731if ${ac_cv_prog_ac_ct_MIG+:} false; then :
81ecdfbb 7732 $as_echo_n "(cached) " >&6
bec39cab
AC
7733else
7734 if test -n "$ac_ct_MIG"; then
7735 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7736else
7737as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7738for as_dir in $PATH
7739do
7740 IFS=$as_save_IFS
7741 test -z "$as_dir" && as_dir=.
81ecdfbb 7742 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7743 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7744 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 7745 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7746 break 2
7747 fi
7748done
81ecdfbb
RW
7749 done
7750IFS=$as_save_IFS
c906108c 7751
bec39cab
AC
7752fi
7753fi
7754ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7755if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
7756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7757$as_echo "$ac_ct_MIG" >&6; }
bec39cab 7758else
81ecdfbb
RW
7759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7760$as_echo "no" >&6; }
bec39cab 7761fi
c906108c 7762
81ecdfbb
RW
7763 if test "x$ac_ct_MIG" = x; then
7764 MIG=""
7765 else
7766 case $cross_compiling:$ac_tool_warned in
7767yes:)
7768{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7769$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7770ac_tool_warned=yes ;;
7771esac
7772 MIG=$ac_ct_MIG
7773 fi
bec39cab
AC
7774else
7775 MIG="$ac_cv_prog_MIG"
7776fi
c906108c 7777
036c3acb 7778 if test x"$MIG" = x; then
d0ac1c44 7779 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
036c3acb
TS
7780 fi
7781 ;;
7782esac
c906108c 7783
bec39cab
AC
7784# ---------------------- #
7785# Checks for libraries. #
7786# ---------------------- #
c906108c 7787
bec39cab 7788# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
7789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7790$as_echo_n "checking for main in -lm... " >&6; }
d0ac1c44 7791if ${ac_cv_lib_m_main+:} false; then :
81ecdfbb 7792 $as_echo_n "(cached) " >&6
bec39cab
AC
7793else
7794 ac_check_lib_save_LIBS=$LIBS
7795LIBS="-lm $LIBS"
81ecdfbb 7796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7797/* end confdefs.h. */
c906108c 7798
c906108c 7799
bec39cab
AC
7800int
7801main ()
7802{
81ecdfbb 7803return main ();
bec39cab
AC
7804 ;
7805 return 0;
7806}
7807_ACEOF
81ecdfbb 7808if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
7809 ac_cv_lib_m_main=yes
7810else
81ecdfbb 7811 ac_cv_lib_m_main=no
bec39cab 7812fi
81ecdfbb
RW
7813rm -f core conftest.err conftest.$ac_objext \
7814 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
7815LIBS=$ac_check_lib_save_LIBS
7816fi
81ecdfbb
RW
7817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7818$as_echo "$ac_cv_lib_m_main" >&6; }
d0ac1c44 7819if test "x$ac_cv_lib_m_main" = xyes; then :
bec39cab
AC
7820 cat >>confdefs.h <<_ACEOF
7821#define HAVE_LIBM 1
7822_ACEOF
7823
7824 LIBS="-lm $LIBS"
c906108c 7825
c906108c 7826fi
bec39cab
AC
7827
7828
bec39cab 7829# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
7830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7831$as_echo_n "checking for library containing gethostbyname... " >&6; }
d0ac1c44 7832if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb 7833 $as_echo_n "(cached) " >&6
bec39cab
AC
7834else
7835 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7837/* end confdefs.h. */
ddc9cd0f 7838
81ecdfbb
RW
7839/* Override any GCC internal prototype to avoid an error.
7840 Use char because int might match the return type of a GCC
7841 builtin and then its argument prototype would still apply. */
bec39cab
AC
7842#ifdef __cplusplus
7843extern "C"
7844#endif
bec39cab
AC
7845char gethostbyname ();
7846int
7847main ()
7848{
81ecdfbb 7849return gethostbyname ();
bec39cab
AC
7850 ;
7851 return 0;
7852}
7853_ACEOF
81ecdfbb
RW
7854for ac_lib in '' nsl; do
7855 if test -z "$ac_lib"; then
7856 ac_res="none required"
7857 else
7858 ac_res=-l$ac_lib
b4e70030 7859 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7860 fi
7861 if ac_fn_c_try_link "$LINENO"; then :
7862 ac_cv_search_gethostbyname=$ac_res
7863fi
7864rm -f core conftest.err conftest.$ac_objext \
7865 conftest$ac_exeext
d0ac1c44 7866 if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb
RW
7867 break
7868fi
7869done
d0ac1c44 7870if ${ac_cv_search_gethostbyname+:} false; then :
ddc9cd0f 7871
bec39cab 7872else
81ecdfbb 7873 ac_cv_search_gethostbyname=no
bec39cab 7874fi
81ecdfbb 7875rm conftest.$ac_ext
bec39cab
AC
7876LIBS=$ac_func_search_save_LIBS
7877fi
81ecdfbb
RW
7878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7879$as_echo "$ac_cv_search_gethostbyname" >&6; }
7880ac_res=$ac_cv_search_gethostbyname
7881if test "$ac_res" != no; then :
7882 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 7883
bec39cab 7884fi
96baa820 7885
c906108c 7886
b4e70030 7887# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
7888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7889$as_echo_n "checking for library containing socketpair... " >&6; }
d0ac1c44 7890if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb 7891 $as_echo_n "(cached) " >&6
b4e70030
JB
7892else
7893 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7895/* end confdefs.h. */
7896
81ecdfbb
RW
7897/* Override any GCC internal prototype to avoid an error.
7898 Use char because int might match the return type of a GCC
7899 builtin and then its argument prototype would still apply. */
b4e70030
JB
7900#ifdef __cplusplus
7901extern "C"
7902#endif
b4e70030
JB
7903char socketpair ();
7904int
7905main ()
7906{
81ecdfbb 7907return socketpair ();
b4e70030
JB
7908 ;
7909 return 0;
7910}
7911_ACEOF
81ecdfbb
RW
7912for ac_lib in '' socket; do
7913 if test -z "$ac_lib"; then
7914 ac_res="none required"
7915 else
7916 ac_res=-l$ac_lib
b4e70030 7917 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7918 fi
7919 if ac_fn_c_try_link "$LINENO"; then :
7920 ac_cv_search_socketpair=$ac_res
7921fi
7922rm -f core conftest.err conftest.$ac_objext \
7923 conftest$ac_exeext
d0ac1c44 7924 if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb
RW
7925 break
7926fi
7927done
d0ac1c44 7928if ${ac_cv_search_socketpair+:} false; then :
b4e70030 7929
b4e70030 7930else
81ecdfbb 7931 ac_cv_search_socketpair=no
b4e70030 7932fi
81ecdfbb 7933rm conftest.$ac_ext
b4e70030
JB
7934LIBS=$ac_func_search_save_LIBS
7935fi
81ecdfbb
RW
7936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7937$as_echo "$ac_cv_search_socketpair" >&6; }
7938ac_res=$ac_cv_search_socketpair
7939if test "$ac_res" != no; then :
7940 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7941
7942fi
7943
7944
233a11ab 7945# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 7946
711a72d3 7947 # Use the system's zlib library.
39f3de7c
L
7948 zlibdir="-L\$(top_builddir)/../zlib"
7949 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 7950
711a72d3
L
7951# Check whether --with-system-zlib was given.
7952if test "${with_system_zlib+set}" = set; then :
afa59b79
L
7953 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7954 zlibdir=
7955 zlibinc=
7956 fi
b040ad30 7957
233a11ab 7958fi
233a11ab 7959
233a11ab 7960
233a11ab 7961
b040ad30 7962
233a11ab 7963
25268153 7964# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
37773e78 7965# On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
25268153
JB
7966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7967$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
d0ac1c44 7968if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7969 $as_echo_n "(cached) " >&6
7970else
7971 ac_func_search_save_LIBS=$LIBS
7972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7973/* end confdefs.h. */
7974
7975/* Override any GCC internal prototype to avoid an error.
7976 Use char because int might match the return type of a GCC
7977 builtin and then its argument prototype would still apply. */
7978#ifdef __cplusplus
7979extern "C"
7980#endif
7981char kinfo_getvmmap ();
7982int
7983main ()
7984{
7985return kinfo_getvmmap ();
7986 ;
7987 return 0;
7988}
7989_ACEOF
37773e78 7990for ac_lib in '' util util-freebsd; do
25268153
JB
7991 if test -z "$ac_lib"; then
7992 ac_res="none required"
7993 else
7994 ac_res=-l$ac_lib
7995 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7996 fi
7997 if ac_fn_c_try_link "$LINENO"; then :
7998 ac_cv_search_kinfo_getvmmap=$ac_res
7999fi
8000rm -f core conftest.err conftest.$ac_objext \
8001 conftest$ac_exeext
d0ac1c44 8002 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
8003 break
8004fi
8005done
d0ac1c44 8006if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
8007
8008else
8009 ac_cv_search_kinfo_getvmmap=no
8010fi
8011rm conftest.$ac_ext
8012LIBS=$ac_func_search_save_LIBS
8013fi
8014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
8015$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
8016ac_res=$ac_cv_search_kinfo_getvmmap
8017if test "$ac_res" != no; then :
8018 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8019
8020$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
8021
8022fi
8023
8024
92fce24d
JB
8025# fbsd-nat.c can also use kinfo_getfile.
8026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
8027$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
d0ac1c44 8028if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
8029 $as_echo_n "(cached) " >&6
8030else
8031 ac_func_search_save_LIBS=$LIBS
8032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8033/* end confdefs.h. */
8034
8035/* Override any GCC internal prototype to avoid an error.
8036 Use char because int might match the return type of a GCC
8037 builtin and then its argument prototype would still apply. */
8038#ifdef __cplusplus
8039extern "C"
8040#endif
8041char kinfo_getfile ();
8042int
8043main ()
8044{
8045return kinfo_getfile ();
8046 ;
8047 return 0;
8048}
8049_ACEOF
8050for ac_lib in '' util util-freebsd; do
8051 if test -z "$ac_lib"; then
8052 ac_res="none required"
8053 else
8054 ac_res=-l$ac_lib
8055 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8056 fi
8057 if ac_fn_c_try_link "$LINENO"; then :
8058 ac_cv_search_kinfo_getfile=$ac_res
8059fi
8060rm -f core conftest.err conftest.$ac_objext \
8061 conftest$ac_exeext
d0ac1c44 8062 if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
8063 break
8064fi
8065done
d0ac1c44 8066if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
8067
8068else
8069 ac_cv_search_kinfo_getfile=no
8070fi
8071rm conftest.$ac_ext
8072LIBS=$ac_func_search_save_LIBS
8073fi
8074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
8075$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
8076ac_res=$ac_cv_search_kinfo_getfile
8077if test "$ac_res" != no; then :
8078 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8079
8080$as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
8081
8082fi
8083
8084
77f120bf 8085
016a3251
DD
8086 if test "X$prefix" = "XNONE"; then
8087 acl_final_prefix="$ac_default_prefix"
8088 else
8089 acl_final_prefix="$prefix"
8090 fi
8091 if test "X$exec_prefix" = "XNONE"; then
8092 acl_final_exec_prefix='${prefix}'
8093 else
8094 acl_final_exec_prefix="$exec_prefix"
8095 fi
8096 acl_save_prefix="$prefix"
8097 prefix="$acl_final_prefix"
8098 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8099 prefix="$acl_save_prefix"
8100
8101
8102# Check whether --with-gnu-ld was given.
8103if test "${with_gnu_ld+set}" = set; then :
8104 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8105else
8106 with_gnu_ld=no
8107fi
8108
8109# Prepare PATH_SEPARATOR.
8110# The user is always right.
8111if test "${PATH_SEPARATOR+set}" != set; then
8112 echo "#! /bin/sh" >conf$$.sh
8113 echo "exit 0" >>conf$$.sh
8114 chmod +x conf$$.sh
8115 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8116 PATH_SEPARATOR=';'
8117 else
8118 PATH_SEPARATOR=:
8119 fi
8120 rm -f conf$$.sh
8121fi
8122ac_prog=ld
8123if test "$GCC" = yes; then
8124 # Check if gcc -print-prog-name=ld gives a path.
8125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8126$as_echo_n "checking for ld used by GCC... " >&6; }
8127 case $host in
8128 *-*-mingw*)
8129 # gcc leaves a trailing carriage return which upsets mingw
8130 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8131 *)
8132 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8133 esac
8134 case $ac_prog in
8135 # Accept absolute paths.
8136 [\\/]* | [A-Za-z]:[\\/]*)
8137 re_direlt='/[^/][^/]*/\.\./'
8138 # Canonicalize the path of ld
8139 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8140 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8141 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8142 done
8143 test -z "$LD" && LD="$ac_prog"
8144 ;;
8145 "")
8146 # If it fails, then pretend we aren't using GCC.
8147 ac_prog=ld
8148 ;;
8149 *)
8150 # If it is relative, then search for the first ld in PATH.
8151 with_gnu_ld=unknown
8152 ;;
8153 esac
8154elif test "$with_gnu_ld" = yes; then
8155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8156$as_echo_n "checking for GNU ld... " >&6; }
8157else
8158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8159$as_echo_n "checking for non-GNU ld... " >&6; }
8160fi
d0ac1c44 8161if ${acl_cv_path_LD+:} false; then :
016a3251
DD
8162 $as_echo_n "(cached) " >&6
8163else
8164 if test -z "$LD"; then
8165 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8166 for ac_dir in $PATH; do
8167 test -z "$ac_dir" && ac_dir=.
8168 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8169 acl_cv_path_LD="$ac_dir/$ac_prog"
8170 # Check to see if the program is GNU ld. I'd rather use --version,
8171 # but apparently some GNU ld's only accept -v.
8172 # Break only if it was the GNU/non-GNU ld that we prefer.
8173 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8174 test "$with_gnu_ld" != no && break
8175 else
8176 test "$with_gnu_ld" != yes && break
8177 fi
8178 fi
8179 done
8180 IFS="$ac_save_ifs"
8181else
8182 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8183fi
8184fi
8185
8186LD="$acl_cv_path_LD"
8187if test -n "$LD"; then
8188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8189$as_echo "$LD" >&6; }
8190else
8191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8192$as_echo "no" >&6; }
8193fi
d0ac1c44 8194test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
016a3251
DD
8195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8196$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
d0ac1c44 8197if ${acl_cv_prog_gnu_ld+:} false; then :
016a3251
DD
8198 $as_echo_n "(cached) " >&6
8199else
8200 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8201if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8202 acl_cv_prog_gnu_ld=yes
8203else
8204 acl_cv_prog_gnu_ld=no
8205fi
8206fi
8207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8208$as_echo "$acl_cv_prog_gnu_ld" >&6; }
8209with_gnu_ld=$acl_cv_prog_gnu_ld
8210
8211
8212
8213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8214$as_echo_n "checking for shared library run path origin... " >&6; }
d0ac1c44 8215if ${acl_cv_rpath+:} false; then :
016a3251
DD
8216 $as_echo_n "(cached) " >&6
8217else
8218
8219 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8220 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8221 . ./conftest.sh
8222 rm -f ./conftest.sh
8223 acl_cv_rpath=done
8224
8225fi
8226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8227$as_echo "$acl_cv_rpath" >&6; }
8228 wl="$acl_cv_wl"
8229 libext="$acl_cv_libext"
8230 shlibext="$acl_cv_shlibext"
8231 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8232 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8233 hardcode_direct="$acl_cv_hardcode_direct"
8234 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8235 # Check whether --enable-rpath was given.
8236if test "${enable_rpath+set}" = set; then :
8237 enableval=$enable_rpath; :
8238else
8239 enable_rpath=yes
8240fi
8241
8242
8243
8244
8245
8246
8247
8248
8249 use_additional=yes
8250
8251 acl_save_prefix="$prefix"
8252 prefix="$acl_final_prefix"
8253 acl_save_exec_prefix="$exec_prefix"
8254 exec_prefix="$acl_final_exec_prefix"
8255
8256 eval additional_includedir=\"$includedir\"
8257 eval additional_libdir=\"$libdir\"
8258
8259 exec_prefix="$acl_save_exec_prefix"
8260 prefix="$acl_save_prefix"
77f120bf 8261
6c7a06a3 8262
81ecdfbb
RW
8263# Check whether --with-libiconv-prefix was given.
8264if test "${with_libiconv_prefix+set}" = set; then :
8265 withval=$with_libiconv_prefix;
016a3251
DD
8266 if test "X$withval" = "Xno"; then
8267 use_additional=no
8268 else
8269 if test "X$withval" = "X"; then
8270
8271 acl_save_prefix="$prefix"
8272 prefix="$acl_final_prefix"
8273 acl_save_exec_prefix="$exec_prefix"
8274 exec_prefix="$acl_final_exec_prefix"
8275
8276 eval additional_includedir=\"$includedir\"
8277 eval additional_libdir=\"$libdir\"
8278
8279 exec_prefix="$acl_save_exec_prefix"
8280 prefix="$acl_save_prefix"
8281
8282 else
8283 additional_includedir="$withval/include"
8284 additional_libdir="$withval/lib"
8285 fi
8286 fi
6c7a06a3 8287
81ecdfbb
RW
8288fi
8289
016a3251
DD
8290 LIBICONV=
8291 LTLIBICONV=
8292 INCICONV=
8293 rpathdirs=
8294 ltrpathdirs=
8295 names_already_handled=
8296 names_next_round='iconv '
8297 while test -n "$names_next_round"; do
8298 names_this_round="$names_next_round"
8299 names_next_round=
8300 for name in $names_this_round; do
8301 already_handled=
8302 for n in $names_already_handled; do
8303 if test "$n" = "$name"; then
8304 already_handled=yes
8305 break
8306 fi
8307 done
8308 if test -z "$already_handled"; then
8309 names_already_handled="$names_already_handled $name"
8310 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8311 eval value=\"\$HAVE_LIB$uppername\"
8312 if test -n "$value"; then
8313 if test "$value" = yes; then
8314 eval value=\"\$LIB$uppername\"
8315 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8316 eval value=\"\$LTLIB$uppername\"
8317 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8318 else
8319 :
8320 fi
8321 else
8322 found_dir=
8323 found_la=
8324 found_so=
8325 found_a=
8326 if test $use_additional = yes; then
8327 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8328 found_dir="$additional_libdir"
8329 found_so="$additional_libdir/lib$name.$shlibext"
8330 if test -f "$additional_libdir/lib$name.la"; then
8331 found_la="$additional_libdir/lib$name.la"
8332 fi
8333 else
8334 if test -f "$additional_libdir/lib$name.$libext"; then
8335 found_dir="$additional_libdir"
8336 found_a="$additional_libdir/lib$name.$libext"
8337 if test -f "$additional_libdir/lib$name.la"; then
8338 found_la="$additional_libdir/lib$name.la"
8339 fi
8340 fi
8341 fi
8342 fi
8343 if test "X$found_dir" = "X"; then
8344 for x in $LDFLAGS $LTLIBICONV; do
8345
8346 acl_save_prefix="$prefix"
8347 prefix="$acl_final_prefix"
8348 acl_save_exec_prefix="$exec_prefix"
8349 exec_prefix="$acl_final_exec_prefix"
8350 eval x=\"$x\"
8351 exec_prefix="$acl_save_exec_prefix"
8352 prefix="$acl_save_prefix"
8353
8354 case "$x" in
8355 -L*)
8356 dir=`echo "X$x" | sed -e 's/^X-L//'`
8357 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8358 found_dir="$dir"
8359 found_so="$dir/lib$name.$shlibext"
8360 if test -f "$dir/lib$name.la"; then
8361 found_la="$dir/lib$name.la"
8362 fi
8363 else
8364 if test -f "$dir/lib$name.$libext"; then
8365 found_dir="$dir"
8366 found_a="$dir/lib$name.$libext"
8367 if test -f "$dir/lib$name.la"; then
8368 found_la="$dir/lib$name.la"
8369 fi
8370 fi
8371 fi
8372 ;;
8373 esac
8374 if test "X$found_dir" != "X"; then
8375 break
8376 fi
8377 done
8378 fi
8379 if test "X$found_dir" != "X"; then
8380 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8381 if test "X$found_so" != "X"; then
8382 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8383 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8384 else
8385 haveit=
8386 for x in $ltrpathdirs; do
8387 if test "X$x" = "X$found_dir"; then
8388 haveit=yes
8389 break
8390 fi
8391 done
8392 if test -z "$haveit"; then
8393 ltrpathdirs="$ltrpathdirs $found_dir"
8394 fi
8395 if test "$hardcode_direct" = yes; then
8396 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8397 else
8398 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8399 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8400 haveit=
8401 for x in $rpathdirs; do
8402 if test "X$x" = "X$found_dir"; then
8403 haveit=yes
8404 break
8405 fi
8406 done
8407 if test -z "$haveit"; then
8408 rpathdirs="$rpathdirs $found_dir"
8409 fi
8410 else
8411 haveit=
8412 for x in $LDFLAGS $LIBICONV; do
8413
8414 acl_save_prefix="$prefix"
8415 prefix="$acl_final_prefix"
8416 acl_save_exec_prefix="$exec_prefix"
8417 exec_prefix="$acl_final_exec_prefix"
8418 eval x=\"$x\"
8419 exec_prefix="$acl_save_exec_prefix"
8420 prefix="$acl_save_prefix"
8421
8422 if test "X$x" = "X-L$found_dir"; then
8423 haveit=yes
8424 break
8425 fi
8426 done
8427 if test -z "$haveit"; then
8428 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8429 fi
8430 if test "$hardcode_minus_L" != no; then
8431 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8432 else
8433 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8434 fi
8435 fi
8436 fi
8437 fi
8438 else
8439 if test "X$found_a" != "X"; then
8440 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8441 else
8442 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8443 fi
8444 fi
8445 additional_includedir=
8446 case "$found_dir" in
8447 */lib | */lib/)
8448 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8449 additional_includedir="$basedir/include"
8450 ;;
8451 esac
8452 if test "X$additional_includedir" != "X"; then
8453 if test "X$additional_includedir" != "X/usr/include"; then
8454 haveit=
8455 if test "X$additional_includedir" = "X/usr/local/include"; then
8456 if test -n "$GCC"; then
8457 case $host_os in
8458 linux*) haveit=yes;;
8459 esac
8460 fi
8461 fi
8462 if test -z "$haveit"; then
8463 for x in $CPPFLAGS $INCICONV; do
8464
8465 acl_save_prefix="$prefix"
8466 prefix="$acl_final_prefix"
8467 acl_save_exec_prefix="$exec_prefix"
8468 exec_prefix="$acl_final_exec_prefix"
8469 eval x=\"$x\"
8470 exec_prefix="$acl_save_exec_prefix"
8471 prefix="$acl_save_prefix"
8472
8473 if test "X$x" = "X-I$additional_includedir"; then
8474 haveit=yes
8475 break
8476 fi
8477 done
8478 if test -z "$haveit"; then
8479 if test -d "$additional_includedir"; then
8480 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8481 fi
8482 fi
8483 fi
8484 fi
8485 fi
8486 if test -n "$found_la"; then
8487 save_libdir="$libdir"
8488 case "$found_la" in
8489 */* | *\\*) . "$found_la" ;;
8490 *) . "./$found_la" ;;
8491 esac
8492 libdir="$save_libdir"
8493 for dep in $dependency_libs; do
8494 case "$dep" in
8495 -L*)
8496 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8497 if test "X$additional_libdir" != "X/usr/lib"; then
8498 haveit=
8499 if test "X$additional_libdir" = "X/usr/local/lib"; then
8500 if test -n "$GCC"; then
8501 case $host_os in
8502 linux*) haveit=yes;;
8503 esac
8504 fi
8505 fi
8506 if test -z "$haveit"; then
8507 haveit=
8508 for x in $LDFLAGS $LIBICONV; do
8509
8510 acl_save_prefix="$prefix"
8511 prefix="$acl_final_prefix"
8512 acl_save_exec_prefix="$exec_prefix"
8513 exec_prefix="$acl_final_exec_prefix"
8514 eval x=\"$x\"
8515 exec_prefix="$acl_save_exec_prefix"
8516 prefix="$acl_save_prefix"
8517
8518 if test "X$x" = "X-L$additional_libdir"; then
8519 haveit=yes
8520 break
8521 fi
8522 done
8523 if test -z "$haveit"; then
8524 if test -d "$additional_libdir"; then
8525 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8526 fi
8527 fi
8528 haveit=
8529 for x in $LDFLAGS $LTLIBICONV; do
8530
8531 acl_save_prefix="$prefix"
8532 prefix="$acl_final_prefix"
8533 acl_save_exec_prefix="$exec_prefix"
8534 exec_prefix="$acl_final_exec_prefix"
8535 eval x=\"$x\"
8536 exec_prefix="$acl_save_exec_prefix"
8537 prefix="$acl_save_prefix"
8538
8539 if test "X$x" = "X-L$additional_libdir"; then
8540 haveit=yes
8541 break
8542 fi
8543 done
8544 if test -z "$haveit"; then
8545 if test -d "$additional_libdir"; then
8546 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8547 fi
8548 fi
8549 fi
8550 fi
8551 ;;
8552 -R*)
8553 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8554 if test "$enable_rpath" != no; then
8555 haveit=
8556 for x in $rpathdirs; do
8557 if test "X$x" = "X$dir"; then
8558 haveit=yes
8559 break
8560 fi
8561 done
8562 if test -z "$haveit"; then
8563 rpathdirs="$rpathdirs $dir"
8564 fi
8565 haveit=
8566 for x in $ltrpathdirs; do
8567 if test "X$x" = "X$dir"; then
8568 haveit=yes
8569 break
8570 fi
8571 done
8572 if test -z "$haveit"; then
8573 ltrpathdirs="$ltrpathdirs $dir"
8574 fi
8575 fi
8576 ;;
8577 -l*)
8578 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8579 ;;
8580 *.la)
8581 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8582 ;;
8583 *)
8584 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8585 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8586 ;;
8587 esac
8588 done
8589 fi
8590 else
8591 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8592 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8593 fi
8594 fi
8595 fi
8596 done
8597 done
8598 if test "X$rpathdirs" != "X"; then
8599 if test -n "$hardcode_libdir_separator"; then
8600 alldirs=
8601 for found_dir in $rpathdirs; do
8602 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8603 done
8604 acl_save_libdir="$libdir"
8605 libdir="$alldirs"
8606 eval flag=\"$hardcode_libdir_flag_spec\"
8607 libdir="$acl_save_libdir"
8608 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8609 else
8610 for found_dir in $rpathdirs; do
8611 acl_save_libdir="$libdir"
8612 libdir="$found_dir"
8613 eval flag=\"$hardcode_libdir_flag_spec\"
8614 libdir="$acl_save_libdir"
8615 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8616 done
8617 fi
8618 fi
8619 if test "X$ltrpathdirs" != "X"; then
8620 for found_dir in $ltrpathdirs; do
8621 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8622 done
8623 fi
8624
8625
8626
8627
8628
6c7a06a3 8629
6c7a06a3 8630
81ecdfbb
RW
8631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8632$as_echo_n "checking for iconv... " >&6; }
d0ac1c44 8633if ${am_cv_func_iconv+:} false; then :
81ecdfbb 8634 $as_echo_n "(cached) " >&6
d542061a 8635else
6c7a06a3
TT
8636
8637 am_cv_func_iconv="no, consider installing GNU libiconv"
8638 am_cv_lib_iconv=no
016a3251
DD
8639 am_save_CPPFLAGS="$CPPFLAGS"
8640 CPPFLAGS="$CPPFLAGS $INCICONV"
8641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8642/* end confdefs.h. */
6c7a06a3
TT
8643#include <stdlib.h>
8644#include <iconv.h>
d542061a
UW
8645int
8646main ()
8647{
6c7a06a3 8648iconv_t cd = iconv_open("","");
016a3251
DD
8649 iconv(cd,NULL,NULL,NULL,NULL);
8650 iconv_close(cd);
d542061a
UW
8651 ;
8652 return 0;
8653}
8654_ACEOF
81ecdfbb 8655if ac_fn_c_try_link "$LINENO"; then :
016a3251 8656 am_cv_func_iconv=yes
d542061a 8657fi
81ecdfbb
RW
8658rm -f core conftest.err conftest.$ac_objext \
8659 conftest$ac_exeext conftest.$ac_ext
016a3251 8660 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 8661
016a3251
DD
8662 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8663 for _libs in .libs _libs; do
8664 am_save_CPPFLAGS="$CPPFLAGS"
8665 am_save_LIBS="$LIBS"
8666 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8667 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8669/* end confdefs.h. */
6c7a06a3
TT
8670#include <stdlib.h>
8671#include <iconv.h>
d542061a
UW
8672int
8673main ()
8674{
6c7a06a3 8675iconv_t cd = iconv_open("","");
016a3251
DD
8676 iconv(cd,NULL,NULL,NULL,NULL);
8677 iconv_close(cd);
d542061a
UW
8678 ;
8679 return 0;
8680}
8681_ACEOF
81ecdfbb 8682if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
8683 INCICONV="-I../libiconv/include"
8684 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8685 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8686 am_cv_lib_iconv=yes
8687 am_cv_func_iconv=yes
d542061a 8688fi
81ecdfbb
RW
8689rm -f core conftest.err conftest.$ac_objext \
8690 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
8691 CPPFLAGS="$am_save_CPPFLAGS"
8692 LIBS="$am_save_LIBS"
8693 if test "$am_cv_func_iconv" = "yes"; then
8694 break
8695 fi
8696 done
77f120bf 8697 fi
94ae1714 8698
4edb1e84 8699 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 8700 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 8701 am_save_LIBS="$LIBS"
016a3251
DD
8702 CPPFLAGS="$LIBS $INCICONV"
8703 LIBS="$LIBS $LIBICONV"
81ecdfbb 8704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8705/* end confdefs.h. */
6c7a06a3
TT
8706#include <stdlib.h>
8707#include <iconv.h>
bec39cab
AC
8708int
8709main ()
8710{
6c7a06a3
TT
8711iconv_t cd = iconv_open("","");
8712 iconv(cd,NULL,NULL,NULL,NULL);
8713 iconv_close(cd);
bec39cab
AC
8714 ;
8715 return 0;
8716}
8717_ACEOF
81ecdfbb 8718if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8719 am_cv_lib_iconv=yes
6c7a06a3 8720 am_cv_func_iconv=yes
627af7ea 8721fi
81ecdfbb
RW
8722rm -f core conftest.err conftest.$ac_objext \
8723 conftest$ac_exeext conftest.$ac_ext
fc3b640d 8724 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 8725 LIBS="$am_save_LIBS"
6c7a06a3
TT
8726 fi
8727
8728fi
81ecdfbb
RW
8729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8730$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
8731 if test "$am_cv_func_iconv" = yes; then
8732
8733$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 8734
016a3251 8735 fi
fc3b640d 8736 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
8737
8738 for element in $INCICONV; do
8739 haveit=
8740 for x in $CPPFLAGS; do
8741
8742 acl_save_prefix="$prefix"
8743 prefix="$acl_final_prefix"
8744 acl_save_exec_prefix="$exec_prefix"
8745 exec_prefix="$acl_final_exec_prefix"
8746 eval x=\"$x\"
8747 exec_prefix="$acl_save_exec_prefix"
8748 prefix="$acl_save_prefix"
8749
8750 if test "X$x" = "X$element"; then
8751 haveit=yes
8752 break
8753 fi
8754 done
8755 if test -z "$haveit"; then
8756 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8757 fi
8758 done
8759
8760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8761$as_echo_n "checking how to link with libiconv... " >&6; }
8762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8763$as_echo "$LIBICONV" >&6; }
94ae1714 8764 else
016a3251
DD
8765 LIBICONV=
8766 LTLIBICONV=
fc3b640d 8767 fi
94ae1714 8768
6c7a06a3 8769
6c7a06a3 8770
016a3251 8771 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
8772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8773$as_echo_n "checking for iconv declaration... " >&6; }
d0ac1c44 8774 if ${am_cv_proto_iconv+:} false; then :
81ecdfbb 8775 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8776else
8777
81ecdfbb 8778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8779/* end confdefs.h. */
8780
6c7a06a3
TT
8781#include <stdlib.h>
8782#include <iconv.h>
8783extern
b4e70030 8784#ifdef __cplusplus
6c7a06a3 8785"C"
b4e70030 8786#endif
6c7a06a3
TT
8787#if defined(__STDC__) || defined(__cplusplus)
8788size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8789#else
8790size_t iconv();
8791#endif
8792
b4e70030
JB
8793int
8794main ()
8795{
6c7a06a3 8796
b4e70030
JB
8797 ;
8798 return 0;
8799}
8800_ACEOF
81ecdfbb 8801if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 8802 am_cv_proto_iconv_arg1=""
4e8d927d 8803else
81ecdfbb 8804 am_cv_proto_iconv_arg1="const"
b4e70030 8805fi
81ecdfbb 8806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
8807 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);"
8808fi
8809
8810 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 8811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 8812 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
8813$as_echo "${ac_t:-
8814 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
8815
8816cat >>confdefs.h <<_ACEOF
8817#define ICONV_CONST $am_cv_proto_iconv_arg1
8818_ACEOF
8819
8820 fi
6c7a06a3
TT
8821
8822
478aac75
DE
8823# GDB may fork/exec the iconv program to get the list of supported character
8824# sets. Allow the user to specify where to find it.
8825# There are several factors affecting the choice of option name:
8826# - There is already --with-libiconv-prefix but we can't use it, it specifies
8827# the build-time location of libiconv files.
8828# - The program we need to find is iconv, which comes with glibc. The user
8829# doesn't necessarily have libiconv installed. Therefore naming this
8830# --with-libiconv-foo feels wrong.
8831# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8832# defined to work on directories not files (though it really doesn't know
8833# the difference).
8834# - Calling this --with-iconv-prefix is perceived to cause too much confusion
8835# with --with-libiconv-prefix.
8836# Putting these together is why the option name is --with-iconv-bin.
8837
8838
8839# Check whether --with-iconv-bin was given.
8840if test "${with_iconv_bin+set}" = set; then :
8841 withval=$with_iconv_bin; iconv_bin="${withval}"
8842
8843cat >>confdefs.h <<_ACEOF
8844#define ICONV_BIN "${iconv_bin}"
8845_ACEOF
8846
8847
8848 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8849 if test "x$prefix" = xNONE; then
8850 test_prefix=/usr/local
8851 else
8852 test_prefix=$prefix
8853 fi
8854 else
8855 test_prefix=$exec_prefix
8856 fi
8857 value=0
8858 case ${iconv_bin} in
8859 "${test_prefix}"|"${test_prefix}/"*|\
8860 '${exec_prefix}'|'${exec_prefix}/'*)
8861 value=1
8862 ;;
8863 esac
8864
8865cat >>confdefs.h <<_ACEOF
8866#define ICONV_BIN_RELOCATABLE $value
8867_ACEOF
8868
8869
8870
8871fi
8872
8873
cb01cfba 8874# For the TUI, we need enhanced curses functionality.
bd8a8e1b 8875if test x"$enable_tui" != xno; then
cb01cfba
JB
8876 prefer_curses=yes
8877fi
8878
8879curses_found=no
8880if test x"$prefer_curses" = xyes; then
8881 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8882 # curses library because the latter might not provide all the
8883 # functionality we need. However, this leads to problems on systems
8884 # where the linker searches /usr/local/lib, but the compiler doesn't
8885 # search /usr/local/include, if ncurses is installed in /usr/local. A
8886 # default installation of ncurses on alpha*-dec-osf* will lead to such
8887 # a situation.
81ecdfbb
RW
8888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8889$as_echo_n "checking for library containing waddstr... " >&6; }
d0ac1c44 8890if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8891 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8892else
8893 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8895/* end confdefs.h. */
8896
81ecdfbb
RW
8897/* Override any GCC internal prototype to avoid an error.
8898 Use char because int might match the return type of a GCC
8899 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8900#ifdef __cplusplus
8901extern "C"
8902#endif
6c7a06a3
TT
8903char waddstr ();
8904int
8905main ()
8906{
81ecdfbb 8907return waddstr ();
6c7a06a3
TT
8908 ;
8909 return 0;
8910}
8911_ACEOF
5007d765 8912for ac_lib in '' ncursesw ncurses cursesX curses; do
81ecdfbb
RW
8913 if test -z "$ac_lib"; then
8914 ac_res="none required"
8915 else
8916 ac_res=-l$ac_lib
8917 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8918 fi
8919 if ac_fn_c_try_link "$LINENO"; then :
8920 ac_cv_search_waddstr=$ac_res
8921fi
8922rm -f core conftest.err conftest.$ac_objext \
8923 conftest$ac_exeext
d0ac1c44 8924 if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb
RW
8925 break
8926fi
8927done
d0ac1c44 8928if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8929
6c7a06a3 8930else
81ecdfbb
RW
8931 ac_cv_search_waddstr=no
8932fi
8933rm conftest.$ac_ext
8934LIBS=$ac_func_search_save_LIBS
8935fi
8936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8937$as_echo "$ac_cv_search_waddstr" >&6; }
8938ac_res=$ac_cv_search_waddstr
8939if test "$ac_res" != no; then :
8940 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
8941
8942fi
8943
8944
cb01cfba
JB
8945 if test "$ac_cv_search_waddstr" != no; then
8946 curses_found=yes
8947 fi
8948fi
8949
8950# Check whether we should enable the TUI, but only do so if we really
8951# can.
8952if test x"$enable_tui" != xno; then
8953 if test -d $srcdir/tui; then
8954 if test "$curses_found" != no; then
6c7a06a3
TT
8955 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8956 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8957 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8958 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
8959 else
8960 if test x"$enable_tui" = xyes; then
d0ac1c44 8961 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 8962 else
81ecdfbb
RW
8963 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8964$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
8965 fi
8966 fi
8967 fi
8968fi
8969
8970# Since GDB uses Readline, we need termcap functionality. In many
8971# cases this will be provided by the curses library, but some systems
96fe4562 8972# have a separate termcap library, or no curses library at all.
6c7a06a3
TT
8973
8974case $host_os in
8975 cygwin*)
8976 if test -d $srcdir/libtermcap; then
8977 LIBS="../libtermcap/libtermcap.a $LIBS"
8978 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8979 fi ;;
8980 go32* | *djgpp*)
8981 ac_cv_search_tgetent="none required"
8982 ;;
6c7a06a3
TT
8983esac
8984
8985# These are the libraries checked by Readline.
81ecdfbb
RW
8986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8987$as_echo_n "checking for library containing tgetent... " >&6; }
d0ac1c44 8988if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb 8989 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8990else
8991 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8993/* end confdefs.h. */
8994
81ecdfbb
RW
8995/* Override any GCC internal prototype to avoid an error.
8996 Use char because int might match the return type of a GCC
8997 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8998#ifdef __cplusplus
8999extern "C"
9000#endif
6c7a06a3
TT
9001char tgetent ();
9002int
9003main ()
9004{
81ecdfbb 9005return tgetent ();
6c7a06a3
TT
9006 ;
9007 return 0;
9008}
9009_ACEOF
5007d765 9010for ac_lib in '' termcap tinfo curses ncursesw ncurses; do
81ecdfbb
RW
9011 if test -z "$ac_lib"; then
9012 ac_res="none required"
9013 else
9014 ac_res=-l$ac_lib
6c7a06a3 9015 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9016 fi
9017 if ac_fn_c_try_link "$LINENO"; then :
9018 ac_cv_search_tgetent=$ac_res
9019fi
9020rm -f core conftest.err conftest.$ac_objext \
9021 conftest$ac_exeext
d0ac1c44 9022 if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb
RW
9023 break
9024fi
9025done
d0ac1c44 9026if ${ac_cv_search_tgetent+:} false; then :
6c7a06a3 9027
6c7a06a3 9028else
81ecdfbb 9029 ac_cv_search_tgetent=no
6c7a06a3 9030fi
81ecdfbb 9031rm conftest.$ac_ext
6c7a06a3
TT
9032LIBS=$ac_func_search_save_LIBS
9033fi
81ecdfbb
RW
9034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9035$as_echo "$ac_cv_search_tgetent" >&6; }
9036ac_res=$ac_cv_search_tgetent
9037if test "$ac_res" != no; then :
9038 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 9039
06825bd1
MK
9040fi
9041
06825bd1 9042
bec39cab 9043if test "$ac_cv_search_tgetent" = no; then
7a85168d 9044 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
9045fi
9046
3841debe 9047
81ecdfbb
RW
9048# Check whether --with-system-readline was given.
9049if test "${with_system_readline+set}" = set; then :
9050 withval=$with_system_readline;
9051fi
6a30b0a5 9052
6a30b0a5
AS
9053
9054if test "$with_system_readline" = yes; then
9055 READLINE=-lreadline
9056 READLINE_DEPS=
9057 READLINE_CFLAGS=
39037522 9058 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
9059else
9060 READLINE='$(READLINE_DIR)/libreadline.a'
9061 READLINE_DEPS='$(READLINE)'
9062 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 9063 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
9064fi
9065
9066
9067
9068
9069
f997c383
SD
9070# Generate jit-reader.h
9071
9072# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9073TARGET_PTR=
9074
9075# The cast to long int works around a bug in the HP C Compiler
9076# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9077# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9078# This bug is HP SR number 8606223364.
9079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9080$as_echo_n "checking size of unsigned long long... " >&6; }
d0ac1c44 9081if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
f997c383
SD
9082 $as_echo_n "(cached) " >&6
9083else
9084 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9085
9086else
9087 if test "$ac_cv_type_unsigned_long_long" = yes; then
9088 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9089$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9090as_fn_error 77 "cannot compute sizeof (unsigned long long)
9091See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9092 else
9093 ac_cv_sizeof_unsigned_long_long=0
9094 fi
9095fi
9096
9097fi
9098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9099$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9100
9101
9102
9103cat >>confdefs.h <<_ACEOF
9104#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9105_ACEOF
9106
9107
9108# The cast to long int works around a bug in the HP C Compiler
9109# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9110# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9111# This bug is HP SR number 8606223364.
9112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9113$as_echo_n "checking size of unsigned long... " >&6; }
d0ac1c44 9114if ${ac_cv_sizeof_unsigned_long+:} false; then :
f997c383
SD
9115 $as_echo_n "(cached) " >&6
9116else
9117 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9118
9119else
9120 if test "$ac_cv_type_unsigned_long" = yes; then
9121 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9122$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9123as_fn_error 77 "cannot compute sizeof (unsigned long)
9124See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9125 else
9126 ac_cv_sizeof_unsigned_long=0
9127 fi
9128fi
9129
9130fi
9131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9132$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9133
9134
9135
9136cat >>confdefs.h <<_ACEOF
9137#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9138_ACEOF
9139
9140
9141# The cast to long int works around a bug in the HP C Compiler
9142# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9143# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9144# This bug is HP SR number 8606223364.
9145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9146$as_echo_n "checking size of unsigned __int128... " >&6; }
d0ac1c44 9147if ${ac_cv_sizeof_unsigned___int128+:} false; then :
f997c383
SD
9148 $as_echo_n "(cached) " >&6
9149else
9150 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9151
9152else
9153 if test "$ac_cv_type_unsigned___int128" = yes; then
9154 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9155$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9156as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9157See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9158 else
9159 ac_cv_sizeof_unsigned___int128=0
9160 fi
9161fi
9162
9163fi
9164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9165$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9166
9167
9168
9169cat >>confdefs.h <<_ACEOF
9170#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9171_ACEOF
9172
9173
9174
9175if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9176 TARGET_PTR="unsigned long"
9177elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9178 TARGET_PTR="unsigned long long"
9179elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9180 TARGET_PTR="unsigned __int128"
9181else
9182 TARGET_PTR="unsigned long"
9183fi
9184
9185
9186ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9187
9188
a2d08b9e
SD
9189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9190$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 9191if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9192 $as_echo_n "(cached) " >&6
9193else
9194 ac_func_search_save_LIBS=$LIBS
9195cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9196/* end confdefs.h. */
9197
9198/* Override any GCC internal prototype to avoid an error.
9199 Use char because int might match the return type of a GCC
9200 builtin and then its argument prototype would still apply. */
9201#ifdef __cplusplus
9202extern "C"
9203#endif
9204char dlopen ();
9205int
9206main ()
9207{
9208return dlopen ();
9209 ;
9210 return 0;
9211}
9212_ACEOF
9213for ac_lib in '' dl; do
9214 if test -z "$ac_lib"; then
9215 ac_res="none required"
9216 else
9217 ac_res=-l$ac_lib
9218 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9219 fi
9220 if ac_fn_c_try_link "$LINENO"; then :
9221 ac_cv_search_dlopen=$ac_res
9222fi
9223rm -f core conftest.err conftest.$ac_objext \
9224 conftest$ac_exeext
d0ac1c44 9225 if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9226 break
9227fi
9228done
d0ac1c44 9229if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9230
9231else
9232 ac_cv_search_dlopen=no
9233fi
9234rm conftest.$ac_ext
9235LIBS=$ac_func_search_save_LIBS
9236fi
9237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9238$as_echo "$ac_cv_search_dlopen" >&6; }
9239ac_res=$ac_cv_search_dlopen
9240if test "$ac_res" != no; then :
9241 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9242
9243fi
9244
9245
39037522 9246
b8e0a31c
SD
9247
9248# Check whether --with-jit-reader-dir was given.
9249if test "${with_jit_reader_dir+set}" = set; then :
9250 withval=$with_jit_reader_dir;
9251 JIT_READER_DIR=$withval
9252else
9253 JIT_READER_DIR=${libdir}/gdb
9254fi
9255
9256
9257 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9258 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9259 ac_define_dir=`eval echo $JIT_READER_DIR`
9260 ac_define_dir=`eval echo $ac_define_dir`
9261
9262cat >>confdefs.h <<_ACEOF
9263#define JIT_READER_DIR "$ac_define_dir"
9264_ACEOF
9265
9266
9267
9268
9269 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9270 if test "x$prefix" = xNONE; then
9271 test_prefix=/usr/local
9272 else
9273 test_prefix=$prefix
9274 fi
9275 else
9276 test_prefix=$exec_prefix
9277 fi
9278 value=0
9279 case ${ac_define_dir} in
9280 "${test_prefix}"|"${test_prefix}/"*|\
9281 '${exec_prefix}'|'${exec_prefix}/'*)
9282 value=1
9283 ;;
9284 esac
9285
9286cat >>confdefs.h <<_ACEOF
9287#define JIT_READER_DIR_RELOCATABLE $value
9288_ACEOF
9289
9290
9291
9292
9293
81ecdfbb
RW
9294# Check whether --with-expat was given.
9295if test "${with_expat+set}" = set; then :
9296 withval=$with_expat;
5c39566f
DJ
9297else
9298 with_expat=auto
81ecdfbb
RW
9299fi
9300
9301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9302$as_echo_n "checking whether to use expat... " >&6; }
9303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9304$as_echo "$with_expat" >&6; }
5c39566f
DJ
9305
9306if test "${with_expat}" = no; then
81ecdfbb
RW
9307 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9308$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9309 HAVE_LIBEXPAT=no
9310else
9311
3841debe
DJ
9312
9313
9314
9315
9316
9317
9318
9319 use_additional=yes
9320
9321 acl_save_prefix="$prefix"
9322 prefix="$acl_final_prefix"
9323 acl_save_exec_prefix="$exec_prefix"
9324 exec_prefix="$acl_final_exec_prefix"
9325
9326 eval additional_includedir=\"$includedir\"
9327 eval additional_libdir=\"$libdir\"
9328
9329 exec_prefix="$acl_save_exec_prefix"
9330 prefix="$acl_save_prefix"
9331
9332
81ecdfbb
RW
9333# Check whether --with-libexpat-prefix was given.
9334if test "${with_libexpat_prefix+set}" = set; then :
9335 withval=$with_libexpat_prefix;
3841debe
DJ
9336 if test "X$withval" = "Xno"; then
9337 use_additional=no
9338 else
9339 if test "X$withval" = "X"; then
9340
9341 acl_save_prefix="$prefix"
9342 prefix="$acl_final_prefix"
9343 acl_save_exec_prefix="$exec_prefix"
9344 exec_prefix="$acl_final_exec_prefix"
9345
9346 eval additional_includedir=\"$includedir\"
9347 eval additional_libdir=\"$libdir\"
9348
9349 exec_prefix="$acl_save_exec_prefix"
9350 prefix="$acl_save_prefix"
9351
9352 else
9353 additional_includedir="$withval/include"
9354 additional_libdir="$withval/lib"
9355 fi
9356 fi
9357
81ecdfbb
RW
9358fi
9359
3841debe
DJ
9360 LIBEXPAT=
9361 LTLIBEXPAT=
9362 INCEXPAT=
9363 rpathdirs=
9364 ltrpathdirs=
9365 names_already_handled=
9366 names_next_round='expat '
9367 while test -n "$names_next_round"; do
9368 names_this_round="$names_next_round"
9369 names_next_round=
9370 for name in $names_this_round; do
9371 already_handled=
9372 for n in $names_already_handled; do
9373 if test "$n" = "$name"; then
9374 already_handled=yes
9375 break
9376 fi
9377 done
9378 if test -z "$already_handled"; then
9379 names_already_handled="$names_already_handled $name"
9380 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9381 eval value=\"\$HAVE_LIB$uppername\"
9382 if test -n "$value"; then
9383 if test "$value" = yes; then
9384 eval value=\"\$LIB$uppername\"
9385 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9386 eval value=\"\$LTLIB$uppername\"
9387 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9388 else
9389 :
9390 fi
9391 else
9392 found_dir=
9393 found_la=
9394 found_so=
9395 found_a=
9396 if test $use_additional = yes; then
9397 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9398 found_dir="$additional_libdir"
9399 found_so="$additional_libdir/lib$name.$shlibext"
9400 if test -f "$additional_libdir/lib$name.la"; then
9401 found_la="$additional_libdir/lib$name.la"
9402 fi
9403 else
9404 if test -f "$additional_libdir/lib$name.$libext"; then
9405 found_dir="$additional_libdir"
9406 found_a="$additional_libdir/lib$name.$libext"
9407 if test -f "$additional_libdir/lib$name.la"; then
9408 found_la="$additional_libdir/lib$name.la"
9409 fi
9410 fi
9411 fi
9412 fi
9413 if test "X$found_dir" = "X"; then
9414 for x in $LDFLAGS $LTLIBEXPAT; do
9415
9416 acl_save_prefix="$prefix"
9417 prefix="$acl_final_prefix"
9418 acl_save_exec_prefix="$exec_prefix"
9419 exec_prefix="$acl_final_exec_prefix"
9420 eval x=\"$x\"
9421 exec_prefix="$acl_save_exec_prefix"
9422 prefix="$acl_save_prefix"
9423
9424 case "$x" in
9425 -L*)
9426 dir=`echo "X$x" | sed -e 's/^X-L//'`
9427 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9428 found_dir="$dir"
9429 found_so="$dir/lib$name.$shlibext"
9430 if test -f "$dir/lib$name.la"; then
9431 found_la="$dir/lib$name.la"
9432 fi
9433 else
9434 if test -f "$dir/lib$name.$libext"; then
9435 found_dir="$dir"
9436 found_a="$dir/lib$name.$libext"
9437 if test -f "$dir/lib$name.la"; then
9438 found_la="$dir/lib$name.la"
9439 fi
9440 fi
9441 fi
9442 ;;
9443 esac
9444 if test "X$found_dir" != "X"; then
9445 break
9446 fi
9447 done
9448 fi
9449 if test "X$found_dir" != "X"; then
9450 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9451 if test "X$found_so" != "X"; then
9452 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9453 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9454 else
9455 haveit=
9456 for x in $ltrpathdirs; do
9457 if test "X$x" = "X$found_dir"; then
9458 haveit=yes
9459 break
9460 fi
9461 done
9462 if test -z "$haveit"; then
9463 ltrpathdirs="$ltrpathdirs $found_dir"
9464 fi
9465 if test "$hardcode_direct" = yes; then
9466 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9467 else
9468 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9469 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9470 haveit=
9471 for x in $rpathdirs; do
9472 if test "X$x" = "X$found_dir"; then
9473 haveit=yes
9474 break
9475 fi
9476 done
9477 if test -z "$haveit"; then
9478 rpathdirs="$rpathdirs $found_dir"
9479 fi
9480 else
9481 haveit=
9482 for x in $LDFLAGS $LIBEXPAT; do
9483
9484 acl_save_prefix="$prefix"
9485 prefix="$acl_final_prefix"
9486 acl_save_exec_prefix="$exec_prefix"
9487 exec_prefix="$acl_final_exec_prefix"
9488 eval x=\"$x\"
9489 exec_prefix="$acl_save_exec_prefix"
9490 prefix="$acl_save_prefix"
9491
9492 if test "X$x" = "X-L$found_dir"; then
9493 haveit=yes
9494 break
9495 fi
9496 done
9497 if test -z "$haveit"; then
9498 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9499 fi
9500 if test "$hardcode_minus_L" != no; then
9501 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9502 else
9503 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9504 fi
9505 fi
9506 fi
9507 fi
9508 else
9509 if test "X$found_a" != "X"; then
9510 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9511 else
9512 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9513 fi
9514 fi
9515 additional_includedir=
9516 case "$found_dir" in
9517 */lib | */lib/)
9518 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9519 additional_includedir="$basedir/include"
9520 ;;
9521 esac
9522 if test "X$additional_includedir" != "X"; then
9523 if test "X$additional_includedir" != "X/usr/include"; then
9524 haveit=
9525 if test "X$additional_includedir" = "X/usr/local/include"; then
9526 if test -n "$GCC"; then
9527 case $host_os in
9528 linux*) haveit=yes;;
9529 esac
9530 fi
9531 fi
9532 if test -z "$haveit"; then
9533 for x in $CPPFLAGS $INCEXPAT; do
9534
9535 acl_save_prefix="$prefix"
9536 prefix="$acl_final_prefix"
9537 acl_save_exec_prefix="$exec_prefix"
9538 exec_prefix="$acl_final_exec_prefix"
9539 eval x=\"$x\"
9540 exec_prefix="$acl_save_exec_prefix"
9541 prefix="$acl_save_prefix"
9542
9543 if test "X$x" = "X-I$additional_includedir"; then
9544 haveit=yes
9545 break
9546 fi
9547 done
9548 if test -z "$haveit"; then
9549 if test -d "$additional_includedir"; then
9550 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9551 fi
9552 fi
9553 fi
9554 fi
9555 fi
9556 if test -n "$found_la"; then
9557 save_libdir="$libdir"
9558 case "$found_la" in
9559 */* | *\\*) . "$found_la" ;;
9560 *) . "./$found_la" ;;
9561 esac
9562 libdir="$save_libdir"
9563 for dep in $dependency_libs; do
9564 case "$dep" in
9565 -L*)
9566 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9567 if test "X$additional_libdir" != "X/usr/lib"; then
9568 haveit=
9569 if test "X$additional_libdir" = "X/usr/local/lib"; then
9570 if test -n "$GCC"; then
9571 case $host_os in
9572 linux*) haveit=yes;;
9573 esac
9574 fi
9575 fi
9576 if test -z "$haveit"; then
9577 haveit=
9578 for x in $LDFLAGS $LIBEXPAT; do
9579
9580 acl_save_prefix="$prefix"
9581 prefix="$acl_final_prefix"
9582 acl_save_exec_prefix="$exec_prefix"
9583 exec_prefix="$acl_final_exec_prefix"
9584 eval x=\"$x\"
9585 exec_prefix="$acl_save_exec_prefix"
9586 prefix="$acl_save_prefix"
9587
9588 if test "X$x" = "X-L$additional_libdir"; then
9589 haveit=yes
9590 break
9591 fi
9592 done
9593 if test -z "$haveit"; then
9594 if test -d "$additional_libdir"; then
9595 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9596 fi
9597 fi
9598 haveit=
9599 for x in $LDFLAGS $LTLIBEXPAT; do
9600
9601 acl_save_prefix="$prefix"
9602 prefix="$acl_final_prefix"
9603 acl_save_exec_prefix="$exec_prefix"
9604 exec_prefix="$acl_final_exec_prefix"
9605 eval x=\"$x\"
9606 exec_prefix="$acl_save_exec_prefix"
9607 prefix="$acl_save_prefix"
9608
9609 if test "X$x" = "X-L$additional_libdir"; then
9610 haveit=yes
9611 break
9612 fi
9613 done
9614 if test -z "$haveit"; then
9615 if test -d "$additional_libdir"; then
9616 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9617 fi
9618 fi
9619 fi
9620 fi
9621 ;;
9622 -R*)
9623 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9624 if test "$enable_rpath" != no; then
9625 haveit=
9626 for x in $rpathdirs; do
9627 if test "X$x" = "X$dir"; then
9628 haveit=yes
9629 break
9630 fi
9631 done
9632 if test -z "$haveit"; then
9633 rpathdirs="$rpathdirs $dir"
9634 fi
9635 haveit=
9636 for x in $ltrpathdirs; do
9637 if test "X$x" = "X$dir"; then
9638 haveit=yes
9639 break
9640 fi
9641 done
9642 if test -z "$haveit"; then
9643 ltrpathdirs="$ltrpathdirs $dir"
9644 fi
9645 fi
9646 ;;
9647 -l*)
9648 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9649 ;;
9650 *.la)
9651 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9652 ;;
9653 *)
9654 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9655 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9656 ;;
81ecdfbb
RW
9657 esac
9658 done
9659 fi
9660 else
9661 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9662 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9663 fi
9664 fi
9665 fi
9666 done
9667 done
9668 if test "X$rpathdirs" != "X"; then
9669 if test -n "$hardcode_libdir_separator"; then
9670 alldirs=
9671 for found_dir in $rpathdirs; do
9672 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9673 done
9674 acl_save_libdir="$libdir"
9675 libdir="$alldirs"
9676 eval flag=\"$hardcode_libdir_flag_spec\"
9677 libdir="$acl_save_libdir"
9678 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9679 else
9680 for found_dir in $rpathdirs; do
9681 acl_save_libdir="$libdir"
9682 libdir="$found_dir"
9683 eval flag=\"$hardcode_libdir_flag_spec\"
9684 libdir="$acl_save_libdir"
9685 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9686 done
9687 fi
9688 fi
9689 if test "X$ltrpathdirs" != "X"; then
9690 for found_dir in $ltrpathdirs; do
9691 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9692 done
9693 fi
a9322a30
TT
9694
9695
81ecdfbb 9696 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 9697
81ecdfbb
RW
9698 for element in $INCEXPAT; do
9699 haveit=
9700 for x in $CPPFLAGS; do
a9322a30 9701
81ecdfbb
RW
9702 acl_save_prefix="$prefix"
9703 prefix="$acl_final_prefix"
9704 acl_save_exec_prefix="$exec_prefix"
9705 exec_prefix="$acl_final_exec_prefix"
9706 eval x=\"$x\"
9707 exec_prefix="$acl_save_exec_prefix"
9708 prefix="$acl_save_prefix"
a8111142 9709
81ecdfbb
RW
9710 if test "X$x" = "X$element"; then
9711 haveit=yes
9712 break
9713 fi
9714 done
9715 if test -z "$haveit"; then
9716 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9717 fi
9718 done
a9322a30
TT
9719
9720
81ecdfbb
RW
9721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9722$as_echo_n "checking for libexpat... " >&6; }
d0ac1c44 9723if ${ac_cv_libexpat+:} false; then :
81ecdfbb 9724 $as_echo_n "(cached) " >&6
bec39cab 9725else
bec39cab 9726
81ecdfbb
RW
9727 ac_save_LIBS="$LIBS"
9728 LIBS="$LIBS $LIBEXPAT"
9729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9730/* end confdefs.h. */
81ecdfbb
RW
9731#include "expat.h"
9732int
9733main ()
9734{
9735XML_Parser p = XML_ParserCreate (0);
9736 ;
9737 return 0;
9738}
bec39cab 9739_ACEOF
81ecdfbb
RW
9740if ac_fn_c_try_link "$LINENO"; then :
9741 ac_cv_libexpat=yes
c906108c 9742else
81ecdfbb 9743 ac_cv_libexpat=no
bec39cab 9744fi
81ecdfbb
RW
9745rm -f core conftest.err conftest.$ac_objext \
9746 conftest$ac_exeext conftest.$ac_ext
9747 LIBS="$ac_save_LIBS"
c906108c 9748
95ca63c4 9749fi
81ecdfbb
RW
9750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9751$as_echo "$ac_cv_libexpat" >&6; }
9752 if test "$ac_cv_libexpat" = yes; then
9753 HAVE_LIBEXPAT=yes
bec39cab 9754
81ecdfbb 9755$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 9756
81ecdfbb
RW
9757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9758$as_echo_n "checking how to link with libexpat... " >&6; }
9759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9760$as_echo "$LIBEXPAT" >&6; }
9761 else
9762 HAVE_LIBEXPAT=no
9763 CPPFLAGS="$ac_save_CPPFLAGS"
9764 LIBEXPAT=
9765 LTLIBEXPAT=
9766 fi
95ca63c4
CF
9767
9768
9769
7cb9022a
MK
9770
9771
bec39cab 9772
81ecdfbb
RW
9773 if test "$HAVE_LIBEXPAT" != yes; then
9774 if test "$with_expat" = yes; then
d0ac1c44 9775 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
81ecdfbb
RW
9776 else
9777 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9778$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9779 fi
9780 else
9781 save_LIBS=$LIBS
9782 LIBS="$LIBS $LIBEXPAT"
9783 for ac_func in XML_StopParser
9784do :
9785 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
d0ac1c44 9786if test "x$ac_cv_func_XML_StopParser" = xyes; then :
bec39cab 9787 cat >>confdefs.h <<_ACEOF
81ecdfbb 9788#define HAVE_XML_STOPPARSER 1
bec39cab 9789_ACEOF
95ca63c4 9790
bec39cab 9791fi
bec39cab 9792done
95ca63c4 9793
81ecdfbb
RW
9794 LIBS=$save_LIBS
9795 fi
a9322a30
TT
9796fi
9797
2400729e
UW
9798
9799# Check whether --with-mpfr was given.
9800if test "${with_mpfr+set}" = set; then :
9801 withval=$with_mpfr;
9802else
9803 with_mpfr=auto
9804fi
9805
9806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
9807$as_echo_n "checking whether to use MPFR... " >&6; }
9808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
9809$as_echo "$with_mpfr" >&6; }
9810
9811if test "${with_mpfr}" = no; then
9812 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
9813$as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
9814 HAVE_LIBMPFR=no
9815else
9816
9817
9818
9819
9820
9821
9822
9823
9824 use_additional=yes
9825
9826 acl_save_prefix="$prefix"
9827 prefix="$acl_final_prefix"
9828 acl_save_exec_prefix="$exec_prefix"
9829 exec_prefix="$acl_final_exec_prefix"
9830
9831 eval additional_includedir=\"$includedir\"
9832 eval additional_libdir=\"$libdir\"
9833
9834 exec_prefix="$acl_save_exec_prefix"
9835 prefix="$acl_save_prefix"
9836
9837
9838# Check whether --with-libmpfr-prefix was given.
9839if test "${with_libmpfr_prefix+set}" = set; then :
9840 withval=$with_libmpfr_prefix;
9841 if test "X$withval" = "Xno"; then
9842 use_additional=no
9843 else
9844 if test "X$withval" = "X"; then
9845
9846 acl_save_prefix="$prefix"
9847 prefix="$acl_final_prefix"
9848 acl_save_exec_prefix="$exec_prefix"
9849 exec_prefix="$acl_final_exec_prefix"
9850
9851 eval additional_includedir=\"$includedir\"
9852 eval additional_libdir=\"$libdir\"
9853
9854 exec_prefix="$acl_save_exec_prefix"
9855 prefix="$acl_save_prefix"
9856
9857 else
9858 additional_includedir="$withval/include"
9859 additional_libdir="$withval/lib"
9860 fi
9861 fi
9862
9863fi
9864
9865 LIBMPFR=
9866 LTLIBMPFR=
9867 INCMPFR=
9868 rpathdirs=
9869 ltrpathdirs=
9870 names_already_handled=
9871 names_next_round='mpfr '
9872 while test -n "$names_next_round"; do
9873 names_this_round="$names_next_round"
9874 names_next_round=
9875 for name in $names_this_round; do
9876 already_handled=
9877 for n in $names_already_handled; do
9878 if test "$n" = "$name"; then
9879 already_handled=yes
9880 break
9881 fi
9882 done
9883 if test -z "$already_handled"; then
9884 names_already_handled="$names_already_handled $name"
9885 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9886 eval value=\"\$HAVE_LIB$uppername\"
9887 if test -n "$value"; then
9888 if test "$value" = yes; then
9889 eval value=\"\$LIB$uppername\"
9890 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
9891 eval value=\"\$LTLIB$uppername\"
9892 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
9893 else
9894 :
9895 fi
9896 else
9897 found_dir=
9898 found_la=
9899 found_so=
9900 found_a=
9901 if test $use_additional = yes; then
9902 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9903 found_dir="$additional_libdir"
9904 found_so="$additional_libdir/lib$name.$shlibext"
9905 if test -f "$additional_libdir/lib$name.la"; then
9906 found_la="$additional_libdir/lib$name.la"
9907 fi
9908 else
9909 if test -f "$additional_libdir/lib$name.$libext"; then
9910 found_dir="$additional_libdir"
9911 found_a="$additional_libdir/lib$name.$libext"
9912 if test -f "$additional_libdir/lib$name.la"; then
9913 found_la="$additional_libdir/lib$name.la"
9914 fi
9915 fi
9916 fi
9917 fi
9918 if test "X$found_dir" = "X"; then
9919 for x in $LDFLAGS $LTLIBMPFR; do
9920
9921 acl_save_prefix="$prefix"
9922 prefix="$acl_final_prefix"
9923 acl_save_exec_prefix="$exec_prefix"
9924 exec_prefix="$acl_final_exec_prefix"
9925 eval x=\"$x\"
9926 exec_prefix="$acl_save_exec_prefix"
9927 prefix="$acl_save_prefix"
9928
9929 case "$x" in
9930 -L*)
9931 dir=`echo "X$x" | sed -e 's/^X-L//'`
9932 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9933 found_dir="$dir"
9934 found_so="$dir/lib$name.$shlibext"
9935 if test -f "$dir/lib$name.la"; then
9936 found_la="$dir/lib$name.la"
9937 fi
9938 else
9939 if test -f "$dir/lib$name.$libext"; then
9940 found_dir="$dir"
9941 found_a="$dir/lib$name.$libext"
9942 if test -f "$dir/lib$name.la"; then
9943 found_la="$dir/lib$name.la"
9944 fi
9945 fi
9946 fi
9947 ;;
9948 esac
9949 if test "X$found_dir" != "X"; then
9950 break
9951 fi
9952 done
9953 fi
9954 if test "X$found_dir" != "X"; then
9955 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
9956 if test "X$found_so" != "X"; then
9957 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9958 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9959 else
9960 haveit=
9961 for x in $ltrpathdirs; do
9962 if test "X$x" = "X$found_dir"; then
9963 haveit=yes
9964 break
9965 fi
9966 done
9967 if test -z "$haveit"; then
9968 ltrpathdirs="$ltrpathdirs $found_dir"
9969 fi
9970 if test "$hardcode_direct" = yes; then
9971 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9972 else
9973 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9974 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9975 haveit=
9976 for x in $rpathdirs; do
9977 if test "X$x" = "X$found_dir"; then
9978 haveit=yes
9979 break
9980 fi
9981 done
9982 if test -z "$haveit"; then
9983 rpathdirs="$rpathdirs $found_dir"
9984 fi
9985 else
9986 haveit=
9987 for x in $LDFLAGS $LIBMPFR; do
9988
9989 acl_save_prefix="$prefix"
9990 prefix="$acl_final_prefix"
9991 acl_save_exec_prefix="$exec_prefix"
9992 exec_prefix="$acl_final_exec_prefix"
9993 eval x=\"$x\"
9994 exec_prefix="$acl_save_exec_prefix"
9995 prefix="$acl_save_prefix"
9996
9997 if test "X$x" = "X-L$found_dir"; then
9998 haveit=yes
9999 break
10000 fi
10001 done
10002 if test -z "$haveit"; then
10003 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
10004 fi
10005 if test "$hardcode_minus_L" != no; then
10006 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10007 else
10008 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10009 fi
10010 fi
10011 fi
10012 fi
10013 else
10014 if test "X$found_a" != "X"; then
10015 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
10016 else
10017 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
10018 fi
10019 fi
10020 additional_includedir=
10021 case "$found_dir" in
10022 */lib | */lib/)
10023 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10024 additional_includedir="$basedir/include"
10025 ;;
10026 esac
10027 if test "X$additional_includedir" != "X"; then
10028 if test "X$additional_includedir" != "X/usr/include"; then
10029 haveit=
10030 if test "X$additional_includedir" = "X/usr/local/include"; then
10031 if test -n "$GCC"; then
10032 case $host_os in
10033 linux*) haveit=yes;;
10034 esac
10035 fi
10036 fi
10037 if test -z "$haveit"; then
10038 for x in $CPPFLAGS $INCMPFR; do
10039
10040 acl_save_prefix="$prefix"
10041 prefix="$acl_final_prefix"
10042 acl_save_exec_prefix="$exec_prefix"
10043 exec_prefix="$acl_final_exec_prefix"
10044 eval x=\"$x\"
10045 exec_prefix="$acl_save_exec_prefix"
10046 prefix="$acl_save_prefix"
10047
10048 if test "X$x" = "X-I$additional_includedir"; then
10049 haveit=yes
10050 break
10051 fi
10052 done
10053 if test -z "$haveit"; then
10054 if test -d "$additional_includedir"; then
10055 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10056 fi
10057 fi
10058 fi
10059 fi
10060 fi
10061 if test -n "$found_la"; then
10062 save_libdir="$libdir"
10063 case "$found_la" in
10064 */* | *\\*) . "$found_la" ;;
10065 *) . "./$found_la" ;;
10066 esac
10067 libdir="$save_libdir"
10068 for dep in $dependency_libs; do
10069 case "$dep" in
10070 -L*)
10071 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10072 if test "X$additional_libdir" != "X/usr/lib"; then
10073 haveit=
10074 if test "X$additional_libdir" = "X/usr/local/lib"; then
10075 if test -n "$GCC"; then
10076 case $host_os in
10077 linux*) haveit=yes;;
10078 esac
10079 fi
10080 fi
10081 if test -z "$haveit"; then
10082 haveit=
10083 for x in $LDFLAGS $LIBMPFR; do
10084
10085 acl_save_prefix="$prefix"
10086 prefix="$acl_final_prefix"
10087 acl_save_exec_prefix="$exec_prefix"
10088 exec_prefix="$acl_final_exec_prefix"
10089 eval x=\"$x\"
10090 exec_prefix="$acl_save_exec_prefix"
10091 prefix="$acl_save_prefix"
10092
10093 if test "X$x" = "X-L$additional_libdir"; then
10094 haveit=yes
10095 break
10096 fi
10097 done
10098 if test -z "$haveit"; then
10099 if test -d "$additional_libdir"; then
10100 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10101 fi
10102 fi
10103 haveit=
10104 for x in $LDFLAGS $LTLIBMPFR; do
10105
10106 acl_save_prefix="$prefix"
10107 prefix="$acl_final_prefix"
10108 acl_save_exec_prefix="$exec_prefix"
10109 exec_prefix="$acl_final_exec_prefix"
10110 eval x=\"$x\"
10111 exec_prefix="$acl_save_exec_prefix"
10112 prefix="$acl_save_prefix"
10113
10114 if test "X$x" = "X-L$additional_libdir"; then
10115 haveit=yes
10116 break
10117 fi
10118 done
10119 if test -z "$haveit"; then
10120 if test -d "$additional_libdir"; then
10121 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10122 fi
10123 fi
10124 fi
10125 fi
10126 ;;
10127 -R*)
10128 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10129 if test "$enable_rpath" != no; then
10130 haveit=
10131 for x in $rpathdirs; do
10132 if test "X$x" = "X$dir"; then
10133 haveit=yes
10134 break
10135 fi
10136 done
10137 if test -z "$haveit"; then
10138 rpathdirs="$rpathdirs $dir"
10139 fi
10140 haveit=
10141 for x in $ltrpathdirs; do
10142 if test "X$x" = "X$dir"; then
10143 haveit=yes
10144 break
10145 fi
10146 done
10147 if test -z "$haveit"; then
10148 ltrpathdirs="$ltrpathdirs $dir"
10149 fi
10150 fi
10151 ;;
10152 -l*)
10153 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10154 ;;
10155 *.la)
10156 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10157 ;;
10158 *)
10159 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10160 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10161 ;;
10162 esac
10163 done
10164 fi
10165 else
10166 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10167 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10168 fi
10169 fi
10170 fi
10171 done
10172 done
10173 if test "X$rpathdirs" != "X"; then
10174 if test -n "$hardcode_libdir_separator"; then
10175 alldirs=
10176 for found_dir in $rpathdirs; do
10177 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10178 done
10179 acl_save_libdir="$libdir"
10180 libdir="$alldirs"
10181 eval flag=\"$hardcode_libdir_flag_spec\"
10182 libdir="$acl_save_libdir"
10183 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10184 else
10185 for found_dir in $rpathdirs; do
10186 acl_save_libdir="$libdir"
10187 libdir="$found_dir"
10188 eval flag=\"$hardcode_libdir_flag_spec\"
10189 libdir="$acl_save_libdir"
10190 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10191 done
10192 fi
10193 fi
10194 if test "X$ltrpathdirs" != "X"; then
10195 for found_dir in $ltrpathdirs; do
10196 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10197 done
10198 fi
10199
10200
10201 ac_save_CPPFLAGS="$CPPFLAGS"
10202
10203 for element in $INCMPFR; do
10204 haveit=
10205 for x in $CPPFLAGS; do
10206
10207 acl_save_prefix="$prefix"
10208 prefix="$acl_final_prefix"
10209 acl_save_exec_prefix="$exec_prefix"
10210 exec_prefix="$acl_final_exec_prefix"
10211 eval x=\"$x\"
10212 exec_prefix="$acl_save_exec_prefix"
10213 prefix="$acl_save_prefix"
10214
10215 if test "X$x" = "X$element"; then
10216 haveit=yes
10217 break
10218 fi
10219 done
10220 if test -z "$haveit"; then
10221 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10222 fi
10223 done
10224
10225
10226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10227$as_echo_n "checking for libmpfr... " >&6; }
d0ac1c44 10228if ${ac_cv_libmpfr+:} false; then :
2400729e
UW
10229 $as_echo_n "(cached) " >&6
10230else
10231
10232 ac_save_LIBS="$LIBS"
10233 LIBS="$LIBS $LIBMPFR"
10234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10235/* end confdefs.h. */
10236#include <mpfr.h>
10237int
10238main ()
10239{
10240mpfr_exp_t exp; mpfr_t x;
10241 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10242 ;
10243 return 0;
10244}
10245_ACEOF
10246if ac_fn_c_try_link "$LINENO"; then :
10247 ac_cv_libmpfr=yes
10248else
10249 ac_cv_libmpfr=no
10250fi
10251rm -f core conftest.err conftest.$ac_objext \
10252 conftest$ac_exeext conftest.$ac_ext
10253 LIBS="$ac_save_LIBS"
10254
10255fi
10256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10257$as_echo "$ac_cv_libmpfr" >&6; }
10258 if test "$ac_cv_libmpfr" = yes; then
10259 HAVE_LIBMPFR=yes
10260
10261$as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10262
10263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10264$as_echo_n "checking how to link with libmpfr... " >&6; }
10265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10266$as_echo "$LIBMPFR" >&6; }
10267 else
10268 HAVE_LIBMPFR=no
10269 CPPFLAGS="$ac_save_CPPFLAGS"
10270 LIBMPFR=
10271 LTLIBMPFR=
10272 fi
10273
10274
10275
10276
10277
10278
10279 if test "$HAVE_LIBMPFR" != yes; then
10280 if test "$with_mpfr" = yes; then
d0ac1c44 10281 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
2400729e
UW
10282 else
10283 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10284$as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10285 fi
10286 fi
10287fi
10288
d344e670
DE
10289# --------------------- #
10290# Check for libpython. #
10291# --------------------- #
10292
a9322a30 10293
a9322a30
TT
10294
10295
ec685c5e 10296
0c4a4063 10297
81ecdfbb
RW
10298# Check whether --with-python was given.
10299if test "${with_python+set}" = set; then :
10300 withval=$with_python;
bec39cab 10301else
81ecdfbb 10302 with_python=auto
bec39cab 10303fi
bec39cab 10304
81ecdfbb
RW
10305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10306$as_echo_n "checking whether to use python... " >&6; }
10307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10308$as_echo "$with_python" >&6; }
9a156167 10309
81ecdfbb
RW
10310if test "${with_python}" = no; then
10311 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10312$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10313 have_libpython=no
bec39cab 10314else
81ecdfbb 10315 case "${with_python}" in
8c85a4e2 10316 [\\/]* | ?:[\\/]*)
ec685c5e
DE
10317 if test -d ${with_python}; then
10318 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10319 python_prog="${with_python}/bin/python"
0c4a4063 10320 python_prefix=
9c4ea6c5
JB
10321 # If python does not exit ${with_python}/bin, then try in
10322 # ${with_python}. On Windows/MinGW, this is where the Python
10323 # executable is.
10324 if test ! -x "${python_prog}"; then
10325 python_prog="${with_python}/python"
10326 python_prefix=
10327 fi
e7a30f46 10328 if test ! -x "${python_prog}"; then
ec685c5e
DE
10329 # Fall back to gdb 7.0/7.1 behaviour.
10330 python_prog=missing
0c4a4063 10331 python_prefix=${with_python}
ec685c5e 10332 fi
e7a30f46 10333 elif test -x "${with_python}"; then
ec685c5e
DE
10334 # While we can't run python compiled for $host (unless host == build),
10335 # the user could write a script that provides the needed information,
10336 # so we support that.
ec685c5e 10337 python_prog=${with_python}
0c4a4063 10338 python_prefix=
ec685c5e 10339 else
d0ac1c44 10340 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
ec685c5e 10341 fi
81ecdfbb 10342 ;;
ec685c5e
DE
10343 */*)
10344 # Disallow --with-python=foo/bar.
d0ac1c44 10345 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
81ecdfbb 10346 ;;
ec685c5e
DE
10347 *)
10348 # The user has either specified auto, yes, or the name of the python
10349 # program assumed to be in $PATH.
10350 python_prefix=
10351 case "${with_python}" in
10352 yes | auto)
10353 if test ${build} = ${host}; then
10354 # Extract the first word of "python", so it can be a program name with args.
10355set dummy python; ac_word=$2
10356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10357$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10358if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10359 $as_echo_n "(cached) " >&6
10360else
10361 case $python_prog_path in
10362 [\\/]* | ?:[\\/]*)
10363 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10364 ;;
10365 *)
10366 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10367for as_dir in $PATH
10368do
10369 IFS=$as_save_IFS
10370 test -z "$as_dir" && as_dir=.
10371 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10372 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10373 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10374 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10375 break 2
10376 fi
10377done
10378 done
10379IFS=$as_save_IFS
10380
10381 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10382 ;;
10383esac
10384fi
10385python_prog_path=$ac_cv_path_python_prog_path
10386if test -n "$python_prog_path"; then
10387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10388$as_echo "$python_prog_path" >&6; }
10389else
10390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10391$as_echo "no" >&6; }
10392fi
10393
10394
10395 if test "${python_prog_path}" = missing; then
10396 python_prog=missing
10397 else
10398 python_prog=${python_prog_path}
10399 fi
10400 else
10401 # Not much we can do except assume the cross-compiler will find the
10402 # right files.
10403 python_prog=missing
10404 fi
10405 ;;
10406 *)
10407 # While we can't run python compiled for $host (unless host == build),
10408 # the user could write a script that provides the needed information,
10409 # so we support that.
10410 python_prog="${with_python}"
10411 # Extract the first word of "${python_prog}", so it can be a program name with args.
10412set dummy ${python_prog}; ac_word=$2
10413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10414$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10415if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10416 $as_echo_n "(cached) " >&6
10417else
10418 case $python_prog_path in
10419 [\\/]* | ?:[\\/]*)
10420 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10421 ;;
10422 *)
10423 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10424for as_dir in $PATH
10425do
10426 IFS=$as_save_IFS
10427 test -z "$as_dir" && as_dir=.
10428 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10429 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10430 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10431 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10432 break 2
10433 fi
10434done
10435 done
10436IFS=$as_save_IFS
10437
10438 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10439 ;;
10440esac
10441fi
10442python_prog_path=$ac_cv_path_python_prog_path
10443if test -n "$python_prog_path"; then
10444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10445$as_echo "$python_prog_path" >&6; }
10446else
10447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10448$as_echo "no" >&6; }
10449fi
10450
10451
10452 if test "${python_prog_path}" = missing; then
d0ac1c44 10453 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
ec685c5e
DE
10454 fi
10455 ;;
10456 esac
81ecdfbb
RW
10457 esac
10458
ec685c5e 10459 if test "${python_prog}" != missing; then
e7a30f46
DE
10460 # We have a python program to use, but it may be too old.
10461 # Don't flag an error for --with-python=auto (the default).
10462 have_python_config=yes
ec685c5e
DE
10463 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10464 if test $? != 0; then
e7a30f46
DE
10465 have_python_config=failed
10466 if test "${with_python}" != auto; then
d0ac1c44 10467 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
e7a30f46 10468 fi
ec685c5e
DE
10469 fi
10470 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10471 if test $? != 0; then
e7a30f46
DE
10472 have_python_config=failed
10473 if test "${with_python}" != auto; then
d0ac1c44 10474 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
e7a30f46 10475 fi
ec685c5e 10476 fi
0c4a4063
DE
10477 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10478 if test $? != 0; then
e7a30f46
DE
10479 have_python_config=failed
10480 if test "${with_python}" != auto; then
d0ac1c44 10481 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
e7a30f46 10482 fi
0c4a4063 10483 fi
ec685c5e 10484 else
ac534cba
JB
10485 # We do not have a python executable we can use to determine where
10486 # to find the Python headers and libs. We cannot guess the include
10487 # path from the python_prefix either, because that include path
10488 # depends on the Python version. So, there is nothing much we can
10489 # do except assume that the compiler will be able to find those files.
10490 python_includes=
10491 python_libs=
0c4a4063 10492 have_python_config=no
ec685c5e 10493 fi
bec39cab 10494
ec685c5e
DE
10495 # If we have python-config, only try the configuration it provides.
10496 # Otherwise fallback on the old way of trying different versions of
10497 # python in turn.
81ecdfbb 10498
ec685c5e
DE
10499 have_libpython=no
10500 if test "${have_python_config}" = yes; then
c1039e3c
JB
10501 # Determine the Python version by extracting "-lpython<version>"
10502 # part of the python_libs. <version> is usually X.Y with X and Y
10503 # being decimal numbers, but can also be XY (seen on Windows).
10504 #
10505 # The extraction is performed using sed with a regular expression.
10506 # Initially, the regexp used was using the '?' quantifier to make
10507 # the dot in the version number optional. Unfortunately, this
10508 # does not work with non-GNU versions of sed because, because of
10509 # what looks like a limitation (the '?' quantifier does not work
10510 # with back-references). We work around this limitation by using
10511 # the '*' quantifier instead. It means that, in theory, we might
10512 # match unexpected version strings such as "-lpython2..7", but
10513 # this seems unlikely in practice. And even if that happens,
10514 # an error will be triggered later on, when checking that version
10515 # number.
ec685c5e 10516 python_version=`echo " ${python_libs} " \
c1039e3c 10517 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
10518 case "${python_version}" in
10519 python*)
ec685c5e
DE
10520
10521 version=${python_version}
10522
10523 new_CPPFLAGS=${python_includes}
10524 new_LIBS=${python_libs}
81ecdfbb
RW
10525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10526$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10527 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10528 save_LIBS=$LIBS
ec685c5e 10529 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10530 LIBS="$new_LIBS $LIBS"
ec685c5e 10531 found_usable_python=no
81ecdfbb 10532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10533/* end confdefs.h. */
ac534cba 10534#include "Python.h"
81ecdfbb
RW
10535int
10536main ()
10537{
10538Py_Initialize ();
10539 ;
10540 return 0;
10541}
bec39cab 10542_ACEOF
81ecdfbb 10543if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10544 have_libpython=${version}
10545 found_usable_python=yes
ac534cba
JB
10546 PYTHON_CPPFLAGS=$new_CPPFLAGS
10547 PYTHON_LIBS=$new_LIBS
9a156167 10548fi
81ecdfbb
RW
10549rm -f core conftest.err conftest.$ac_objext \
10550 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10551 CPPFLAGS=$save_CPPFLAGS
10552 LIBS=$save_LIBS
ec685c5e
DE
10553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10554$as_echo "${found_usable_python}" >&6; }
9a156167 10555
0c4a4063
DE
10556 ;;
10557 *)
d0ac1c44 10558 as_fn_error $? "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
10559 ;;
10560 esac
e7a30f46 10561 elif test "${have_python_config}" != failed; then
ec685c5e 10562 if test "${have_libpython}" = no; then
9a156167 10563
420697bb
TT
10564 version=python2.7
10565
10566 new_CPPFLAGS=${python_includes}
bf27f0e2 10567 new_LIBS="-lpython2.7 ${python_libs}"
420697bb
TT
10568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10569$as_echo_n "checking for ${version}... " >&6; }
10570 save_CPPFLAGS=$CPPFLAGS
10571 save_LIBS=$LIBS
10572 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10573 LIBS="$new_LIBS $LIBS"
420697bb
TT
10574 found_usable_python=no
10575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10576/* end confdefs.h. */
ac534cba 10577#include "Python.h"
420697bb
TT
10578int
10579main ()
10580{
10581Py_Initialize ();
10582 ;
10583 return 0;
10584}
10585_ACEOF
10586if ac_fn_c_try_link "$LINENO"; then :
10587 have_libpython=${version}
10588 found_usable_python=yes
ac534cba
JB
10589 PYTHON_CPPFLAGS=$new_CPPFLAGS
10590 PYTHON_LIBS=$new_LIBS
420697bb
TT
10591fi
10592rm -f core conftest.err conftest.$ac_objext \
10593 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10594 CPPFLAGS=$save_CPPFLAGS
10595 LIBS=$save_LIBS
420697bb
TT
10596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10597$as_echo "${found_usable_python}" >&6; }
10598
10599 fi
10600 if test "${have_libpython}" = no; then
10601
ec685c5e
DE
10602 version=python2.6
10603
10604 new_CPPFLAGS=${python_includes}
bf27f0e2 10605 new_LIBS="-lpython2.6 ${python_libs}"
ec685c5e
DE
10606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10607$as_echo_n "checking for ${version}... " >&6; }
10608 save_CPPFLAGS=$CPPFLAGS
10609 save_LIBS=$LIBS
10610 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10611 LIBS="$new_LIBS $LIBS"
ec685c5e
DE
10612 found_usable_python=no
10613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10614/* end confdefs.h. */
ac534cba 10615#include "Python.h"
ec685c5e
DE
10616int
10617main ()
10618{
10619Py_Initialize ();
10620 ;
10621 return 0;
10622}
10623_ACEOF
10624if ac_fn_c_try_link "$LINENO"; then :
10625 have_libpython=${version}
10626 found_usable_python=yes
ac534cba
JB
10627 PYTHON_CPPFLAGS=$new_CPPFLAGS
10628 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
10629fi
10630rm -f core conftest.err conftest.$ac_objext \
10631 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10632 CPPFLAGS=$save_CPPFLAGS
10633 LIBS=$save_LIBS
ec685c5e
DE
10634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10635$as_echo "${found_usable_python}" >&6; }
9a156167 10636
81ecdfbb 10637 fi
ec685c5e 10638 if test ${have_libpython} = no; then
9a156167 10639
81ecdfbb 10640 version=python2.5
9a156167 10641
ec685c5e 10642 new_CPPFLAGS=${python_includes}
bf27f0e2 10643 new_LIBS="-lpython2.5 ${python_libs}"
81ecdfbb
RW
10644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10645$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10646 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10647 save_LIBS=$LIBS
ec685c5e 10648 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10649 LIBS="$new_LIBS $LIBS"
ec685c5e 10650 found_usable_python=no
81ecdfbb 10651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10652/* end confdefs.h. */
ac534cba 10653#include "Python.h"
81ecdfbb
RW
10654int
10655main ()
10656{
10657Py_Initialize ();
10658 ;
10659 return 0;
10660}
436868fb 10661_ACEOF
81ecdfbb 10662if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10663 have_libpython=${version}
10664 found_usable_python=yes
ac534cba
JB
10665 PYTHON_CPPFLAGS=$new_CPPFLAGS
10666 PYTHON_LIBS=$new_LIBS
436868fb 10667fi
81ecdfbb
RW
10668rm -f core conftest.err conftest.$ac_objext \
10669 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10670 CPPFLAGS=$save_CPPFLAGS
10671 LIBS=$save_LIBS
ec685c5e
DE
10672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10673$as_echo "${found_usable_python}" >&6; }
a9322a30 10674
81ecdfbb 10675 fi
ec685c5e 10676 if test ${have_libpython} = no; then
a9322a30 10677
81ecdfbb 10678 version=python2.4
a9322a30 10679
ec685c5e 10680 new_CPPFLAGS=${python_includes}
bf27f0e2 10681 new_LIBS="-lpython2.4 ${python_libs}"
81ecdfbb
RW
10682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10683$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10684 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10685 save_LIBS=$LIBS
ec685c5e 10686 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10687 LIBS="$new_LIBS $LIBS"
ec685c5e 10688 found_usable_python=no
81ecdfbb 10689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10690/* end confdefs.h. */
ac534cba 10691#include "Python.h"
a9322a30
TT
10692int
10693main ()
10694{
81ecdfbb 10695Py_Initialize ();
a9322a30
TT
10696 ;
10697 return 0;
10698}
436868fb 10699_ACEOF
81ecdfbb 10700if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10701 have_libpython=${version}
10702 found_usable_python=yes
ac534cba
JB
10703 PYTHON_CPPFLAGS=$new_CPPFLAGS
10704 PYTHON_LIBS=$new_LIBS
436868fb 10705fi
81ecdfbb
RW
10706rm -f core conftest.err conftest.$ac_objext \
10707 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10708 CPPFLAGS=$save_CPPFLAGS
10709 LIBS=$save_LIBS
ec685c5e
DE
10710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10711$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10712
ec685c5e
DE
10713 fi
10714 fi
9c4ea6c5 10715 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
10716
10717$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
10718
9c4ea6c5 10719 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
10720
10721$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
10722
9c4ea6c5 10723 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
10724
10725$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
10726
9c4ea6c5 10727 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
10728
10729$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
10730
81ecdfbb 10731 fi
ec685c5e
DE
10732
10733 if test "${have_libpython}" = no; then
81ecdfbb
RW
10734 case "${with_python}" in
10735 yes)
d0ac1c44 10736 as_fn_error $? "python is missing or unusable" "$LINENO" 5
81ecdfbb
RW
10737 ;;
10738 auto)
10739 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10740$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10741 ;;
10742 *)
d0ac1c44 10743 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
81ecdfbb
RW
10744 ;;
10745 esac
0c4a4063
DE
10746 else
10747 if test -n "${python_prefix}"; then
10748
10749cat >>confdefs.h <<_ACEOF
10750#define WITH_PYTHON_PATH "${python_prefix}"
10751_ACEOF
10752
10753
10754 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10755 if test "x$prefix" = xNONE; then
10756 test_prefix=/usr/local
10757 else
10758 test_prefix=$prefix
10759 fi
10760 else
10761 test_prefix=$exec_prefix
10762 fi
10763 value=0
10764 case ${python_prefix} in
10765 "${test_prefix}"|"${test_prefix}/"*|\
10766 '${exec_prefix}'|'${exec_prefix}/'*)
10767 value=1
10768 ;;
10769 esac
10770
10771cat >>confdefs.h <<_ACEOF
10772#define PYTHON_PATH_RELOCATABLE $value
10773_ACEOF
10774
10775
10776 fi
81ecdfbb 10777 fi
436868fb 10778fi
436868fb 10779
ec685c5e 10780if test "${have_libpython}" != no; then
436868fb 10781
81ecdfbb 10782$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 10783
81ecdfbb
RW
10784 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10785 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10786 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 10787 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 10788 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 10789
81ecdfbb
RW
10790 # Flags needed to compile Python code (taken from python-config --cflags).
10791 # We cannot call python-config directly because it will output whatever was
10792 # used when compiling the Python interpreter itself, including flags which
10793 # would make the python-related objects be compiled differently from the
10794 # rest of GDB (e.g., -O2 and -fPIC).
10795 if test "${GCC}" = yes; then
10796 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
10797 fi
436868fb 10798
81ecdfbb
RW
10799 if test "x${tentative_python_cflags}" != x; then
10800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10801$as_echo_n "checking compiler flags for python code... " >&6; }
10802 for flag in ${tentative_python_cflags}; do
10803 # Check that the compiler accepts it
10804 saved_CFLAGS="$CFLAGS"
10805 CFLAGS="$CFLAGS $flag"
10806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10807/* end confdefs.h. */
81ecdfbb 10808
a9322a30
TT
10809int
10810main ()
10811{
a9322a30
TT
10812
10813 ;
10814 return 0;
10815}
bec39cab 10816_ACEOF
81ecdfbb
RW
10817if ac_fn_c_try_compile "$LINENO"; then :
10818 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 10819fi
81ecdfbb
RW
10820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10821 CFLAGS="$saved_CFLAGS"
10822 done
10823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10824$as_echo "${PYTHON_CFLAGS}" >&6; }
10825 fi
043b6510 10826
c83393b9
JB
10827 # On x64 Windows, Python's include headers, and pyconfig.h in
10828 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10829 # version of Windows. Unfortunately, MS_WIN64 is only defined if
10830 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
10831 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10832 # The issue was reported to the Python community, but still isn't
10833 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10834
043b6510 10835 case "$gdb_host" in
c83393b9
JB
10836 mingw64)
10837 if test "${GCC}" = yes; then
10838 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10839 fi
10840 ;;
043b6510 10841 esac
a8db4212
YPK
10842
10843 # Note that "python -m threading" cannot be used to check for
10844 # threading support due to a bug in Python 2.7.3
10845 # (http://bugs.python.org/issue15567).
10846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
10847$as_echo_n "checking whether python supports threads... " >&6; }
10848 saved_CPPFLAGS="${CPPFLAGS}"
10849 CPPFLAGS="${PYTHON_CPPFLAGS}"
10850 # Note that the test is reversed so that python_has_threads=yes on
10851 # unexpected failures.
10852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10853/* end confdefs.h. */
10854
10855#include <Python.h>
10856#ifdef WITH_THREAD
10857# error
10858#endif
10859
10860_ACEOF
10861if ac_fn_c_try_cpp "$LINENO"; then :
10862 python_has_threads=no
10863else
10864 python_has_threads=yes
10865fi
d0ac1c44 10866rm -f conftest.err conftest.i conftest.$ac_ext
a8db4212
YPK
10867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
10868$as_echo "${python_has_threads}" >&6; }
10869 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 10870else
6dddc817
DE
10871 # Even if Python support is not compiled in, we need to have this file
10872 # included so that the "python" command, et.al., still exists.
8fd8d003 10873 CONFIG_OBS="$CONFIG_OBS python/python.o"
6dddc817 10874 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 10875fi
9a156167 10876
a4a1c157
PA
10877# Work around Python http://bugs.python.org/issue10112. See also
10878# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10879# no effect. Note that the only test after this that uses Python is
10880# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10881# run without -export-dynamic too.
10882PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10883
10884
ed3ef339
DE
10885
10886
4df42755
DE
10887 if test "${have_libpython}" != no; then
10888 HAVE_PYTHON_TRUE=
10889 HAVE_PYTHON_FALSE='#'
10890else
10891 HAVE_PYTHON_TRUE='#'
10892 HAVE_PYTHON_FALSE=
10893fi
10894
ed3ef339
DE
10895
10896# -------------------- #
10897# Check for libguile. #
10898# -------------------- #
10899
10900
e1402065
DE
10901
10902
10903
10904
10905# Check whether --with-guile was given.
10906if test "${with_guile+set}" = set; then :
10907 withval=$with_guile;
10908else
10909 with_guile=auto
10910fi
10911
10912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10913$as_echo_n "checking whether to use guile... " >&6; }
10914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10915$as_echo "$with_guile" >&6; }
10916
ed3ef339
DE
10917# Extract the first word of "pkg-config", so it can be a program name with args.
10918set dummy pkg-config; ac_word=$2
10919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10920$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10921if ${ac_cv_path_pkg_config_prog_path+:} false; then :
ed3ef339
DE
10922 $as_echo_n "(cached) " >&6
10923else
10924 case $pkg_config_prog_path in
10925 [\\/]* | ?:[\\/]*)
10926 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10927 ;;
10928 *)
10929 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10930for as_dir in $PATH
10931do
10932 IFS=$as_save_IFS
10933 test -z "$as_dir" && as_dir=.
10934 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10935 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ed3ef339
DE
10936 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10937 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10938 break 2
10939 fi
10940done
10941 done
10942IFS=$as_save_IFS
10943
10944 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10945 ;;
10946esac
10947fi
10948pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10949if test -n "$pkg_config_prog_path"; then
10950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10951$as_echo "$pkg_config_prog_path" >&6; }
10952else
10953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10954$as_echo "no" >&6; }
10955fi
10956
10957
10958
6e66f753 10959try_guile_versions="guile-2.0"
ed3ef339
DE
10960have_libguile=no
10961case "${with_guile}" in
10962no)
10963 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10964$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10965 ;;
10966auto)
e1402065
DE
10967 if test "${pkg_config_prog_path}" = "missing"; then
10968 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10969$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10970 else
ed3ef339
DE
10971
10972 pkg_config=${pkg_config_prog_path}
10973 guile_version_list=${try_guile_versions}
10974 flag_errors=no
10975
ed3ef339
DE
10976 found_usable_guile=checking
10977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10978$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10979 for guile_version in ${guile_version_list}; do
10980 ${pkg_config} --exists ${guile_version} 2>/dev/null
10981 if test $? != 0; then
10982 continue
10983 fi
10984 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10985 if test $? != 0; then
d0ac1c44 10986 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
10987 fi
10988 new_LIBS=`${pkg_config} --libs ${guile_version}`
10989 if test $? != 0; then
d0ac1c44 10990 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
10991 fi
10992 found_usable_guile=${guile_version}
10993 break
10994 done
10995 if test "${found_usable_guile}" = "checking"; then
10996 if test "${flag_errors}" = "yes"; then
d0ac1c44 10997 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
10998 else
10999 found_usable_guile=no
11000 fi
11001 fi
11002 if test "${found_usable_guile}" != no; then
11003 save_CPPFLAGS=$CPPFLAGS
11004 save_LIBS=$LIBS
11005 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11006 LIBS="$LIBS $new_LIBS"
11007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11008/* end confdefs.h. */
11009#include "libguile.h"
11010int
11011main ()
11012{
11013scm_init_guile ();
11014 ;
11015 return 0;
11016}
11017_ACEOF
11018if ac_fn_c_try_link "$LINENO"; then :
11019 have_libguile=yes
11020 GUILE_CPPFLAGS=$new_CPPFLAGS
11021 GUILE_LIBS=$new_LIBS
11022else
11023 found_usable_guile=no
11024fi
11025rm -f core conftest.err conftest.$ac_objext \
11026 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11027 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11028if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11029
11030$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11031
11032
11033fi
11034
ed3ef339
DE
11035 CPPFLAGS=$save_CPPFLAGS
11036 LIBS=$save_LIBS
11037 if test "${found_usable_guile}" = no; then
11038 if test "${flag_errors}" = yes; then
11039 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11040$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11041as_fn_error $? "linking guile version ${guile_version} test program failed
11042See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11043 fi
11044 fi
11045 fi
11046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11047$as_echo "${found_usable_guile}" >&6; }
11048
e1402065 11049 fi
ed3ef339
DE
11050 ;;
11051yes)
e1402065 11052 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11053 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11054 fi
ed3ef339
DE
11055
11056 pkg_config=${pkg_config_prog_path}
11057 guile_version_list=${try_guile_versions}
11058 flag_errors=yes
11059
ed3ef339
DE
11060 found_usable_guile=checking
11061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11062$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11063 for guile_version in ${guile_version_list}; do
11064 ${pkg_config} --exists ${guile_version} 2>/dev/null
11065 if test $? != 0; then
11066 continue
11067 fi
11068 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11069 if test $? != 0; then
d0ac1c44 11070 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11071 fi
11072 new_LIBS=`${pkg_config} --libs ${guile_version}`
11073 if test $? != 0; then
d0ac1c44 11074 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11075 fi
11076 found_usable_guile=${guile_version}
11077 break
11078 done
11079 if test "${found_usable_guile}" = "checking"; then
11080 if test "${flag_errors}" = "yes"; then
d0ac1c44 11081 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11082 else
11083 found_usable_guile=no
11084 fi
11085 fi
11086 if test "${found_usable_guile}" != no; then
11087 save_CPPFLAGS=$CPPFLAGS
11088 save_LIBS=$LIBS
11089 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11090 LIBS="$LIBS $new_LIBS"
11091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11092/* end confdefs.h. */
11093#include "libguile.h"
11094int
11095main ()
11096{
11097scm_init_guile ();
11098 ;
11099 return 0;
11100}
11101_ACEOF
11102if ac_fn_c_try_link "$LINENO"; then :
11103 have_libguile=yes
11104 GUILE_CPPFLAGS=$new_CPPFLAGS
11105 GUILE_LIBS=$new_LIBS
11106else
11107 found_usable_guile=no
11108fi
11109rm -f core conftest.err conftest.$ac_objext \
11110 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11111 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11112if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11113
11114$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11115
11116
11117fi
11118
ed3ef339
DE
11119 CPPFLAGS=$save_CPPFLAGS
11120 LIBS=$save_LIBS
11121 if test "${found_usable_guile}" = no; then
11122 if test "${flag_errors}" = yes; then
11123 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11124$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11125as_fn_error $? "linking guile version ${guile_version} test program failed
11126See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11127 fi
11128 fi
11129 fi
11130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11131$as_echo "${found_usable_guile}" >&6; }
11132
11133 ;;
11134[\\/]* | ?:[\\/]*)
e1402065 11135 if test -x "${with_guile}"; then
ed3ef339
DE
11136
11137 pkg_config=${with_guile}
11138 guile_version_list=${try_guile_versions}
11139 flag_errors=yes
11140
ed3ef339
DE
11141 found_usable_guile=checking
11142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11143$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11144 for guile_version in ${guile_version_list}; do
11145 ${pkg_config} --exists ${guile_version} 2>/dev/null
11146 if test $? != 0; then
11147 continue
11148 fi
11149 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11150 if test $? != 0; then
d0ac1c44 11151 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11152 fi
11153 new_LIBS=`${pkg_config} --libs ${guile_version}`
11154 if test $? != 0; then
d0ac1c44 11155 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11156 fi
11157 found_usable_guile=${guile_version}
11158 break
11159 done
11160 if test "${found_usable_guile}" = "checking"; then
11161 if test "${flag_errors}" = "yes"; then
d0ac1c44 11162 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11163 else
11164 found_usable_guile=no
11165 fi
11166 fi
11167 if test "${found_usable_guile}" != no; then
11168 save_CPPFLAGS=$CPPFLAGS
11169 save_LIBS=$LIBS
11170 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11171 LIBS="$LIBS $new_LIBS"
11172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11173/* end confdefs.h. */
11174#include "libguile.h"
11175int
11176main ()
11177{
11178scm_init_guile ();
11179 ;
11180 return 0;
11181}
11182_ACEOF
11183if ac_fn_c_try_link "$LINENO"; then :
11184 have_libguile=yes
11185 GUILE_CPPFLAGS=$new_CPPFLAGS
11186 GUILE_LIBS=$new_LIBS
11187else
11188 found_usable_guile=no
11189fi
11190rm -f core conftest.err conftest.$ac_objext \
11191 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11192 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11193if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11194
11195$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11196
11197
11198fi
11199
ed3ef339
DE
11200 CPPFLAGS=$save_CPPFLAGS
11201 LIBS=$save_LIBS
11202 if test "${found_usable_guile}" = no; then
11203 if test "${flag_errors}" = yes; then
11204 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11205$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11206as_fn_error $? "linking guile version ${guile_version} test program failed
11207See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11208 fi
11209 fi
11210 fi
11211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11212$as_echo "${found_usable_guile}" >&6; }
11213
e1402065 11214 else
d0ac1c44 11215 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
e1402065 11216 fi
ed3ef339
DE
11217 ;;
11218"" | */*)
11219 # Disallow --with=guile="" and --with-guile=foo/bar.
d0ac1c44 11220 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
ed3ef339
DE
11221 ;;
11222*)
11223 # A space separate list of guile versions to try, in order.
e1402065 11224 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11225 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11226 fi
ed3ef339
DE
11227
11228 pkg_config=${pkg_config_prog_path}
11229 guile_version_list=${with_guile}
11230 flag_errors=yes
11231
ed3ef339
DE
11232 found_usable_guile=checking
11233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11234$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11235 for guile_version in ${guile_version_list}; do
11236 ${pkg_config} --exists ${guile_version} 2>/dev/null
11237 if test $? != 0; then
11238 continue
11239 fi
11240 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11241 if test $? != 0; then
d0ac1c44 11242 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11243 fi
11244 new_LIBS=`${pkg_config} --libs ${guile_version}`
11245 if test $? != 0; then
d0ac1c44 11246 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11247 fi
11248 found_usable_guile=${guile_version}
11249 break
11250 done
11251 if test "${found_usable_guile}" = "checking"; then
11252 if test "${flag_errors}" = "yes"; then
d0ac1c44 11253 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11254 else
11255 found_usable_guile=no
11256 fi
11257 fi
11258 if test "${found_usable_guile}" != no; then
11259 save_CPPFLAGS=$CPPFLAGS
11260 save_LIBS=$LIBS
11261 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11262 LIBS="$LIBS $new_LIBS"
11263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11264/* end confdefs.h. */
11265#include "libguile.h"
11266int
11267main ()
11268{
11269scm_init_guile ();
11270 ;
11271 return 0;
11272}
11273_ACEOF
11274if ac_fn_c_try_link "$LINENO"; then :
11275 have_libguile=yes
11276 GUILE_CPPFLAGS=$new_CPPFLAGS
11277 GUILE_LIBS=$new_LIBS
11278else
11279 found_usable_guile=no
11280fi
11281rm -f core conftest.err conftest.$ac_objext \
11282 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11283 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11284if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11285
11286$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11287
11288
11289fi
11290
ed3ef339
DE
11291 CPPFLAGS=$save_CPPFLAGS
11292 LIBS=$save_LIBS
11293 if test "${found_usable_guile}" = no; then
11294 if test "${flag_errors}" = yes; then
11295 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11296$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11297as_fn_error $? "linking guile version ${guile_version} test program failed
11298See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11299 fi
11300 fi
11301 fi
11302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11303$as_echo "${found_usable_guile}" >&6; }
11304
11305 ;;
11306esac
11307
e76c5d17 11308if test "${have_libguile}" != no; then
d342a0da
DE
11309 case "${with_guile}" in
11310 [\\/]* | ?:[\\/]*)
e76c5d17
DE
11311
11312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11313$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11314if ${ac_cv_guild_program_name+:} false; then :
e76c5d17
DE
11315 $as_echo_n "(cached) " >&6
11316else
d342a0da 11317 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
11318
11319 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11320 # the 'guild' and 'bindir' variables. In that case, try to guess
11321 # what the program name is, at the risk of getting it wrong if
11322 # Guile was configured with '--program-suffix' or similar.
11323 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 11324 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
11325 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11326 fi
11327
11328fi
11329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11330$as_echo "$ac_cv_guild_program_name" >&6; }
11331
11332 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11333 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
e76c5d17
DE
11334 fi
11335
11336 GUILD="$ac_cv_guild_program_name"
11337
11338
d342a0da
DE
11339 ;;
11340 *)
11341
11342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11343$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11344if ${ac_cv_guild_program_name+:} false; then :
d342a0da
DE
11345 $as_echo_n "(cached) " >&6
11346else
11347 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11348
11349 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11350 # the 'guild' and 'bindir' variables. In that case, try to guess
11351 # what the program name is, at the risk of getting it wrong if
11352 # Guile was configured with '--program-suffix' or similar.
11353 if test "x$ac_cv_guild_program_name" = "x"; then
11354 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11355 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11356 fi
11357
11358fi
11359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11360$as_echo "$ac_cv_guild_program_name" >&6; }
11361
11362 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11363 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
d342a0da
DE
11364 fi
11365
11366 GUILD="$ac_cv_guild_program_name"
11367
11368
11369 ;;
11370 esac
e76c5d17
DE
11371
11372
11373 if test "$cross_compiling" = no; then
11374 GUILD_TARGET_FLAG=
11375 else
11376 GUILD_TARGET_FLAG="--target=$host"
11377 fi
11378
11379
11380
11381
11382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11383$as_echo_n "checking whether guild supports this host... " >&6; }
d0ac1c44 11384if ${ac_cv_guild_ok+:} false; then :
e76c5d17
DE
11385 $as_echo_n "(cached) " >&6
11386else
11387 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11388 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11389 ac_cv_guild_ok=yes
11390 else
11391 ac_cv_guild_ok=no
11392 fi
11393fi
11394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11395$as_echo "$ac_cv_guild_ok" >&6; }
11396
11397 if test "$ac_cv_guild_ok" = no; then
11398 have_libguile=no
11399 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11400$as_echo "$as_me: WARNING: disabling guile support" >&2;}
11401 fi
11402fi
11403
ed3ef339
DE
11404if test "${have_libguile}" != no; then
11405
11406$as_echo "#define HAVE_GUILE 1" >>confdefs.h
11407
11408 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11409 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11410 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11411 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11412 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
11413
11414 save_LIBS="$LIBS"
11415 save_CPPFLAGS="$CPPFLAGS"
11416 LIBS="$GUILE_LIBS"
11417 CPPFLAGS="$GUILE_CPPFLAGS"
11418 for ac_func in scm_new_smob
11419do :
11420 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
d0ac1c44 11421if test "x$ac_cv_func_scm_new_smob" = xyes; then :
16954d5d
LC
11422 cat >>confdefs.h <<_ACEOF
11423#define HAVE_SCM_NEW_SMOB 1
11424_ACEOF
11425
11426fi
11427done
11428
11429 LIBS="$save_LIBS"
11430 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
11431else
11432 # Even if Guile support is not compiled in, we need to have these files
11433 # included.
bd810fff 11434 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
ed3ef339
DE
11435 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11436fi
9a156167 11437
ac534cba 11438
4df42755
DE
11439 if test "${have_libguile}" != no; then
11440 HAVE_GUILE_TRUE=
11441 HAVE_GUILE_FALSE='#'
11442else
11443 HAVE_GUILE_TRUE='#'
11444 HAVE_GUILE_FALSE=
11445fi
11446
ac534cba 11447
d344e670
DE
11448# --------------------- #
11449# Check for libmcheck. #
11450# --------------------- #
11451
a8db4212
YPK
11452# Enable -lmcheck by default (it provides cheap-enough memory mangling),
11453# but turn it off if Python is enabled with threads, since -lmcheck is
11454# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
11455# and for releases.
17ef446e
PA
11456if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
11457 && $development; then
11458 libmcheck_default=yes
11459else
11460 libmcheck_default=no
a8db4212
YPK
11461fi
11462
17ef446e
PA
11463 # Check whether --enable-libmcheck was given.
11464if test "${enable_libmcheck+set}" = set; then :
11465 enableval=$enable_libmcheck; case "${enableval}" in
11466 yes | y) ENABLE_LIBMCHECK="yes" ;;
11467 no | n) ENABLE_LIBMCHECK="no" ;;
d0ac1c44 11468 *) as_fn_error $? "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
17ef446e
PA
11469 esac
11470fi
11471
11472
11473 if test -z "${ENABLE_LIBMCHECK}"; then
11474 ENABLE_LIBMCHECK=${libmcheck_default}
a8db4212 11475 fi
17ef446e
PA
11476
11477 if test "$ENABLE_LIBMCHECK" = "yes" ; then
11478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
a8db4212 11479$as_echo_n "checking for main in -lmcheck... " >&6; }
d0ac1c44 11480if ${ac_cv_lib_mcheck_main+:} false; then :
a8db4212
YPK
11481 $as_echo_n "(cached) " >&6
11482else
11483 ac_check_lib_save_LIBS=$LIBS
11484LIBS="-lmcheck $LIBS"
11485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11486/* end confdefs.h. */
11487
11488
11489int
11490main ()
11491{
11492return main ();
11493 ;
11494 return 0;
11495}
11496_ACEOF
11497if ac_fn_c_try_link "$LINENO"; then :
11498 ac_cv_lib_mcheck_main=yes
11499else
11500 ac_cv_lib_mcheck_main=no
11501fi
11502rm -f core conftest.err conftest.$ac_objext \
11503 conftest$ac_exeext conftest.$ac_ext
11504LIBS=$ac_check_lib_save_LIBS
11505fi
11506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
11507$as_echo "$ac_cv_lib_mcheck_main" >&6; }
d0ac1c44 11508if test "x$ac_cv_lib_mcheck_main" = xyes; then :
a8db4212
YPK
11509 cat >>confdefs.h <<_ACEOF
11510#define HAVE_LIBMCHECK 1
11511_ACEOF
11512
11513 LIBS="-lmcheck $LIBS"
11514
11515fi
11516
17ef446e
PA
11517 fi
11518
11519
11520if test "$ENABLE_LIBMCHECK" = "yes" \
11521 -a "${have_libpython}" != "no" \
11522 -a "${python_has_threads}" = "yes" ; then
11523 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
11524$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
a8db4212
YPK
11525fi
11526
58bfce93
MM
11527
11528# Check whether --with-intel_pt was given.
11529if test "${with_intel_pt+set}" = set; then :
11530 withval=$with_intel_pt;
11531else
11532 with_intel_pt=auto
11533fi
11534
11535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
11536$as_echo_n "checking whether to use intel pt... " >&6; }
11537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
11538$as_echo "$with_intel_pt" >&6; }
11539
11540if test "${with_intel_pt}" = no; then
bc504a31
PA
11541 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
11542$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
58bfce93
MM
11543 HAVE_LIBIPT=no
11544else
5599c404
MM
11545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11546/* end confdefs.h. */
11547
11548#include <linux/perf_event.h>
11549#ifndef PERF_ATTR_SIZE_VER5
11550# error
11551#endif
11552
11553_ACEOF
11554if ac_fn_c_try_cpp "$LINENO"; then :
11555 perf_event=yes
11556else
11557 perf_event=no
11558fi
d0ac1c44 11559rm -f conftest.err conftest.i conftest.$ac_ext
5599c404
MM
11560 if test "$perf_event" != yes; then
11561 if test "$with_intel_pt" = yes; then
d0ac1c44 11562 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
5599c404
MM
11563 else
11564 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
11565$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
11566 fi
11567 fi
11568
58bfce93
MM
11569
11570
11571
11572
11573
11574
11575
11576
11577 use_additional=yes
11578
11579 acl_save_prefix="$prefix"
11580 prefix="$acl_final_prefix"
11581 acl_save_exec_prefix="$exec_prefix"
11582 exec_prefix="$acl_final_exec_prefix"
11583
11584 eval additional_includedir=\"$includedir\"
11585 eval additional_libdir=\"$libdir\"
11586
11587 exec_prefix="$acl_save_exec_prefix"
11588 prefix="$acl_save_prefix"
11589
11590
11591# Check whether --with-libipt-prefix was given.
11592if test "${with_libipt_prefix+set}" = set; then :
11593 withval=$with_libipt_prefix;
11594 if test "X$withval" = "Xno"; then
11595 use_additional=no
11596 else
11597 if test "X$withval" = "X"; then
11598
11599 acl_save_prefix="$prefix"
11600 prefix="$acl_final_prefix"
11601 acl_save_exec_prefix="$exec_prefix"
11602 exec_prefix="$acl_final_exec_prefix"
11603
11604 eval additional_includedir=\"$includedir\"
11605 eval additional_libdir=\"$libdir\"
11606
11607 exec_prefix="$acl_save_exec_prefix"
11608 prefix="$acl_save_prefix"
11609
11610 else
11611 additional_includedir="$withval/include"
11612 additional_libdir="$withval/lib"
11613 fi
11614 fi
11615
11616fi
11617
11618 LIBIPT=
11619 LTLIBIPT=
11620 INCIPT=
11621 rpathdirs=
11622 ltrpathdirs=
11623 names_already_handled=
11624 names_next_round='ipt '
11625 while test -n "$names_next_round"; do
11626 names_this_round="$names_next_round"
11627 names_next_round=
11628 for name in $names_this_round; do
11629 already_handled=
11630 for n in $names_already_handled; do
11631 if test "$n" = "$name"; then
11632 already_handled=yes
11633 break
11634 fi
11635 done
11636 if test -z "$already_handled"; then
11637 names_already_handled="$names_already_handled $name"
11638 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11639 eval value=\"\$HAVE_LIB$uppername\"
11640 if test -n "$value"; then
11641 if test "$value" = yes; then
11642 eval value=\"\$LIB$uppername\"
11643 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
11644 eval value=\"\$LTLIB$uppername\"
11645 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
11646 else
11647 :
11648 fi
11649 else
11650 found_dir=
11651 found_la=
11652 found_so=
11653 found_a=
11654 if test $use_additional = yes; then
11655 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11656 found_dir="$additional_libdir"
11657 found_so="$additional_libdir/lib$name.$shlibext"
11658 if test -f "$additional_libdir/lib$name.la"; then
11659 found_la="$additional_libdir/lib$name.la"
11660 fi
11661 else
11662 if test -f "$additional_libdir/lib$name.$libext"; then
11663 found_dir="$additional_libdir"
11664 found_a="$additional_libdir/lib$name.$libext"
11665 if test -f "$additional_libdir/lib$name.la"; then
11666 found_la="$additional_libdir/lib$name.la"
11667 fi
11668 fi
11669 fi
11670 fi
11671 if test "X$found_dir" = "X"; then
11672 for x in $LDFLAGS $LTLIBIPT; do
11673
11674 acl_save_prefix="$prefix"
11675 prefix="$acl_final_prefix"
11676 acl_save_exec_prefix="$exec_prefix"
11677 exec_prefix="$acl_final_exec_prefix"
11678 eval x=\"$x\"
11679 exec_prefix="$acl_save_exec_prefix"
11680 prefix="$acl_save_prefix"
11681
11682 case "$x" in
11683 -L*)
11684 dir=`echo "X$x" | sed -e 's/^X-L//'`
11685 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11686 found_dir="$dir"
11687 found_so="$dir/lib$name.$shlibext"
11688 if test -f "$dir/lib$name.la"; then
11689 found_la="$dir/lib$name.la"
11690 fi
11691 else
11692 if test -f "$dir/lib$name.$libext"; then
11693 found_dir="$dir"
11694 found_a="$dir/lib$name.$libext"
11695 if test -f "$dir/lib$name.la"; then
11696 found_la="$dir/lib$name.la"
11697 fi
11698 fi
11699 fi
11700 ;;
11701 esac
11702 if test "X$found_dir" != "X"; then
11703 break
11704 fi
11705 done
11706 fi
11707 if test "X$found_dir" != "X"; then
11708 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
11709 if test "X$found_so" != "X"; then
11710 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11711 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11712 else
11713 haveit=
11714 for x in $ltrpathdirs; do
11715 if test "X$x" = "X$found_dir"; then
11716 haveit=yes
11717 break
11718 fi
11719 done
11720 if test -z "$haveit"; then
11721 ltrpathdirs="$ltrpathdirs $found_dir"
11722 fi
11723 if test "$hardcode_direct" = yes; then
11724 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11725 else
11726 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11727 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11728 haveit=
11729 for x in $rpathdirs; do
11730 if test "X$x" = "X$found_dir"; then
11731 haveit=yes
11732 break
11733 fi
11734 done
11735 if test -z "$haveit"; then
11736 rpathdirs="$rpathdirs $found_dir"
11737 fi
11738 else
11739 haveit=
11740 for x in $LDFLAGS $LIBIPT; do
11741
11742 acl_save_prefix="$prefix"
11743 prefix="$acl_final_prefix"
11744 acl_save_exec_prefix="$exec_prefix"
11745 exec_prefix="$acl_final_exec_prefix"
11746 eval x=\"$x\"
11747 exec_prefix="$acl_save_exec_prefix"
11748 prefix="$acl_save_prefix"
11749
11750 if test "X$x" = "X-L$found_dir"; then
11751 haveit=yes
11752 break
11753 fi
11754 done
11755 if test -z "$haveit"; then
11756 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
11757 fi
11758 if test "$hardcode_minus_L" != no; then
11759 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11760 else
11761 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11762 fi
11763 fi
11764 fi
11765 fi
11766 else
11767 if test "X$found_a" != "X"; then
11768 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
11769 else
11770 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
11771 fi
11772 fi
11773 additional_includedir=
11774 case "$found_dir" in
11775 */lib | */lib/)
11776 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11777 additional_includedir="$basedir/include"
11778 ;;
11779 esac
11780 if test "X$additional_includedir" != "X"; then
11781 if test "X$additional_includedir" != "X/usr/include"; then
11782 haveit=
11783 if test "X$additional_includedir" = "X/usr/local/include"; then
11784 if test -n "$GCC"; then
11785 case $host_os in
11786 linux*) haveit=yes;;
11787 esac
11788 fi
11789 fi
11790 if test -z "$haveit"; then
11791 for x in $CPPFLAGS $INCIPT; do
11792
11793 acl_save_prefix="$prefix"
11794 prefix="$acl_final_prefix"
11795 acl_save_exec_prefix="$exec_prefix"
11796 exec_prefix="$acl_final_exec_prefix"
11797 eval x=\"$x\"
11798 exec_prefix="$acl_save_exec_prefix"
11799 prefix="$acl_save_prefix"
11800
11801 if test "X$x" = "X-I$additional_includedir"; then
11802 haveit=yes
11803 break
11804 fi
11805 done
11806 if test -z "$haveit"; then
11807 if test -d "$additional_includedir"; then
11808 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
11809 fi
11810 fi
11811 fi
11812 fi
11813 fi
11814 if test -n "$found_la"; then
11815 save_libdir="$libdir"
11816 case "$found_la" in
11817 */* | *\\*) . "$found_la" ;;
11818 *) . "./$found_la" ;;
11819 esac
11820 libdir="$save_libdir"
11821 for dep in $dependency_libs; do
11822 case "$dep" in
11823 -L*)
11824 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11825 if test "X$additional_libdir" != "X/usr/lib"; then
11826 haveit=
11827 if test "X$additional_libdir" = "X/usr/local/lib"; then
11828 if test -n "$GCC"; then
11829 case $host_os in
11830 linux*) haveit=yes;;
11831 esac
11832 fi
11833 fi
11834 if test -z "$haveit"; then
11835 haveit=
11836 for x in $LDFLAGS $LIBIPT; do
11837
11838 acl_save_prefix="$prefix"
11839 prefix="$acl_final_prefix"
11840 acl_save_exec_prefix="$exec_prefix"
11841 exec_prefix="$acl_final_exec_prefix"
11842 eval x=\"$x\"
11843 exec_prefix="$acl_save_exec_prefix"
11844 prefix="$acl_save_prefix"
11845
11846 if test "X$x" = "X-L$additional_libdir"; then
11847 haveit=yes
11848 break
11849 fi
11850 done
11851 if test -z "$haveit"; then
11852 if test -d "$additional_libdir"; then
11853 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
11854 fi
11855 fi
11856 haveit=
11857 for x in $LDFLAGS $LTLIBIPT; do
11858
11859 acl_save_prefix="$prefix"
11860 prefix="$acl_final_prefix"
11861 acl_save_exec_prefix="$exec_prefix"
11862 exec_prefix="$acl_final_exec_prefix"
11863 eval x=\"$x\"
11864 exec_prefix="$acl_save_exec_prefix"
11865 prefix="$acl_save_prefix"
11866
11867 if test "X$x" = "X-L$additional_libdir"; then
11868 haveit=yes
11869 break
11870 fi
11871 done
11872 if test -z "$haveit"; then
11873 if test -d "$additional_libdir"; then
11874 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
11875 fi
11876 fi
11877 fi
11878 fi
11879 ;;
11880 -R*)
11881 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11882 if test "$enable_rpath" != no; then
11883 haveit=
11884 for x in $rpathdirs; do
11885 if test "X$x" = "X$dir"; then
11886 haveit=yes
11887 break
11888 fi
11889 done
11890 if test -z "$haveit"; then
11891 rpathdirs="$rpathdirs $dir"
11892 fi
11893 haveit=
11894 for x in $ltrpathdirs; do
11895 if test "X$x" = "X$dir"; then
11896 haveit=yes
11897 break
11898 fi
11899 done
11900 if test -z "$haveit"; then
11901 ltrpathdirs="$ltrpathdirs $dir"
11902 fi
11903 fi
11904 ;;
11905 -l*)
11906 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11907 ;;
11908 *.la)
11909 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11910 ;;
11911 *)
11912 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
11913 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
11914 ;;
11915 esac
11916 done
11917 fi
11918 else
11919 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11920 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
11921 fi
11922 fi
11923 fi
11924 done
11925 done
11926 if test "X$rpathdirs" != "X"; then
11927 if test -n "$hardcode_libdir_separator"; then
11928 alldirs=
11929 for found_dir in $rpathdirs; do
11930 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11931 done
11932 acl_save_libdir="$libdir"
11933 libdir="$alldirs"
11934 eval flag=\"$hardcode_libdir_flag_spec\"
11935 libdir="$acl_save_libdir"
11936 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11937 else
11938 for found_dir in $rpathdirs; do
11939 acl_save_libdir="$libdir"
11940 libdir="$found_dir"
11941 eval flag=\"$hardcode_libdir_flag_spec\"
11942 libdir="$acl_save_libdir"
11943 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11944 done
11945 fi
11946 fi
11947 if test "X$ltrpathdirs" != "X"; then
11948 for found_dir in $ltrpathdirs; do
11949 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
11950 done
11951 fi
11952
11953
11954 ac_save_CPPFLAGS="$CPPFLAGS"
11955
11956 for element in $INCIPT; do
11957 haveit=
11958 for x in $CPPFLAGS; do
11959
11960 acl_save_prefix="$prefix"
11961 prefix="$acl_final_prefix"
11962 acl_save_exec_prefix="$exec_prefix"
11963 exec_prefix="$acl_final_exec_prefix"
11964 eval x=\"$x\"
11965 exec_prefix="$acl_save_exec_prefix"
11966 prefix="$acl_save_prefix"
11967
11968 if test "X$x" = "X$element"; then
11969 haveit=yes
11970 break
11971 fi
11972 done
11973 if test -z "$haveit"; then
11974 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11975 fi
11976 done
11977
11978
11979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
11980$as_echo_n "checking for libipt... " >&6; }
d0ac1c44 11981if ${ac_cv_libipt+:} false; then :
58bfce93
MM
11982 $as_echo_n "(cached) " >&6
11983else
11984
11985 ac_save_LIBS="$LIBS"
11986 LIBS="$LIBS $LIBIPT"
11987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11988/* end confdefs.h. */
11989#include "intel-pt.h"
11990int
11991main ()
11992{
11993pt_insn_alloc_decoder (0);
11994 ;
11995 return 0;
11996}
11997_ACEOF
11998if ac_fn_c_try_link "$LINENO"; then :
11999 ac_cv_libipt=yes
12000else
12001 ac_cv_libipt=no
12002fi
12003rm -f core conftest.err conftest.$ac_objext \
12004 conftest$ac_exeext conftest.$ac_ext
12005 LIBS="$ac_save_LIBS"
12006
12007fi
12008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
12009$as_echo "$ac_cv_libipt" >&6; }
12010 if test "$ac_cv_libipt" = yes; then
12011 HAVE_LIBIPT=yes
12012
12013$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
12014
12015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
12016$as_echo_n "checking how to link with libipt... " >&6; }
12017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
12018$as_echo "$LIBIPT" >&6; }
12019 else
12020 HAVE_LIBIPT=no
12021 CPPFLAGS="$ac_save_CPPFLAGS"
12022 LIBIPT=
12023 LTLIBIPT=
12024 fi
12025
12026
12027
12028
12029
12030
12031 if test "$HAVE_LIBIPT" != yes; then
12032 if test "$with_intel_pt" = yes; then
d0ac1c44 12033 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
58bfce93
MM
12034 else
12035 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
12036$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
12037 fi
c56ccc05
MM
12038 else
12039 save_LIBS=$LIBS
12040 LIBS="$LIBS $LIBIPT"
12041 for ac_func in pt_insn_event
12042do :
12043 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
d0ac1c44 12044if test "x$ac_cv_func_pt_insn_event" = xyes; then :
c56ccc05
MM
12045 cat >>confdefs.h <<_ACEOF
12046#define HAVE_PT_INSN_EVENT 1
12047_ACEOF
12048
12049fi
12050done
12051
12052 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
12053"
d0ac1c44 12054if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
c56ccc05
MM
12055
12056cat >>confdefs.h <<_ACEOF
12057#define HAVE_STRUCT_PT_INSN_ENABLED 1
12058_ACEOF
12059
12060
12061fi
12062ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
12063"
d0ac1c44 12064if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
c56ccc05
MM
12065
12066cat >>confdefs.h <<_ACEOF
12067#define HAVE_STRUCT_PT_INSN_RESYNCED 1
12068_ACEOF
12069
12070
12071fi
12072
12073 LIBS=$save_LIBS
58bfce93
MM
12074 fi
12075fi
12076
81ecdfbb
RW
12077# ------------------------- #
12078# Checks for header files. #
12079# ------------------------- #
c890192f 12080
81ecdfbb
RW
12081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12082$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 12083if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 12084 $as_echo_n "(cached) " >&6
bec39cab 12085else
81ecdfbb 12086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12087/* end confdefs.h. */
81ecdfbb
RW
12088#include <stdlib.h>
12089#include <stdarg.h>
12090#include <string.h>
12091#include <float.h>
12092
a9322a30
TT
12093int
12094main ()
12095{
a9322a30
TT
12096
12097 ;
12098 return 0;
12099}
bec39cab 12100_ACEOF
81ecdfbb
RW
12101if ac_fn_c_try_compile "$LINENO"; then :
12102 ac_cv_header_stdc=yes
bec39cab 12103else
81ecdfbb 12104 ac_cv_header_stdc=no
a9322a30 12105fi
81ecdfbb 12106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12107
81ecdfbb
RW
12108if test $ac_cv_header_stdc = yes; then
12109 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12111/* end confdefs.h. */
12112#include <string.h>
bec39cab 12113
81ecdfbb
RW
12114_ACEOF
12115if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12116 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 12117
bec39cab 12118else
81ecdfbb
RW
12119 ac_cv_header_stdc=no
12120fi
12121rm -f conftest*
12122
12123fi
12124
12125if test $ac_cv_header_stdc = yes; then
12126 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12128/* end confdefs.h. */
12129#include <stdlib.h>
12130
bec39cab 12131_ACEOF
81ecdfbb
RW
12132if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12133 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 12134
81ecdfbb
RW
12135else
12136 ac_cv_header_stdc=no
12137fi
12138rm -f conftest*
bec39cab 12139
bec39cab 12140fi
81ecdfbb
RW
12141
12142if test $ac_cv_header_stdc = yes; then
12143 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12144 if test "$cross_compiling" = yes; then :
12145 :
bec39cab 12146else
81ecdfbb 12147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12148/* end confdefs.h. */
81ecdfbb
RW
12149#include <ctype.h>
12150#include <stdlib.h>
12151#if ((' ' & 0x0FF) == 0x020)
12152# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12153# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12154#else
12155# define ISLOWER(c) \
12156 (('a' <= (c) && (c) <= 'i') \
12157 || ('j' <= (c) && (c) <= 'r') \
12158 || ('s' <= (c) && (c) <= 'z'))
12159# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12160#endif
12161
12162#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
12163int
12164main ()
12165{
81ecdfbb
RW
12166 int i;
12167 for (i = 0; i < 256; i++)
12168 if (XOR (islower (i), ISLOWER (i))
12169 || toupper (i) != TOUPPER (i))
12170 return 2;
a9322a30
TT
12171 return 0;
12172}
bec39cab 12173_ACEOF
81ecdfbb
RW
12174if ac_fn_c_try_run "$LINENO"; then :
12175
bec39cab 12176else
81ecdfbb
RW
12177 ac_cv_header_stdc=no
12178fi
12179rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12180 conftest.$ac_objext conftest.beam conftest.$ac_ext
12181fi
bec39cab 12182
bec39cab 12183fi
a9322a30 12184fi
81ecdfbb
RW
12185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12186$as_echo "$ac_cv_header_stdc" >&6; }
12187if test $ac_cv_header_stdc = yes; then
bec39cab 12188
81ecdfbb 12189$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 12190
81ecdfbb 12191fi
bec39cab 12192
81ecdfbb 12193# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 12194for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
161d1bec 12195 thread_db.h \
81ecdfbb
RW
12196 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12197 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
44122162 12198 sys/reg.h sys/debugreg.h sys/select.h \
726e1356 12199 termios.h elf_hp.h \
9467110b 12200 dlfcn.h
81ecdfbb
RW
12201do :
12202 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12203ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 12204if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12205 cat >>confdefs.h <<_ACEOF
81ecdfbb 12206#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12207_ACEOF
c906108c 12208
bec39cab 12209fi
81ecdfbb
RW
12210
12211done
12212
81ecdfbb
RW
12213for ac_header in sys/user.h
12214do :
12215 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
12216# include <sys/param.h>
a9322a30
TT
12217#endif
12218
81ecdfbb 12219"
d0ac1c44 12220if test "x$ac_cv_header_sys_user_h" = xyes; then :
81ecdfbb
RW
12221 cat >>confdefs.h <<_ACEOF
12222#define HAVE_SYS_USER_H 1
bec39cab 12223_ACEOF
bec39cab 12224
a9322a30 12225fi
bec39cab 12226
81ecdfbb 12227done
5ee754fc 12228
5ee754fc 12229
5007d765 12230for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
81ecdfbb
RW
12231do :
12232 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12233ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 12234if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12235 cat >>confdefs.h <<_ACEOF
81ecdfbb 12236#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12237_ACEOF
5ee754fc
MK
12238
12239fi
12240
81ecdfbb 12241done
bec39cab 12242
81ecdfbb
RW
12243for ac_header in term.h
12244do :
12245 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
12246# include <curses.h>
12247#endif
bec39cab 12248
81ecdfbb 12249"
d0ac1c44 12250if test "x$ac_cv_header_term_h" = xyes; then :
81ecdfbb
RW
12251 cat >>confdefs.h <<_ACEOF
12252#define HAVE_TERM_H 1
a8111142 12253_ACEOF
a8111142 12254
a8111142 12255fi
a8111142 12256
81ecdfbb 12257done
a8111142
TT
12258
12259
81ecdfbb
RW
12260# ------------------------- #
12261# Checks for declarations. #
12262# ------------------------- #
a9322a30 12263
07697489
PA
12264
12265 # Check for presence and size of long long.
12266 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
d0ac1c44 12267if test "x$ac_cv_type_long_long" = xyes; then :
07697489
PA
12268
12269cat >>confdefs.h <<_ACEOF
12270#define HAVE_LONG_LONG 1
12271_ACEOF
12272
12273# The cast to long int works around a bug in the HP C Compiler
12274# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12275# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12276# This bug is HP SR number 8606223364.
12277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
12278$as_echo_n "checking size of long long... " >&6; }
d0ac1c44 12279if ${ac_cv_sizeof_long_long+:} false; then :
07697489
PA
12280 $as_echo_n "(cached) " >&6
12281else
12282 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
12283
12284else
12285 if test "$ac_cv_type_long_long" = yes; then
12286 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12287$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
12288as_fn_error 77 "cannot compute sizeof (long long)
12289See \`config.log' for more details" "$LINENO" 5; }
07697489
PA
12290 else
12291 ac_cv_sizeof_long_long=0
12292 fi
12293fi
12294
12295fi
12296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
12297$as_echo "$ac_cv_sizeof_long_long" >&6; }
12298
12299
12300
12301cat >>confdefs.h <<_ACEOF
12302#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12303_ACEOF
12304
12305
12306fi
12307
12308
d0ac1c44
SM
12309 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
12310ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
12311if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
07697489
PA
12312 ac_have_decl=1
12313else
12314 ac_have_decl=0
12315fi
12316
12317cat >>confdefs.h <<_ACEOF
12318#define HAVE_DECL_BASENAME $ac_have_decl
12319_ACEOF
12320ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
d0ac1c44 12321if test "x$ac_cv_have_decl_ffs" = xyes; then :
07697489
PA
12322 ac_have_decl=1
12323else
12324 ac_have_decl=0
12325fi
12326
12327cat >>confdefs.h <<_ACEOF
12328#define HAVE_DECL_FFS $ac_have_decl
12329_ACEOF
12330ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
d0ac1c44 12331if test "x$ac_cv_have_decl_asprintf" = xyes; then :
07697489
PA
12332 ac_have_decl=1
12333else
12334 ac_have_decl=0
12335fi
12336
12337cat >>confdefs.h <<_ACEOF
12338#define HAVE_DECL_ASPRINTF $ac_have_decl
12339_ACEOF
12340ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
d0ac1c44 12341if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
07697489
PA
12342 ac_have_decl=1
12343else
12344 ac_have_decl=0
12345fi
12346
12347cat >>confdefs.h <<_ACEOF
12348#define HAVE_DECL_VASPRINTF $ac_have_decl
12349_ACEOF
12350ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
d0ac1c44 12351if test "x$ac_cv_have_decl_snprintf" = xyes; then :
07697489
PA
12352 ac_have_decl=1
12353else
12354 ac_have_decl=0
12355fi
12356
12357cat >>confdefs.h <<_ACEOF
12358#define HAVE_DECL_SNPRINTF $ac_have_decl
12359_ACEOF
12360ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
d0ac1c44 12361if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
07697489
PA
12362 ac_have_decl=1
12363else
12364 ac_have_decl=0
12365fi
12366
12367cat >>confdefs.h <<_ACEOF
12368#define HAVE_DECL_VSNPRINTF $ac_have_decl
12369_ACEOF
12370
12371 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
d0ac1c44 12372if test "x$ac_cv_have_decl_strtol" = xyes; then :
07697489
PA
12373 ac_have_decl=1
12374else
12375 ac_have_decl=0
12376fi
12377
12378cat >>confdefs.h <<_ACEOF
12379#define HAVE_DECL_STRTOL $ac_have_decl
12380_ACEOF
12381ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
d0ac1c44 12382if test "x$ac_cv_have_decl_strtoul" = xyes; then :
07697489
PA
12383 ac_have_decl=1
12384else
12385 ac_have_decl=0
12386fi
12387
12388cat >>confdefs.h <<_ACEOF
12389#define HAVE_DECL_STRTOUL $ac_have_decl
12390_ACEOF
12391ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
d0ac1c44 12392if test "x$ac_cv_have_decl_strtoll" = xyes; then :
07697489
PA
12393 ac_have_decl=1
12394else
12395 ac_have_decl=0
12396fi
12397
12398cat >>confdefs.h <<_ACEOF
12399#define HAVE_DECL_STRTOLL $ac_have_decl
12400_ACEOF
12401ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
d0ac1c44 12402if test "x$ac_cv_have_decl_strtoull" = xyes; then :
07697489
PA
12403 ac_have_decl=1
12404else
12405 ac_have_decl=0
12406fi
12407
12408cat >>confdefs.h <<_ACEOF
12409#define HAVE_DECL_STRTOULL $ac_have_decl
12410_ACEOF
12411
12412 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
d0ac1c44 12413if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
07697489
PA
12414 ac_have_decl=1
12415else
12416 ac_have_decl=0
12417fi
12418
12419cat >>confdefs.h <<_ACEOF
12420#define HAVE_DECL_STRVERSCMP $ac_have_decl
12421_ACEOF
12422
12423
12424
81ecdfbb 12425ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
d0ac1c44 12426if test "x$ac_cv_have_decl_free" = xyes; then :
81ecdfbb 12427 ac_have_decl=1
bec39cab 12428else
81ecdfbb
RW
12429 ac_have_decl=0
12430fi
12431
12432cat >>confdefs.h <<_ACEOF
12433#define HAVE_DECL_FREE $ac_have_decl
bec39cab 12434_ACEOF
81ecdfbb 12435ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
d0ac1c44 12436if test "x$ac_cv_have_decl_malloc" = xyes; then :
81ecdfbb
RW
12437 ac_have_decl=1
12438else
12439 ac_have_decl=0
12440fi
12441
12442cat >>confdefs.h <<_ACEOF
12443#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 12444_ACEOF
81ecdfbb 12445ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
d0ac1c44 12446if test "x$ac_cv_have_decl_realloc" = xyes; then :
81ecdfbb 12447 ac_have_decl=1
bec39cab 12448else
81ecdfbb
RW
12449 ac_have_decl=0
12450fi
bec39cab 12451
81ecdfbb
RW
12452cat >>confdefs.h <<_ACEOF
12453#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 12454_ACEOF
81ecdfbb 12455ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
d0ac1c44 12456if test "x$ac_cv_have_decl_snprintf" = xyes; then :
81ecdfbb
RW
12457 ac_have_decl=1
12458else
12459 ac_have_decl=0
5ee754fc 12460fi
81ecdfbb
RW
12461
12462cat >>confdefs.h <<_ACEOF
12463#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 12464_ACEOF
5ee754fc 12465
5ee754fc 12466
81ecdfbb
RW
12467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12468$as_echo_n "checking for LC_MESSAGES... " >&6; }
d0ac1c44 12469if ${am_cv_val_LC_MESSAGES+:} false; then :
81ecdfbb 12470 $as_echo_n "(cached) " >&6
bec39cab 12471else
81ecdfbb 12472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12473/* end confdefs.h. */
81ecdfbb 12474#include <locale.h>
a9322a30
TT
12475int
12476main ()
12477{
81ecdfbb 12478return LC_MESSAGES
a9322a30
TT
12479 ;
12480 return 0;
12481}
bec39cab 12482_ACEOF
81ecdfbb
RW
12483if ac_fn_c_try_link "$LINENO"; then :
12484 am_cv_val_LC_MESSAGES=yes
bec39cab 12485else
81ecdfbb
RW
12486 am_cv_val_LC_MESSAGES=no
12487fi
12488rm -f core conftest.err conftest.$ac_objext \
12489 conftest$ac_exeext conftest.$ac_ext
12490fi
12491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12492$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12493 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 12494
81ecdfbb
RW
12495$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
12496
12497 fi
12498
12499
12500# ----------------------- #
12501# Checks for structures. #
12502# ----------------------- #
12503
12504ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
d0ac1c44 12505if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
81ecdfbb
RW
12506
12507cat >>confdefs.h <<_ACEOF
12508#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 12509_ACEOF
7eb368b3 12510
81ecdfbb 12511
7eb368b3 12512fi
81ecdfbb 12513ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
d0ac1c44 12514if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
7eb368b3 12515
a9322a30
TT
12516cat >>confdefs.h <<_ACEOF
12517#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
12518_ACEOF
12519
a9322a30 12520
7eb368b3
NR
12521fi
12522
7eb368b3 12523
a9322a30
TT
12524# ------------------ #
12525# Checks for types. #
12526# ------------------ #
7eb368b3 12527
81ecdfbb 12528ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
12529#include <sys/socket.h>
12530
81ecdfbb 12531"
d0ac1c44 12532if test "x$ac_cv_type_socklen_t" = xyes; then :
bec39cab 12533
a9322a30
TT
12534cat >>confdefs.h <<_ACEOF
12535#define HAVE_SOCKLEN_T 1
12536_ACEOF
12537
12538
12539fi
12540
12541
12542# ------------------------------------- #
12543# Checks for compiler characteristics. #
12544# ------------------------------------- #
12545
81ecdfbb
RW
12546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12547$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
d0ac1c44 12548if ${ac_cv_c_const+:} false; then :
81ecdfbb 12549 $as_echo_n "(cached) " >&6
a9322a30 12550else
81ecdfbb 12551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12552/* end confdefs.h. */
a9322a30
TT
12553
12554int
12555main ()
12556{
d0ac1c44 12557
a9322a30 12558#ifndef __cplusplus
d0ac1c44 12559 /* Ultrix mips cc rejects this sort of thing. */
a9322a30 12560 typedef int charset[2];
d0ac1c44 12561 const charset cs = { 0, 0 };
a9322a30 12562 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
12563 char const *const *pcpcc;
12564 char **ppc;
a9322a30
TT
12565 /* NEC SVR4.0.2 mips cc rejects this. */
12566 struct point {int x, y;};
12567 static struct point const zero = {0,0};
12568 /* AIX XL C 1.02.0.0 rejects this.
12569 It does not let you subtract one const X* pointer from another in
12570 an arm of an if-expression whose if-part is not a constant
12571 expression */
12572 const char *g = "string";
81ecdfbb 12573 pcpcc = &g + (g ? g-g : 0);
a9322a30 12574 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
12575 ++pcpcc;
12576 ppc = (char**) pcpcc;
12577 pcpcc = (char const *const *) ppc;
d0ac1c44
SM
12578 { /* SCO 3.2v4 cc rejects this sort of thing. */
12579 char tx;
12580 char *t = &tx;
a9322a30
TT
12581 char const *s = 0 ? (char *) 0 : (char const *) 0;
12582
12583 *t++ = 0;
81ecdfbb 12584 if (s) return 0;
a9322a30
TT
12585 }
12586 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12587 int x[] = {25, 17};
12588 const int *foo = &x[0];
12589 ++foo;
12590 }
12591 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12592 typedef const int *iptr;
12593 iptr p = 0;
12594 ++p;
12595 }
d0ac1c44 12596 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
a9322a30 12597 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
d0ac1c44
SM
12598 struct s { int j; const int *ap[3]; } bx;
12599 struct s *b = &bx; b->j = 5;
a9322a30
TT
12600 }
12601 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12602 const int foo = 10;
81ecdfbb 12603 if (!foo) return 0;
a9322a30 12604 }
81ecdfbb 12605 return !cs[0] && !zero.x;
a9322a30
TT
12606#endif
12607
12608 ;
12609 return 0;
12610}
bec39cab 12611_ACEOF
81ecdfbb 12612if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12613 ac_cv_c_const=yes
5ee754fc 12614else
81ecdfbb 12615 ac_cv_c_const=no
5ee754fc 12616fi
81ecdfbb 12617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 12618fi
81ecdfbb
RW
12619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12620$as_echo "$ac_cv_c_const" >&6; }
a9322a30 12621if test $ac_cv_c_const = no; then
bec39cab 12622
81ecdfbb 12623$as_echo "#define const /**/" >>confdefs.h
bec39cab 12624
5ee754fc 12625fi
bec39cab 12626
81ecdfbb
RW
12627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12628$as_echo_n "checking for inline... " >&6; }
d0ac1c44 12629if ${ac_cv_c_inline+:} false; then :
81ecdfbb 12630 $as_echo_n "(cached) " >&6
bec39cab 12631else
a9322a30
TT
12632 ac_cv_c_inline=no
12633for ac_kw in inline __inline__ __inline; do
81ecdfbb 12634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12635/* end confdefs.h. */
a9322a30
TT
12636#ifndef __cplusplus
12637typedef int foo_t;
12638static $ac_kw foo_t static_foo () {return 0; }
12639$ac_kw foo_t foo () {return 0; }
12640#endif
12641
bec39cab 12642_ACEOF
81ecdfbb
RW
12643if ac_fn_c_try_compile "$LINENO"; then :
12644 ac_cv_c_inline=$ac_kw
bec39cab 12645fi
81ecdfbb
RW
12646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12647 test "$ac_cv_c_inline" != no && break
a9322a30 12648done
bec39cab 12649
5ee754fc 12650fi
81ecdfbb
RW
12651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12652$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 12653
a9322a30
TT
12654case $ac_cv_c_inline in
12655 inline | yes) ;;
12656 *)
12657 case $ac_cv_c_inline in
12658 no) ac_val=;;
12659 *) ac_val=$ac_cv_c_inline;;
12660 esac
12661 cat >>confdefs.h <<_ACEOF
12662#ifndef __cplusplus
12663#define inline $ac_val
12664#endif
12665_ACEOF
bec39cab
AC
12666 ;;
12667esac
bec39cab 12668
81ecdfbb
RW
12669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12670$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
d0ac1c44 12671if ${ac_cv_c_bigendian+:} false; then :
81ecdfbb 12672 $as_echo_n "(cached) " >&6
bec39cab 12673else
81ecdfbb
RW
12674 ac_cv_c_bigendian=unknown
12675 # See if we're dealing with a universal compiler.
12676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12677/* end confdefs.h. */
12678#ifndef __APPLE_CC__
12679 not a universal capable compiler
12680 #endif
12681 typedef int dummy;
12682
12683_ACEOF
12684if ac_fn_c_try_compile "$LINENO"; then :
12685
12686 # Check for potential -arch flags. It is not universal unless
12687 # there are at least two -arch flags with different values.
12688 ac_arch=
12689 ac_prev=
12690 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12691 if test -n "$ac_prev"; then
12692 case $ac_word in
12693 i?86 | x86_64 | ppc | ppc64)
12694 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12695 ac_arch=$ac_word
12696 else
12697 ac_cv_c_bigendian=universal
12698 break
12699 fi
12700 ;;
12701 esac
12702 ac_prev=
12703 elif test "x$ac_word" = "x-arch"; then
12704 ac_prev=arch
12705 fi
12706 done
12707fi
12708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12709 if test $ac_cv_c_bigendian = unknown; then
12710 # See if sys/param.h defines the BYTE_ORDER macro.
12711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12712/* end confdefs.h. */
a9322a30 12713#include <sys/types.h>
81ecdfbb 12714 #include <sys/param.h>
a9322a30
TT
12715
12716int
12717main ()
12718{
81ecdfbb
RW
12719#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12720 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12721 && LITTLE_ENDIAN)
12722 bogus endian macros
12723 #endif
a9322a30
TT
12724
12725 ;
12726 return 0;
12727}
bec39cab 12728_ACEOF
81ecdfbb 12729if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12730 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 12731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12732/* end confdefs.h. */
a9322a30 12733#include <sys/types.h>
81ecdfbb 12734 #include <sys/param.h>
a9322a30
TT
12735
12736int
12737main ()
12738{
12739#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
12740 not big endian
12741 #endif
a9322a30
TT
12742
12743 ;
12744 return 0;
12745}
bec39cab 12746_ACEOF
81ecdfbb 12747if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12748 ac_cv_c_bigendian=yes
5ee754fc 12749else
81ecdfbb 12750 ac_cv_c_bigendian=no
5ee754fc 12751fi
81ecdfbb
RW
12752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12753fi
12754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12755 fi
12756 if test $ac_cv_c_bigendian = unknown; then
12757 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12759/* end confdefs.h. */
12760#include <limits.h>
bec39cab 12761
81ecdfbb
RW
12762int
12763main ()
12764{
12765#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12766 bogus endian macros
12767 #endif
12768
12769 ;
12770 return 0;
12771}
7eb368b3 12772_ACEOF
81ecdfbb
RW
12773if ac_fn_c_try_compile "$LINENO"; then :
12774 # It does; now see whether it defined to _BIG_ENDIAN or not.
12775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 12776/* end confdefs.h. */
81ecdfbb
RW
12777#include <limits.h>
12778
7eb368b3
NR
12779int
12780main ()
12781{
81ecdfbb
RW
12782#ifndef _BIG_ENDIAN
12783 not big endian
12784 #endif
12785
7eb368b3
NR
12786 ;
12787 return 0;
12788}
12789_ACEOF
81ecdfbb 12790if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12791 ac_cv_c_bigendian=yes
81ecdfbb
RW
12792else
12793 ac_cv_c_bigendian=no
a9322a30 12794fi
81ecdfbb 12795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 12796fi
81ecdfbb
RW
12797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12798 fi
12799 if test $ac_cv_c_bigendian = unknown; then
12800 # Compile a test program.
12801 if test "$cross_compiling" = yes; then :
12802 # Try to guess by grepping values from an object file.
12803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12804/* end confdefs.h. */
12805short int ascii_mm[] =
12806 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12807 short int ascii_ii[] =
12808 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12809 int use_ascii (int i) {
12810 return ascii_mm[i] + ascii_ii[i];
12811 }
12812 short int ebcdic_ii[] =
12813 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12814 short int ebcdic_mm[] =
12815 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12816 int use_ebcdic (int i) {
12817 return ebcdic_mm[i] + ebcdic_ii[i];
12818 }
12819 extern int foo;
7eb368b3 12820
81ecdfbb
RW
12821int
12822main ()
12823{
12824return use_ascii (foo) == use_ebcdic (foo);
12825 ;
12826 return 0;
12827}
12828_ACEOF
12829if ac_fn_c_try_compile "$LINENO"; then :
12830 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12831 ac_cv_c_bigendian=yes
12832 fi
12833 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12834 if test "$ac_cv_c_bigendian" = unknown; then
12835 ac_cv_c_bigendian=no
12836 else
12837 # finding both strings is unlikely to happen, but who knows?
12838 ac_cv_c_bigendian=unknown
12839 fi
12840 fi
7eb368b3 12841fi
81ecdfbb 12842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12843else
81ecdfbb 12844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12845/* end confdefs.h. */
81ecdfbb 12846$ac_includes_default
d3ea6809
MM
12847int
12848main ()
12849{
81ecdfbb
RW
12850
12851 /* Are we little or big endian? From Harbison&Steele. */
12852 union
12853 {
12854 long int l;
12855 char c[sizeof (long int)];
12856 } u;
12857 u.l = 1;
12858 return u.c[sizeof (long int) - 1] == 1;
12859
12860 ;
12861 return 0;
d3ea6809
MM
12862}
12863_ACEOF
81ecdfbb 12864if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12865 ac_cv_c_bigendian=no
d3ea6809 12866else
81ecdfbb 12867 ac_cv_c_bigendian=yes
d3ea6809 12868fi
81ecdfbb
RW
12869rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12870 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12871fi
a9322a30 12872
81ecdfbb
RW
12873 fi
12874fi
12875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12876$as_echo "$ac_cv_c_bigendian" >&6; }
12877 case $ac_cv_c_bigendian in #(
12878 yes)
12879 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12880;; #(
12881 no)
12882 ;; #(
12883 universal)
12884
12885$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12886
12887 ;; #(
12888 *)
d0ac1c44 12889 as_fn_error $? "unknown endianness
81ecdfbb
RW
12890 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12891 esac
d3ea6809
MM
12892
12893
a9322a30
TT
12894# ------------------------------ #
12895# Checks for library functions. #
12896# ------------------------------ #
d3ea6809 12897
d0ac1c44
SM
12898
12899
12900
12901 for ac_header in $ac_header_list
81ecdfbb
RW
12902do :
12903 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
d0ac1c44
SM
12904ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12905"
12906if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12907 cat >>confdefs.h <<_ACEOF
81ecdfbb 12908#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12909_ACEOF
b757528f 12910
b757528f 12911fi
bec39cab 12912
a9322a30 12913done
a3828db0 12914
d0ac1c44
SM
12915
12916
12917
12918
12919
12920
12921
a9322a30 12922for ac_func in getpagesize
81ecdfbb
RW
12923do :
12924 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
d0ac1c44 12925if test "x$ac_cv_func_getpagesize" = xyes; then :
bec39cab 12926 cat >>confdefs.h <<_ACEOF
81ecdfbb 12927#define HAVE_GETPAGESIZE 1
bec39cab 12928_ACEOF
bcb3dc3d 12929
bcb3dc3d
MK
12930fi
12931done
12932
81ecdfbb
RW
12933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12934$as_echo_n "checking for working mmap... " >&6; }
d0ac1c44 12935if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
81ecdfbb 12936 $as_echo_n "(cached) " >&6
a9322a30 12937else
81ecdfbb 12938 if test "$cross_compiling" = yes; then :
a9322a30 12939 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12940else
81ecdfbb 12941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12942/* end confdefs.h. */
a9322a30
TT
12943$ac_includes_default
12944/* malloc might have been renamed as rpl_malloc. */
12945#undef malloc
bec39cab 12946
a9322a30
TT
12947/* Thanks to Mike Haertel and Jim Avera for this test.
12948 Here is a matrix of mmap possibilities:
12949 mmap private not fixed
12950 mmap private fixed at somewhere currently unmapped
12951 mmap private fixed at somewhere already mapped
12952 mmap shared not fixed
12953 mmap shared fixed at somewhere currently unmapped
12954 mmap shared fixed at somewhere already mapped
12955 For private mappings, we should verify that changes cannot be read()
12956 back from the file, nor mmap's back from the file at a different
12957 address. (There have been systems where private was not correctly
12958 implemented like the infamous i386 svr4.0, and systems where the
12959 VM page cache was not coherent with the file system buffer cache
12960 like early versions of FreeBSD and possibly contemporary NetBSD.)
12961 For shared mappings, we should conversely verify that changes get
12962 propagated back to all the places they're supposed to be.
bec39cab 12963
a9322a30
TT
12964 Grep wants private fixed already mapped.
12965 The main things grep needs to know about mmap are:
12966 * does it exist and is it safe to write into the mmap'd area
12967 * how to use it (BSD variants) */
8b9cf735 12968
a9322a30
TT
12969#include <fcntl.h>
12970#include <sys/mman.h>
8b9cf735 12971
81ecdfbb 12972#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12973char *malloc ();
a3828db0
MK
12974#endif
12975
a9322a30 12976/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12977#ifndef HAVE_GETPAGESIZE
a9322a30
TT
12978# ifdef _SC_PAGESIZE
12979# define getpagesize() sysconf(_SC_PAGESIZE)
12980# else /* no _SC_PAGESIZE */
81ecdfbb 12981# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12982# include <sys/param.h>
12983# ifdef EXEC_PAGESIZE
12984# define getpagesize() EXEC_PAGESIZE
12985# else /* no EXEC_PAGESIZE */
12986# ifdef NBPG
12987# define getpagesize() NBPG * CLSIZE
12988# ifndef CLSIZE
12989# define CLSIZE 1
12990# endif /* no CLSIZE */
12991# else /* no NBPG */
12992# ifdef NBPC
12993# define getpagesize() NBPC
12994# else /* no NBPC */
12995# ifdef PAGESIZE
12996# define getpagesize() PAGESIZE
12997# endif /* PAGESIZE */
12998# endif /* no NBPC */
12999# endif /* no NBPG */
13000# endif /* no EXEC_PAGESIZE */
13001# else /* no HAVE_SYS_PARAM_H */
13002# define getpagesize() 8192 /* punt totally */
13003# endif /* no HAVE_SYS_PARAM_H */
13004# endif /* no _SC_PAGESIZE */
13005
13006#endif /* no HAVE_GETPAGESIZE */
13007
bec39cab
AC
13008int
13009main ()
13010{
a9322a30 13011 char *data, *data2, *data3;
d0ac1c44 13012 const char *cdata2;
a9322a30 13013 int i, pagesize;
d0ac1c44 13014 int fd, fd2;
a9322a30
TT
13015
13016 pagesize = getpagesize ();
13017
13018 /* First, make a file with some known garbage in it. */
13019 data = (char *) malloc (pagesize);
13020 if (!data)
81ecdfbb 13021 return 1;
a9322a30
TT
13022 for (i = 0; i < pagesize; ++i)
13023 *(data + i) = rand ();
13024 umask (0);
13025 fd = creat ("conftest.mmap", 0600);
13026 if (fd < 0)
d0ac1c44 13027 return 2;
a9322a30 13028 if (write (fd, data, pagesize) != pagesize)
d0ac1c44 13029 return 3;
a9322a30
TT
13030 close (fd);
13031
d0ac1c44
SM
13032 /* Next, check that the tail of a page is zero-filled. File must have
13033 non-zero length, otherwise we risk SIGBUS for entire page. */
13034 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
13035 if (fd2 < 0)
13036 return 4;
13037 cdata2 = "";
13038 if (write (fd2, cdata2, 1) != 1)
13039 return 5;
13040 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
13041 if (data2 == MAP_FAILED)
13042 return 6;
13043 for (i = 0; i < pagesize; ++i)
13044 if (*(data2 + i))
13045 return 7;
13046 close (fd2);
13047 if (munmap (data2, pagesize))
13048 return 8;
13049
a9322a30
TT
13050 /* Next, try to mmap the file at a fixed address which already has
13051 something else allocated at it. If we can, also make sure that
13052 we see the same garbage. */
13053 fd = open ("conftest.mmap", O_RDWR);
13054 if (fd < 0)
d0ac1c44 13055 return 9;
a9322a30
TT
13056 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
13057 MAP_PRIVATE | MAP_FIXED, fd, 0L))
d0ac1c44 13058 return 10;
a9322a30
TT
13059 for (i = 0; i < pagesize; ++i)
13060 if (*(data + i) != *(data2 + i))
d0ac1c44 13061 return 11;
a9322a30
TT
13062
13063 /* Finally, make sure that changes to the mapped area do not
13064 percolate back to the file as seen by read(). (This is a bug on
13065 some variants of i386 svr4.0.) */
13066 for (i = 0; i < pagesize; ++i)
13067 *(data2 + i) = *(data2 + i) + 1;
13068 data3 = (char *) malloc (pagesize);
13069 if (!data3)
d0ac1c44 13070 return 12;
a9322a30 13071 if (read (fd, data3, pagesize) != pagesize)
d0ac1c44 13072 return 13;
a9322a30
TT
13073 for (i = 0; i < pagesize; ++i)
13074 if (*(data + i) != *(data3 + i))
d0ac1c44 13075 return 14;
a9322a30 13076 close (fd);
81ecdfbb 13077 return 0;
bec39cab
AC
13078}
13079_ACEOF
81ecdfbb 13080if ac_fn_c_try_run "$LINENO"; then :
a9322a30 13081 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 13082else
81ecdfbb 13083 ac_cv_func_mmap_fixed_mapped=no
a3828db0 13084fi
81ecdfbb
RW
13085rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13086 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 13087fi
81ecdfbb 13088
a9322a30 13089fi
81ecdfbb
RW
13090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
13091$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
13092if test $ac_cv_func_mmap_fixed_mapped = yes; then
13093
81ecdfbb 13094$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 13095
086ec9eb 13096fi
d0ac1c44 13097rm -f conftest.mmap conftest.txt
a3828db0 13098
81ecdfbb 13099ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
d0ac1c44 13100if test "x$ac_cv_type_pid_t" = xyes; then :
bec39cab 13101
a9322a30
TT
13102else
13103
13104cat >>confdefs.h <<_ACEOF
13105#define pid_t int
bec39cab 13106_ACEOF
086ec9eb
MK
13107
13108fi
13109
81ecdfbb
RW
13110for ac_header in vfork.h
13111do :
13112 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
d0ac1c44 13113if test "x$ac_cv_header_vfork_h" = xyes; then :
a3828db0 13114 cat >>confdefs.h <<_ACEOF
81ecdfbb 13115#define HAVE_VFORK_H 1
bec39cab 13116_ACEOF
c906108c
SS
13117
13118fi
a9322a30 13119
a3828db0 13120done
c906108c 13121
a9322a30 13122for ac_func in fork vfork
81ecdfbb
RW
13123do :
13124 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13125ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13126if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
a3828db0 13127 cat >>confdefs.h <<_ACEOF
81ecdfbb 13128#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 13129_ACEOF
b83266a0 13130
97bf5e38 13131fi
a3828db0 13132done
b83266a0 13133
a9322a30 13134if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
13135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13136$as_echo_n "checking for working fork... " >&6; }
d0ac1c44 13137if ${ac_cv_func_fork_works+:} false; then :
81ecdfbb 13138 $as_echo_n "(cached) " >&6
a9322a30 13139else
81ecdfbb 13140 if test "$cross_compiling" = yes; then :
a9322a30
TT
13141 ac_cv_func_fork_works=cross
13142else
81ecdfbb
RW
13143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13144/* end confdefs.h. */
13145$ac_includes_default
13146int
13147main ()
13148{
13149
13150 /* By Ruediger Kuhlmann. */
13151 return fork () < 0;
13152
13153 ;
13154 return 0;
13155}
a9322a30 13156_ACEOF
81ecdfbb 13157if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13158 ac_cv_func_fork_works=yes
13159else
81ecdfbb 13160 ac_cv_func_fork_works=no
a9322a30 13161fi
81ecdfbb
RW
13162rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13163 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13164fi
81ecdfbb 13165
a9322a30 13166fi
81ecdfbb
RW
13167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13168$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
13169
13170else
13171 ac_cv_func_fork_works=$ac_cv_func_fork
13172fi
13173if test "x$ac_cv_func_fork_works" = xcross; then
13174 case $host in
13175 *-*-amigaos* | *-*-msdosdjgpp*)
13176 # Override, as these systems have only a dummy fork() stub
13177 ac_cv_func_fork_works=no
13178 ;;
13179 *)
13180 ac_cv_func_fork_works=yes
13181 ;;
13182 esac
81ecdfbb
RW
13183 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13184$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13185fi
13186ac_cv_func_vfork_works=$ac_cv_func_vfork
13187if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
13188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13189$as_echo_n "checking for working vfork... " >&6; }
d0ac1c44 13190if ${ac_cv_func_vfork_works+:} false; then :
81ecdfbb 13191 $as_echo_n "(cached) " >&6
a9322a30 13192else
81ecdfbb 13193 if test "$cross_compiling" = yes; then :
a9322a30
TT
13194 ac_cv_func_vfork_works=cross
13195else
81ecdfbb 13196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
13197/* end confdefs.h. */
13198/* Thanks to Paul Eggert for this test. */
81ecdfbb 13199$ac_includes_default
a9322a30 13200#include <sys/wait.h>
81ecdfbb 13201#ifdef HAVE_VFORK_H
a9322a30
TT
13202# include <vfork.h>
13203#endif
13204/* On some sparc systems, changes by the child to local and incoming
13205 argument registers are propagated back to the parent. The compiler
13206 is told about this with #include <vfork.h>, but some compilers
13207 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13208 static variable whose address is put into a register that is
13209 clobbered by the vfork. */
13210static void
13211#ifdef __cplusplus
13212sparc_address_test (int arg)
13213# else
13214sparc_address_test (arg) int arg;
13215#endif
13216{
13217 static pid_t child;
13218 if (!child) {
13219 child = vfork ();
13220 if (child < 0) {
13221 perror ("vfork");
13222 _exit(2);
13223 }
13224 if (!child) {
13225 arg = getpid();
13226 write(-1, "", 0);
13227 _exit (arg);
13228 }
13229 }
13230}
13231
13232int
13233main ()
13234{
13235 pid_t parent = getpid ();
13236 pid_t child;
13237
13238 sparc_address_test (0);
13239
13240 child = vfork ();
13241
13242 if (child == 0) {
13243 /* Here is another test for sparc vfork register problems. This
13244 test uses lots of local variables, at least as many local
13245 variables as main has allocated so far including compiler
13246 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13247 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13248 reuse the register of parent for one of the local variables,
13249 since it will think that parent can't possibly be used any more
13250 in this routine. Assigning to the local variable will thus
13251 munge parent in the parent process. */
13252 pid_t
13253 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13254 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13255 /* Convince the compiler that p..p7 are live; otherwise, it might
13256 use the same hardware register for all 8 local variables. */
13257 if (p != p1 || p != p2 || p != p3 || p != p4
13258 || p != p5 || p != p6 || p != p7)
13259 _exit(1);
13260
13261 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13262 from child file descriptors. If the child closes a descriptor
13263 before it execs or exits, this munges the parent's descriptor
13264 as well. Test for this by closing stdout in the child. */
13265 _exit(close(fileno(stdout)) != 0);
13266 } else {
13267 int status;
13268 struct stat st;
13269
13270 while (wait(&status) != child)
13271 ;
81ecdfbb 13272 return (
a9322a30
TT
13273 /* Was there some problem with vforking? */
13274 child < 0
13275
13276 /* Did the child fail? (This shouldn't happen.) */
13277 || status
13278
13279 /* Did the vfork/compiler bug occur? */
13280 || parent != getpid()
13281
13282 /* Did the file descriptor bug occur? */
13283 || fstat(fileno(stdout), &st) != 0
13284 );
13285 }
13286}
13287_ACEOF
81ecdfbb 13288if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13289 ac_cv_func_vfork_works=yes
13290else
81ecdfbb 13291 ac_cv_func_vfork_works=no
a9322a30 13292fi
81ecdfbb
RW
13293rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13294 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13295fi
81ecdfbb 13296
a9322a30 13297fi
81ecdfbb
RW
13298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13299$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
13300
13301fi;
13302if test "x$ac_cv_func_fork_works" = xcross; then
13303 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
13304 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13305$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13306fi
13307
13308if test "x$ac_cv_func_vfork_works" = xyes; then
13309
81ecdfbb 13310$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
13311
13312else
13313
81ecdfbb 13314$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
13315
13316fi
13317if test "x$ac_cv_func_fork_works" = xyes; then
13318
81ecdfbb 13319$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
13320
13321fi
13322
cdf43629 13323for ac_func in getauxval getrusage getuid getgid \
bdca27a2 13324 pipe poll pread pread64 pwrite resize_term \
e671cd59 13325 sbrk getpgid setpgid setpgrp setsid \
9467110b 13326 sigaction sigprocmask sigsetmask socketpair \
110ed339 13327 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 13328 setrlimit getrlimit posix_madvise waitpid \
4b8b5e72 13329 ptrace64 sigaltstack mkdtemp setns
81ecdfbb
RW
13330do :
13331 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13332ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13333if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6c7a06a3 13334 cat >>confdefs.h <<_ACEOF
81ecdfbb 13335#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
13336_ACEOF
13337
13338fi
13339done
13340
13341
81ecdfbb
RW
13342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13343$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 13344if ${am_cv_langinfo_codeset+:} false; then :
81ecdfbb 13345 $as_echo_n "(cached) " >&6
6c7a06a3 13346else
81ecdfbb 13347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
13348/* end confdefs.h. */
13349#include <langinfo.h>
13350int
13351main ()
13352{
13353char* cs = nl_langinfo(CODESET);
bec39cab
AC
13354 ;
13355 return 0;
13356}
13357_ACEOF
81ecdfbb 13358if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 13359 am_cv_langinfo_codeset=yes
a4db0f07 13360else
81ecdfbb 13361 am_cv_langinfo_codeset=no
a4db0f07 13362fi
81ecdfbb
RW
13363rm -f core conftest.err conftest.$ac_objext \
13364 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 13365
a4db0f07 13366fi
81ecdfbb
RW
13367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13368$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
13369 if test $am_cv_langinfo_codeset = yes; then
13370
81ecdfbb 13371$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 13372
6c7a06a3 13373 fi
c906108c 13374
d0ac1c44
SM
13375ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13376if test "x$ac_cv_type_size_t" = xyes; then :
13377
13378else
13379
13380cat >>confdefs.h <<_ACEOF
13381#define size_t unsigned int
13382_ACEOF
13383
13384fi
13385
06825bd1 13386
3266f10b
TT
13387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13388$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 13389if ${ac_cv_header_stdc+:} false; then :
3266f10b
TT
13390 $as_echo_n "(cached) " >&6
13391else
13392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13393/* end confdefs.h. */
13394#include <stdlib.h>
13395#include <stdarg.h>
13396#include <string.h>
13397#include <float.h>
13398
13399int
13400main ()
13401{
13402
13403 ;
13404 return 0;
13405}
13406_ACEOF
13407if ac_fn_c_try_compile "$LINENO"; then :
13408 ac_cv_header_stdc=yes
13409else
13410 ac_cv_header_stdc=no
13411fi
13412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13413
13414if test $ac_cv_header_stdc = yes; then
13415 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13417/* end confdefs.h. */
13418#include <string.h>
13419
13420_ACEOF
13421if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13422 $EGREP "memchr" >/dev/null 2>&1; then :
13423
13424else
13425 ac_cv_header_stdc=no
13426fi
13427rm -f conftest*
13428
13429fi
13430
13431if test $ac_cv_header_stdc = yes; then
13432 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13434/* end confdefs.h. */
13435#include <stdlib.h>
13436
13437_ACEOF
13438if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13439 $EGREP "free" >/dev/null 2>&1; then :
13440
13441else
13442 ac_cv_header_stdc=no
13443fi
13444rm -f conftest*
13445
13446fi
13447
13448if test $ac_cv_header_stdc = yes; then
13449 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13450 if test "$cross_compiling" = yes; then :
13451 :
13452else
13453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13454/* end confdefs.h. */
13455#include <ctype.h>
13456#include <stdlib.h>
13457#if ((' ' & 0x0FF) == 0x020)
13458# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13459# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13460#else
13461# define ISLOWER(c) \
13462 (('a' <= (c) && (c) <= 'i') \
13463 || ('j' <= (c) && (c) <= 'r') \
13464 || ('s' <= (c) && (c) <= 'z'))
13465# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13466#endif
13467
13468#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13469int
13470main ()
13471{
13472 int i;
13473 for (i = 0; i < 256; i++)
13474 if (XOR (islower (i), ISLOWER (i))
13475 || toupper (i) != TOUPPER (i))
13476 return 2;
13477 return 0;
13478}
13479_ACEOF
13480if ac_fn_c_try_run "$LINENO"; then :
13481
13482else
13483 ac_cv_header_stdc=no
13484fi
13485rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13486 conftest.$ac_objext conftest.beam conftest.$ac_ext
13487fi
13488
13489fi
13490fi
13491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
13492$as_echo "$ac_cv_header_stdc" >&6; }
13493if test $ac_cv_header_stdc = yes; then
13494
13495$as_echo "#define STDC_HEADERS 1" >>confdefs.h
13496
3266f10b
TT
13497fi
13498
13499 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13500# for constant arguments. Useless!
13501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13502$as_echo_n "checking for working alloca.h... " >&6; }
d0ac1c44 13503if ${ac_cv_working_alloca_h+:} false; then :
3266f10b
TT
13504 $as_echo_n "(cached) " >&6
13505else
13506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13507/* end confdefs.h. */
13508#include <alloca.h>
13509int
13510main ()
13511{
13512char *p = (char *) alloca (2 * sizeof (int));
13513 if (p) return 0;
13514 ;
13515 return 0;
13516}
13517_ACEOF
13518if ac_fn_c_try_link "$LINENO"; then :
13519 ac_cv_working_alloca_h=yes
13520else
13521 ac_cv_working_alloca_h=no
13522fi
13523rm -f core conftest.err conftest.$ac_objext \
13524 conftest$ac_exeext conftest.$ac_ext
13525fi
13526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13527$as_echo "$ac_cv_working_alloca_h" >&6; }
13528if test $ac_cv_working_alloca_h = yes; then
13529
13530$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
13531
13532fi
13533
13534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13535$as_echo_n "checking for alloca... " >&6; }
d0ac1c44 13536if ${ac_cv_func_alloca_works+:} false; then :
3266f10b
TT
13537 $as_echo_n "(cached) " >&6
13538else
13539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13540/* end confdefs.h. */
13541#ifdef __GNUC__
13542# define alloca __builtin_alloca
13543#else
13544# ifdef _MSC_VER
13545# include <malloc.h>
13546# define alloca _alloca
13547# else
13548# ifdef HAVE_ALLOCA_H
13549# include <alloca.h>
13550# else
13551# ifdef _AIX
13552 #pragma alloca
13553# else
13554# ifndef alloca /* predefined by HP cc +Olibcalls */
d0ac1c44 13555void *alloca (size_t);
3266f10b
TT
13556# endif
13557# endif
13558# endif
13559# endif
13560#endif
13561
13562int
13563main ()
13564{
13565char *p = (char *) alloca (1);
13566 if (p) return 0;
13567 ;
13568 return 0;
13569}
13570_ACEOF
13571if ac_fn_c_try_link "$LINENO"; then :
13572 ac_cv_func_alloca_works=yes
13573else
13574 ac_cv_func_alloca_works=no
13575fi
13576rm -f core conftest.err conftest.$ac_objext \
13577 conftest$ac_exeext conftest.$ac_ext
13578fi
13579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13580$as_echo "$ac_cv_func_alloca_works" >&6; }
13581
13582if test $ac_cv_func_alloca_works = yes; then
13583
13584$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13585
13586else
13587 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13588# that cause trouble. Some versions do not even contain alloca or
13589# contain a buggy version. If you still want to use their alloca,
13590# use ar to extract alloca.o from them instead of compiling alloca.c.
13591
13592ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
13593
13594$as_echo "#define C_ALLOCA 1" >>confdefs.h
13595
13596
13597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13598$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
d0ac1c44 13599if ${ac_cv_os_cray+:} false; then :
3266f10b
TT
13600 $as_echo_n "(cached) " >&6
13601else
13602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13603/* end confdefs.h. */
13604#if defined CRAY && ! defined CRAY2
13605webecray
13606#else
13607wenotbecray
13608#endif
13609
13610_ACEOF
13611if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13612 $EGREP "webecray" >/dev/null 2>&1; then :
13613 ac_cv_os_cray=yes
13614else
13615 ac_cv_os_cray=no
13616fi
13617rm -f conftest*
13618
13619fi
13620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13621$as_echo "$ac_cv_os_cray" >&6; }
13622if test $ac_cv_os_cray = yes; then
13623 for ac_func in _getb67 GETB67 getb67; do
13624 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13625ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13626if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
13627
13628cat >>confdefs.h <<_ACEOF
13629#define CRAY_STACKSEG_END $ac_func
13630_ACEOF
13631
13632 break
13633fi
13634
13635 done
13636fi
13637
13638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13639$as_echo_n "checking stack direction for C alloca... " >&6; }
d0ac1c44 13640if ${ac_cv_c_stack_direction+:} false; then :
3266f10b
TT
13641 $as_echo_n "(cached) " >&6
13642else
13643 if test "$cross_compiling" = yes; then :
13644 ac_cv_c_stack_direction=0
13645else
13646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13647/* end confdefs.h. */
13648$ac_includes_default
13649int
d0ac1c44 13650find_stack_direction (int *addr, int depth)
3266f10b 13651{
d0ac1c44
SM
13652 int dir, dummy = 0;
13653 if (! addr)
13654 addr = &dummy;
13655 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
13656 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
13657 return dir + dummy;
3266f10b
TT
13658}
13659
13660int
d0ac1c44 13661main (int argc, char **argv)
3266f10b 13662{
d0ac1c44 13663 return find_stack_direction (0, argc + !argv + 20) < 0;
3266f10b
TT
13664}
13665_ACEOF
13666if ac_fn_c_try_run "$LINENO"; then :
13667 ac_cv_c_stack_direction=1
13668else
13669 ac_cv_c_stack_direction=-1
13670fi
13671rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13672 conftest.$ac_objext conftest.beam conftest.$ac_ext
13673fi
13674
13675fi
13676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13677$as_echo "$ac_cv_c_stack_direction" >&6; }
13678cat >>confdefs.h <<_ACEOF
13679#define STACK_DIRECTION $ac_cv_c_stack_direction
13680_ACEOF
13681
13682
13683fi
13684
13685
13686
13687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13688$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 13689if ${am_cv_langinfo_codeset+:} false; then :
3266f10b
TT
13690 $as_echo_n "(cached) " >&6
13691else
13692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13693/* end confdefs.h. */
13694#include <langinfo.h>
13695int
13696main ()
13697{
13698char* cs = nl_langinfo(CODESET);
13699 ;
13700 return 0;
13701}
13702_ACEOF
13703if ac_fn_c_try_link "$LINENO"; then :
13704 am_cv_langinfo_codeset=yes
13705else
13706 am_cv_langinfo_codeset=no
13707fi
13708rm -f core conftest.err conftest.$ac_objext \
13709 conftest$ac_exeext conftest.$ac_ext
13710
13711fi
13712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13713$as_echo "$am_cv_langinfo_codeset" >&6; }
13714 if test $am_cv_langinfo_codeset = yes; then
13715
13716$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13717
13718 fi
13719
13720
44122162 13721 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
13722do :
13723 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13724ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 13725if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3266f10b
TT
13726 cat >>confdefs.h <<_ACEOF
13727#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13728_ACEOF
13729
13730fi
13731
13732done
13733
13734
f348d89a 13735 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction
3266f10b
TT
13736do :
13737 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13738ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13739if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
13740 cat >>confdefs.h <<_ACEOF
13741#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13742_ACEOF
13743
13744fi
13745done
13746
13747
13748 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
d0ac1c44 13749if test "x$ac_cv_have_decl_strerror" = xyes; then :
3266f10b
TT
13750 ac_have_decl=1
13751else
13752 ac_have_decl=0
13753fi
13754
13755cat >>confdefs.h <<_ACEOF
13756#define HAVE_DECL_STRERROR $ac_have_decl
13757_ACEOF
13758ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
d0ac1c44 13759if test "x$ac_cv_have_decl_strstr" = xyes; then :
3266f10b
TT
13760 ac_have_decl=1
13761else
13762 ac_have_decl=0
13763fi
13764
13765cat >>confdefs.h <<_ACEOF
13766#define HAVE_DECL_STRSTR $ac_have_decl
13767_ACEOF
13768
13769
e9bcb658
GB
13770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13771$as_echo_n "checking for sigsetjmp... " >&6; }
d0ac1c44 13772if ${gdb_cv_func_sigsetjmp+:} false; then :
e9bcb658
GB
13773 $as_echo_n "(cached) " >&6
13774else
13775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13776/* end confdefs.h. */
13777
13778#include <setjmp.h>
13779
13780int
13781main ()
13782{
13783sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
13784 ;
13785 return 0;
13786}
13787_ACEOF
13788if ac_fn_c_try_compile "$LINENO"; then :
13789 gdb_cv_func_sigsetjmp=yes
13790else
13791 gdb_cv_func_sigsetjmp=no
13792fi
13793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13794fi
13795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13796$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
13797if test $gdb_cv_func_sigsetjmp = yes; then
13798
13799$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
13800
13801fi
13802
3266f10b 13803
54019719
PA
13804# Check the return and argument types of ptrace.
13805
13806
54019719
PA
13807for ac_header in sys/ptrace.h ptrace.h
13808do :
13809 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13810ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 13811if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
54019719
PA
13812 cat >>confdefs.h <<_ACEOF
13813#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13814_ACEOF
13815
13816fi
13817
13818done
13819
13820
a3828db0 13821gdb_ptrace_headers='
4ff70b84 13822#include <sys/types.h>
a3828db0
MK
13823#if HAVE_SYS_PTRACE_H
13824# include <sys/ptrace.h>
13825#endif
13826#if HAVE_UNISTD_H
13827# include <unistd.h>
13828#endif
13829'
13830# There is no point in checking if we don't have a prototype.
9b30624b 13831ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
81ecdfbb 13832"
d0ac1c44 13833if test "x$ac_cv_have_decl_ptrace" = xyes; then :
81ecdfbb 13834 ac_have_decl=1
06825bd1 13835else
81ecdfbb 13836 ac_have_decl=0
06825bd1 13837fi
06825bd1 13838
a3828db0 13839cat >>confdefs.h <<_ACEOF
81ecdfbb 13840#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 13841_ACEOF
81ecdfbb 13842if test $ac_have_decl = 1; then :
bec39cab 13843
a3828db0 13844else
a3828db0
MK
13845
13846 : ${gdb_cv_func_ptrace_ret='int'}
13847 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13848
06825bd1
MK
13849fi
13850
064ef605
DJ
13851# Check return type. Varargs (used on GNU/Linux) conflict with the
13852# empty argument list, so check for that explicitly.
81ecdfbb
RW
13853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
13854$as_echo_n "checking return type of ptrace... " >&6; }
d0ac1c44 13855if ${gdb_cv_func_ptrace_ret+:} false; then :
81ecdfbb 13856 $as_echo_n "(cached) " >&6
bec39cab 13857else
81ecdfbb 13858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13859/* end confdefs.h. */
a3828db0 13860$gdb_ptrace_headers
bec39cab
AC
13861int
13862main ()
13863{
064ef605
DJ
13864extern long ptrace (enum __ptrace_request, ...);
13865 ;
13866 return 0;
13867}
13868_ACEOF
9b30624b 13869if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
13870 gdb_cv_func_ptrace_ret='long'
13871else
81ecdfbb 13872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13873/* end confdefs.h. */
13874$gdb_ptrace_headers
13875int
13876main ()
13877{
a3828db0 13878extern int ptrace ();
bec39cab
AC
13879 ;
13880 return 0;
13881}
13882_ACEOF
9b30624b 13883if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13884 gdb_cv_func_ptrace_ret='int'
70f9f479 13885else
81ecdfbb 13886 gdb_cv_func_ptrace_ret='long'
70f9f479 13887fi
81ecdfbb 13888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 13889fi
81ecdfbb 13890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 13891fi
81ecdfbb
RW
13892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13893$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 13894
a3828db0
MK
13895cat >>confdefs.h <<_ACEOF
13896#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 13897_ACEOF
70f9f479 13898
a3828db0 13899# Check argument types.
81ecdfbb
RW
13900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13901$as_echo_n "checking types of arguments for ptrace... " >&6; }
d0ac1c44 13902if ${gdb_cv_func_ptrace_args+:} false; then :
81ecdfbb 13903 $as_echo_n "(cached) " >&6
bec39cab 13904else
a3828db0 13905
81ecdfbb 13906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13907/* end confdefs.h. */
13908$gdb_ptrace_headers
13909int
13910main ()
13911{
13912extern long ptrace (enum __ptrace_request, ...);
13913 ;
13914 return 0;
13915}
13916_ACEOF
9b30624b 13917if ac_fn_c_try_compile "$LINENO"; then :
54019719 13918 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
064ef605 13919else
064ef605 13920
a3828db0
MK
13921for gdb_arg1 in 'int' 'long'; do
13922 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 13923 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 13924 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 13925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13926/* end confdefs.h. */
a3828db0 13927$gdb_ptrace_headers
bec39cab
AC
13928int
13929main ()
13930{
a3828db0
MK
13931
13932extern $gdb_cv_func_ptrace_ret
13933 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13934
bec39cab
AC
13935 ;
13936 return 0;
13937}
13938_ACEOF
9b30624b 13939if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13940 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13941 break 4;
5c7f2947 13942fi
81ecdfbb 13943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 13944 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 13945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13946/* end confdefs.h. */
a3828db0 13947$gdb_ptrace_headers
bec39cab
AC
13948int
13949main ()
13950{
a3828db0
MK
13951
13952extern $gdb_cv_func_ptrace_ret
13953 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13954
bec39cab
AC
13955 ;
13956 return 0;
13957}
13958_ACEOF
9b30624b 13959if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13960
13961gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13962 break 5;
78434e59 13963fi
81ecdfbb 13964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
13965 done
13966 done
13967 done
13968 done
13969done
13970# Provide a safe default value.
13971: ${gdb_cv_func_ptrace_args='int,int,long,long'}
13972
064ef605 13973fi
81ecdfbb 13974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 13975fi
81ecdfbb
RW
13976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13977$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
13978ac_save_IFS=$IFS; IFS=','
13979set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13980IFS=$ac_save_IFS
13981shift
bec39cab 13982
54019719
PA
13983cat >>confdefs.h <<_ACEOF
13984#define PTRACE_TYPE_ARG1 $1
13985_ACEOF
13986
13987
a3828db0
MK
13988cat >>confdefs.h <<_ACEOF
13989#define PTRACE_TYPE_ARG3 $3
13990_ACEOF
13991
96d7229d
LM
13992
13993cat >>confdefs.h <<_ACEOF
13994#define PTRACE_TYPE_ARG4 $4
13995_ACEOF
13996
a3828db0
MK
13997if test -n "$5"; then
13998
13999cat >>confdefs.h <<_ACEOF
14000#define PTRACE_TYPE_ARG5 $5
bec39cab 14001_ACEOF
78434e59
MK
14002
14003fi
14004
54019719 14005
a3828db0 14006if test "$cross_compiling" = no; then
81ecdfbb
RW
14007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
14008$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
d0ac1c44 14009if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 14010 $as_echo_n "(cached) " >&6
a3828db0 14011else
81ecdfbb 14012 if test "$cross_compiling" = yes; then :
d0ac1c44 14013 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 14014else
81ecdfbb 14015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14016/* end confdefs.h. */
81ecdfbb 14017$ac_includes_default
bec39cab
AC
14018int
14019main ()
14020{
a3828db0
MK
14021/* If this system has a BSD-style setpgrp which takes arguments,
14022 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
14023 exit successfully. */
81ecdfbb 14024 return setpgrp (1,1) != -1;
bec39cab
AC
14025 ;
14026 return 0;
14027}
14028_ACEOF
81ecdfbb 14029if ac_fn_c_try_run "$LINENO"; then :
a3828db0 14030 ac_cv_func_setpgrp_void=no
c906108c 14031else
81ecdfbb 14032 ac_cv_func_setpgrp_void=yes
c906108c 14033fi
81ecdfbb
RW
14034rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14035 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14036fi
81ecdfbb 14037
a3828db0 14038fi
81ecdfbb
RW
14039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
14040$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
14041if test $ac_cv_func_setpgrp_void = yes; then
14042
81ecdfbb 14043$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
14044
14045fi
a3828db0
MK
14046
14047else
81ecdfbb
RW
14048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
14049$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
d0ac1c44 14050if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 14051 $as_echo_n "(cached) " >&6
97bf5e38 14052else
81ecdfbb 14053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14054/* end confdefs.h. */
a3828db0
MK
14055
14056#include <unistd.h>
14057
bec39cab
AC
14058int
14059main ()
14060{
a3828db0
MK
14061
14062 if (setpgrp(1,1) == -1)
14063 exit (0);
14064 else
14065 exit (1);
14066
bec39cab
AC
14067 ;
14068 return 0;
14069}
14070_ACEOF
81ecdfbb 14071if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14072 ac_cv_func_setpgrp_void=no
c906108c 14073else
81ecdfbb 14074 ac_cv_func_setpgrp_void=yes
c906108c 14075fi
81ecdfbb 14076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14077fi
81ecdfbb
RW
14078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
14079$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 14080if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 14081 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 14082
a3828db0 14083fi
c906108c
SS
14084fi
14085
db1ff28b
JK
14086# Assume we'll default to using the included libiberty regex.
14087gdb_use_included_regex=yes
14088
14089# However, if the system regex is GNU regex, then default to *not*
14090# using the included regex.
14091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
14092$as_echo_n "checking for GNU regex... " >&6; }
d0ac1c44 14093if ${gdb_cv_have_gnu_regex+:} false; then :
db1ff28b
JK
14094 $as_echo_n "(cached) " >&6
14095else
14096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14097/* end confdefs.h. */
14098#include <gnu-versions.h>
14099int
14100main ()
14101{
14102#define REGEX_INTERFACE_VERSION 1
14103#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
14104# error "Version mismatch"
14105#endif
14106 ;
14107 return 0;
14108}
14109_ACEOF
14110if ac_fn_c_try_compile "$LINENO"; then :
14111 gdb_cv_have_gnu_regex=yes
14112else
14113 gdb_cv_have_gnu_regex=no
14114fi
14115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14116fi
14117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
14118$as_echo "$gdb_cv_have_gnu_regex" >&6; }
14119if test $gdb_cv_have_gnu_regex = yes; then
14120 gdb_use_included_regex=no
14121fi
14122
14123
14124# Check whether --with-included-regex was given.
14125if test "${with_included_regex+set}" = set; then :
14126 withval=$with_included_regex; gdb_with_regex=$withval
14127else
14128 gdb_with_regex=$gdb_use_included_regex
14129fi
14130
14131if test "$gdb_with_regex" = yes; then
14132
14133$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
14134
14135fi
14136
81ecdfbb
RW
14137# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
14138ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
14139#include <sys/proc.h>
14140
14141"
d0ac1c44 14142if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
c906108c 14143
5c45e068 14144cat >>confdefs.h <<_ACEOF
a3828db0 14145#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 14146_ACEOF
c906108c 14147
5c45e068 14148
97bf5e38 14149fi
c906108c 14150
5c45e068 14151
a3828db0 14152# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
14153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
14154$as_echo_n "checking for struct lwp... " >&6; }
d0ac1c44 14155if ${gdb_cv_struct_lwp+:} false; then :
81ecdfbb 14156 $as_echo_n "(cached) " >&6
bec39cab 14157else
81ecdfbb 14158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14159/* end confdefs.h. */
a3828db0 14160#include <sys/param.h>
c49fbc6c 14161#define _KMEMUSER
a3828db0 14162#include <sys/lwp.h>
bec39cab
AC
14163int
14164main ()
14165{
a3828db0 14166struct lwp l;
bec39cab
AC
14167 ;
14168 return 0;
14169}
14170_ACEOF
81ecdfbb 14171if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14172 gdb_cv_struct_lwp=yes
c906108c 14173else
81ecdfbb 14174 gdb_cv_struct_lwp=no
c906108c 14175fi
81ecdfbb 14176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14177fi
81ecdfbb
RW
14178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
14179$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 14180if test $gdb_cv_struct_lwp = yes; then
c906108c 14181
81ecdfbb 14182$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 14183
97bf5e38 14184fi
c906108c 14185
a3828db0 14186# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
14187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
14188$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
d0ac1c44 14189if ${gdb_cv_struct_reg+:} false; then :
81ecdfbb 14190 $as_echo_n "(cached) " >&6
bec39cab 14191else
81ecdfbb 14192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14193/* end confdefs.h. */
a3828db0
MK
14194#include <sys/types.h>
14195#include <machine/reg.h>
bec39cab
AC
14196int
14197main ()
14198{
a3828db0 14199struct reg r;
bec39cab
AC
14200 ;
14201 return 0;
14202}
14203_ACEOF
81ecdfbb 14204if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14205 gdb_cv_struct_reg=yes
27ca5dad 14206else
81ecdfbb 14207 gdb_cv_struct_reg=no
27ca5dad 14208fi
81ecdfbb 14209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 14210fi
81ecdfbb
RW
14211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
14212$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 14213if test $gdb_cv_struct_reg = yes; then
bec39cab 14214
81ecdfbb 14215$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
14216
14217fi
97bf5e38 14218
a3828db0
MK
14219# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
14220# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
a6e69c1f
JB
14221ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
14222#include <machine/reg.h>
81ecdfbb 14223"
d0ac1c44 14224if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
5c45e068
MK
14225
14226cat >>confdefs.h <<_ACEOF
a3828db0 14227#define HAVE_STRUCT_REG_R_FS 1
bec39cab 14228_ACEOF
3862412b 14229
5c45e068 14230
97bf5e38 14231fi
a6e69c1f
JB
14232ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
14233#include <machine/reg.h>
81ecdfbb 14234"
d0ac1c44 14235if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
5c45e068
MK
14236
14237cat >>confdefs.h <<_ACEOF
a3828db0 14238#define HAVE_STRUCT_REG_R_GS 1
bec39cab 14239_ACEOF
3862412b 14240
5c45e068 14241
97bf5e38 14242fi
3862412b 14243
5c45e068 14244
6fea9e18
L
14245# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
14246# Older amd64 Linux's don't have the fs_base and gs_base members of
14247# `struct user_regs_struct'.
f517c180
EA
14248ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/types.h>
14249#include <sys/user.h>
6fea9e18 14250"
d0ac1c44 14251if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then :
6fea9e18
L
14252
14253cat >>confdefs.h <<_ACEOF
14254#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
14255_ACEOF
14256
14257
14258fi
f517c180
EA
14259ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/types.h>
14260#include <sys/user.h>
6fea9e18 14261"
d0ac1c44 14262if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then :
6fea9e18
L
14263
14264cat >>confdefs.h <<_ACEOF
14265#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
14266_ACEOF
14267
14268
14269fi
14270
14271
a3828db0 14272# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
14273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
14274$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
d0ac1c44 14275if ${gdb_cv_have_ptrace_getregs+:} false; then :
81ecdfbb 14276 $as_echo_n "(cached) " >&6
451928c5 14277else
81ecdfbb 14278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14279/* end confdefs.h. */
a3828db0 14280#include <sys/ptrace.h>
bec39cab
AC
14281int
14282main ()
14283{
a3828db0 14284PTRACE_GETREGS;
bec39cab
AC
14285 ;
14286 return 0;
14287}
14288_ACEOF
81ecdfbb 14289if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14290 gdb_cv_have_ptrace_getregs=yes
451928c5 14291else
81ecdfbb 14292 gdb_cv_have_ptrace_getregs=no
451928c5 14293fi
81ecdfbb 14294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14295fi
14296
81ecdfbb
RW
14297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
14298$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 14299if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 14300
81ecdfbb 14301$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 14302
97bf5e38 14303fi
451928c5 14304
a3828db0 14305# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
14306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
14307$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
d0ac1c44 14308if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
81ecdfbb 14309 $as_echo_n "(cached) " >&6
451928c5 14310else
81ecdfbb 14311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14312/* end confdefs.h. */
a3828db0 14313#include <sys/ptrace.h>
bec39cab
AC
14314int
14315main ()
14316{
a3828db0 14317PTRACE_GETFPXREGS;
bec39cab
AC
14318 ;
14319 return 0;
14320}
14321_ACEOF
81ecdfbb 14322if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14323 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 14324else
81ecdfbb 14325 gdb_cv_have_ptrace_getfpxregs=no
451928c5 14326fi
81ecdfbb 14327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14328fi
14329
81ecdfbb
RW
14330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
14331$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 14332if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 14333
81ecdfbb 14334$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 14335
97bf5e38 14336fi
451928c5 14337
a3828db0 14338# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
14339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
14340$as_echo_n "checking for PT_GETDBREGS... " >&6; }
d0ac1c44 14341if ${gdb_cv_have_pt_getdbregs+:} false; then :
81ecdfbb 14342 $as_echo_n "(cached) " >&6
3862412b 14343else
81ecdfbb 14344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14345/* end confdefs.h. */
a3828db0
MK
14346#include <sys/types.h>
14347#include <sys/ptrace.h>
bec39cab
AC
14348int
14349main ()
14350{
a3828db0 14351PT_GETDBREGS;
bec39cab
AC
14352 ;
14353 return 0;
14354}
14355_ACEOF
81ecdfbb 14356if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14357 gdb_cv_have_pt_getdbregs=yes
3862412b 14358else
81ecdfbb 14359 gdb_cv_have_pt_getdbregs=no
3862412b 14360fi
81ecdfbb 14361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14362fi
14363
81ecdfbb
RW
14364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
14365$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 14366if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 14367
81ecdfbb 14368$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 14369
97bf5e38 14370fi
3862412b 14371
a3828db0 14372# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
14373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
14374$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
d0ac1c44 14375if ${gdb_cv_have_pt_getxmmregs+:} false; then :
81ecdfbb 14376 $as_echo_n "(cached) " >&6
3862412b 14377else
81ecdfbb 14378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14379/* end confdefs.h. */
a3828db0
MK
14380#include <sys/types.h>
14381#include <sys/ptrace.h>
bec39cab
AC
14382int
14383main ()
14384{
a3828db0 14385PT_GETXMMREGS;
bec39cab
AC
14386 ;
14387 return 0;
14388}
14389_ACEOF
81ecdfbb 14390if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14391 gdb_cv_have_pt_getxmmregs=yes
3862412b 14392else
81ecdfbb 14393 gdb_cv_have_pt_getxmmregs=no
3862412b 14394fi
81ecdfbb 14395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14396fi
14397
81ecdfbb
RW
14398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
14399$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 14400if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 14401
81ecdfbb 14402$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 14403
97bf5e38 14404fi
3862412b 14405
6e9567fe
JB
14406# See if <sys/ptrace.h> supports LWP names on FreeBSD
14407# Older FreeBSD versions don't have the pl_tdname member of
14408# `struct ptrace_lwpinfo'.
14409ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
14410"
d0ac1c44 14411if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
6e9567fe
JB
14412
14413cat >>confdefs.h <<_ACEOF
14414#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
14415_ACEOF
14416
14417
14418fi
14419
14420
e6cdd38e
JB
14421# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
14422# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
14423# FreeBSD 10.3.
14424ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
14425"
d0ac1c44 14426if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
e6cdd38e
JB
14427
14428cat >>confdefs.h <<_ACEOF
14429#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
14430_ACEOF
14431
14432
14433fi
14434
6e9567fe 14435
97bf5e38 14436if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
14437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
14438$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14439 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
81ecdfbb 14440 $as_echo_n "(cached) " >&6
596c9d4b 14441else
81ecdfbb 14442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14443/* end confdefs.h. */
596c9d4b
KB
14444
14445#define _SYSCALL32
d30c5336
JK
14446/* Needed for new procfs interface on sparc-solaris. */
14447#define _STRUCTURED_PROC 1
596c9d4b 14448#include <sys/procfs.h>
bec39cab
AC
14449int
14450main ()
14451{
97bf5e38 14452gregset_t avar
bec39cab
AC
14453 ;
14454 return 0;
14455}
14456_ACEOF
81ecdfbb 14457if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14458 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 14459else
81ecdfbb 14460 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 14461
596c9d4b 14462fi
81ecdfbb 14463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
14464fi
14465
97bf5e38 14466 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 14467
81ecdfbb 14468$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
14469
14470 fi
81ecdfbb
RW
14471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14472$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 14473
81ecdfbb
RW
14474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
14475$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14476 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
81ecdfbb 14477 $as_echo_n "(cached) " >&6
d84dd0c5 14478else
81ecdfbb 14479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14480/* end confdefs.h. */
97bf5e38
MK
14481
14482#define _SYSCALL32
d30c5336
JK
14483/* Needed for new procfs interface on sparc-solaris. */
14484#define _STRUCTURED_PROC 1
d84dd0c5 14485#include <sys/procfs.h>
bec39cab
AC
14486int
14487main ()
14488{
97bf5e38 14489fpregset_t avar
bec39cab
AC
14490 ;
14491 return 0;
14492}
14493_ACEOF
81ecdfbb 14494if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14495 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 14496else
81ecdfbb 14497 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 14498
d84dd0c5 14499fi
81ecdfbb 14500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
14501fi
14502
97bf5e38 14503 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 14504
81ecdfbb 14505$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 14506
97bf5e38 14507 fi
81ecdfbb
RW
14508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14509$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 14510
81ecdfbb
RW
14511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
14512$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14513 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
81ecdfbb 14514 $as_echo_n "(cached) " >&6
c906108c 14515else
81ecdfbb 14516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14517/* end confdefs.h. */
c906108c 14518
97bf5e38 14519#define _SYSCALL32
d30c5336
JK
14520/* Needed for new procfs interface on sparc-solaris. */
14521#define _STRUCTURED_PROC 1
97bf5e38 14522#include <sys/procfs.h>
bec39cab
AC
14523int
14524main ()
14525{
97bf5e38 14526prgregset_t avar
bec39cab
AC
14527 ;
14528 return 0;
14529}
14530_ACEOF
81ecdfbb 14531if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14532 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 14533else
81ecdfbb 14534 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 14535
c906108c 14536fi
81ecdfbb 14537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14538fi
14539
97bf5e38 14540 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 14541
81ecdfbb 14542$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 14543
97bf5e38 14544 fi
81ecdfbb
RW
14545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14546$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 14547
81ecdfbb
RW
14548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
14549$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14550 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
81ecdfbb 14551 $as_echo_n "(cached) " >&6
d45fe813 14552else
81ecdfbb 14553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14554/* end confdefs.h. */
97bf5e38
MK
14555
14556#define _SYSCALL32
d30c5336
JK
14557/* Needed for new procfs interface on sparc-solaris. */
14558#define _STRUCTURED_PROC 1
97bf5e38 14559#include <sys/procfs.h>
bec39cab
AC
14560int
14561main ()
14562{
97bf5e38 14563prfpregset_t avar
bec39cab
AC
14564 ;
14565 return 0;
14566}
14567_ACEOF
81ecdfbb 14568if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14569 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 14570else
81ecdfbb 14571 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 14572
d45fe813 14573fi
81ecdfbb 14574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14575fi
14576
97bf5e38 14577 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 14578
81ecdfbb 14579$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 14580
97bf5e38 14581 fi
81ecdfbb
RW
14582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14583$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 14584
81ecdfbb
RW
14585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14586$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
d0ac1c44 14587 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
81ecdfbb 14588 $as_echo_n "(cached) " >&6
d45fe813 14589else
81ecdfbb 14590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14591/* end confdefs.h. */
97bf5e38
MK
14592
14593#define _SYSCALL32
d30c5336
JK
14594/* Needed for new procfs interface on sparc-solaris. */
14595#define _STRUCTURED_PROC 1
97bf5e38 14596#include <sys/procfs.h>
bec39cab
AC
14597int
14598main ()
14599{
97bf5e38 14600prgregset32_t avar
bec39cab
AC
14601 ;
14602 return 0;
14603}
14604_ACEOF
81ecdfbb 14605if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14606 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 14607else
81ecdfbb 14608 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 14609
d45fe813 14610fi
81ecdfbb 14611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14612fi
14613
97bf5e38 14614 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 14615
81ecdfbb 14616$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 14617
97bf5e38 14618 fi
81ecdfbb
RW
14619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14620$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 14621
81ecdfbb
RW
14622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14623$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
d0ac1c44 14624 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
81ecdfbb 14625 $as_echo_n "(cached) " >&6
d45fe813 14626else
81ecdfbb 14627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14628/* end confdefs.h. */
97bf5e38 14629
d45fe813 14630#define _SYSCALL32
d30c5336
JK
14631/* Needed for new procfs interface on sparc-solaris. */
14632#define _STRUCTURED_PROC 1
97bf5e38 14633#include <sys/procfs.h>
bec39cab
AC
14634int
14635main ()
14636{
97bf5e38 14637lwpid_t avar
bec39cab
AC
14638 ;
14639 return 0;
14640}
14641_ACEOF
81ecdfbb 14642if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14643 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 14644else
81ecdfbb 14645 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 14646
d45fe813 14647fi
81ecdfbb 14648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14649fi
14650
97bf5e38 14651 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 14652
81ecdfbb 14653$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 14654
97bf5e38 14655 fi
81ecdfbb
RW
14656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14657$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 14658
81ecdfbb
RW
14659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14660$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
d0ac1c44 14661 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
81ecdfbb 14662 $as_echo_n "(cached) " >&6
c906108c 14663else
81ecdfbb 14664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14665/* end confdefs.h. */
c906108c 14666
97bf5e38 14667#define _SYSCALL32
d30c5336
JK
14668/* Needed for new procfs interface on sparc-solaris. */
14669#define _STRUCTURED_PROC 1
97bf5e38 14670#include <sys/procfs.h>
bec39cab
AC
14671int
14672main ()
14673{
97bf5e38 14674psaddr_t avar
bec39cab
AC
14675 ;
14676 return 0;
14677}
14678_ACEOF
81ecdfbb 14679if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14680 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 14681else
81ecdfbb 14682 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 14683
c906108c 14684fi
81ecdfbb 14685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14686fi
14687
97bf5e38 14688 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 14689
81ecdfbb 14690$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 14691
97bf5e38 14692 fi
81ecdfbb
RW
14693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14694$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 14695
97bf5e38
MK
14696
14697
14698
97bf5e38 14699 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
14700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
14701$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
d0ac1c44 14702 if ${gdb_cv_prfpregset_t_broken+:} false; then :
81ecdfbb 14703 $as_echo_n "(cached) " >&6
c906108c 14704else
81ecdfbb 14705 if test "$cross_compiling" = yes; then :
97bf5e38 14706 gdb_cv_prfpregset_t_broken=yes
c906108c 14707else
81ecdfbb 14708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14709/* end confdefs.h. */
97bf5e38
MK
14710#include <sys/procfs.h>
14711 int main ()
14712 {
14713 if (sizeof (prfpregset_t) == sizeof (void *))
14714 return 1;
14715 return 0;
14716 }
bec39cab 14717_ACEOF
81ecdfbb 14718if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14719 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
14720else
14721 gdb_cv_prfpregset_t_broken=yes
c906108c 14722fi
81ecdfbb
RW
14723rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14724 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14725fi
81ecdfbb 14726
c906108c
SS
14727fi
14728
81ecdfbb
RW
14729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
14730$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 14731 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 14732
81ecdfbb 14733$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 14734
97bf5e38
MK
14735 fi
14736 fi
c906108c 14737fi
c906108c 14738
bc8bcb4b 14739# Check if the compiler supports the `long long' type.
c906108c 14740
81ecdfbb
RW
14741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14742$as_echo_n "checking for long long support in compiler... " >&6; }
d0ac1c44 14743if ${gdb_cv_c_long_long+:} false; then :
81ecdfbb 14744 $as_echo_n "(cached) " >&6
97bf5e38 14745else
81ecdfbb 14746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14747/* end confdefs.h. */
bc8bcb4b 14748extern long long foo;
bec39cab
AC
14749int
14750main ()
14751{
bc8bcb4b 14752switch (foo & 2) { case 0: return 1; }
bec39cab
AC
14753 ;
14754 return 0;
14755}
14756_ACEOF
81ecdfbb 14757if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14758 gdb_cv_c_long_long=yes
14759else
81ecdfbb 14760 gdb_cv_c_long_long=no
97bf5e38 14761fi
81ecdfbb 14762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14763fi
81ecdfbb
RW
14764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14765$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
14766if test $gdb_cv_c_long_long != yes; then
14767 # libdecnumber requires long long.
d0ac1c44 14768 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
14769fi
14770
bc8bcb4b 14771# Check if the compiler and runtime support printing long longs.
97bf5e38 14772
81ecdfbb
RW
14773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14774$as_echo_n "checking for long long support in printf... " >&6; }
d0ac1c44 14775if ${gdb_cv_printf_has_long_long+:} false; then :
81ecdfbb 14776 $as_echo_n "(cached) " >&6
97bf5e38 14777else
81ecdfbb 14778 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14779 gdb_cv_printf_has_long_long=no
14780else
81ecdfbb 14781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14782/* end confdefs.h. */
bc8bcb4b
MK
14783$ac_includes_default
14784int
14785main ()
14786{
14787char buf[32];
97bf5e38
MK
14788 long long l = 0;
14789 l = (l << 16) + 0x0123;
14790 l = (l << 16) + 0x4567;
14791 l = (l << 16) + 0x89ab;
14792 l = (l << 16) + 0xcdef;
14793 sprintf (buf, "0x%016llx", l);
14794 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
14795 ;
14796 return 0;
c906108c 14797}
bec39cab 14798_ACEOF
81ecdfbb 14799if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14800 gdb_cv_printf_has_long_long=yes
14801else
81ecdfbb 14802 gdb_cv_printf_has_long_long=no
97bf5e38 14803fi
81ecdfbb
RW
14804rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14805 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14806fi
81ecdfbb 14807
97bf5e38 14808fi
81ecdfbb
RW
14809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14810$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 14811if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 14812
81ecdfbb 14813$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14814
14815fi
97bf5e38 14816
1a619819
LM
14817# Check if the compiler and runtime support printing decfloats.
14818
81ecdfbb
RW
14819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14820$as_echo_n "checking for decfloat support in printf... " >&6; }
d0ac1c44 14821if ${gdb_cv_printf_has_decfloat+:} false; then :
81ecdfbb 14822 $as_echo_n "(cached) " >&6
1a619819 14823else
81ecdfbb 14824 if test "$cross_compiling" = yes; then :
1a619819
LM
14825 gdb_cv_printf_has_decfloat=no
14826else
81ecdfbb 14827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
14828/* end confdefs.h. */
14829$ac_includes_default
14830int
14831main ()
14832{
14833char buf[64];
14834 _Decimal32 d32 = 1.2345df;
14835 _Decimal64 d64 = 1.2345dd;
14836 _Decimal128 d128 = 1.2345dl;
14837 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14838 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14839 ;
14840 return 0;
14841}
14842_ACEOF
81ecdfbb 14843if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
14844 gdb_cv_printf_has_decfloat=yes
14845else
81ecdfbb 14846 gdb_cv_printf_has_decfloat=no
1a619819 14847fi
81ecdfbb
RW
14848rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14849 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 14850fi
81ecdfbb 14851
1a619819 14852fi
81ecdfbb
RW
14853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14854$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
14855if test $gdb_cv_printf_has_decfloat = yes; then
14856
81ecdfbb 14857$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
14858
14859fi
14860
bc8bcb4b
MK
14861# Check if the compiler supports the `long double' type. We can't use
14862# AC_C_LONG_DOUBLE because that one does additional checks on the
14863# constants defined in <float.h> that fail on some systems,
14864# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 14865
81ecdfbb
RW
14866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14867$as_echo_n "checking for long double support in compiler... " >&6; }
d0ac1c44 14868if ${gdb_cv_c_long_double+:} false; then :
81ecdfbb 14869 $as_echo_n "(cached) " >&6
97bf5e38 14870else
81ecdfbb 14871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14872/* end confdefs.h. */
97bf5e38 14873long double foo;
bec39cab 14874_ACEOF
81ecdfbb 14875if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 14876 gdb_cv_c_long_double=yes
97bf5e38 14877else
81ecdfbb 14878 gdb_cv_c_long_double=no
97bf5e38 14879fi
81ecdfbb 14880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14881fi
81ecdfbb
RW
14882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14883$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 14884if test $gdb_cv_c_long_double = yes; then
c906108c 14885
81ecdfbb 14886$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14887
14888fi
14889
bc8bcb4b 14890# Check if the compiler and runtime support printing long doubles.
97bf5e38 14891
81ecdfbb
RW
14892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14893$as_echo_n "checking for long double support in printf... " >&6; }
d0ac1c44 14894if ${gdb_cv_printf_has_long_double+:} false; then :
81ecdfbb 14895 $as_echo_n "(cached) " >&6
97bf5e38 14896else
81ecdfbb 14897 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14898 gdb_cv_printf_has_long_double=no
14899else
81ecdfbb 14900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14901/* end confdefs.h. */
bc8bcb4b
MK
14902$ac_includes_default
14903int
14904main ()
14905{
14906char buf[16];
97bf5e38
MK
14907 long double f = 3.141592653;
14908 sprintf (buf, "%Lg", f);
14909 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
14910 ;
14911 return 0;
97bf5e38 14912}
bec39cab 14913_ACEOF
81ecdfbb 14914if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14915 gdb_cv_printf_has_long_double=yes
c906108c 14916else
81ecdfbb 14917 gdb_cv_printf_has_long_double=no
c906108c 14918fi
81ecdfbb
RW
14919rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14920 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14921fi
81ecdfbb 14922
c906108c 14923fi
81ecdfbb
RW
14924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14925$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 14926if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 14927
81ecdfbb 14928$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14929
14930fi
97bf5e38 14931
bc8bcb4b 14932# Check if the compiler and runtime support scanning long doubles.
97bf5e38 14933
81ecdfbb
RW
14934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14935$as_echo_n "checking for long double support in scanf... " >&6; }
d0ac1c44 14936if ${gdb_cv_scanf_has_long_double+:} false; then :
81ecdfbb 14937 $as_echo_n "(cached) " >&6
97bf5e38 14938else
81ecdfbb 14939 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14940 gdb_cv_scanf_has_long_double=no
14941else
81ecdfbb 14942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14943/* end confdefs.h. */
bc8bcb4b
MK
14944#include <stdio.h>
14945int
14946main ()
14947{
14948char *buf = "3.141592653";
97bf5e38
MK
14949 long double f = 0;
14950 sscanf (buf, "%Lg", &f);
14951 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
14952 ;
14953 return 0;
97bf5e38 14954}
bec39cab 14955_ACEOF
81ecdfbb 14956if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14957 gdb_cv_scanf_has_long_double=yes
14958else
81ecdfbb 14959 gdb_cv_scanf_has_long_double=no
97bf5e38 14960fi
81ecdfbb
RW
14961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14962 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14963fi
81ecdfbb 14964
c906108c 14965fi
81ecdfbb
RW
14966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14967$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 14968if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 14969
81ecdfbb 14970$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14971
14972fi
c906108c 14973
438013df
AO
14974case ${host_os} in
14975aix*)
81ecdfbb
RW
14976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14977$as_echo_n "checking for -bbigtoc option... " >&6; }
d0ac1c44 14978if ${gdb_cv_bigtoc+:} false; then :
81ecdfbb 14979 $as_echo_n "(cached) " >&6
438013df 14980else
bec39cab 14981
438013df
AO
14982 SAVE_LDFLAGS=$LDFLAGS
14983
14984 case $GCC in
14985 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14986 *) gdb_cv_bigtoc=-bbigtoc ;;
14987 esac
14988
14989 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 14990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14991/* end confdefs.h. */
438013df 14992
bec39cab
AC
14993int
14994main ()
14995{
438013df 14996int i;
bec39cab
AC
14997 ;
14998 return 0;
14999}
15000_ACEOF
81ecdfbb 15001if ac_fn_c_try_link "$LINENO"; then :
bec39cab 15002
81ecdfbb
RW
15003else
15004 gdb_cv_bigtoc=
438013df 15005fi
81ecdfbb
RW
15006rm -f core conftest.err conftest.$ac_objext \
15007 conftest$ac_exeext conftest.$ac_ext
ec76baa5 15008 LDFLAGS="${SAVE_LDFLAGS}"
438013df 15009
bec39cab 15010fi
81ecdfbb
RW
15011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
15012$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
15013 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
15014 ;;
15015esac
15016
38f6b338 15017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 15018$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
15019dynamic_list=false
15020if test "${gdb_native}" = yes; then
15021 # The dynamically loaded libthread_db needs access to symbols in the gdb
15022 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
15023 # may not be supported there.
15024 old_LDFLAGS="$LDFLAGS"
15025 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
15026 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
15027 LDFLAGS="$LDFLAGS $RDYNAMIC"
15028 if test "${have_libpython}" = no; then
15029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
15030/* end confdefs.h. */
15031
15032int
15033main ()
15034{
15035
15036 ;
15037 return 0;
15038}
15039_ACEOF
15040if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
15041 dynamic_list=true
15042fi
15043rm -f core conftest.err conftest.$ac_objext \
15044 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
15045 else
15046 # Workaround http://bugs.python.org/issue4434 where static
15047 # libpythonX.Y.a would get its symbols required for
15048 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
15049 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
15050
15051 # Note the workaround for Python
15052 # http://bugs.python.org/issue10112 earlier has removed
15053 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
15054 # here too, as otherwise it'd make this -Wl,--dynamic-list test
15055 # always pass.
38f6b338
JK
15056 old_CFLAGS="$CFLAGS"
15057 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
15058 old_LIBS="$LIBS"
15059 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
15060 old_CPPFLAGS="$CPPFLAGS"
15061 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 15062 if test "$cross_compiling" = yes; then :
3bebe2f2 15063 true
f6528abd 15064else
3bebe2f2
JK
15065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15066/* end confdefs.h. */
1b4f615e 15067#include "Python.h"
3bebe2f2
JK
15068int
15069main ()
15070{
15071int err;
38f6b338
JK
15072 Py_Initialize ();
15073 err = PyRun_SimpleString ("import itertools\n");
15074 Py_Finalize ();
15075 return err == 0 ? 0 : 1;
3bebe2f2
JK
15076 ;
15077 return 0;
15078}
15079_ACEOF
15080if ac_fn_c_try_run "$LINENO"; then :
15081 dynamic_list=true
15082fi
15083rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15084 conftest.$ac_objext conftest.beam conftest.$ac_ext
15085fi
15086
8c1fb155 15087 LIBS="$old_LIBS"
38f6b338 15088 CFLAGS="$old_CFLAGS"
1b4f615e 15089 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
15090 fi
15091 LDFLAGS="$old_LDFLAGS"
15092fi
15093if $dynamic_list; then
15094 found="-Wl,--dynamic-list"
15095 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 15096else
38f6b338
JK
15097 found="-rdynamic"
15098 RDYNAMIC="-rdynamic"
f6528abd 15099fi
f6528abd 15100
38f6b338 15101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 15102$as_echo "$found" >&6; }
0407b3f1 15103
f6528abd 15104
0407b3f1 15105if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 15106 case ${host_os} in
d92419e5 15107 aix*)
81ecdfbb
RW
15108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
15109$as_echo_n "checking for AiX thread debugging library... " >&6; }
d0ac1c44 15110 if ${gdb_cv_have_aix_thread_debug+:} false; then :
81ecdfbb 15111 $as_echo_n "(cached) " >&6
bec39cab 15112else
81ecdfbb 15113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15114/* end confdefs.h. */
d92419e5 15115#include <sys/pthdebug.h>
bec39cab
AC
15116int
15117main ()
15118{
d92419e5
JB
15119#ifndef PTHDB_VERSION_3
15120 #error
15121 #endif
bec39cab
AC
15122 ;
15123 return 0;
15124}
15125_ACEOF
81ecdfbb 15126if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
15127 gdb_cv_have_aix_thread_debug=yes
15128else
81ecdfbb 15129 gdb_cv_have_aix_thread_debug=no
d92419e5 15130fi
81ecdfbb 15131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
15132fi
15133
81ecdfbb
RW
15134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
15135$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
15136 if test $gdb_cv_have_aix_thread_debug = yes; then
15137 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 15138 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 15139 LIBS="$LIBS -lpthdebug"
d645e32e
JB
15140
15141 # Older versions of AIX do not provide the declaration for
15142 # the getthrds function (it appears that it was introduced
15143 # with AIX 6.x).
15144 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
15145"
d0ac1c44 15146if test "x$ac_cv_have_decl_getthrds" = xyes; then :
d645e32e
JB
15147 ac_have_decl=1
15148else
15149 ac_have_decl=0
15150fi
15151
15152cat >>confdefs.h <<_ACEOF
15153#define HAVE_DECL_GETTHRDS $ac_have_decl
15154_ACEOF
15155
d92419e5
JB
15156 fi
15157 ;;
c906108c 15158 esac
bec39cab 15159
c906108c
SS
15160fi
15161
3f47be5c 15162if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
15163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
15164$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
d0ac1c44 15165if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
81ecdfbb 15166 $as_echo_n "(cached) " >&6
bec39cab 15167else
81ecdfbb 15168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15169/* end confdefs.h. */
3f47be5c 15170#include <thread_db.h>
bec39cab
AC
15171int
15172main ()
15173{
3f47be5c 15174int i = TD_NOTALLOC;
bec39cab
AC
15175 ;
15176 return 0;
15177}
15178_ACEOF
81ecdfbb 15179if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
15180 gdb_cv_thread_db_h_has_td_notalloc=yes
15181else
81ecdfbb 15182 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 15183
3f47be5c 15184fi
81ecdfbb 15185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 15186
bec39cab 15187fi
81ecdfbb
RW
15188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
15189$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
15190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
15191$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
d0ac1c44 15192if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
81ecdfbb 15193 $as_echo_n "(cached) " >&6
59f80f10 15194else
81ecdfbb 15195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
15196/* end confdefs.h. */
15197#include <thread_db.h>
15198int
15199main ()
15200{
15201int i = TD_VERSION;
15202 ;
15203 return 0;
15204}
15205_ACEOF
81ecdfbb 15206if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15207 gdb_cv_thread_db_h_has_td_version=yes
15208else
81ecdfbb 15209 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
15210
15211fi
81ecdfbb 15212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15213
15214fi
81ecdfbb
RW
15215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
15216$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
15217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
15218$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
d0ac1c44 15219if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
81ecdfbb 15220 $as_echo_n "(cached) " >&6
59f80f10 15221else
81ecdfbb 15222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
15223/* end confdefs.h. */
15224#include <thread_db.h>
15225int
15226main ()
15227{
15228int i = TD_NOTLS;
15229 ;
15230 return 0;
15231}
15232_ACEOF
81ecdfbb 15233if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15234 gdb_cv_thread_db_h_has_td_notls=yes
15235else
81ecdfbb 15236 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
15237
15238fi
81ecdfbb 15239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15240
15241fi
81ecdfbb
RW
15242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
15243$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
15244fi
15245if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 15246
81ecdfbb 15247$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 15248
59f80f10
DJ
15249fi
15250if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
15251
81ecdfbb 15252$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
15253
15254fi
15255if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
15256
81ecdfbb 15257$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 15258
3f47be5c
EZ
15259fi
15260
81ecdfbb
RW
15261ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
15262"
d0ac1c44 15263if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
81ecdfbb 15264 ac_have_decl=1
10568435 15265else
81ecdfbb 15266 ac_have_decl=0
10568435 15267fi
10568435
JK
15268
15269cat >>confdefs.h <<_ACEOF
81ecdfbb 15270#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
15271_ACEOF
15272
15273
81ecdfbb
RW
15274if test "$cross_compiling" = yes; then :
15275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15276/* end confdefs.h. */
15277#include <sys/personality.h>
15278int
15279main ()
15280{
15281
15282# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15283# define ADDR_NO_RANDOMIZE 0x0040000
15284# endif
15285 /* Test the flag could be set and stays set. */
15286 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15287 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15288 return 1
15289 ;
15290 return 0;
15291}
15292_ACEOF
81ecdfbb 15293if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
15294 have_personality=true
15295else
81ecdfbb 15296 have_personality=false
10568435 15297fi
81ecdfbb
RW
15298rm -f core conftest.err conftest.$ac_objext \
15299 conftest$ac_exeext conftest.$ac_ext
10568435 15300else
81ecdfbb 15301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15302/* end confdefs.h. */
15303#include <sys/personality.h>
15304int
15305main ()
15306{
15307
15308# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15309# define ADDR_NO_RANDOMIZE 0x0040000
15310# endif
15311 /* Test the flag could be set and stays set. */
15312 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15313 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15314 return 1
15315 ;
15316 return 0;
15317}
15318_ACEOF
81ecdfbb 15319if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
15320 have_personality=true
15321else
81ecdfbb 15322 have_personality=false
10568435 15323fi
81ecdfbb
RW
15324rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15325 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 15326fi
81ecdfbb 15327
10568435
JK
15328if $have_personality
15329then
15330
81ecdfbb 15331$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
15332
15333fi
15334
e655c1a2
PA
15335case $host_os in
15336 go32* | *djgpp*)
15337 gdbinit=gdb.ini
15338 ;;
15339 *)
15340 gdbinit=.gdbinit
15341 ;;
15342esac
15343
15344cat >>confdefs.h <<_ACEOF
15345#define GDBINIT "$gdbinit"
15346_ACEOF
15347
15348
fb40c209 15349
f83d8a90
DE
15350# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
15351# except that the argument to --with-sysroot is optional.
15352# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
15353if test "x$with_sysroot" = xyes; then
15354 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
15355fi
bec39cab 15356
81ecdfbb
RW
15357# Check whether --with-sysroot was given.
15358if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
15359 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
15360else
15361 TARGET_SYSTEM_ROOT=
15362fi
030292b7 15363
030292b7 15364
f83d8a90
DE
15365 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15366 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15367 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
15368 ac_define_dir=`eval echo $ac_define_dir`
030292b7 15369
f83d8a90
DE
15370cat >>confdefs.h <<_ACEOF
15371#define TARGET_SYSTEM_ROOT "$ac_define_dir"
15372_ACEOF
bec39cab 15373
030292b7 15374
b14b1491 15375
f83d8a90
DE
15376
15377 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15378 if test "x$prefix" = xNONE; then
15379 test_prefix=/usr/local
15380 else
15381 test_prefix=$prefix
15382 fi
15383 else
15384 test_prefix=$exec_prefix
15385 fi
15386 value=0
15387 case ${ac_define_dir} in
15388 "${test_prefix}"|"${test_prefix}/"*|\
15389 '${exec_prefix}'|'${exec_prefix}/'*)
15390 value=1
15391 ;;
15392 esac
15393
15394cat >>confdefs.h <<_ACEOF
15395#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
15396_ACEOF
030292b7
DJ
15397
15398
15399
16e7150e 15400
16e7150e 15401
81ecdfbb
RW
15402# Check whether --with-system-gdbinit was given.
15403if test "${with_system_gdbinit+set}" = set; then :
15404 withval=$with_system_gdbinit;
b14b1491
TT
15405 SYSTEM_GDBINIT=$withval
15406else
15407 SYSTEM_GDBINIT=
81ecdfbb
RW
15408fi
15409
16e7150e
JG
15410
15411 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15412 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 15413 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
15414 ac_define_dir=`eval echo $ac_define_dir`
15415
15416cat >>confdefs.h <<_ACEOF
15417#define SYSTEM_GDBINIT "$ac_define_dir"
15418_ACEOF
15419
15420
15421
0c4a4063 15422
b14b1491
TT
15423 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15424 if test "x$prefix" = xNONE; then
15425 test_prefix=/usr/local
15426 else
15427 test_prefix=$prefix
15428 fi
15429 else
15430 test_prefix=$exec_prefix
15431 fi
15432 value=0
15433 case ${ac_define_dir} in
15434 "${test_prefix}"|"${test_prefix}/"*|\
15435 '${exec_prefix}'|'${exec_prefix}/'*)
15436 value=1
15437 ;;
15438 esac
16e7150e 15439
b14b1491
TT
15440cat >>confdefs.h <<_ACEOF
15441#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
15442_ACEOF
15443
b14b1491 15444
16e7150e 15445
0c4a4063 15446
b835bb52 15447
81ecdfbb
RW
15448# Check whether --enable-werror was given.
15449if test "${enable_werror+set}" = set; then :
15450 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
15451 yes | y) ERROR_ON_WARNING="yes" ;;
15452 no | n) ERROR_ON_WARNING="no" ;;
d0ac1c44 15453 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 15454 esac
81ecdfbb
RW
15455fi
15456
094a342e 15457
9a084706
PA
15458# Enable -Werror by default when using gcc. Turn it off for releases.
15459if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
15460 ERROR_ON_WARNING=yes
15461fi
15462
15463WERROR_CFLAGS=""
15464if test "${ERROR_ON_WARNING}" = yes ; then
15465 WERROR_CFLAGS="-Werror"
15466fi
15467
cf6de44d 15468# The options we'll try to enable.
aac331e4 15469build_warnings="-Wall -Wpointer-arith \
1cb5e2a4 15470-Wno-unused -Wunused-value -Wunused-function \
aac331e4 15471-Wno-switch -Wno-char-subscripts \
cf6de44d 15472-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
8465943a 15473-Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized \
7f8a5d38 15474-Wno-mismatched-tags \
632e107b 15475-Wno-error=deprecated-register \
85e26832 15476-Wsuggest-override \
1a34f210 15477-Wimplicit-fallthrough=3 \
aff689d3 15478-Wduplicated-cond"
3bc3d82a 15479
3526781e 15480case "${host}" in
4fa7574e
RO
15481 *-*-mingw32*)
15482 # Enable -Wno-format by default when using gcc on mingw since many
15483 # GCC versions complain about %I64.
15484 build_warnings="$build_warnings -Wno-format" ;;
15485 *-*-solaris*)
15486 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
15487 # doesn't understand.
15488 build_warnings="$build_warnings -Wno-unknown-pragmas"
15489 # Solaris 11 <unistd.h> marks vfork deprecated.
15490 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
d3685d60 15491 *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
15492esac
15493
81ecdfbb
RW
15494# Check whether --enable-build-warnings was given.
15495if test "${enable_build_warnings+set}" = set; then :
15496 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
15497 yes) ;;
15498 no) build_warnings="-w";;
15499 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15500 build_warnings="${build_warnings} ${t}";;
15501 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15502 build_warnings="${t} ${build_warnings}";;
15503 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15504esac
d4f3574e 15505if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 15506 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 15507fi
81ecdfbb
RW
15508fi
15509# Check whether --enable-gdb-build-warnings was given.
15510if test "${enable_gdb_build_warnings+set}" = set; then :
15511 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
15512 yes) ;;
15513 no) build_warnings="-w";;
15514 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15515 build_warnings="${build_warnings} ${t}";;
15516 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15517 build_warnings="${t} ${build_warnings}";;
15518 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15519esac
15520if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15521 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
15522fi
81ecdfbb 15523fi
3bc3d82a
PA
15524
15525# The set of warnings supported by a C++ compiler is not the same as
15526# of the C compiler.
cf6de44d 15527ac_ext=cpp
3bc3d82a
PA
15528ac_cpp='$CXXCPP $CPPFLAGS'
15529ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15530ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15531ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15532
3bc3d82a 15533
81ecdfbb 15534WARN_CFLAGS=""
c906108c
SS
15535if test "x${build_warnings}" != x -a "x$GCC" = xyes
15536then
81ecdfbb
RW
15537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
15538$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
15539 # Separate out the -Werror flag as some files just cannot be
15540 # compiled with it enabled.
15541 for w in ${build_warnings}; do
7544db95
PA
15542 # GCC does not complain about -Wno-unknown-warning. Invert
15543 # and test -Wunknown-warning instead.
15544 case $w in
15545 -Wno-*)
15546 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
15547 *)
15548 wtest=$w ;;
15549 esac
15550
746a987d
AC
15551 case $w in
15552 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
15553 *)
15554 # Check whether GCC accepts it.
4536bbc6 15555 saved_CFLAGS="$CFLAGS"
3e019bdc 15556 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 15557 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 15558 CXXFLAGS="$CXXFLAGS -Werror $wtest"
54019719 15559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15560/* end confdefs.h. */
4536bbc6 15561
bec39cab
AC
15562int
15563main ()
15564{
4536bbc6 15565
bec39cab
AC
15566 ;
15567 return 0;
15568}
15569_ACEOF
3bc3d82a 15570if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 15571 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 15572fi
81ecdfbb 15573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 15574 CFLAGS="$saved_CFLAGS"
3bc3d82a 15575 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
15576 esac
15577 done
81ecdfbb
RW
15578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
15579$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
15580fi
15581
15582
104c1213 15583
cf6de44d 15584ac_ext=c
3bc3d82a
PA
15585ac_cpp='$CPP $CPPFLAGS'
15586ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15587ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15588ac_compiler_gnu=$ac_cv_c_compiler_gnu
15589
3bc3d82a 15590
b835bb52 15591
7a292a7a 15592# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
15593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
15594$as_echo_n "checking for cygwin... " >&6; }
d0ac1c44 15595if ${gdb_cv_os_cygwin+:} false; then :
81ecdfbb 15596 $as_echo_n "(cached) " >&6
bec39cab 15597else
81ecdfbb 15598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15599/* end confdefs.h. */
7a292a7a
SS
15600
15601#if defined (__CYGWIN__) || defined (__CYGWIN32__)
15602lose
15603#endif
bec39cab 15604_ACEOF
7a292a7a 15605if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 15606 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
15607 gdb_cv_os_cygwin=yes
15608else
7a292a7a
SS
15609 gdb_cv_os_cygwin=no
15610fi
15611rm -f conftest*
15612
15613fi
81ecdfbb
RW
15614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
15615$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 15616
aff38e61 15617
3eb25fda 15618SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 15619case ${host} in
95cbc983
AC
15620 *go32* ) SER_HARDWIRE=ser-go32.o ;;
15621 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 15622 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
15623esac
15624
15625
cd0fc7c3
SS
15626# libreadline needs libuser32.a in a cygwin environment
15627WIN32LIBS=
15628if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
15629 WIN32LIBS="-luser32"
15630 case "${target}" in
15631 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15632 ;;
15633 esac
cd0fc7c3 15634fi
c906108c 15635
b4505029
MM
15636# The ser-tcp.c module requires sockets.
15637case ${host} in
15638 *mingw32*)
15639
81ecdfbb 15640$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
15641
15642 WIN32LIBS="$WIN32LIBS -lws2_32"
15643 ;;
15644esac
15645
7a292a7a 15646
31d99776 15647# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
15648
15649 OLD_CFLAGS=$CFLAGS
15650 OLD_LDFLAGS=$LDFLAGS
15651 OLD_LIBS=$LIBS
15652 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15653 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15654 # always want our bfd.
15655 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15656 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15657 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 15658 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15659 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 15660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb 15661$as_echo_n "checking for ELF support in BFD... " >&6; }
d0ac1c44 15662if ${gdb_cv_var_elf+:} false; then :
81ecdfbb 15663 $as_echo_n "(cached) " >&6
31d99776 15664else
81ecdfbb 15665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
15666/* end confdefs.h. */
15667#include <stdlib.h>
def63ff0
TT
15668 #include "bfd.h"
15669 #include "elf-bfd.h"
31d99776
DJ
15670
15671int
15672main ()
15673{
def63ff0 15674return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
15675 ;
15676 return 0;
15677}
15678_ACEOF
81ecdfbb 15679if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
15680 gdb_cv_var_elf=yes
15681else
81ecdfbb 15682 gdb_cv_var_elf=no
31d99776 15683fi
81ecdfbb
RW
15684rm -f core conftest.err conftest.$ac_objext \
15685 conftest$ac_exeext conftest.$ac_ext
31d99776 15686fi
81ecdfbb
RW
15687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15688$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
15689 CFLAGS=$OLD_CFLAGS
15690 LDFLAGS=$OLD_LDFLAGS
15691 LIBS=$OLD_LIBS
31d99776 15692if test $gdb_cv_var_elf = yes; then
d4777acb 15693 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 15694
81ecdfbb 15695$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 15696
075ff26d
JK
15697 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15698 if test "$plugins" = "yes"; then
a48b32c0
L
15699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
15700$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 15701if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15702 $as_echo_n "(cached) " >&6
15703else
15704 ac_func_search_save_LIBS=$LIBS
15705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15706/* end confdefs.h. */
15707
15708/* Override any GCC internal prototype to avoid an error.
15709 Use char because int might match the return type of a GCC
15710 builtin and then its argument prototype would still apply. */
15711#ifdef __cplusplus
15712extern "C"
15713#endif
15714char dlopen ();
15715int
15716main ()
15717{
15718return dlopen ();
15719 ;
15720 return 0;
15721}
15722_ACEOF
15723for ac_lib in '' dl; do
15724 if test -z "$ac_lib"; then
15725 ac_res="none required"
15726 else
15727 ac_res=-l$ac_lib
15728 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15729 fi
15730 if ac_fn_c_try_link "$LINENO"; then :
15731 ac_cv_search_dlopen=$ac_res
15732fi
15733rm -f core conftest.err conftest.$ac_objext \
15734 conftest$ac_exeext
d0ac1c44 15735 if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15736 break
15737fi
15738done
d0ac1c44 15739if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15740
15741else
15742 ac_cv_search_dlopen=no
15743fi
15744rm conftest.$ac_ext
15745LIBS=$ac_func_search_save_LIBS
15746fi
15747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
15748$as_echo "$ac_cv_search_dlopen" >&6; }
15749ac_res=$ac_cv_search_dlopen
15750if test "$ac_res" != no; then :
15751 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15752
15753fi
15754
075ff26d 15755 fi
31d99776 15756fi
31d99776 15757
4f05add4
TT
15758# Add macho support to GDB, but only if BFD includes it.
15759
15760 OLD_CFLAGS=$CFLAGS
15761 OLD_LDFLAGS=$LDFLAGS
15762 OLD_LIBS=$LIBS
15763 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15764 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15765 # always want our bfd.
15766 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15767 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15768 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 15769 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15770 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
15771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
15772$as_echo_n "checking for Mach-O support in BFD... " >&6; }
d0ac1c44 15773if ${gdb_cv_var_macho+:} false; then :
4f05add4
TT
15774 $as_echo_n "(cached) " >&6
15775else
15776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15777/* end confdefs.h. */
15778#include <stdlib.h>
15779 #include "bfd.h"
15780 #include "mach-o.h"
15781
15782int
15783main ()
15784{
15785return bfd_mach_o_lookup_command (NULL, 0, NULL);
15786 ;
15787 return 0;
15788}
15789_ACEOF
15790if ac_fn_c_try_link "$LINENO"; then :
15791 gdb_cv_var_macho=yes
15792else
15793 gdb_cv_var_macho=no
15794fi
15795rm -f core conftest.err conftest.$ac_objext \
15796 conftest$ac_exeext conftest.$ac_ext
15797fi
15798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
15799$as_echo "$gdb_cv_var_macho" >&6; }
15800 CFLAGS=$OLD_CFLAGS
15801 LDFLAGS=$OLD_LDFLAGS
15802 LIBS=$OLD_LIBS
15803if test $gdb_cv_var_macho = yes; then
15804 CONFIG_OBS="$CONFIG_OBS machoread.o"
15805fi
15806
121ce6e5
DJ
15807# Add any host-specific objects to GDB.
15808CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15809
608e2dbb
TT
15810# If building on ELF, look for lzma support for embedded compressed debug info.
15811if test $gdb_cv_var_elf = yes; then
15812
15813# Check whether --with-lzma was given.
15814if test "${with_lzma+set}" = set; then :
15815 withval=$with_lzma;
15816else
15817 with_lzma=auto
15818fi
15819
15820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
15821$as_echo_n "checking whether to use lzma... " >&6; }
15822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
15823$as_echo "$with_lzma" >&6; }
15824
15825 if test "${with_lzma}" != no; then
15826
15827
15828
15829
15830
15831
15832
15833
15834 use_additional=yes
15835
15836 acl_save_prefix="$prefix"
15837 prefix="$acl_final_prefix"
15838 acl_save_exec_prefix="$exec_prefix"
15839 exec_prefix="$acl_final_exec_prefix"
15840
15841 eval additional_includedir=\"$includedir\"
15842 eval additional_libdir=\"$libdir\"
15843
15844 exec_prefix="$acl_save_exec_prefix"
15845 prefix="$acl_save_prefix"
15846
15847
15848# Check whether --with-liblzma-prefix was given.
15849if test "${with_liblzma_prefix+set}" = set; then :
15850 withval=$with_liblzma_prefix;
15851 if test "X$withval" = "Xno"; then
15852 use_additional=no
15853 else
15854 if test "X$withval" = "X"; then
15855
15856 acl_save_prefix="$prefix"
15857 prefix="$acl_final_prefix"
15858 acl_save_exec_prefix="$exec_prefix"
15859 exec_prefix="$acl_final_exec_prefix"
15860
15861 eval additional_includedir=\"$includedir\"
15862 eval additional_libdir=\"$libdir\"
15863
15864 exec_prefix="$acl_save_exec_prefix"
15865 prefix="$acl_save_prefix"
15866
15867 else
15868 additional_includedir="$withval/include"
15869 additional_libdir="$withval/lib"
15870 fi
15871 fi
15872
15873fi
15874
15875 LIBLZMA=
15876 LTLIBLZMA=
15877 INCLZMA=
15878 rpathdirs=
15879 ltrpathdirs=
15880 names_already_handled=
15881 names_next_round='lzma '
15882 while test -n "$names_next_round"; do
15883 names_this_round="$names_next_round"
15884 names_next_round=
15885 for name in $names_this_round; do
15886 already_handled=
15887 for n in $names_already_handled; do
15888 if test "$n" = "$name"; then
15889 already_handled=yes
15890 break
15891 fi
15892 done
15893 if test -z "$already_handled"; then
15894 names_already_handled="$names_already_handled $name"
15895 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
15896 eval value=\"\$HAVE_LIB$uppername\"
15897 if test -n "$value"; then
15898 if test "$value" = yes; then
15899 eval value=\"\$LIB$uppername\"
15900 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
15901 eval value=\"\$LTLIB$uppername\"
15902 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
15903 else
15904 :
15905 fi
15906 else
15907 found_dir=
15908 found_la=
15909 found_so=
15910 found_a=
15911 if test $use_additional = yes; then
15912 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
15913 found_dir="$additional_libdir"
15914 found_so="$additional_libdir/lib$name.$shlibext"
15915 if test -f "$additional_libdir/lib$name.la"; then
15916 found_la="$additional_libdir/lib$name.la"
15917 fi
15918 else
15919 if test -f "$additional_libdir/lib$name.$libext"; then
15920 found_dir="$additional_libdir"
15921 found_a="$additional_libdir/lib$name.$libext"
15922 if test -f "$additional_libdir/lib$name.la"; then
15923 found_la="$additional_libdir/lib$name.la"
15924 fi
15925 fi
15926 fi
15927 fi
15928 if test "X$found_dir" = "X"; then
15929 for x in $LDFLAGS $LTLIBLZMA; do
15930
15931 acl_save_prefix="$prefix"
15932 prefix="$acl_final_prefix"
15933 acl_save_exec_prefix="$exec_prefix"
15934 exec_prefix="$acl_final_exec_prefix"
15935 eval x=\"$x\"
15936 exec_prefix="$acl_save_exec_prefix"
15937 prefix="$acl_save_prefix"
15938
15939 case "$x" in
15940 -L*)
15941 dir=`echo "X$x" | sed -e 's/^X-L//'`
15942 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
15943 found_dir="$dir"
15944 found_so="$dir/lib$name.$shlibext"
15945 if test -f "$dir/lib$name.la"; then
15946 found_la="$dir/lib$name.la"
15947 fi
15948 else
15949 if test -f "$dir/lib$name.$libext"; then
15950 found_dir="$dir"
15951 found_a="$dir/lib$name.$libext"
15952 if test -f "$dir/lib$name.la"; then
15953 found_la="$dir/lib$name.la"
15954 fi
15955 fi
15956 fi
15957 ;;
15958 esac
15959 if test "X$found_dir" != "X"; then
15960 break
15961 fi
15962 done
15963 fi
15964 if test "X$found_dir" != "X"; then
15965 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
15966 if test "X$found_so" != "X"; then
15967 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
15968 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15969 else
15970 haveit=
15971 for x in $ltrpathdirs; do
15972 if test "X$x" = "X$found_dir"; then
15973 haveit=yes
15974 break
15975 fi
15976 done
15977 if test -z "$haveit"; then
15978 ltrpathdirs="$ltrpathdirs $found_dir"
15979 fi
15980 if test "$hardcode_direct" = yes; then
15981 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15982 else
15983 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
15984 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15985 haveit=
15986 for x in $rpathdirs; do
15987 if test "X$x" = "X$found_dir"; then
15988 haveit=yes
15989 break
15990 fi
15991 done
15992 if test -z "$haveit"; then
15993 rpathdirs="$rpathdirs $found_dir"
15994 fi
15995 else
15996 haveit=
15997 for x in $LDFLAGS $LIBLZMA; do
15998
15999 acl_save_prefix="$prefix"
16000 prefix="$acl_final_prefix"
16001 acl_save_exec_prefix="$exec_prefix"
16002 exec_prefix="$acl_final_exec_prefix"
16003 eval x=\"$x\"
16004 exec_prefix="$acl_save_exec_prefix"
16005 prefix="$acl_save_prefix"
16006
16007 if test "X$x" = "X-L$found_dir"; then
16008 haveit=yes
16009 break
16010 fi
16011 done
16012 if test -z "$haveit"; then
16013 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
16014 fi
16015 if test "$hardcode_minus_L" != no; then
16016 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16017 else
16018 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16019 fi
16020 fi
16021 fi
16022 fi
16023 else
16024 if test "X$found_a" != "X"; then
16025 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
16026 else
16027 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
16028 fi
16029 fi
16030 additional_includedir=
16031 case "$found_dir" in
16032 */lib | */lib/)
16033 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16034 additional_includedir="$basedir/include"
16035 ;;
16036 esac
16037 if test "X$additional_includedir" != "X"; then
16038 if test "X$additional_includedir" != "X/usr/include"; then
16039 haveit=
16040 if test "X$additional_includedir" = "X/usr/local/include"; then
16041 if test -n "$GCC"; then
16042 case $host_os in
16043 linux*) haveit=yes;;
16044 esac
16045 fi
16046 fi
16047 if test -z "$haveit"; then
16048 for x in $CPPFLAGS $INCLZMA; do
16049
16050 acl_save_prefix="$prefix"
16051 prefix="$acl_final_prefix"
16052 acl_save_exec_prefix="$exec_prefix"
16053 exec_prefix="$acl_final_exec_prefix"
16054 eval x=\"$x\"
16055 exec_prefix="$acl_save_exec_prefix"
16056 prefix="$acl_save_prefix"
16057
16058 if test "X$x" = "X-I$additional_includedir"; then
16059 haveit=yes
16060 break
16061 fi
16062 done
16063 if test -z "$haveit"; then
16064 if test -d "$additional_includedir"; then
16065 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
16066 fi
16067 fi
16068 fi
16069 fi
16070 fi
16071 if test -n "$found_la"; then
16072 save_libdir="$libdir"
16073 case "$found_la" in
16074 */* | *\\*) . "$found_la" ;;
16075 *) . "./$found_la" ;;
16076 esac
16077 libdir="$save_libdir"
16078 for dep in $dependency_libs; do
16079 case "$dep" in
16080 -L*)
16081 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16082 if test "X$additional_libdir" != "X/usr/lib"; then
16083 haveit=
16084 if test "X$additional_libdir" = "X/usr/local/lib"; then
16085 if test -n "$GCC"; then
16086 case $host_os in
16087 linux*) haveit=yes;;
16088 esac
16089 fi
16090 fi
16091 if test -z "$haveit"; then
16092 haveit=
16093 for x in $LDFLAGS $LIBLZMA; do
16094
16095 acl_save_prefix="$prefix"
16096 prefix="$acl_final_prefix"
16097 acl_save_exec_prefix="$exec_prefix"
16098 exec_prefix="$acl_final_exec_prefix"
16099 eval x=\"$x\"
16100 exec_prefix="$acl_save_exec_prefix"
16101 prefix="$acl_save_prefix"
16102
16103 if test "X$x" = "X-L$additional_libdir"; then
16104 haveit=yes
16105 break
16106 fi
16107 done
16108 if test -z "$haveit"; then
16109 if test -d "$additional_libdir"; then
16110 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
16111 fi
16112 fi
16113 haveit=
16114 for x in $LDFLAGS $LTLIBLZMA; do
16115
16116 acl_save_prefix="$prefix"
16117 prefix="$acl_final_prefix"
16118 acl_save_exec_prefix="$exec_prefix"
16119 exec_prefix="$acl_final_exec_prefix"
16120 eval x=\"$x\"
16121 exec_prefix="$acl_save_exec_prefix"
16122 prefix="$acl_save_prefix"
16123
16124 if test "X$x" = "X-L$additional_libdir"; then
16125 haveit=yes
16126 break
16127 fi
16128 done
16129 if test -z "$haveit"; then
16130 if test -d "$additional_libdir"; then
16131 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
16132 fi
16133 fi
16134 fi
16135 fi
16136 ;;
16137 -R*)
16138 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16139 if test "$enable_rpath" != no; then
16140 haveit=
16141 for x in $rpathdirs; do
16142 if test "X$x" = "X$dir"; then
16143 haveit=yes
16144 break
16145 fi
16146 done
16147 if test -z "$haveit"; then
16148 rpathdirs="$rpathdirs $dir"
16149 fi
16150 haveit=
16151 for x in $ltrpathdirs; do
16152 if test "X$x" = "X$dir"; then
16153 haveit=yes
16154 break
16155 fi
16156 done
16157 if test -z "$haveit"; then
16158 ltrpathdirs="$ltrpathdirs $dir"
16159 fi
16160 fi
16161 ;;
16162 -l*)
16163 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16164 ;;
16165 *.la)
16166 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16167 ;;
16168 *)
16169 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
16170 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
16171 ;;
16172 esac
16173 done
16174 fi
16175 else
16176 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16177 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
16178 fi
16179 fi
16180 fi
16181 done
16182 done
16183 if test "X$rpathdirs" != "X"; then
16184 if test -n "$hardcode_libdir_separator"; then
16185 alldirs=
16186 for found_dir in $rpathdirs; do
16187 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16188 done
16189 acl_save_libdir="$libdir"
16190 libdir="$alldirs"
16191 eval flag=\"$hardcode_libdir_flag_spec\"
16192 libdir="$acl_save_libdir"
16193 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16194 else
16195 for found_dir in $rpathdirs; do
16196 acl_save_libdir="$libdir"
16197 libdir="$found_dir"
16198 eval flag=\"$hardcode_libdir_flag_spec\"
16199 libdir="$acl_save_libdir"
16200 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16201 done
16202 fi
16203 fi
16204 if test "X$ltrpathdirs" != "X"; then
16205 for found_dir in $ltrpathdirs; do
16206 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
16207 done
16208 fi
16209
16210
16211 ac_save_CPPFLAGS="$CPPFLAGS"
16212
16213 for element in $INCLZMA; do
16214 haveit=
16215 for x in $CPPFLAGS; do
16216
16217 acl_save_prefix="$prefix"
16218 prefix="$acl_final_prefix"
16219 acl_save_exec_prefix="$exec_prefix"
16220 exec_prefix="$acl_final_exec_prefix"
16221 eval x=\"$x\"
16222 exec_prefix="$acl_save_exec_prefix"
16223 prefix="$acl_save_prefix"
16224
16225 if test "X$x" = "X$element"; then
16226 haveit=yes
16227 break
16228 fi
16229 done
16230 if test -z "$haveit"; then
16231 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16232 fi
16233 done
16234
16235
16236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
16237$as_echo_n "checking for liblzma... " >&6; }
d0ac1c44 16238if ${ac_cv_liblzma+:} false; then :
608e2dbb
TT
16239 $as_echo_n "(cached) " >&6
16240else
16241
16242 ac_save_LIBS="$LIBS"
16243 LIBS="$LIBS $LIBLZMA"
16244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16245/* end confdefs.h. */
16246#include "lzma.h"
16247int
16248main ()
16249{
16250lzma_index_iter iter;
16251 lzma_index_iter_init (&iter, 0);
16252 lzma_mf_is_supported (LZMA_MF_HC3);
16253 ;
16254 return 0;
16255}
16256_ACEOF
16257if ac_fn_c_try_link "$LINENO"; then :
16258 ac_cv_liblzma=yes
16259else
16260 ac_cv_liblzma=no
16261fi
16262rm -f core conftest.err conftest.$ac_objext \
16263 conftest$ac_exeext conftest.$ac_ext
16264 LIBS="$ac_save_LIBS"
16265
16266fi
16267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
16268$as_echo "$ac_cv_liblzma" >&6; }
16269 if test "$ac_cv_liblzma" = yes; then
16270 HAVE_LIBLZMA=yes
16271
16272$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
16273
16274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
16275$as_echo_n "checking how to link with liblzma... " >&6; }
16276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
16277$as_echo "$LIBLZMA" >&6; }
16278 else
16279 HAVE_LIBLZMA=no
16280 CPPFLAGS="$ac_save_CPPFLAGS"
16281 LIBLZMA=
16282 LTLIBLZMA=
16283 fi
16284
16285
16286
16287
16288
16289
16290 if test "$HAVE_LIBLZMA" != yes; then
16291 if test "$with_lzma" = yes; then
d0ac1c44 16292 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
608e2dbb
TT
16293 fi
16294 fi
16295 fi
16296fi
16297
3fc11d3e
JM
16298LIBGUI="../libgui/src/libgui.a"
16299GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
16300
16301
7a292a7a 16302
3fc11d3e
JM
16303WIN32LDAPP=
16304
16305
16306
d91670b9 16307case "${host}" in
686a5eed 16308*-*-cygwin* | *-*-mingw* )
d91670b9
CV
16309 configdir="win"
16310 ;;
16311*)
16312 configdir="unix"
16313 ;;
16314esac
3fc11d3e
JM
16315
16316GDBTKLIBS=
16317if test "${enable_gdbtk}" = "yes"; then
16318
d1c3b63a
KS
16319 # Gdbtk must have an absolute path to srcdir in order to run
16320 # properly when not installed.
16321 here=`pwd`
16322 cd ${srcdir}
16323 GDBTK_SRC_DIR=`pwd`
16324 cd $here
16325
bec39cab 16326
5062cc19
KS
16327 #
16328 # Ok, lets find the tcl configuration
16329 # First, look for one uninstalled.
16330 # the alternative search directory is invoked by --with-tcl
16331 #
3fc11d3e 16332
5062cc19
KS
16333 if test x"${no_tcl}" = x ; then
16334 # we reset no_tcl in case something fails here
16335 no_tcl=true
bec39cab 16336
81ecdfbb
RW
16337# Check whether --with-tcl was given.
16338if test "${with_tcl+set}" = set; then :
16339 withval=$with_tcl; with_tclconfig=${withval}
16340fi
16341
16342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
16343$as_echo_n "checking for Tcl configuration... " >&6; }
d0ac1c44 16344 if ${ac_cv_c_tclconfig+:} false; then :
81ecdfbb 16345 $as_echo_n "(cached) " >&6
3fc11d3e 16346else
bec39cab 16347
3fc11d3e 16348
5062cc19
KS
16349 # First check to see if --with-tcl was specified.
16350 case "${host}" in
16351 *-*-cygwin*) platDir="win" ;;
16352 *) platDir="unix" ;;
16353 esac
16354 if test x"${with_tclconfig}" != x ; then
16355 if test -f "${with_tclconfig}/tclConfig.sh" ; then
16356 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
16357 else
d0ac1c44 16358 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
16359 fi
16360 fi
16361
16362 # then check for a private Tcl installation
16363 if test x"${ac_cv_c_tclconfig}" = x ; then
16364 for i in \
16365 ../tcl \
16366 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16367 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
16368 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
16369 ../../tcl \
16370 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16371 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
16372 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
16373 ../../../tcl \
16374 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16375 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
16376 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
16377 if test -f "$i/$platDir/tclConfig.sh" ; then
16378 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16379 break
16380 fi
16381 done
16382 fi
16383
16384 # on Darwin, check in Framework installation locations
16385 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
16386 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16387 `ls -d /Library/Frameworks 2>/dev/null` \
16388 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16389 `ls -d /System/Library/Frameworks 2>/dev/null` \
16390 ; do
16391 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
16392 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
16393 break
16394 fi
16395 done
16396 fi
16397
16398 # check in a few common install locations
16399 if test x"${ac_cv_c_tclconfig}" = x ; then
16400 for i in `ls -d ${libdir} 2>/dev/null` \
16401 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16402 `ls -d ${prefix}/lib 2>/dev/null` \
16403 `ls -d /usr/local/lib 2>/dev/null` \
16404 `ls -d /usr/contrib/lib 2>/dev/null` \
16405 `ls -d /usr/lib 2>/dev/null` \
16406 ; do
16407 if test -f "$i/tclConfig.sh" ; then
16408 ac_cv_c_tclconfig=`(cd $i; pwd)`
16409 break
16410 fi
16411 done
16412 fi
3fc11d3e 16413
5062cc19
KS
16414 # check in a few other private locations
16415 if test x"${ac_cv_c_tclconfig}" = x ; then
16416 for i in \
16417 ${srcdir}/../tcl \
16418 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16419 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
16420 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
16421 if test -f "$i/$platDir/tclConfig.sh" ; then
16422 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16423 break
16424 fi
16425 done
16426 fi
bec39cab 16427
3fc11d3e
JM
16428fi
16429
5062cc19
KS
16430
16431 if test x"${ac_cv_c_tclconfig}" = x ; then
16432 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
16433 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
16434$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
16435 else
16436 no_tcl=
16437 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
16438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
16439$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
16440 fi
16441 fi
3fc11d3e 16442
bec39cab 16443
85541719
DE
16444 # If $no_tk is nonempty, then we can't do Tk, and there is no
16445 # point to doing Tcl.
bec39cab 16446
5062cc19
KS
16447 #
16448 # Ok, lets find the tk configuration
16449 # First, look for one uninstalled.
16450 # the alternative search directory is invoked by --with-tk
16451 #
3fc11d3e 16452
5062cc19
KS
16453 if test x"${no_tk}" = x ; then
16454 # we reset no_tk in case something fails here
16455 no_tk=true
bec39cab 16456
81ecdfbb
RW
16457# Check whether --with-tk was given.
16458if test "${with_tk+set}" = set; then :
16459 withval=$with_tk; with_tkconfig=${withval}
16460fi
16461
16462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
16463$as_echo_n "checking for Tk configuration... " >&6; }
d0ac1c44 16464 if ${ac_cv_c_tkconfig+:} false; then :
81ecdfbb 16465 $as_echo_n "(cached) " >&6
bec39cab 16466else
3fc11d3e
JM
16467
16468
5062cc19
KS
16469 # First check to see if --with-tkconfig was specified.
16470 if test x"${with_tkconfig}" != x ; then
16471 if test -f "${with_tkconfig}/tkConfig.sh" ; then
16472 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
16473 else
d0ac1c44 16474 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
16475 fi
16476 fi
3fc11d3e 16477
5062cc19
KS
16478 # then check for a private Tk library
16479 case "${host}" in
16480 *-*-cygwin*) platDir="win" ;;
16481 *) platDir="unix" ;;
16482 esac
16483 if test x"${ac_cv_c_tkconfig}" = x ; then
16484 for i in \
16485 ../tk \
16486 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16487 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
16488 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
16489 ../../tk \
16490 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16491 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
16492 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
16493 ../../../tk \
16494 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16495 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
16496 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
16497 if test -f "$i/$platDir/tkConfig.sh" ; then
16498 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16499 break
16500 fi
16501 done
16502 fi
16503
16504 # on Darwin, check in Framework installation locations
16505 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
16506 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16507 `ls -d /Library/Frameworks 2>/dev/null` \
16508 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16509 `ls -d /System/Library/Frameworks 2>/dev/null` \
16510 ; do
16511 if test -f "$i/Tk.framework/tkConfig.sh" ; then
16512 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
16513 break
16514 fi
16515 done
16516 fi
16517
16518 # check in a few common install locations
16519 if test x"${ac_cv_c_tkconfig}" = x ; then
16520 for i in `ls -d ${libdir} 2>/dev/null` \
16521 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16522 `ls -d ${prefix}/lib 2>/dev/null` \
16523 `ls -d /usr/local/lib 2>/dev/null` \
16524 `ls -d /usr/contrib/lib 2>/dev/null` \
16525 `ls -d /usr/lib 2>/dev/null` \
16526 ; do
16527 if test -f "$i/tkConfig.sh" ; then
16528 ac_cv_c_tkconfig=`(cd $i; pwd)`
16529 break
16530 fi
16531 done
16532 fi
16533 # check in a few other private locations
16534 if test x"${ac_cv_c_tkconfig}" = x ; then
16535 for i in \
16536 ${srcdir}/../tk \
16537 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16538 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
16539 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
16540 if test -f "$i/$platDir/tkConfig.sh" ; then
16541 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16542 break
16543 fi
16544 done
16545 fi
3fc11d3e 16546
3fc11d3e
JM
16547fi
16548
16549
5062cc19
KS
16550 if test x"${ac_cv_c_tkconfig}" = x ; then
16551 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
16552 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
16553$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
16554 else
16555 no_tk=
16556 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
16557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
16558$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 16559 fi
3fc11d3e 16560 fi
dd2504ab 16561
dd2504ab 16562
85541719
DE
16563 if test -z "${no_tcl}" -a -z "${no_tk}"; then
16564
81ecdfbb
RW
16565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
16566$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
16567
16568 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
16569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16570$as_echo "loading" >&6; }
85541719
DE
16571 . ${TCL_BIN_DIR}/tclConfig.sh
16572 else
81ecdfbb
RW
16573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
16574$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
16575 fi
16576
16577 # eval is required to do the TCL_DBGX substitution
16578 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
16579 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
16580
16581 # If the TCL_BIN_DIR is the build directory (not the install directory),
16582 # then set the common variable name to the value of the build variables.
16583 # For example, the variable TCL_LIB_SPEC will be set to the value
16584 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
16585 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
16586 # installed and uninstalled version of Tcl.
16587 if test -f "${TCL_BIN_DIR}/Makefile" ; then
16588 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
16589 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
16590 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
16591 elif test "`uname -s`" = "Darwin"; then
16592 # If Tcl was built as a framework, attempt to use the libraries
16593 # from the framework at the given location so that linking works
a68ffae9 16594 # against Tcl.framework installed in an arbitrary location.
85541719
DE
16595 case ${TCL_DEFS} in
16596 *TCL_FRAMEWORK*)
16597 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
16598 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
16599 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
16600 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
16601 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
16602 break
16603 fi
16604 done
16605 fi
16606 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
16607 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
16608 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
16609 fi
16610 ;;
16611 esac
16612 fi
16613
16614 # eval is required to do the TCL_DBGX substitution
16615 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
16616 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
16617 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
16618 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
16619
16620
16621
16622
16623
16624
16625
16626
16627
16628
16629
16630
16631
16632
16633
16634 # Check for in-tree tcl
16635 here=`pwd`
16636 cd ${srcdir}/..
16637 topdir=`pwd`
16638 cd ${here}
16639
16640 intree="no"
16641 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
16642 intree="yes"
16643 fi
16644
16645 # Find Tcl private headers
16646 if test x"${intree}" = xno; then
16647
81ecdfbb
RW
16648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
16649$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
16650 private_dir=""
16651 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
16652 if test -f ${dir}/tclInt.h ; then
16653 private_dir=${dir}
16654 fi
16655
16656 if test x"${private_dir}" = x; then
d0ac1c44 16657 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
85541719
DE
16658 else
16659 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16661$as_echo "${private_dir}" >&6; }
85541719
DE
16662 fi
16663
16664 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
16665 TCL_LIBRARY="${TCL_LIB_SPEC}"
16666 TCL_DEPS=""
16667 else
16668 # If building tcl in the same src tree, private headers
16669 # are not needed, but we need to be sure to use the right
16670 # headers library
16671 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
16672 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
16673 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
16674 fi
16675
16676
16677
16678
16679
81ecdfbb
RW
16680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
16681$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 16682
5062cc19 16683 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
16684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16685$as_echo "loading" >&6; }
5062cc19 16686 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 16687 else
81ecdfbb
RW
16688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
16689$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 16690 fi
bec39cab 16691
5062cc19
KS
16692 # eval is required to do the TK_DBGX substitution
16693 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
16694 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
16695
16696 # If the TK_BIN_DIR is the build directory (not the install directory),
16697 # then set the common variable name to the value of the build variables.
16698 # For example, the variable TK_LIB_SPEC will be set to the value
16699 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
16700 # instead of TK_BUILD_LIB_SPEC since it will work with both an
16701 # installed and uninstalled version of Tcl.
85541719 16702 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
16703 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
16704 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
16705 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
16706 elif test "`uname -s`" = "Darwin"; then
16707 # If Tk was built as a framework, attempt to use the libraries
16708 # from the framework at the given location so that linking works
a68ffae9 16709 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
16710 case ${TK_DEFS} in
16711 *TK_FRAMEWORK*)
85541719 16712 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
16713 for i in "`cd ${TK_BIN_DIR}; pwd`" \
16714 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
16715 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
16716 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
16717 break
16718 fi
16719 done
16720 fi
85541719 16721 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
16722 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
16723 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
16724 fi
16725 ;;
16726 esac
3fc11d3e
JM
16727 fi
16728
5062cc19
KS
16729 # eval is required to do the TK_DBGX substitution
16730 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
16731 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
16732 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
16733 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 16734
3fc11d3e
JM
16735
16736
bec39cab
AC
16737
16738
16739
16740
16741
16742
16743
3fc11d3e 16744
3fc11d3e 16745
bec39cab 16746
bec39cab 16747
85541719
DE
16748 # Check for in-tree Tk
16749 intree="no"
16750 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
16751 intree="yes"
16752 fi
3fc11d3e 16753
85541719
DE
16754 # Find Tk private headers
16755 if test x"${intree}" = xno; then
3fc11d3e 16756
81ecdfbb
RW
16757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
16758$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
16759 private_dir=""
16760 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
16761 if test -f ${dir}/tkInt.h; then
16762 private_dir=${dir}
3fc11d3e 16763 fi
bec39cab 16764
5062cc19 16765 if test x"${private_dir}" = x; then
d0ac1c44 16766 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
3fc11d3e 16767 else
5062cc19 16768 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16770$as_echo "${private_dir}" >&6; }
3fc11d3e 16771 fi
3fc11d3e 16772
85541719
DE
16773 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
16774 TK_LIBRARY=${TK_LIB_SPEC}
16775 TK_DEPS=""
16776 else
16777 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
16778 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
16779 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
16780 fi
3fc11d3e
JM
16781
16782
3fc11d3e
JM
16783
16784
3fc11d3e 16785
85541719 16786 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 16787
85541719
DE
16788 # Include some libraries that Tcl and Tk want.
16789 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
16790 # Yes, the ordering seems wrong here. But it isn't.
16791 # TK_LIBS is the list of libraries that need to be linked
16792 # after Tcl/Tk. Note that this isn't put into LIBS. If it
16793 # were in LIBS then any link tests after this point would
16794 # try to include things like `$(LIBGUI)', which wouldn't work.
16795 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 16796
85541719
DE
16797 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
16798 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
16799 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
16800 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
16801 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
16802 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
16803 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 16804
85541719
DE
16805 if test x$gdb_cv_os_cygwin = xyes; then
16806 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
16807 WIN32LDAPP="-Wl,--subsystem,console"
16808 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 16809 fi
ffc6a242 16810
81ecdfbb 16811 subdirs="$subdirs gdbtk"
3ace7edb 16812
85541719 16813 fi
3fc11d3e
JM
16814fi
16815
16816
16817
16818
16819
16820
16821
16822
81ecdfbb
RW
16823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
16824$as_echo_n "checking for X... " >&6; }
bec39cab 16825
c906108c 16826
81ecdfbb
RW
16827# Check whether --with-x was given.
16828if test "${with_x+set}" = set; then :
16829 withval=$with_x;
16830fi
c906108c
SS
16831
16832# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
16833if test "x$with_x" = xno; then
16834 # The user explicitly disabled X.
16835 have_x=disabled
16836else
81ecdfbb 16837 case $x_includes,$x_libraries in #(
d0ac1c44
SM
16838 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
16839 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
81ecdfbb 16840 $as_echo_n "(cached) " >&6
c906108c
SS
16841else
16842 # One or both of the vars are not set, and there is no cached value.
bec39cab 16843ac_x_includes=no ac_x_libraries=no
81ecdfbb 16844rm -f -r conftest.dir
bec39cab
AC
16845if mkdir conftest.dir; then
16846 cd conftest.dir
bec39cab 16847 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
16848incroot:
16849 @echo incroot='${INCROOT}'
16850usrlibdir:
16851 @echo usrlibdir='${USRLIBDIR}'
16852libdir:
16853 @echo libdir='${LIBDIR}'
16854_ACEOF
16855 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
d0ac1c44 16856 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
81ecdfbb
RW
16857 for ac_var in incroot usrlibdir libdir; do
16858 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
16859 done
c906108c 16860 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
16861 for ac_extension in a so sl dylib la dll; do
16862 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
16863 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 16864 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
16865 fi
16866 done
16867 # Screen out bogus values from the imake configuration. They are
16868 # bogus both because they are the default anyway, and because
16869 # using them would break gcc on systems where it needs fixed includes.
bec39cab 16870 case $ac_im_incroot in
81ecdfbb 16871 /usr/include) ac_x_includes= ;;
bec39cab 16872 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 16873 esac
bec39cab 16874 case $ac_im_usrlibdir in
81ecdfbb 16875 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 16876 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
16877 esac
16878 fi
16879 cd ..
81ecdfbb 16880 rm -f -r conftest.dir
c906108c
SS
16881fi
16882
bec39cab
AC
16883# Standard set of common directories for X headers.
16884# Check X11 before X11Rn because it is often a symlink to the current release.
16885ac_x_header_dirs='
16886/usr/X11/include
81ecdfbb 16887/usr/X11R7/include
bec39cab
AC
16888/usr/X11R6/include
16889/usr/X11R5/include
16890/usr/X11R4/include
16891
16892/usr/include/X11
81ecdfbb 16893/usr/include/X11R7
bec39cab
AC
16894/usr/include/X11R6
16895/usr/include/X11R5
16896/usr/include/X11R4
16897
16898/usr/local/X11/include
81ecdfbb 16899/usr/local/X11R7/include
bec39cab
AC
16900/usr/local/X11R6/include
16901/usr/local/X11R5/include
16902/usr/local/X11R4/include
16903
16904/usr/local/include/X11
81ecdfbb 16905/usr/local/include/X11R7
bec39cab
AC
16906/usr/local/include/X11R6
16907/usr/local/include/X11R5
16908/usr/local/include/X11R4
16909
16910/usr/X386/include
16911/usr/x386/include
16912/usr/XFree86/include/X11
16913
16914/usr/include
16915/usr/local/include
16916/usr/unsupported/include
16917/usr/athena/include
16918/usr/local/x11r5/include
16919/usr/lpp/Xamples/include
16920
16921/usr/openwin/include
16922/usr/openwin/share/include'
16923
16924if test "$ac_x_includes" = no; then
81ecdfbb 16925 # Guess where to find include files, by looking for Xlib.h.
c906108c 16926 # First, try using that file with no special directory specified.
81ecdfbb 16927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16928/* end confdefs.h. */
81ecdfbb 16929#include <X11/Xlib.h>
bec39cab 16930_ACEOF
81ecdfbb 16931if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
16932 # We can compile using X headers with no special include directory.
16933ac_x_includes=
16934else
bec39cab 16935 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 16936 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
16937 ac_x_includes=$ac_dir
16938 break
16939 fi
16940done
c906108c 16941fi
d0ac1c44 16942rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 16943fi # $ac_x_includes = no
c906108c 16944
bec39cab 16945if test "$ac_x_libraries" = no; then
c906108c 16946 # Check for the libraries.
c906108c
SS
16947 # See if we find them without any special options.
16948 # Don't add to $LIBS permanently.
bec39cab 16949 ac_save_LIBS=$LIBS
81ecdfbb
RW
16950 LIBS="-lX11 $LIBS"
16951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16952/* end confdefs.h. */
81ecdfbb 16953#include <X11/Xlib.h>
bec39cab
AC
16954int
16955main ()
16956{
81ecdfbb 16957XrmInitialize ()
bec39cab
AC
16958 ;
16959 return 0;
16960}
16961_ACEOF
81ecdfbb 16962if ac_fn_c_try_link "$LINENO"; then :
bec39cab 16963 LIBS=$ac_save_LIBS
c906108c
SS
16964# We can link X programs with no special library path.
16965ac_x_libraries=
16966else
81ecdfbb
RW
16967 LIBS=$ac_save_LIBS
16968for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 16969do
bec39cab 16970 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
16971 for ac_extension in a so sl dylib la dll; do
16972 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
16973 ac_x_libraries=$ac_dir
16974 break 2
16975 fi
16976 done
16977done
16978fi
81ecdfbb
RW
16979rm -f core conftest.err conftest.$ac_objext \
16980 conftest$ac_exeext conftest.$ac_ext
bec39cab 16981fi # $ac_x_libraries = no
c906108c 16982
81ecdfbb
RW
16983case $ac_x_includes,$ac_x_libraries in #(
16984 no,* | *,no | *\'*)
16985 # Didn't find X, or a directory has "'" in its name.
16986 ac_cv_have_x="have_x=no";; #(
16987 *)
16988 # Record where we found X for the cache.
16989 ac_cv_have_x="have_x=yes\
16990 ac_x_includes='$ac_x_includes'\
16991 ac_x_libraries='$ac_x_libraries'"
16992esac
c906108c 16993fi
81ecdfbb
RW
16994;; #(
16995 *) have_x=yes;;
16996 esac
c906108c
SS
16997 eval "$ac_cv_have_x"
16998fi # $with_x != no
16999
17000if test "$have_x" != yes; then
81ecdfbb
RW
17001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
17002$as_echo "$have_x" >&6; }
c906108c
SS
17003 no_x=yes
17004else
17005 # If each of the values was on the command line, it overrides each guess.
17006 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
17007 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
17008 # Update the cache value to reflect the command line values.
81ecdfbb
RW
17009 ac_cv_have_x="have_x=yes\
17010 ac_x_includes='$x_includes'\
17011 ac_x_libraries='$x_libraries'"
17012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
17013$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
17014fi
17015
17016
bec39cab 17017# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 17018# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
17019# This code just checks for a few cases where we'd like to ignore those
17020# definitions, even when they're present in the '.mt' file. These cases
17021# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 17022# not part of the source tree.
7a292a7a 17023#
81ecdfbb
RW
17024# Check whether --enable-sim was given.
17025if test "${enable_sim+set}" = set; then :
17026 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
17027 echo "enableval = ${enableval}";
17028 case "${enableval}" in
17029 yes) ignore_sim=false ;;
17030 no) ignore_sim=true ;;
17031 *) ignore_sim=false ;;
17032 esac
17033else
17034 ignore_sim=false
81ecdfbb
RW
17035fi
17036
7a292a7a
SS
17037
17038if test ! -d "${srcdir}/../sim"; then
17039 ignore_sim=true
17040fi
17041
9b624dbe
UW
17042SIM=
17043SIM_OBS=
17044if test "${ignore_sim}" = "false"; then
17045 if test x"${gdb_sim}" != x ; then
17046 SIM="${gdb_sim}"
17047 SIM_OBS="remote-sim.o"
60ca704f 17048
81ecdfbb 17049$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 17050
976102cd
PA
17051
17052 # Some tdep code should only be compiled in when the ppc sim is
17053 # built. PR sim/13418.
17054 case $target in
17055 powerpc*-*-*)
17056
17057$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
17058
17059 ;;
17060 esac
9b624dbe 17061 fi
7a292a7a
SS
17062fi
17063
17064
17065
c906108c
SS
17066
17067
17068
17069
17070
17071
dfcd3bfb 17072
e56ac5c3
AC
17073
17074
b3a90332
AC
17075
17076
c35f4ffc 17077# List of host floatformats.
bec39cab
AC
17078
17079cat >>confdefs.h <<_ACEOF
c35f4ffc 17080#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 17081_ACEOF
c35f4ffc 17082
bec39cab
AC
17083
17084cat >>confdefs.h <<_ACEOF
c35f4ffc 17085#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
17086_ACEOF
17087
c35f4ffc 17088
bec39cab 17089cat >>confdefs.h <<_ACEOF
c35f4ffc 17090#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 17091_ACEOF
c35f4ffc
AC
17092
17093
c906108c
SS
17094# target_subdir is used by the testsuite to find the target libraries.
17095target_subdir=
17096if test "${host}" != "${target}"; then
17097 target_subdir="${target_alias}/"
17098fi
17099
17100
21ea5acd 17101# Import nat definitions.
2b351b19 17102nat_makefile_frag=/dev/null
771b4502 17103if test "${gdb_native}" = "yes"; then
21ea5acd
SDJ
17104 . ${srcdir}/configure.nat
17105 nativefile=$NAT_FILE
c906108c 17106fi
c906108c 17107
c906108c
SS
17108
17109
17110
21ea5acd
SDJ
17111
17112
17113
17114
17115
c906108c
SS
17116
17117
b00a8037 17118if test x"${gdb_osabi}" != x ; then
bec39cab
AC
17119
17120cat >>confdefs.h <<_ACEOF
b00a8037 17121#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 17122_ACEOF
b00a8037
DJ
17123
17124fi
17125
8dcde887 17126# Enable multi-ice-gdb-server.
81ecdfbb
RW
17127# Check whether --enable-multi-ice was given.
17128if test "${enable_multi_ice+set}" = set; then :
17129 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
17130 yes | no)
17131 ;;
d0ac1c44 17132 *) as_fn_error $? "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 17133 esac
81ecdfbb 17134fi
b4e70030 17135
81ecdfbb
RW
17136if test "x$enable_multi_ice" = xyes; then
17137 subdirs="$subdirs multi-ice"
3ace7edb 17138
a85f51e7
DJ
17139fi
17140
496c0e1b
JB
17141# Check whether --enable-gdbserver was given.
17142if test "${enable_gdbserver+set}" = set; then :
17143 enableval=$enable_gdbserver; case "${enableval}" in
17144 yes| no|auto) ;;
d0ac1c44 17145 *) as_fn_error $? "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
496c0e1b
JB
17146esac
17147else
17148 enable_gdbserver=auto
17149fi
17150
17151
17152# We only build gdbserver automatically in a native configuration, and
17153# only if the user did not explicitly disable its build.
17154if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
17155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
17156$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 17157 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
17158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17159$as_echo "yes" >&6; }
17160 subdirs="$subdirs gdbserver"
3ace7edb 17161
496c0e1b 17162 gdbserver_build_enabled=yes
8dcde887 17163 else
81ecdfbb
RW
17164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17165$as_echo "no" >&6; }
8dcde887
MK
17166 fi
17167fi
17168
496c0e1b
JB
17169# If the user explicitly request the gdbserver to be built, verify that
17170# we were in fact able to enable it.
17171if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
d0ac1c44 17172 as_fn_error $? "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
496c0e1b
JB
17173fi
17174
393fd4c3
YQ
17175# Check for babeltrace and babeltrace-ctf
17176
17177# Check whether --with-babeltrace was given.
17178if test "${with_babeltrace+set}" = set; then :
17179 withval=$with_babeltrace;
17180else
17181 with_babeltrace=auto
17182fi
17183
17184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
17185$as_echo_n "checking whether to use babeltrace... " >&6; }
17186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
17187$as_echo "$with_babeltrace" >&6; }
17188
17189if test "x$with_babeltrace" = "xno"; then
17190 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
17191$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
17192else
17193 # Append -Werror to CFLAGS so that configure can catch the warning
17194 # "assignment from incompatible pointer type", which is related to
17195 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
17196 # in GDB, while babeltrace 1.0.3 is broken.
17197 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
17198 # safe to save and restore CFLAGS here.
17199 saved_CFLAGS=$CFLAGS
17200 CFLAGS="$CFLAGS -Werror"
17201
17202
17203
17204
17205
17206
17207
17208
17209 use_additional=yes
17210
17211 acl_save_prefix="$prefix"
17212 prefix="$acl_final_prefix"
17213 acl_save_exec_prefix="$exec_prefix"
17214 exec_prefix="$acl_final_exec_prefix"
17215
17216 eval additional_includedir=\"$includedir\"
17217 eval additional_libdir=\"$libdir\"
17218
17219 exec_prefix="$acl_save_exec_prefix"
17220 prefix="$acl_save_prefix"
17221
17222
17223# Check whether --with-libbabeltrace-prefix was given.
17224if test "${with_libbabeltrace_prefix+set}" = set; then :
17225 withval=$with_libbabeltrace_prefix;
17226 if test "X$withval" = "Xno"; then
17227 use_additional=no
17228 else
17229 if test "X$withval" = "X"; then
17230
17231 acl_save_prefix="$prefix"
17232 prefix="$acl_final_prefix"
17233 acl_save_exec_prefix="$exec_prefix"
17234 exec_prefix="$acl_final_exec_prefix"
17235
17236 eval additional_includedir=\"$includedir\"
17237 eval additional_libdir=\"$libdir\"
17238
17239 exec_prefix="$acl_save_exec_prefix"
17240 prefix="$acl_save_prefix"
17241
17242 else
17243 additional_includedir="$withval/include"
17244 additional_libdir="$withval/lib"
17245 fi
17246 fi
17247
17248fi
17249
17250 LIBBABELTRACE=
17251 LTLIBBABELTRACE=
17252 INCBABELTRACE=
17253 rpathdirs=
17254 ltrpathdirs=
17255 names_already_handled=
17256 names_next_round='babeltrace babeltrace-ctf'
17257 while test -n "$names_next_round"; do
17258 names_this_round="$names_next_round"
17259 names_next_round=
17260 for name in $names_this_round; do
17261 already_handled=
17262 for n in $names_already_handled; do
17263 if test "$n" = "$name"; then
17264 already_handled=yes
17265 break
17266 fi
17267 done
17268 if test -z "$already_handled"; then
17269 names_already_handled="$names_already_handled $name"
17270 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17271 eval value=\"\$HAVE_LIB$uppername\"
17272 if test -n "$value"; then
17273 if test "$value" = yes; then
17274 eval value=\"\$LIB$uppername\"
17275 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
17276 eval value=\"\$LTLIB$uppername\"
17277 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
17278 else
17279 :
17280 fi
17281 else
17282 found_dir=
17283 found_la=
17284 found_so=
17285 found_a=
17286 if test $use_additional = yes; then
17287 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
17288 found_dir="$additional_libdir"
17289 found_so="$additional_libdir/lib$name.$shlibext"
17290 if test -f "$additional_libdir/lib$name.la"; then
17291 found_la="$additional_libdir/lib$name.la"
17292 fi
17293 else
17294 if test -f "$additional_libdir/lib$name.$libext"; then
17295 found_dir="$additional_libdir"
17296 found_a="$additional_libdir/lib$name.$libext"
17297 if test -f "$additional_libdir/lib$name.la"; then
17298 found_la="$additional_libdir/lib$name.la"
17299 fi
17300 fi
17301 fi
17302 fi
17303 if test "X$found_dir" = "X"; then
17304 for x in $LDFLAGS $LTLIBBABELTRACE; 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 case "$x" in
17315 -L*)
17316 dir=`echo "X$x" | sed -e 's/^X-L//'`
17317 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
17318 found_dir="$dir"
17319 found_so="$dir/lib$name.$shlibext"
17320 if test -f "$dir/lib$name.la"; then
17321 found_la="$dir/lib$name.la"
17322 fi
17323 else
17324 if test -f "$dir/lib$name.$libext"; then
17325 found_dir="$dir"
17326 found_a="$dir/lib$name.$libext"
17327 if test -f "$dir/lib$name.la"; then
17328 found_la="$dir/lib$name.la"
17329 fi
17330 fi
17331 fi
17332 ;;
17333 esac
17334 if test "X$found_dir" != "X"; then
17335 break
17336 fi
17337 done
17338 fi
17339 if test "X$found_dir" != "X"; then
17340 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
17341 if test "X$found_so" != "X"; then
17342 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17343 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17344 else
17345 haveit=
17346 for x in $ltrpathdirs; do
17347 if test "X$x" = "X$found_dir"; then
17348 haveit=yes
17349 break
17350 fi
17351 done
17352 if test -z "$haveit"; then
17353 ltrpathdirs="$ltrpathdirs $found_dir"
17354 fi
17355 if test "$hardcode_direct" = yes; then
17356 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17357 else
17358 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17359 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17360 haveit=
17361 for x in $rpathdirs; do
17362 if test "X$x" = "X$found_dir"; then
17363 haveit=yes
17364 break
17365 fi
17366 done
17367 if test -z "$haveit"; then
17368 rpathdirs="$rpathdirs $found_dir"
17369 fi
17370 else
17371 haveit=
17372 for x in $LDFLAGS $LIBBABELTRACE; do
17373
17374 acl_save_prefix="$prefix"
17375 prefix="$acl_final_prefix"
17376 acl_save_exec_prefix="$exec_prefix"
17377 exec_prefix="$acl_final_exec_prefix"
17378 eval x=\"$x\"
17379 exec_prefix="$acl_save_exec_prefix"
17380 prefix="$acl_save_prefix"
17381
17382 if test "X$x" = "X-L$found_dir"; then
17383 haveit=yes
17384 break
17385 fi
17386 done
17387 if test -z "$haveit"; then
17388 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
17389 fi
17390 if test "$hardcode_minus_L" != no; then
17391 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17392 else
17393 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17394 fi
17395 fi
17396 fi
17397 fi
17398 else
17399 if test "X$found_a" != "X"; then
17400 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
17401 else
17402 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
17403 fi
17404 fi
17405 additional_includedir=
17406 case "$found_dir" in
17407 */lib | */lib/)
17408 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17409 additional_includedir="$basedir/include"
17410 ;;
17411 esac
17412 if test "X$additional_includedir" != "X"; then
17413 if test "X$additional_includedir" != "X/usr/include"; then
17414 haveit=
17415 if test "X$additional_includedir" = "X/usr/local/include"; then
17416 if test -n "$GCC"; then
17417 case $host_os in
17418 linux*) haveit=yes;;
17419 esac
17420 fi
17421 fi
17422 if test -z "$haveit"; then
17423 for x in $CPPFLAGS $INCBABELTRACE; do
17424
17425 acl_save_prefix="$prefix"
17426 prefix="$acl_final_prefix"
17427 acl_save_exec_prefix="$exec_prefix"
17428 exec_prefix="$acl_final_exec_prefix"
17429 eval x=\"$x\"
17430 exec_prefix="$acl_save_exec_prefix"
17431 prefix="$acl_save_prefix"
17432
17433 if test "X$x" = "X-I$additional_includedir"; then
17434 haveit=yes
17435 break
17436 fi
17437 done
17438 if test -z "$haveit"; then
17439 if test -d "$additional_includedir"; then
17440 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
17441 fi
17442 fi
17443 fi
17444 fi
17445 fi
17446 if test -n "$found_la"; then
17447 save_libdir="$libdir"
17448 case "$found_la" in
17449 */* | *\\*) . "$found_la" ;;
17450 *) . "./$found_la" ;;
17451 esac
17452 libdir="$save_libdir"
17453 for dep in $dependency_libs; do
17454 case "$dep" in
17455 -L*)
17456 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17457 if test "X$additional_libdir" != "X/usr/lib"; then
17458 haveit=
17459 if test "X$additional_libdir" = "X/usr/local/lib"; then
17460 if test -n "$GCC"; then
17461 case $host_os in
17462 linux*) haveit=yes;;
17463 esac
17464 fi
17465 fi
17466 if test -z "$haveit"; then
17467 haveit=
17468 for x in $LDFLAGS $LIBBABELTRACE; do
17469
17470 acl_save_prefix="$prefix"
17471 prefix="$acl_final_prefix"
17472 acl_save_exec_prefix="$exec_prefix"
17473 exec_prefix="$acl_final_exec_prefix"
17474 eval x=\"$x\"
17475 exec_prefix="$acl_save_exec_prefix"
17476 prefix="$acl_save_prefix"
17477
17478 if test "X$x" = "X-L$additional_libdir"; then
17479 haveit=yes
17480 break
17481 fi
17482 done
17483 if test -z "$haveit"; then
17484 if test -d "$additional_libdir"; then
17485 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
17486 fi
17487 fi
17488 haveit=
17489 for x in $LDFLAGS $LTLIBBABELTRACE; do
17490
17491 acl_save_prefix="$prefix"
17492 prefix="$acl_final_prefix"
17493 acl_save_exec_prefix="$exec_prefix"
17494 exec_prefix="$acl_final_exec_prefix"
17495 eval x=\"$x\"
17496 exec_prefix="$acl_save_exec_prefix"
17497 prefix="$acl_save_prefix"
17498
17499 if test "X$x" = "X-L$additional_libdir"; then
17500 haveit=yes
17501 break
17502 fi
17503 done
17504 if test -z "$haveit"; then
17505 if test -d "$additional_libdir"; then
17506 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
17507 fi
17508 fi
17509 fi
17510 fi
17511 ;;
17512 -R*)
17513 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17514 if test "$enable_rpath" != no; then
17515 haveit=
17516 for x in $rpathdirs; do
17517 if test "X$x" = "X$dir"; then
17518 haveit=yes
17519 break
17520 fi
17521 done
17522 if test -z "$haveit"; then
17523 rpathdirs="$rpathdirs $dir"
17524 fi
17525 haveit=
17526 for x in $ltrpathdirs; do
17527 if test "X$x" = "X$dir"; then
17528 haveit=yes
17529 break
17530 fi
17531 done
17532 if test -z "$haveit"; then
17533 ltrpathdirs="$ltrpathdirs $dir"
17534 fi
17535 fi
17536 ;;
17537 -l*)
17538 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17539 ;;
17540 *.la)
17541 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17542 ;;
17543 *)
17544 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
17545 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
17546 ;;
17547 esac
17548 done
17549 fi
17550 else
17551 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17552 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
17553 fi
17554 fi
17555 fi
17556 done
17557 done
17558 if test "X$rpathdirs" != "X"; then
17559 if test -n "$hardcode_libdir_separator"; then
17560 alldirs=
17561 for found_dir in $rpathdirs; do
17562 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17563 done
17564 acl_save_libdir="$libdir"
17565 libdir="$alldirs"
17566 eval flag=\"$hardcode_libdir_flag_spec\"
17567 libdir="$acl_save_libdir"
17568 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17569 else
17570 for found_dir in $rpathdirs; do
17571 acl_save_libdir="$libdir"
17572 libdir="$found_dir"
17573 eval flag=\"$hardcode_libdir_flag_spec\"
17574 libdir="$acl_save_libdir"
17575 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17576 done
17577 fi
17578 fi
17579 if test "X$ltrpathdirs" != "X"; then
17580 for found_dir in $ltrpathdirs; do
17581 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
17582 done
17583 fi
17584
17585
17586 ac_save_CPPFLAGS="$CPPFLAGS"
17587
17588 for element in $INCBABELTRACE; do
17589 haveit=
17590 for x in $CPPFLAGS; do
17591
17592 acl_save_prefix="$prefix"
17593 prefix="$acl_final_prefix"
17594 acl_save_exec_prefix="$exec_prefix"
17595 exec_prefix="$acl_final_exec_prefix"
17596 eval x=\"$x\"
17597 exec_prefix="$acl_save_exec_prefix"
17598 prefix="$acl_save_prefix"
17599
17600 if test "X$x" = "X$element"; then
17601 haveit=yes
17602 break
17603 fi
17604 done
17605 if test -z "$haveit"; then
17606 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17607 fi
17608 done
17609
17610
17611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
17612$as_echo_n "checking for libbabeltrace... " >&6; }
d0ac1c44 17613if ${ac_cv_libbabeltrace+:} false; then :
393fd4c3
YQ
17614 $as_echo_n "(cached) " >&6
17615else
17616
17617 ac_save_LIBS="$LIBS"
17618 LIBS="$LIBS $LIBBABELTRACE"
17619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17620/* end confdefs.h. */
17621#include <babeltrace/babeltrace.h>
17622 #include <babeltrace/ctf/events.h>
17623 #include <babeltrace/ctf/iterator.h>
17624int
17625main ()
17626{
17627struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
17628 struct bt_ctf_event *event = NULL;
17629 const struct bt_definition *scope;
17630
13cdc2af 17631 pos->type = BT_SEEK_BEGIN;
65c749e7 17632 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
17633 scope = bt_ctf_get_top_level_scope (event,
17634 BT_STREAM_EVENT_HEADER);
17635 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
17636
17637 ;
17638 return 0;
17639}
17640_ACEOF
17641if ac_fn_c_try_link "$LINENO"; then :
17642 ac_cv_libbabeltrace=yes
17643else
17644 ac_cv_libbabeltrace=no
17645fi
17646rm -f core conftest.err conftest.$ac_objext \
17647 conftest$ac_exeext conftest.$ac_ext
17648 LIBS="$ac_save_LIBS"
17649
17650fi
17651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
17652$as_echo "$ac_cv_libbabeltrace" >&6; }
17653 if test "$ac_cv_libbabeltrace" = yes; then
17654 HAVE_LIBBABELTRACE=yes
17655
17656$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
17657
17658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
17659$as_echo_n "checking how to link with libbabeltrace... " >&6; }
17660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
17661$as_echo "$LIBBABELTRACE" >&6; }
17662 else
17663 HAVE_LIBBABELTRACE=no
17664 CPPFLAGS="$ac_save_CPPFLAGS"
17665 LIBBABELTRACE=
17666 LTLIBBABELTRACE=
17667 fi
17668
17669
17670
17671
17672
17673
17674 CFLAGS=$saved_CFLAGS
17675
17676 if test "$HAVE_LIBBABELTRACE" != yes; then
17677 if test "$with_babeltrace" = yes; then
d0ac1c44 17678 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
393fd4c3
YQ
17679 else
17680 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
17681$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
17682 fi
17683 fi
17684fi
17685
21ea5acd
SDJ
17686# If nativefile (NAT_FILE) is not set in configure.nat, we link to an
17687# empty version.
c906108c
SS
17688
17689files=
17690links=
5a2402b8 17691
c906108c
SS
17692rm -f nm.h
17693if test "${nativefile}" != ""; then
0f475e27
AC
17694 case "${nativefile}" in
17695 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
17696 * ) GDB_NM_FILE="${nativefile}"
17697 esac
5a2402b8
AC
17698 files="${files} ${GDB_NM_FILE}"
17699 links="${links} nm.h"
60ca704f
SE
17700
17701cat >>confdefs.h <<_ACEOF
b78960be 17702#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 17703_ACEOF
5a2402b8 17704
c906108c 17705fi
5a2402b8
AC
17706
17707
e3487908
GKB
17708for ac_prog in xsltproc
17709do
17710 # Extract the first word of "$ac_prog", so it can be a program name with args.
17711set dummy $ac_prog; ac_word=$2
17712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17713$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 17714if ${ac_cv_path_XSLTPROC+:} false; then :
e3487908
GKB
17715 $as_echo_n "(cached) " >&6
17716else
17717 case $XSLTPROC in
17718 [\\/]* | ?:[\\/]*)
17719 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
17720 ;;
17721 *)
17722 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17723for as_dir in $PATH
17724do
17725 IFS=$as_save_IFS
17726 test -z "$as_dir" && as_dir=.
17727 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 17728 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e3487908
GKB
17729 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
17730 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17731 break 2
17732 fi
17733done
17734 done
17735IFS=$as_save_IFS
17736
17737 ;;
17738esac
17739fi
17740XSLTPROC=$ac_cv_path_XSLTPROC
17741if test -n "$XSLTPROC"; then
17742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
17743$as_echo "$XSLTPROC" >&6; }
17744else
17745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17746$as_echo "no" >&6; }
17747fi
17748
17749
17750 test -n "$XSLTPROC" && break
17751done
17752test -n "$XSLTPROC" || XSLTPROC="missing"
17753
17754if test "x$USE_MAINTAINER_MODE" = xyes; then
17755 if test "${XSLTPROC}" = missing; then
d0ac1c44 17756 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
e3487908
GKB
17757 fi
17758fi
17759
17760
bec39cab
AC
17761ac_sources="$files"
17762ac_dests="$links"
17763while test -n "$ac_sources"; do
17764 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
17765 set $ac_sources; ac_source=$1; shift; ac_sources=$*
17766 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
17767done
81ecdfbb 17768ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
17769
17770
c906108c
SS
17771
17772
c906108c 17773
81ecdfbb 17774$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 17775
bec39cab 17776
dcd1f979
TT
17777if $development; then
17778
17779$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
17780
b5884fa7 17781 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS) common/selftest.o selftest-arch.o"
1e5ded6c 17782 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS) common/selftest.c selftest-arch.c"
dcd1f979
TT
17783fi
17784
b292c783 17785
f6a88844
JM
17786 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17787 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
17788 if test "x$GDB_TRANSFORM_NAME" = x; then
17789 GDB_TRANSFORM_NAME=gdb
17790 fi
17791
17792
17793
17794 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17795 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
17796 if test "x$GCORE_TRANSFORM_NAME" = x; then
17797 GCORE_TRANSFORM_NAME=gcore
17798 fi
17799
b292c783
JK
17800
17801ac_config_files="$ac_config_files gcore"
17802
141ec9f6 17803ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
81ecdfbb 17804
89a34d1b 17805
bec39cab
AC
17806cat >confcache <<\_ACEOF
17807# This file is a shell script that caches the results of configure
17808# tests run on this system so they can be shared between configure
17809# scripts and configure runs, see configure's option --config-cache.
17810# It is not useful on other systems. If it contains results you don't
17811# want to keep, you may remove or edit it.
17812#
17813# config.status only pays attention to the cache file if you give it
17814# the --recheck option to rerun configure.
17815#
17816# `ac_cv_env_foo' variables (set or unset) will be overridden when
17817# loading this file, other *unset* `ac_cv_foo' will be assigned the
17818# following values.
17819
17820_ACEOF
17821
17822# The following way of writing the cache mishandles newlines in values,
17823# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 17824# So, we kill variables containing newlines.
bec39cab
AC
17825# Ultrix sh set writes to stderr and can't be redirected directly,
17826# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
17827(
17828 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17829 eval ac_val=\$$ac_var
17830 case $ac_val in #(
17831 *${as_nl}*)
17832 case $ac_var in #(
17833 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17834$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
17835 esac
17836 case $ac_var in #(
17837 _ | IFS | as_nl) ;; #(
17838 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17839 *) { eval $ac_var=; unset $ac_var;} ;;
17840 esac ;;
17841 esac
17842 done
17843
bec39cab 17844 (set) 2>&1 |
81ecdfbb
RW
17845 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17846 *${as_nl}ac_space=\ *)
17847 # `set' does not quote correctly, so add quotes: double-quote
17848 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
17849 sed -n \
17850 "s/'/'\\\\''/g;
17851 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 17852 ;; #(
bec39cab
AC
17853 *)
17854 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 17855 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 17856 ;;
81ecdfbb
RW
17857 esac |
17858 sort
17859) |
bec39cab 17860 sed '
81ecdfbb 17861 /^ac_cv_env_/b end
bec39cab 17862 t clear
81ecdfbb 17863 :clear
bec39cab
AC
17864 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17865 t end
81ecdfbb
RW
17866 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17867 :end' >>confcache
17868if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17869 if test -w "$cache_file"; then
d0ac1c44 17870 if test "x$cache_file" != "x/dev/null"; then
81ecdfbb
RW
17871 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17872$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
17873 if test ! -f "$cache_file" || test -h "$cache_file"; then
17874 cat confcache >"$cache_file"
17875 else
17876 case $cache_file in #(
17877 */* | ?:*)
17878 mv -f confcache "$cache_file"$$ &&
17879 mv -f "$cache_file"$$ "$cache_file" ;; #(
17880 *)
17881 mv -f confcache "$cache_file" ;;
17882 esac
17883 fi
17884 fi
bec39cab 17885 else
81ecdfbb
RW
17886 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17887$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
17888 fi
17889fi
17890rm -f confcache
17891
17892test "x$prefix" = xNONE && prefix=$ac_default_prefix
17893# Let make expand exec_prefix.
17894test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17895
bec39cab
AC
17896DEFS=-DHAVE_CONFIG_H
17897
17898ac_libobjs=
17899ac_ltlibobjs=
d0ac1c44 17900U=
bec39cab
AC
17901for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17902 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
17903 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
17904 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
17905 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17906 # will be set to the directory where LIBOBJS objects are built.
17907 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17908 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
17909done
17910LIBOBJS=$ac_libobjs
17911
17912LTLIBOBJS=$ac_ltlibobjs
17913
17914
85981d60 17915if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 17916 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
81ecdfbb 17917Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 17918fi
4df42755 17919if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
d0ac1c44 17920 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
4df42755
DE
17921Usually this means the macro was only invoked conditionally." "$LINENO" 5
17922fi
17923if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
d0ac1c44 17924 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
4df42755
DE
17925Usually this means the macro was only invoked conditionally." "$LINENO" 5
17926fi
81ecdfbb
RW
17927
17928
d0ac1c44 17929: "${CONFIG_STATUS=./config.status}"
81ecdfbb 17930ac_write_fail=0
bec39cab
AC
17931ac_clean_files_save=$ac_clean_files
17932ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
17933{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17934$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17935as_write_fail=0
17936cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
17937#! $SHELL
17938# Generated by $as_me.
17939# Run this file to recreate the current configuration.
17940# Compiler output produced by configure, useful for debugging
17941# configure, is in config.log if it exists.
17942
17943debug=false
17944ac_cs_recheck=false
17945ac_cs_silent=false
bec39cab 17946
81ecdfbb
RW
17947SHELL=\${CONFIG_SHELL-$SHELL}
17948export SHELL
17949_ASEOF
17950cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17951## -------------------- ##
17952## M4sh Initialization. ##
17953## -------------------- ##
17954
17955# Be more Bourne compatible
17956DUALCASE=1; export DUALCASE # for MKS sh
17957if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
17958 emulate sh
17959 NULLCMD=:
81ecdfbb 17960 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
17961 # is contrary to our usage. Disable this feature.
17962 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
17963 setopt NO_GLOB_SUBST
17964else
17965 case `(set -o) 2>/dev/null` in #(
17966 *posix*) :
17967 set -o posix ;; #(
17968 *) :
17969 ;;
17970esac
bec39cab 17971fi
bec39cab 17972
81ecdfbb
RW
17973
17974as_nl='
17975'
17976export as_nl
17977# Printing a long string crashes Solaris 7 /usr/bin/printf.
17978as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17979as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17980as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17981# Prefer a ksh shell builtin over an external printf program on Solaris,
17982# but without wasting forks for bash or zsh.
17983if test -z "$BASH_VERSION$ZSH_VERSION" \
17984 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17985 as_echo='print -r --'
17986 as_echo_n='print -rn --'
17987elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17988 as_echo='printf %s\n'
17989 as_echo_n='printf %s'
17990else
17991 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17992 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17993 as_echo_n='/usr/ucb/echo -n'
17994 else
17995 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17996 as_echo_n_body='eval
17997 arg=$1;
17998 case $arg in #(
17999 *"$as_nl"*)
18000 expr "X$arg" : "X\\(.*\\)$as_nl";
18001 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
18002 esac;
18003 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
18004 '
18005 export as_echo_n_body
18006 as_echo_n='sh -c $as_echo_n_body as_echo'
18007 fi
18008 export as_echo_body
18009 as_echo='sh -c $as_echo_body as_echo'
18010fi
18011
18012# The user is always right.
18013if test "${PATH_SEPARATOR+set}" != set; then
18014 PATH_SEPARATOR=:
18015 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
18016 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
18017 PATH_SEPARATOR=';'
18018 }
bec39cab
AC
18019fi
18020
18021
81ecdfbb
RW
18022# IFS
18023# We need space, tab and new line, in precisely that order. Quoting is
18024# there to prevent editors from complaining about space-tab.
18025# (If _AS_PATH_WALK were called with IFS unset, it would disable word
18026# splitting by setting IFS to empty value.)
18027IFS=" "" $as_nl"
18028
18029# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 18030as_myself=
81ecdfbb
RW
18031case $0 in #((
18032 *[\\/]* ) as_myself=$0 ;;
18033 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18034for as_dir in $PATH
18035do
18036 IFS=$as_save_IFS
18037 test -z "$as_dir" && as_dir=.
18038 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18039 done
18040IFS=$as_save_IFS
18041
18042 ;;
18043esac
18044# We did not find ourselves, most probably we were run as `sh COMMAND'
18045# in which case we are not to be found in the path.
18046if test "x$as_myself" = x; then
18047 as_myself=$0
18048fi
18049if test ! -f "$as_myself"; then
18050 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
18051 exit 1
18052fi
18053
18054# Unset variables that we do not need and which cause bugs (e.g. in
18055# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
18056# suppresses any "Segmentation fault" message there. '((' could
18057# trigger a bug in pdksh 5.2.14.
18058for as_var in BASH_ENV ENV MAIL MAILPATH
18059do eval test x\${$as_var+set} = xset \
18060 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
18061done
bec39cab
AC
18062PS1='$ '
18063PS2='> '
18064PS4='+ '
18065
18066# NLS nuisances.
81ecdfbb
RW
18067LC_ALL=C
18068export LC_ALL
18069LANGUAGE=C
18070export LANGUAGE
18071
18072# CDPATH.
18073(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
18074
18075
d0ac1c44
SM
18076# as_fn_error STATUS ERROR [LINENO LOG_FD]
18077# ----------------------------------------
81ecdfbb
RW
18078# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
18079# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 18080# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
18081as_fn_error ()
18082{
d0ac1c44
SM
18083 as_status=$1; test $as_status -eq 0 && as_status=1
18084 if test "$4"; then
18085 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18086 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 18087 fi
d0ac1c44 18088 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
18089 as_fn_exit $as_status
18090} # as_fn_error
18091
18092
18093# as_fn_set_status STATUS
18094# -----------------------
18095# Set $? to STATUS, without forking.
18096as_fn_set_status ()
18097{
18098 return $1
18099} # as_fn_set_status
18100
18101# as_fn_exit STATUS
18102# -----------------
18103# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
18104as_fn_exit ()
18105{
18106 set +e
18107 as_fn_set_status $1
18108 exit $1
18109} # as_fn_exit
18110
18111# as_fn_unset VAR
18112# ---------------
18113# Portably unset VAR.
18114as_fn_unset ()
18115{
18116 { eval $1=; unset $1;}
18117}
18118as_unset=as_fn_unset
18119# as_fn_append VAR VALUE
18120# ----------------------
18121# Append the text in VALUE to the end of the definition contained in VAR. Take
18122# advantage of any shell optimizations that allow amortized linear growth over
18123# repeated appends, instead of the typical quadratic growth present in naive
18124# implementations.
18125if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
18126 eval 'as_fn_append ()
18127 {
18128 eval $1+=\$2
18129 }'
18130else
18131 as_fn_append ()
18132 {
18133 eval $1=\$$1\$2
18134 }
18135fi # as_fn_append
18136
18137# as_fn_arith ARG...
18138# ------------------
18139# Perform arithmetic evaluation on the ARGs, and store the result in the
18140# global $as_val. Take advantage of shells that can avoid forks. The arguments
18141# must be portable across $(()) and expr.
18142if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
18143 eval 'as_fn_arith ()
18144 {
18145 as_val=$(( $* ))
18146 }'
18147else
18148 as_fn_arith ()
18149 {
18150 as_val=`expr "$@" || test $? -eq 1`
18151 }
18152fi # as_fn_arith
bec39cab 18153
81ecdfbb
RW
18154
18155if expr a : '\(a\)' >/dev/null 2>&1 &&
18156 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
18157 as_expr=expr
18158else
18159 as_expr=false
18160fi
18161
81ecdfbb 18162if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
18163 as_basename=basename
18164else
18165 as_basename=false
18166fi
18167
81ecdfbb
RW
18168if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18169 as_dirname=dirname
18170else
18171 as_dirname=false
18172fi
bec39cab 18173
81ecdfbb 18174as_me=`$as_basename -- "$0" ||
bec39cab
AC
18175$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18176 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
18177 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
18178$as_echo X/"$0" |
18179 sed '/^.*\/\([^/][^/]*\)\/*$/{
18180 s//\1/
18181 q
18182 }
18183 /^X\/\(\/\/\)$/{
18184 s//\1/
18185 q
18186 }
18187 /^X\/\(\/\).*/{
18188 s//\1/
18189 q
18190 }
18191 s/.*/./; q'`
b4e70030 18192
b4e70030
JB
18193# Avoid depending upon Character Ranges.
18194as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18195as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18196as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18197as_cr_digits='0123456789'
18198as_cr_alnum=$as_cr_Letters$as_cr_digits
18199
81ecdfbb
RW
18200ECHO_C= ECHO_N= ECHO_T=
18201case `echo -n x` in #(((((
18202-n*)
18203 case `echo 'xy\c'` in
18204 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
18205 xy) ECHO_C='\c';;
18206 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18207 ECHO_T=' ';;
18208 esac;;
18209*)
18210 ECHO_N='-n';;
bec39cab
AC
18211esac
18212
81ecdfbb
RW
18213rm -f conf$$ conf$$.exe conf$$.file
18214if test -d conf$$.dir; then
18215 rm -f conf$$.dir/conf$$.file
bec39cab 18216else
81ecdfbb
RW
18217 rm -f conf$$.dir
18218 mkdir conf$$.dir 2>/dev/null
bec39cab 18219fi
81ecdfbb
RW
18220if (echo >conf$$.file) 2>/dev/null; then
18221 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 18222 as_ln_s='ln -s'
81ecdfbb
RW
18223 # ... but there are two gotchas:
18224 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18225 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 18226 # In both cases, we have to default to `cp -pR'.
81ecdfbb 18227 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 18228 as_ln_s='cp -pR'
81ecdfbb
RW
18229 elif ln conf$$.file conf$$ 2>/dev/null; then
18230 as_ln_s=ln
18231 else
d0ac1c44 18232 as_ln_s='cp -pR'
b4e70030 18233 fi
bec39cab 18234else
d0ac1c44 18235 as_ln_s='cp -pR'
bec39cab 18236fi
81ecdfbb
RW
18237rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18238rmdir conf$$.dir 2>/dev/null
18239
18240
18241# as_fn_mkdir_p
18242# -------------
18243# Create "$as_dir" as a directory, including parents if necessary.
18244as_fn_mkdir_p ()
18245{
18246
18247 case $as_dir in #(
18248 -*) as_dir=./$as_dir;;
18249 esac
18250 test -d "$as_dir" || eval $as_mkdir_p || {
18251 as_dirs=
18252 while :; do
18253 case $as_dir in #(
18254 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18255 *) as_qdir=$as_dir;;
18256 esac
18257 as_dirs="'$as_qdir' $as_dirs"
18258 as_dir=`$as_dirname -- "$as_dir" ||
18259$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18260 X"$as_dir" : 'X\(//\)[^/]' \| \
18261 X"$as_dir" : 'X\(//\)$' \| \
18262 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18263$as_echo X"$as_dir" |
18264 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18265 s//\1/
18266 q
18267 }
18268 /^X\(\/\/\)[^/].*/{
18269 s//\1/
18270 q
18271 }
18272 /^X\(\/\/\)$/{
18273 s//\1/
18274 q
18275 }
18276 /^X\(\/\).*/{
18277 s//\1/
18278 q
18279 }
18280 s/.*/./; q'`
18281 test -d "$as_dir" && break
18282 done
18283 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 18284 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb 18285
bec39cab 18286
81ecdfbb 18287} # as_fn_mkdir_p
bec39cab 18288if mkdir -p . 2>/dev/null; then
81ecdfbb 18289 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
18290else
18291 test -d ./-p && rmdir ./-p
18292 as_mkdir_p=false
18293fi
18294
d0ac1c44
SM
18295
18296# as_fn_executable_p FILE
18297# -----------------------
18298# Test if FILE is an executable regular file.
18299as_fn_executable_p ()
18300{
18301 test -f "$1" && test -x "$1"
18302} # as_fn_executable_p
18303as_test_x='test -x'
18304as_executable_p=as_fn_executable_p
bec39cab
AC
18305
18306# Sed expression to map a string onto a valid CPP name.
18307as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
18308
18309# Sed expression to map a string onto a valid variable name.
18310as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
18311
18312
bec39cab 18313exec 6>&1
81ecdfbb
RW
18314## ----------------------------------- ##
18315## Main body of $CONFIG_STATUS script. ##
18316## ----------------------------------- ##
18317_ASEOF
18318test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
18319
18320cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18321# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 18322# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
18323# values after options handling.
18324ac_log="
bec39cab 18325This file was extended by $as_me, which was
d0ac1c44 18326generated by GNU Autoconf 2.69. Invocation command line was
bec39cab
AC
18327
18328 CONFIG_FILES = $CONFIG_FILES
18329 CONFIG_HEADERS = $CONFIG_HEADERS
18330 CONFIG_LINKS = $CONFIG_LINKS
18331 CONFIG_COMMANDS = $CONFIG_COMMANDS
18332 $ $0 $@
18333
81ecdfbb
RW
18334on `(hostname || uname -n) 2>/dev/null | sed 1q`
18335"
18336
bec39cab
AC
18337_ACEOF
18338
81ecdfbb
RW
18339case $ac_config_files in *"
18340"*) set x $ac_config_files; shift; ac_config_files=$*;;
18341esac
234b45d4 18342
81ecdfbb
RW
18343case $ac_config_headers in *"
18344"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18345esac
b4e70030 18346
b4e70030 18347
81ecdfbb
RW
18348cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18349# Files that config.status was made for.
18350config_files="$ac_config_files"
18351config_headers="$ac_config_headers"
18352config_links="$ac_config_links"
18353config_commands="$ac_config_commands"
234b45d4 18354
81ecdfbb 18355_ACEOF
b4e70030 18356
81ecdfbb 18357cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 18358ac_cs_usage="\
81ecdfbb
RW
18359\`$as_me' instantiates files and other configuration actions
18360from templates according to the current configuration. Unless the files
18361and actions are specified as TAGs, all are instantiated by default.
234b45d4 18362
81ecdfbb 18363Usage: $0 [OPTION]... [TAG]...
234b45d4 18364
bec39cab 18365 -h, --help print this help, then exit
81ecdfbb 18366 -V, --version print version number and configuration settings, then exit
d0ac1c44 18367 --config print configuration, then exit
81ecdfbb
RW
18368 -q, --quiet, --silent
18369 do not print progress messages
bec39cab
AC
18370 -d, --debug don't remove temporary files
18371 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
18372 --file=FILE[:TEMPLATE]
18373 instantiate the configuration file FILE
18374 --header=FILE[:TEMPLATE]
18375 instantiate the configuration header FILE
234b45d4 18376
bec39cab
AC
18377Configuration files:
18378$config_files
234b45d4 18379
bec39cab
AC
18380Configuration headers:
18381$config_headers
234b45d4 18382
bec39cab
AC
18383Configuration links:
18384$config_links
234b45d4 18385
bec39cab
AC
18386Configuration commands:
18387$config_commands
18388
81ecdfbb 18389Report bugs to the package provider."
b4e70030 18390
81ecdfbb
RW
18391_ACEOF
18392cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 18393ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
bec39cab
AC
18394ac_cs_version="\\
18395config.status
d0ac1c44
SM
18396configured by $0, generated by GNU Autoconf 2.69,
18397 with options \\"\$ac_cs_config\\"
bec39cab 18398
d0ac1c44 18399Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
18400This config.status script is free software; the Free Software Foundation
18401gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
18402
18403ac_pwd='$ac_pwd'
18404srcdir='$srcdir'
18405INSTALL='$INSTALL'
81ecdfbb
RW
18406AWK='$AWK'
18407test -n "\$AWK" || AWK=awk
bec39cab
AC
18408_ACEOF
18409
81ecdfbb
RW
18410cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18411# The default lists apply if the user does not specify any file.
bec39cab
AC
18412ac_need_defaults=:
18413while test $# != 0
18414do
18415 case $1 in
d0ac1c44 18416 --*=?*)
81ecdfbb
RW
18417 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18418 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 18419 ac_shift=:
c906108c 18420 ;;
d0ac1c44
SM
18421 --*=)
18422 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18423 ac_optarg=
18424 ac_shift=:
18425 ;;
81ecdfbb 18426 *)
bec39cab
AC
18427 ac_option=$1
18428 ac_optarg=$2
18429 ac_shift=shift
c906108c 18430 ;;
bec39cab 18431 esac
c906108c 18432
bec39cab
AC
18433 case $ac_option in
18434 # Handling of the options.
bec39cab
AC
18435 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18436 ac_cs_recheck=: ;;
81ecdfbb
RW
18437 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
18438 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
18439 --config | --confi | --conf | --con | --co | --c )
18440 $as_echo "$ac_cs_config"; exit ;;
81ecdfbb 18441 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
18442 debug=: ;;
18443 --file | --fil | --fi | --f )
18444 $ac_shift
81ecdfbb
RW
18445 case $ac_optarg in
18446 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 18447 '') as_fn_error $? "missing file argument" ;;
81ecdfbb
RW
18448 esac
18449 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
18450 ac_need_defaults=false;;
18451 --header | --heade | --head | --hea )
18452 $ac_shift
81ecdfbb
RW
18453 case $ac_optarg in
18454 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18455 esac
18456 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 18457 ac_need_defaults=false;;
81ecdfbb
RW
18458 --he | --h)
18459 # Conflict between --help and --header
d0ac1c44 18460 as_fn_error $? "ambiguous option: \`$1'
81ecdfbb
RW
18461Try \`$0 --help' for more information.";;
18462 --help | --hel | -h )
18463 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
18464 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18465 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18466 ac_cs_silent=: ;;
c906108c 18467
bec39cab 18468 # This is an error.
d0ac1c44 18469 -*) as_fn_error $? "unrecognized option: \`$1'
81ecdfbb 18470Try \`$0 --help' for more information." ;;
c906108c 18471
81ecdfbb
RW
18472 *) as_fn_append ac_config_targets " $1"
18473 ac_need_defaults=false ;;
c906108c 18474
bec39cab
AC
18475 esac
18476 shift
18477done
c906108c 18478
bec39cab 18479ac_configure_extra_args=
c906108c 18480
bec39cab
AC
18481if $ac_cs_silent; then
18482 exec 6>/dev/null
18483 ac_configure_extra_args="$ac_configure_extra_args --silent"
18484fi
c906108c 18485
bec39cab 18486_ACEOF
81ecdfbb 18487cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 18488if \$ac_cs_recheck; then
d0ac1c44 18489 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
81ecdfbb
RW
18490 shift
18491 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18492 CONFIG_SHELL='$SHELL'
18493 export CONFIG_SHELL
18494 exec "\$@"
bec39cab
AC
18495fi
18496
18497_ACEOF
81ecdfbb
RW
18498cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18499exec 5>>config.log
18500{
18501 echo
18502 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18503## Running $as_me. ##
18504_ASBOX
18505 $as_echo "$ac_log"
18506} >&5
bec39cab 18507
81ecdfbb
RW
18508_ACEOF
18509cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 18510#
81ecdfbb 18511# INIT-COMMANDS
c906108c 18512#
a417dc56 18513ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 18514
bec39cab
AC
18515_ACEOF
18516
81ecdfbb 18517cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 18518
81ecdfbb 18519# Handling of arguments.
bec39cab 18520for ac_config_target in $ac_config_targets
c906108c 18521do
81ecdfbb
RW
18522 case $ac_config_target in
18523 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
18524 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 18525 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 18526 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 18527 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 18528 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 18529 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
141ec9f6 18530 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
5ae98d25 18531 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 18532 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb 18533
d0ac1c44 18534 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
18535 esac
18536done
18537
81ecdfbb 18538
bec39cab
AC
18539# If the user did not use the arguments to specify the items to instantiate,
18540# then the envvar interface is used. Set only those that are not.
18541# We use the long form for the default assignment because of an extremely
18542# bizarre bug on SunOS 4.1.3.
18543if $ac_need_defaults; then
18544 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18545 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18546 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
18547 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18548fi
18549
b4e70030 18550# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 18551# simply because there is no reason against having it here, and in addition,
b4e70030 18552# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
18553# Hook for its removal unless debugging.
18554# Note that there is a small window in which the directory will not be cleaned:
18555# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
18556$debug ||
18557{
d0ac1c44 18558 tmp= ac_tmp=
81ecdfbb 18559 trap 'exit_status=$?
d0ac1c44
SM
18560 : "${ac_tmp:=$tmp}"
18561 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
81ecdfbb
RW
18562' 0
18563 trap 'as_fn_exit 1' 1 2 13 15
18564}
18565# Create a (secure) tmp directory for tmp files.
18566
18567{
18568 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 18569 test -d "$tmp"
81ecdfbb
RW
18570} ||
18571{
18572 tmp=./conf$$-$RANDOM
18573 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
18574} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
18575ac_tmp=$tmp
81ecdfbb
RW
18576
18577# Set up the scripts for CONFIG_FILES section.
18578# No need to generate them if there are no CONFIG_FILES.
18579# This happens for instance with `./config.status config.h'.
18580if test -n "$CONFIG_FILES"; then
18581
18582if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
18583 ac_cs_awk_getline=:
18584 ac_cs_awk_pipe_init=
18585 ac_cs_awk_read_file='
18586 while ((getline aline < (F[key])) > 0)
18587 print(aline)
18588 close(F[key])'
18589 ac_cs_awk_pipe_fini=
18590else
18591 ac_cs_awk_getline=false
18592 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
18593 ac_cs_awk_read_file='
18594 print "|#_!!_#|"
18595 print "cat " F[key] " &&"
18596 '$ac_cs_awk_pipe_init
18597 # The final `:' finishes the AND list.
18598 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
18599fi
18600ac_cr=`echo X | tr X '\015'`
18601# On cygwin, bash can eat \r inside `` if the user requested igncr.
18602# But we know of no other shell where ac_cr would be empty at this
18603# point, so we can use a bashism as a fallback.
18604if test "x$ac_cr" = x; then
18605 eval ac_cr=\$\'\\r\'
18606fi
18607ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18608if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 18609 ac_cs_awk_cr='\\r'
81ecdfbb
RW
18610else
18611 ac_cs_awk_cr=$ac_cr
18612fi
18613
d0ac1c44 18614echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
81ecdfbb
RW
18615_ACEOF
18616
18617# Create commands to substitute file output variables.
18618{
18619 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
d0ac1c44 18620 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
81ecdfbb
RW
18621 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
18622 echo "_ACAWK" &&
18623 echo "_ACEOF"
18624} >conf$$files.sh &&
18625. ./conf$$files.sh ||
d0ac1c44 18626 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
18627rm -f conf$$files.sh
18628
18629{
18630 echo "cat >conf$$subs.awk <<_ACEOF" &&
18631 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18632 echo "_ACEOF"
18633} >conf$$subs.sh ||
d0ac1c44
SM
18634 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18635ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
81ecdfbb
RW
18636ac_delim='%!_!# '
18637for ac_last_try in false false false false false :; do
18638 . ./conf$$subs.sh ||
d0ac1c44 18639 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
18640
18641 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18642 if test $ac_delim_n = $ac_delim_num; then
18643 break
18644 elif $ac_last_try; then
d0ac1c44 18645 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
18646 else
18647 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18648 fi
18649done
18650rm -f conf$$subs.sh
18651
18652cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 18653cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
81ecdfbb
RW
18654_ACEOF
18655sed -n '
18656h
18657s/^/S["/; s/!.*/"]=/
18658p
18659g
18660s/^[^!]*!//
18661:repl
18662t repl
18663s/'"$ac_delim"'$//
18664t delim
18665:nl
18666h
d0ac1c44 18667s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
18668t more1
18669s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18670p
18671n
18672b repl
18673:more1
18674s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18675p
18676g
18677s/.\{148\}//
18678t nl
18679:delim
18680h
d0ac1c44 18681s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
18682t more2
18683s/["\\]/\\&/g; s/^/"/; s/$/"/
18684p
18685b
18686:more2
18687s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18688p
18689g
18690s/.\{148\}//
18691t delim
18692' <conf$$subs.awk | sed '
18693/^[^""]/{
18694 N
18695 s/\n//
18696}
18697' >>$CONFIG_STATUS || ac_write_fail=1
18698rm -f conf$$subs.awk
18699cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18700_ACAWK
d0ac1c44 18701cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
81ecdfbb
RW
18702 for (key in S) S_is_set[key] = 1
18703 FS = "\a"
18704 \$ac_cs_awk_pipe_init
18705}
18706{
18707 line = $ 0
18708 nfields = split(line, field, "@")
18709 substed = 0
18710 len = length(field[1])
18711 for (i = 2; i < nfields; i++) {
18712 key = field[i]
18713 keylen = length(key)
18714 if (S_is_set[key]) {
18715 value = S[key]
18716 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18717 len += length(value) + length(field[++i])
18718 substed = 1
18719 } else
18720 len += 1 + keylen
18721 }
18722 if (nfields == 3 && !substed) {
18723 key = field[2]
18724 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
18725 \$ac_cs_awk_read_file
18726 next
18727 }
18728 }
18729 print line
b4e70030 18730}
81ecdfbb
RW
18731\$ac_cs_awk_pipe_fini
18732_ACAWK
18733_ACEOF
18734cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18735if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18736 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18737else
18738 cat
d0ac1c44
SM
18739fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
18740 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
81ecdfbb
RW
18741_ACEOF
18742
d0ac1c44
SM
18743# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18744# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
81ecdfbb
RW
18745# trailing colons and then remove the whole line if VPATH becomes empty
18746# (actually we leave an empty line to preserve line numbers).
18747if test "x$srcdir" = x.; then
d0ac1c44
SM
18748 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18749h
18750s///
18751s/^/:/
18752s/[ ]*$/:/
18753s/:\$(srcdir):/:/g
18754s/:\${srcdir}:/:/g
18755s/:@srcdir@:/:/g
18756s/^:*//
81ecdfbb 18757s/:*$//
d0ac1c44
SM
18758x
18759s/\(=[ ]*\).*/\1/
18760G
18761s/\n//
81ecdfbb
RW
18762s/^[^=]*=[ ]*$//
18763}'
18764fi
18765
18766cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18767fi # test -n "$CONFIG_FILES"
18768
18769# Set up the scripts for CONFIG_HEADERS section.
18770# No need to generate them if there are no CONFIG_HEADERS.
18771# This happens for instance with `./config.status Makefile'.
18772if test -n "$CONFIG_HEADERS"; then
d0ac1c44 18773cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
81ecdfbb
RW
18774BEGIN {
18775_ACEOF
18776
18777# Transform confdefs.h into an awk script `defines.awk', embedded as
18778# here-document in config.status, that substitutes the proper values into
18779# config.h.in to produce config.h.
4e8d927d 18780
81ecdfbb
RW
18781# Create a delimiter string that does not exist in confdefs.h, to ease
18782# handling of long lines.
18783ac_delim='%!_!# '
18784for ac_last_try in false false :; do
d0ac1c44
SM
18785 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18786 if test -z "$ac_tt"; then
81ecdfbb
RW
18787 break
18788 elif $ac_last_try; then
d0ac1c44 18789 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
81ecdfbb
RW
18790 else
18791 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18792 fi
18793done
4e8d927d 18794
81ecdfbb
RW
18795# For the awk script, D is an array of macro values keyed by name,
18796# likewise P contains macro parameters if any. Preserve backslash
18797# newline sequences.
18798
18799ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18800sed -n '
18801s/.\{148\}/&'"$ac_delim"'/g
18802t rset
18803:rset
18804s/^[ ]*#[ ]*define[ ][ ]*/ /
18805t def
18806d
18807:def
18808s/\\$//
18809t bsnl
18810s/["\\]/\\&/g
18811s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18812D["\1"]=" \3"/p
18813s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18814d
18815:bsnl
18816s/["\\]/\\&/g
18817s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18818D["\1"]=" \3\\\\\\n"\\/p
18819t cont
18820s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18821t cont
18822d
18823:cont
18824n
18825s/.\{148\}/&'"$ac_delim"'/g
18826t clear
18827:clear
18828s/\\$//
18829t bsnlc
18830s/["\\]/\\&/g; s/^/"/; s/$/"/p
18831d
18832:bsnlc
18833s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18834b cont
18835' <confdefs.h | sed '
18836s/'"$ac_delim"'/"\\\
18837"/g' >>$CONFIG_STATUS || ac_write_fail=1
18838
18839cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18840 for (key in D) D_is_set[key] = 1
18841 FS = "\a"
18842}
18843/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18844 line = \$ 0
18845 split(line, arg, " ")
18846 if (arg[1] == "#") {
18847 defundef = arg[2]
18848 mac1 = arg[3]
18849 } else {
18850 defundef = substr(arg[1], 2)
18851 mac1 = arg[2]
18852 }
18853 split(mac1, mac2, "(") #)
18854 macro = mac2[1]
18855 prefix = substr(line, 1, index(line, defundef) - 1)
18856 if (D_is_set[macro]) {
18857 # Preserve the white space surrounding the "#".
18858 print prefix "define", macro P[macro] D[macro]
18859 next
18860 } else {
18861 # Replace #undef with comments. This is necessary, for example,
18862 # in the case of _POSIX_SOURCE, which is predefined and required
18863 # on some systems where configure will not decide to define it.
18864 if (defundef == "undef") {
18865 print "/*", prefix defundef, macro, "*/"
18866 next
18867 }
18868 }
b4e70030 18869}
81ecdfbb
RW
18870{ print }
18871_ACAWK
b4e70030 18872_ACEOF
81ecdfbb 18873cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 18874 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
81ecdfbb 18875fi # test -n "$CONFIG_HEADERS"
4e8d927d 18876
4e8d927d 18877
81ecdfbb
RW
18878eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
18879shift
18880for ac_tag
18881do
18882 case $ac_tag in
18883 :[FHLC]) ac_mode=$ac_tag; continue;;
18884 esac
18885 case $ac_mode$ac_tag in
18886 :[FHL]*:*);;
d0ac1c44 18887 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
81ecdfbb
RW
18888 :[FH]-) ac_tag=-:-;;
18889 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18890 esac
18891 ac_save_IFS=$IFS
18892 IFS=:
18893 set x $ac_tag
18894 IFS=$ac_save_IFS
18895 shift
18896 ac_file=$1
18897 shift
4e8d927d 18898
81ecdfbb
RW
18899 case $ac_mode in
18900 :L) ac_source=$1;;
18901 :[FH])
18902 ac_file_inputs=
18903 for ac_f
18904 do
18905 case $ac_f in
d0ac1c44 18906 -) ac_f="$ac_tmp/stdin";;
81ecdfbb
RW
18907 *) # Look for the file first in the build tree, then in the source tree
18908 # (if the path is not absolute). The absolute path cannot be DOS-style,
18909 # because $ac_f cannot contain `:'.
18910 test -f "$ac_f" ||
18911 case $ac_f in
18912 [\\/$]*) false;;
18913 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18914 esac ||
d0ac1c44 18915 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
81ecdfbb
RW
18916 esac
18917 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18918 as_fn_append ac_file_inputs " '$ac_f'"
18919 done
18920
18921 # Let's still pretend it is `configure' which instantiates (i.e., don't
18922 # use $as_me), people would be surprised to read:
18923 # /* config.h. Generated by config.status. */
18924 configure_input='Generated from '`
18925 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18926 `' by configure.'
18927 if test x"$ac_file" != x-; then
18928 configure_input="$ac_file. $configure_input"
18929 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18930$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 18931 fi
81ecdfbb
RW
18932 # Neutralize special characters interpreted by sed in replacement strings.
18933 case $configure_input in #(
18934 *\&* | *\|* | *\\* )
18935 ac_sed_conf_input=`$as_echo "$configure_input" |
18936 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18937 *) ac_sed_conf_input=$configure_input;;
18938 esac
4e8d927d 18939
81ecdfbb 18940 case $ac_tag in
d0ac1c44
SM
18941 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18942 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
81ecdfbb
RW
18943 esac
18944 ;;
c906108c
SS
18945 esac
18946
81ecdfbb 18947 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
18948$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18949 X"$ac_file" : 'X\(//\)[^/]' \| \
18950 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
18951 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
18952$as_echo X"$ac_file" |
18953 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18954 s//\1/
18955 q
18956 }
18957 /^X\(\/\/\)[^/].*/{
18958 s//\1/
18959 q
18960 }
18961 /^X\(\/\/\)$/{
18962 s//\1/
18963 q
18964 }
18965 /^X\(\/\).*/{
18966 s//\1/
18967 q
18968 }
18969 s/.*/./; q'`
18970 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
18971 ac_builddir=.
18972
81ecdfbb
RW
18973case "$ac_dir" in
18974.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18975*)
18976 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18977 # A ".." for each directory in $ac_dir_suffix.
18978 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18979 case $ac_top_builddir_sub in
18980 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18981 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18982 esac ;;
18983esac
18984ac_abs_top_builddir=$ac_pwd
18985ac_abs_builddir=$ac_pwd$ac_dir_suffix
18986# for backward compatibility:
18987ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
18988
18989case $srcdir in
81ecdfbb 18990 .) # We are building in place.
bec39cab 18991 ac_srcdir=.
81ecdfbb
RW
18992 ac_top_srcdir=$ac_top_builddir_sub
18993 ac_abs_top_srcdir=$ac_pwd ;;
18994 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 18995 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
18996 ac_top_srcdir=$srcdir
18997 ac_abs_top_srcdir=$srcdir ;;
18998 *) # Relative name.
18999 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19000 ac_top_srcdir=$ac_top_build_prefix$srcdir
19001 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 19002esac
81ecdfbb 19003ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 19004
c906108c 19005
81ecdfbb
RW
19006 case $ac_mode in
19007 :F)
19008 #
19009 # CONFIG_FILE
19010 #
c906108c 19011
bec39cab
AC
19012 case $INSTALL in
19013 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 19014 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 19015 esac
81ecdfbb 19016_ACEOF
121ce6e5 19017
81ecdfbb
RW
19018cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19019# If the template does not know about datarootdir, expand it.
19020# FIXME: This hack should be removed a few years after 2.60.
19021ac_datarootdir_hack=; ac_datarootdir_seen=
19022ac_sed_dataroot='
19023/datarootdir/ {
19024 p
19025 q
19026}
19027/@datadir@/p
19028/@docdir@/p
19029/@infodir@/p
19030/@localedir@/p
19031/@mandir@/p'
19032case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
19033*datarootdir*) ac_datarootdir_seen=yes;;
19034*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
19035 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
19036$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
19037_ACEOF
19038cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19039 ac_datarootdir_hack='
19040 s&@datadir@&$datadir&g
19041 s&@docdir@&$docdir&g
19042 s&@infodir@&$infodir&g
19043 s&@localedir@&$localedir&g
19044 s&@mandir@&$mandir&g
19045 s&\\\${datarootdir}&$datarootdir&g' ;;
19046esac
4e8d927d 19047_ACEOF
81ecdfbb
RW
19048
19049# Neutralize VPATH when `$srcdir' = `.'.
19050# Shell code in configure.ac might set extrasub.
19051# FIXME: do we really want to maintain this feature?
19052cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19053ac_sed_extra="$ac_vpsub
bec39cab
AC
19054$extrasub
19055_ACEOF
81ecdfbb 19056cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
19057:t
19058/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
19059s|@configure_input@|$ac_sed_conf_input|;t t
19060s&@top_builddir@&$ac_top_builddir_sub&;t t
19061s&@top_build_prefix@&$ac_top_build_prefix&;t t
19062s&@srcdir@&$ac_srcdir&;t t
19063s&@abs_srcdir@&$ac_abs_srcdir&;t t
19064s&@top_srcdir@&$ac_top_srcdir&;t t
19065s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
19066s&@builddir@&$ac_builddir&;t t
19067s&@abs_builddir@&$ac_abs_builddir&;t t
19068s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
19069s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
19070$ac_datarootdir_hack
19071"
19072eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
19073if $ac_cs_awk_getline; then
d0ac1c44 19074 $AWK -f "$ac_tmp/subs.awk"
81ecdfbb 19075else
d0ac1c44
SM
19076 $AWK -f "$ac_tmp/subs.awk" | $SHELL
19077fi \
19078 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
19079
19080test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
19081 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
19082 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
19083 "$ac_tmp/out"`; test -z "$ac_out"; } &&
81ecdfbb 19084 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 19085which seems to be undefined. Please make sure it is defined" >&5
81ecdfbb 19086$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 19087which seems to be undefined. Please make sure it is defined" >&2;}
81ecdfbb 19088
d0ac1c44 19089 rm -f "$ac_tmp/stdin"
bec39cab 19090 case $ac_file in
d0ac1c44
SM
19091 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
19092 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
81ecdfbb 19093 esac \
d0ac1c44 19094 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
19095 ;;
19096 :H)
19097 #
19098 # CONFIG_HEADER
19099 #
bec39cab 19100 if test x"$ac_file" != x-; then
81ecdfbb
RW
19101 {
19102 $as_echo "/* $configure_input */" \
d0ac1c44
SM
19103 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
19104 } >"$ac_tmp/config.h" \
19105 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19106 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
81ecdfbb
RW
19107 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
19108$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 19109 else
81ecdfbb 19110 rm -f "$ac_file"
d0ac1c44
SM
19111 mv "$ac_tmp/config.h" "$ac_file" \
19112 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
bec39cab
AC
19113 fi
19114 else
81ecdfbb 19115 $as_echo "/* $configure_input */" \
d0ac1c44
SM
19116 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
19117 || as_fn_error $? "could not create -" "$LINENO" 5
bec39cab 19118 fi
81ecdfbb
RW
19119 ;;
19120 :L)
19121 #
19122 # CONFIG_LINK
19123 #
c906108c 19124
81ecdfbb
RW
19125 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
19126 :
b4e70030 19127 else
81ecdfbb
RW
19128 # Prefer the file from the source tree if names are identical.
19129 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
19130 ac_source=$srcdir/$ac_source
19131 fi
b4e70030 19132
81ecdfbb
RW
19133 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
19134$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 19135
81ecdfbb 19136 if test ! -r "$ac_source"; then
d0ac1c44 19137 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
81ecdfbb
RW
19138 fi
19139 rm -f "$ac_file"
bec39cab 19140
81ecdfbb 19141 # Try a relative symlink, then a hard link, then a copy.
d0ac1c44 19142 case $ac_source in
81ecdfbb
RW
19143 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
19144 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
19145 esac
19146 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
19147 ln "$ac_source" "$ac_file" 2>/dev/null ||
19148 cp -p "$ac_source" "$ac_file" ||
d0ac1c44 19149 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
81ecdfbb
RW
19150 fi
19151 ;;
19152 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
19153$as_echo "$as_me: executing $ac_file commands" >&6;}
19154 ;;
c906108c 19155 esac
b4e70030 19156
bec39cab 19157
81ecdfbb
RW
19158 case $ac_file$ac_mode in
19159 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 19160 "gcore":F) chmod +x gcore ;;
1e94266c
SM
19161 "Makefile":F)
19162case x$CONFIG_HEADERS in
19163xconfig.h:config.in)
19164echo > stamp-h ;;
19165esac
19166 ;;
19167 "gdb-gdb.gdb":F)
19168case x$CONFIG_HEADERS in
19169xconfig.h:config.in)
19170echo > stamp-h ;;
141ec9f6
SM
19171esac
19172 ;;
19173 "gdb-gdb.py":F)
19174case x$CONFIG_HEADERS in
19175xconfig.h:config.in)
19176echo > stamp-h ;;
1e94266c
SM
19177esac
19178 ;;
19179 "doc/Makefile":F)
19180case x$CONFIG_HEADERS in
19181xconfig.h:config.in)
19182echo > stamp-h ;;
19183esac
19184 ;;
19185 "data-directory/Makefile":F)
c906108c
SS
19186case x$CONFIG_HEADERS in
19187xconfig.h:config.in)
19188echo > stamp-h ;;
19189esac
bec39cab 19190 ;;
81ecdfbb 19191
bec39cab 19192 esac
81ecdfbb 19193done # for ac_tag
c906108c 19194
bec39cab 19195
81ecdfbb 19196as_fn_exit 0
bec39cab 19197_ACEOF
bec39cab
AC
19198ac_clean_files=$ac_clean_files_save
19199
81ecdfbb 19200test $ac_write_fail = 0 ||
d0ac1c44 19201 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
81ecdfbb 19202
bec39cab
AC
19203
19204# configure is writing to config.log, and then calls config.status.
19205# config.status does its own redirection, appending to config.log.
19206# Unfortunately, on DOS this fails, as config.log is still kept open
19207# by configure, so config.status won't be able to write to it; its
19208# output is simply discarded. So we exec the FD to /dev/null,
19209# effectively closing config.log, so it can be properly (re)opened and
19210# appended to by config.status. When coming back to configure, we
19211# need to make the FD available again.
19212if test "$no_create" != yes; then
19213 ac_cs_success=:
19214 ac_config_status_args=
19215 test "$silent" = yes &&
19216 ac_config_status_args="$ac_config_status_args --quiet"
19217 exec 5>/dev/null
19218 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
19219 exec 5>>config.log
19220 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19221 # would make configure fail if this is the last instruction.
d0ac1c44 19222 $ac_cs_success || as_fn_exit 1
bec39cab 19223fi
c906108c 19224
bec39cab 19225#
81ecdfbb 19226# CONFIG_SUBDIRS section.
bec39cab 19227#
c906108c
SS
19228if test "$no_recursion" != yes; then
19229
81ecdfbb
RW
19230 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
19231 # so they do not pile up.
c906108c
SS
19232 ac_sub_configure_args=
19233 ac_prev=
fdc59709
PB
19234 eval "set x $ac_configure_args"
19235 shift
19236 for ac_arg
19237 do
c906108c
SS
19238 if test -n "$ac_prev"; then
19239 ac_prev=
19240 continue
19241 fi
bec39cab 19242 case $ac_arg in
c906108c
SS
19243 -cache-file | --cache-file | --cache-fil | --cache-fi \
19244 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
19245 ac_prev=cache_file ;;
19246 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
19247 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
19248 | --c=*)
19249 ;;
19250 --config-cache | -C)
c906108c
SS
19251 ;;
19252 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
19253 ac_prev=srcdir ;;
19254 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
19255 ;;
bec39cab
AC
19256 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
19257 ac_prev=prefix ;;
19258 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
19259 ;;
81ecdfbb
RW
19260 --disable-option-checking)
19261 ;;
fdc59709
PB
19262 *)
19263 case $ac_arg in
81ecdfbb 19264 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 19265 esac
81ecdfbb 19266 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
19267 esac
19268 done
19269
bec39cab
AC
19270 # Always prepend --prefix to ensure using the same prefix
19271 # in subdir configurations.
fdc59709
PB
19272 ac_arg="--prefix=$prefix"
19273 case $ac_arg in
81ecdfbb 19274 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 19275 esac
81ecdfbb
RW
19276 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
19277
19278 # Pass --silent
19279 if test "$silent" = yes; then
19280 ac_sub_configure_args="--silent $ac_sub_configure_args"
19281 fi
19282
19283 # Always prepend --disable-option-checking to silence warnings, since
19284 # different subdirs can have different --enable and --with options.
19285 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 19286
b4e70030 19287 ac_popdir=`pwd`
bec39cab 19288 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
19289
19290 # Do not complain, so a configure script can configure whichever
19291 # parts of a large source tree are present.
fdc59709 19292 test -d "$srcdir/$ac_dir" || continue
c906108c 19293
81ecdfbb
RW
19294 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
19295 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
19296 $as_echo "$ac_msg" >&6
19297 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
19298 ac_builddir=.
19299
81ecdfbb
RW
19300case "$ac_dir" in
19301.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19302*)
19303 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19304 # A ".." for each directory in $ac_dir_suffix.
19305 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19306 case $ac_top_builddir_sub in
19307 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19308 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19309 esac ;;
19310esac
19311ac_abs_top_builddir=$ac_pwd
19312ac_abs_builddir=$ac_pwd$ac_dir_suffix
19313# for backward compatibility:
19314ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
19315
19316case $srcdir in
81ecdfbb 19317 .) # We are building in place.
bec39cab 19318 ac_srcdir=.
81ecdfbb
RW
19319 ac_top_srcdir=$ac_top_builddir_sub
19320 ac_abs_top_srcdir=$ac_pwd ;;
19321 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 19322 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
19323 ac_top_srcdir=$srcdir
19324 ac_abs_top_srcdir=$srcdir ;;
19325 *) # Relative name.
19326 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19327 ac_top_srcdir=$ac_top_build_prefix$srcdir
19328 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 19329esac
81ecdfbb 19330ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 19331
c906108c 19332
fdc59709 19333 cd "$ac_dir"
c906108c
SS
19334
19335 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
19336 if test -f "$ac_srcdir/configure.gnu"; then
19337 ac_sub_configure=$ac_srcdir/configure.gnu
19338 elif test -f "$ac_srcdir/configure"; then
19339 ac_sub_configure=$ac_srcdir/configure
19340 elif test -f "$ac_srcdir/configure.in"; then
19341 # This should be Cygnus configure.
19342 ac_sub_configure=$ac_aux_dir/configure
c906108c 19343 else
81ecdfbb
RW
19344 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
19345$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
19346 ac_sub_configure=
19347 fi
19348
19349 # The recursion is here.
19350 if test -n "$ac_sub_configure"; then
c906108c 19351 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
19352 case $cache_file in
19353 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
19354 *) # Relative name.
19355 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 19356 esac
c906108c 19357
81ecdfbb
RW
19358 { $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
19359$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 19360 # The eval makes quoting arguments work.
fdc59709
PB
19361 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
19362 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 19363 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
19364 fi
19365
fdc59709 19366 cd "$ac_popdir"
c906108c
SS
19367 done
19368fi
81ecdfbb
RW
19369if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19370 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19371$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
19372fi
c906108c 19373