Make variable in get_startup_shell non-static
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
d0ac1c44
SM
3# Generated by GNU Autoconf 2.69.
4#
5#
6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
81ecdfbb 7#
c906108c
SS
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
81ecdfbb
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
bec39cab 14
81ecdfbb
RW
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18 emulate sh
19 NULLCMD=:
81ecdfbb 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
bec39cab 31fi
bec39cab 32
81ecdfbb
RW
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
bec39cab
AC
79fi
80
81
81ecdfbb
RW
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 90as_myself=
81ecdfbb
RW
91case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94for as_dir in $PATH
95do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100IFS=$as_save_IFS
101
102 ;;
103esac
104# We did not find ourselves, most probably we were run as `sh COMMAND'
105# in which case we are not to be found in the path.
106if test "x$as_myself" = x; then
107 as_myself=$0
108fi
109if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112fi
113
114# Unset variables that we do not need and which cause bugs (e.g. in
115# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116# suppresses any "Segmentation fault" message there. '((' could
117# trigger a bug in pdksh 5.2.14.
118for as_var in BASH_ENV ENV MAIL MAILPATH
119do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121done
bec39cab
AC
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
81ecdfbb
RW
127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export LANGUAGE
131
132# CDPATH.
133(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
d0ac1c44
SM
135# Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140# neutralization value for shells without unset; and this also
141# works around shells that cannot unset nonexistent variables.
142# Preserve -v and -x to the replacement shell.
143BASH_ENV=/dev/null
144ENV=/dev/null
145(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151esac
152exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153# Admittedly, this is quite paranoid, since all the known shells bail
154# out after a failed `exec'.
155$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
81ecdfbb
RW
160if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174esac
175fi
176"
177 as_required="as_fn_return () { (exit \$1); }
178as_fn_success () { as_fn_return 0; }
179as_fn_failure () { as_fn_return 1; }
180as_fn_ret_success () { return 0; }
181as_fn_ret_failure () { return 1; }
182
183exitcode=0
184as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190else
191 exitcode=1; echo positional parameters were not saved.
192fi
d0ac1c44
SM
193test x\$exitcode = x0 || exit 1
194test -x / || exit 1"
81ecdfbb
RW
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202else
203 as_have_required=no
204fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209as_found=false
210for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab 211do
81ecdfbb
RW
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225fi
226fi
227 done;;
228 esac
229 as_found=false
230done
231$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 CONFIG_SHELL=$SHELL as_have_required=yes
234fi; }
235IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
d0ac1c44
SM
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241# neutralization value for shells without unset; and this also
242# works around shells that cannot unset nonexistent variables.
243# Preserve -v and -x to the replacement shell.
244BASH_ENV=/dev/null
245ENV=/dev/null
246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252esac
253exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254# Admittedly, this is quite paranoid, since all the known shells bail
255# out after a failed `exec'.
256$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257exit 255
81ecdfbb
RW
258fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
bec39cab 266 else
81ecdfbb
RW
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268$0: including any error possibly output before this
269$0: message. Then install a modern shell, or manually run
270$0: the script under such a shell if you do have one."
bec39cab 271 fi
81ecdfbb
RW
272 exit 1
273fi
274fi
275fi
276SHELL=${CONFIG_SHELL-/bin/sh}
277export SHELL
278# Unset more variables known to interfere with behavior of common tools.
279CLICOLOR_FORCE= GREP_OPTIONS=
280unset CLICOLOR_FORCE GREP_OPTIONS
281
282## --------------------- ##
283## M4sh Shell Functions. ##
284## --------------------- ##
285# as_fn_unset VAR
286# ---------------
287# Portably unset VAR.
288as_fn_unset ()
289{
290 { eval $1=; unset $1;}
291}
292as_unset=as_fn_unset
293
294# as_fn_set_status STATUS
295# -----------------------
296# Set $? to STATUS, without forking.
297as_fn_set_status ()
298{
299 return $1
300} # as_fn_set_status
bec39cab 301
81ecdfbb
RW
302# as_fn_exit STATUS
303# -----------------
304# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305as_fn_exit ()
306{
307 set +e
308 as_fn_set_status $1
309 exit $1
310} # as_fn_exit
311
312# as_fn_mkdir_p
313# -------------
314# Create "$as_dir" as a directory, including parents if necessary.
315as_fn_mkdir_p ()
316{
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334$as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb
RW
356
357
358} # as_fn_mkdir_p
d0ac1c44
SM
359
360# as_fn_executable_p FILE
361# -----------------------
362# Test if FILE is an executable regular file.
363as_fn_executable_p ()
364{
365 test -f "$1" && test -x "$1"
366} # as_fn_executable_p
81ecdfbb
RW
367# as_fn_append VAR VALUE
368# ----------------------
369# Append the text in VALUE to the end of the definition contained in VAR. Take
370# advantage of any shell optimizations that allow amortized linear growth over
371# repeated appends, instead of the typical quadratic growth present in naive
372# implementations.
373if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383fi # as_fn_append
384
385# as_fn_arith ARG...
386# ------------------
387# Perform arithmetic evaluation on the ARGs, and store the result in the
388# global $as_val. Take advantage of shells that can avoid forks. The arguments
389# must be portable across $(()) and expr.
390if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400fi # as_fn_arith
401
402
d0ac1c44
SM
403# as_fn_error STATUS ERROR [LINENO LOG_FD]
404# ----------------------------------------
81ecdfbb
RW
405# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 407# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
408as_fn_error ()
409{
d0ac1c44
SM
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 414 fi
d0ac1c44 415 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
416 as_fn_exit $as_status
417} # as_fn_error
418
419if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
421 as_expr=expr
422else
423 as_expr=false
424fi
425
81ecdfbb 426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
427 as_basename=basename
428else
429 as_basename=false
430fi
431
81ecdfbb
RW
432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434else
435 as_dirname=false
436fi
bec39cab 437
81ecdfbb 438as_me=`$as_basename -- "$0" ||
bec39cab
AC
439$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442$as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
bec39cab 456
b4e70030
JB
457# Avoid depending upon Character Ranges.
458as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461as_cr_digits='0123456789'
462as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 463
bec39cab 464
81ecdfbb
RW
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
bec39cab 474 sed '
81ecdfbb
RW
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
bec39cab 479 N
81ecdfbb
RW
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 482 t loop
81ecdfbb 483 s/-\n.*//
bec39cab 484 ' >$as_me.lineno &&
81ecdfbb
RW
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
bec39cab 487
d0ac1c44
SM
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
bec39cab
AC
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
81ecdfbb
RW
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
bec39cab
AC
496 # Exit status is that of the last command.
497 exit
498}
499
81ecdfbb
RW
500ECHO_C= ECHO_N= ECHO_T=
501case `echo -n x` in #(((((
502-n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509*)
510 ECHO_N='-n';;
bec39cab
AC
511esac
512
81ecdfbb
RW
513rm -f conf$$ conf$$.exe conf$$.file
514if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
bec39cab 516else
81ecdfbb
RW
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
bec39cab 519fi
81ecdfbb
RW
520if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 522 as_ln_s='ln -s'
81ecdfbb
RW
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 526 # In both cases, we have to default to `cp -pR'.
81ecdfbb 527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 528 as_ln_s='cp -pR'
81ecdfbb
RW
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
d0ac1c44 532 as_ln_s='cp -pR'
b4e70030 533 fi
bec39cab 534else
d0ac1c44 535 as_ln_s='cp -pR'
bec39cab 536fi
81ecdfbb
RW
537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538rmdir conf$$.dir 2>/dev/null
bec39cab
AC
539
540if mkdir -p . 2>/dev/null; then
81ecdfbb 541 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
542else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545fi
546
d0ac1c44
SM
547as_test_x='test -x'
548as_executable_p=as_fn_executable_p
bec39cab
AC
549
550# Sed expression to map a string onto a valid CPP name.
551as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553# Sed expression to map a string onto a valid variable name.
554as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
d0ac1c44
SM
557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 6>&1
c906108c 559
bec39cab 560# Name of the host.
d0ac1c44 561# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
bec39cab
AC
562# so uname gets run too.
563ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
bec39cab
AC
565#
566# Initializations.
567#
c906108c 568ac_default_prefix=/usr/local
81ecdfbb 569ac_clean_files=
bec39cab 570ac_config_libobj_dir=.
81ecdfbb 571LIBOBJS=
bec39cab
AC
572cross_compiling=no
573subdirs=
574MFLAGS=
575MAKEFLAGS=
b4e70030 576
bec39cab
AC
577# Identity of this package.
578PACKAGE_NAME=
579PACKAGE_TARNAME=
580PACKAGE_VERSION=
581PACKAGE_STRING=
582PACKAGE_BUGREPORT=
81ecdfbb 583PACKAGE_URL=
bec39cab
AC
584
585ac_unique_file="main.c"
586# Factoring default headers for most tests.
587ac_includes_default="\
588#include <stdio.h>
81ecdfbb 589#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
590# include <sys/types.h>
591#endif
81ecdfbb 592#ifdef HAVE_SYS_STAT_H
bec39cab
AC
593# include <sys/stat.h>
594#endif
81ecdfbb 595#ifdef STDC_HEADERS
bec39cab
AC
596# include <stdlib.h>
597# include <stddef.h>
598#else
81ecdfbb 599# ifdef HAVE_STDLIB_H
bec39cab
AC
600# include <stdlib.h>
601# endif
602#endif
81ecdfbb
RW
603#ifdef HAVE_STRING_H
604# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
605# include <memory.h>
606# endif
607# include <string.h>
608#endif
81ecdfbb 609#ifdef HAVE_STRINGS_H
bec39cab
AC
610# include <strings.h>
611#endif
81ecdfbb 612#ifdef HAVE_INTTYPES_H
bec39cab 613# include <inttypes.h>
bec39cab 614#endif
81ecdfbb
RW
615#ifdef HAVE_STDINT_H
616# include <stdint.h>
617#endif
618#ifdef HAVE_UNISTD_H
bec39cab
AC
619# include <unistd.h>
620#endif"
621
81ecdfbb 622enable_option_checking=no
d0ac1c44 623ac_header_list=
c971b7fa 624ac_subst_vars='LTLIBOBJS
81ecdfbb 625LIBOBJS
b292c783
JK
626GCORE_TRANSFORM_NAME
627GDB_TRANSFORM_NAME
e3487908 628XSLTPROC
81ecdfbb 629GDB_NM_FILE
393fd4c3
YQ
630LTLIBBABELTRACE
631LIBBABELTRACE
632HAVE_LIBBABELTRACE
21ea5acd
SDJ
633HAVE_NATIVE_GCORE_HOST
634NAT_GENERATED_FILES
635XM_CLIBS
636MH_CFLAGS
637LOADLIBES
638NAT_CDEPS
639NATDEPFILES
640NAT_FILE
81ecdfbb
RW
641target_subdir
642CONFIG_UNINSTALL
643CONFIG_INSTALL
644CONFIG_CLEAN
645CONFIG_ALL
646CONFIG_SRCS
647CONFIG_DEPS
648CONFIG_OBS
649PROFILE_CFLAGS
650ENABLE_CFLAGS
651SIM_OBS
652SIM
653XMKMF
654GDBTK_SRC_DIR
655GDBTK_CFLAGS
656GDBTKLIBS
657X_LIBS
658X_LDFLAGS
659X_CFLAGS
660TK_XINCLUDES
661TK_DEPS
662TK_LIBRARY
663TK_INCLUDE
664TK_STUB_LIB_SPEC
665TK_STUB_LIB_FLAG
666TK_STUB_LIB_FILE
667TK_LIB_SPEC
668TK_LIB_FLAG
669TK_LIB_FILE
670TK_SRC_DIR
671TK_BIN_DIR
672TK_VERSION
673TCL_DEPS
674TCL_LIBRARY
675TCL_INCLUDE
676TCL_STUB_LIB_SPEC
677TCL_STUB_LIB_FLAG
678TCL_STUB_LIB_FILE
679TCL_LIB_SPEC
680TCL_LIB_FLAG
681TCL_LIB_FILE
682TCL_SRC_DIR
683TCL_BIN_DIR
684TCL_PATCH_LEVEL
685TCL_VERSION
686WIN32LDAPP
687GUI_CFLAGS_X
688LIBGUI
608e2dbb
TT
689LTLIBLZMA
690LIBLZMA
691HAVE_LIBLZMA
81ecdfbb
RW
692WIN32LIBS
693SER_HARDWIRE
694WERROR_CFLAGS
695WARN_CFLAGS
696SYSTEM_GDBINIT
81ecdfbb
RW
697TARGET_SYSTEM_ROOT
698CONFIG_LDFLAGS
f6528abd 699RDYNAMIC
81ecdfbb 700ALLOCA
58bfce93
MM
701LTLIBIPT
702LIBIPT
703HAVE_LIBIPT
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
81ecdfbb
RW
858enable_gdbmi
859enable_tui
860enable_gdbtk
05e7c244 861with_libunwind_ia64
81ecdfbb
RW
862with_curses
863enable_profiling
44cee4fd 864enable_codesign
81ecdfbb
RW
865with_pkgversion
866with_bugurl
711a72d3 867with_system_zlib
016a3251
DD
868with_gnu_ld
869enable_rpath
81ecdfbb 870with_libiconv_prefix
478aac75 871with_iconv_bin
81ecdfbb 872with_system_readline
b8e0a31c 873with_jit_reader_dir
81ecdfbb 874with_expat
81ecdfbb 875with_libexpat_prefix
2400729e
UW
876with_mpfr
877with_libmpfr_prefix
81ecdfbb 878with_python
ed3ef339 879with_guile
a8db4212 880enable_libmcheck
58bfce93
MM
881with_intel_pt
882with_libipt_prefix
81ecdfbb
RW
883with_included_regex
884with_sysroot
885with_system_gdbinit
886enable_werror
887enable_build_warnings
888enable_gdb_build_warnings
608e2dbb
TT
889with_lzma
890with_liblzma_prefix
81ecdfbb
RW
891with_tcl
892with_tk
893with_x
894enable_sim
496c0e1b 895enable_gdbserver
393fd4c3
YQ
896with_babeltrace
897with_libbabeltrace_prefix
81ecdfbb
RW
898'
899 ac_precious_vars='build_alias
900host_alias
901target_alias
902CC
903CFLAGS
904LDFLAGS
905LIBS
906CPPFLAGS
3bc3d82a
PA
907CXX
908CXXFLAGS
909CCC
81ecdfbb 910CPP
f06e05e0
JK
911MAKEINFO
912MAKEINFOFLAGS
81ecdfbb
RW
913YACC
914YFLAGS
915XMKMF'
5ae98d25 916ac_subdirs_all='testsuite
81ecdfbb 917gdbtk
81ecdfbb 918gdbserver'
c906108c
SS
919
920# Initialize some variables set by options.
bec39cab
AC
921ac_init_help=
922ac_init_version=false
81ecdfbb
RW
923ac_unrecognized_opts=
924ac_unrecognized_sep=
c906108c
SS
925# The variables have the same names as the options, with
926# dashes changed to underlines.
bec39cab 927cache_file=/dev/null
c906108c 928exec_prefix=NONE
c906108c 929no_create=
c906108c
SS
930no_recursion=
931prefix=NONE
932program_prefix=NONE
933program_suffix=NONE
934program_transform_name=s,x,x,
935silent=
936site=
937srcdir=
c906108c
SS
938verbose=
939x_includes=NONE
940x_libraries=NONE
bec39cab
AC
941
942# Installation directory options.
943# These are left unexpanded so users can "make install exec_prefix=/foo"
944# and all the variables that are supposed to be based on exec_prefix
945# by default will actually change.
946# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 947# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
948bindir='${exec_prefix}/bin'
949sbindir='${exec_prefix}/sbin'
950libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
951datarootdir='${prefix}/share'
952datadir='${datarootdir}'
c906108c
SS
953sysconfdir='${prefix}/etc'
954sharedstatedir='${prefix}/com'
955localstatedir='${prefix}/var'
c906108c
SS
956includedir='${prefix}/include'
957oldincludedir='/usr/include'
81ecdfbb
RW
958docdir='${datarootdir}/doc/${PACKAGE}'
959infodir='${datarootdir}/info'
960htmldir='${docdir}'
961dvidir='${docdir}'
962pdfdir='${docdir}'
963psdir='${docdir}'
964libdir='${exec_prefix}/lib'
965localedir='${datarootdir}/locale'
966mandir='${datarootdir}/man'
c906108c 967
c906108c 968ac_prev=
81ecdfbb 969ac_dashdash=
c906108c
SS
970for ac_option
971do
c906108c
SS
972 # If the previous option needs an argument, assign it.
973 if test -n "$ac_prev"; then
81ecdfbb 974 eval $ac_prev=\$ac_option
c906108c
SS
975 ac_prev=
976 continue
977 fi
978
81ecdfbb 979 case $ac_option in
d0ac1c44
SM
980 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
981 *=) ac_optarg= ;;
982 *) ac_optarg=yes ;;
81ecdfbb 983 esac
c906108c
SS
984
985 # Accept the important Cygnus configure options, so we can diagnose typos.
986
81ecdfbb
RW
987 case $ac_dashdash$ac_option in
988 --)
989 ac_dashdash=yes ;;
c906108c
SS
990
991 -bindir | --bindir | --bindi | --bind | --bin | --bi)
992 ac_prev=bindir ;;
993 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 994 bindir=$ac_optarg ;;
c906108c
SS
995
996 -build | --build | --buil | --bui | --bu)
bec39cab 997 ac_prev=build_alias ;;
c906108c 998 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 999 build_alias=$ac_optarg ;;
c906108c
SS
1000
1001 -cache-file | --cache-file | --cache-fil | --cache-fi \
1002 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1003 ac_prev=cache_file ;;
1004 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1005 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1006 cache_file=$ac_optarg ;;
1007
1008 --config-cache | -C)
1009 cache_file=config.cache ;;
c906108c 1010
81ecdfbb 1011 -datadir | --datadir | --datadi | --datad)
c906108c 1012 ac_prev=datadir ;;
81ecdfbb 1013 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1014 datadir=$ac_optarg ;;
c906108c 1015
81ecdfbb
RW
1016 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1017 | --dataroo | --dataro | --datar)
1018 ac_prev=datarootdir ;;
1019 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1020 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1021 datarootdir=$ac_optarg ;;
1022
c906108c 1023 -disable-* | --disable-*)
81ecdfbb 1024 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1025 # Reject names that are not valid shell variable names.
81ecdfbb 1026 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1027 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1028 ac_useropt_orig=$ac_useropt
1029 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1030 case $ac_user_opts in
1031 *"
1032"enable_$ac_useropt"
1033"*) ;;
1034 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1035 ac_unrecognized_sep=', ';;
1036 esac
1037 eval enable_$ac_useropt=no ;;
1038
1039 -docdir | --docdir | --docdi | --doc | --do)
1040 ac_prev=docdir ;;
1041 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1042 docdir=$ac_optarg ;;
1043
1044 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1045 ac_prev=dvidir ;;
1046 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1047 dvidir=$ac_optarg ;;
c906108c
SS
1048
1049 -enable-* | --enable-*)
81ecdfbb 1050 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1051 # Reject names that are not valid shell variable names.
81ecdfbb 1052 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1053 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1054 ac_useropt_orig=$ac_useropt
1055 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1056 case $ac_user_opts in
1057 *"
1058"enable_$ac_useropt"
1059"*) ;;
1060 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1061 ac_unrecognized_sep=', ';;
b4e70030 1062 esac
81ecdfbb 1063 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1064
1065 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1066 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1067 | --exec | --exe | --ex)
1068 ac_prev=exec_prefix ;;
1069 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1070 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1071 | --exec=* | --exe=* | --ex=*)
bec39cab 1072 exec_prefix=$ac_optarg ;;
c906108c
SS
1073
1074 -gas | --gas | --ga | --g)
1075 # Obsolete; use --with-gas.
1076 with_gas=yes ;;
1077
bec39cab
AC
1078 -help | --help | --hel | --he | -h)
1079 ac_init_help=long ;;
1080 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1081 ac_init_help=recursive ;;
1082 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1083 ac_init_help=short ;;
c906108c
SS
1084
1085 -host | --host | --hos | --ho)
bec39cab 1086 ac_prev=host_alias ;;
c906108c 1087 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1088 host_alias=$ac_optarg ;;
c906108c 1089
81ecdfbb
RW
1090 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1091 ac_prev=htmldir ;;
1092 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1093 | --ht=*)
1094 htmldir=$ac_optarg ;;
1095
c906108c
SS
1096 -includedir | --includedir | --includedi | --included | --include \
1097 | --includ | --inclu | --incl | --inc)
1098 ac_prev=includedir ;;
1099 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1100 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1101 includedir=$ac_optarg ;;
c906108c
SS
1102
1103 -infodir | --infodir | --infodi | --infod | --info | --inf)
1104 ac_prev=infodir ;;
1105 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1106 infodir=$ac_optarg ;;
c906108c
SS
1107
1108 -libdir | --libdir | --libdi | --libd)
1109 ac_prev=libdir ;;
1110 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1111 libdir=$ac_optarg ;;
c906108c
SS
1112
1113 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1114 | --libexe | --libex | --libe)
1115 ac_prev=libexecdir ;;
1116 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1117 | --libexe=* | --libex=* | --libe=*)
bec39cab 1118 libexecdir=$ac_optarg ;;
c906108c 1119
81ecdfbb
RW
1120 -localedir | --localedir | --localedi | --localed | --locale)
1121 ac_prev=localedir ;;
1122 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1123 localedir=$ac_optarg ;;
1124
c906108c 1125 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1126 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1127 ac_prev=localstatedir ;;
1128 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1129 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1130 localstatedir=$ac_optarg ;;
c906108c
SS
1131
1132 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1133 ac_prev=mandir ;;
1134 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1135 mandir=$ac_optarg ;;
c906108c
SS
1136
1137 -nfp | --nfp | --nf)
1138 # Obsolete; use --without-fp.
1139 with_fp=no ;;
1140
1141 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1142 | --no-cr | --no-c | -n)
c906108c
SS
1143 no_create=yes ;;
1144
1145 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1146 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1147 no_recursion=yes ;;
1148
1149 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1150 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1151 | --oldin | --oldi | --old | --ol | --o)
1152 ac_prev=oldincludedir ;;
1153 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1154 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1155 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1156 oldincludedir=$ac_optarg ;;
c906108c
SS
1157
1158 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1159 ac_prev=prefix ;;
1160 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1161 prefix=$ac_optarg ;;
c906108c
SS
1162
1163 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1164 | --program-pre | --program-pr | --program-p)
1165 ac_prev=program_prefix ;;
1166 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1167 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1168 program_prefix=$ac_optarg ;;
c906108c
SS
1169
1170 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1171 | --program-suf | --program-su | --program-s)
1172 ac_prev=program_suffix ;;
1173 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1174 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1175 program_suffix=$ac_optarg ;;
c906108c
SS
1176
1177 -program-transform-name | --program-transform-name \
1178 | --program-transform-nam | --program-transform-na \
1179 | --program-transform-n | --program-transform- \
1180 | --program-transform | --program-transfor \
1181 | --program-transfo | --program-transf \
1182 | --program-trans | --program-tran \
1183 | --progr-tra | --program-tr | --program-t)
1184 ac_prev=program_transform_name ;;
1185 -program-transform-name=* | --program-transform-name=* \
1186 | --program-transform-nam=* | --program-transform-na=* \
1187 | --program-transform-n=* | --program-transform-=* \
1188 | --program-transform=* | --program-transfor=* \
1189 | --program-transfo=* | --program-transf=* \
1190 | --program-trans=* | --program-tran=* \
1191 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1192 program_transform_name=$ac_optarg ;;
c906108c 1193
81ecdfbb
RW
1194 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1195 ac_prev=pdfdir ;;
1196 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1197 pdfdir=$ac_optarg ;;
1198
1199 -psdir | --psdir | --psdi | --psd | --ps)
1200 ac_prev=psdir ;;
1201 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1202 psdir=$ac_optarg ;;
1203
c906108c
SS
1204 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1205 | -silent | --silent | --silen | --sile | --sil)
1206 silent=yes ;;
1207
1208 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1209 ac_prev=sbindir ;;
1210 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1211 | --sbi=* | --sb=*)
bec39cab 1212 sbindir=$ac_optarg ;;
c906108c
SS
1213
1214 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1215 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1216 | --sharedst | --shareds | --shared | --share | --shar \
1217 | --sha | --sh)
1218 ac_prev=sharedstatedir ;;
1219 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1220 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1221 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1222 | --sha=* | --sh=*)
bec39cab 1223 sharedstatedir=$ac_optarg ;;
c906108c
SS
1224
1225 -site | --site | --sit)
1226 ac_prev=site ;;
1227 -site=* | --site=* | --sit=*)
bec39cab 1228 site=$ac_optarg ;;
3ace7edb 1229
c906108c
SS
1230 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1231 ac_prev=srcdir ;;
1232 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1233 srcdir=$ac_optarg ;;
c906108c
SS
1234
1235 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1236 | --syscon | --sysco | --sysc | --sys | --sy)
1237 ac_prev=sysconfdir ;;
1238 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1239 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1240 sysconfdir=$ac_optarg ;;
c906108c
SS
1241
1242 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1243 ac_prev=target_alias ;;
c906108c 1244 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1245 target_alias=$ac_optarg ;;
c906108c
SS
1246
1247 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1248 verbose=yes ;;
1249
bec39cab
AC
1250 -version | --version | --versio | --versi | --vers | -V)
1251 ac_init_version=: ;;
c906108c
SS
1252
1253 -with-* | --with-*)
81ecdfbb 1254 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1255 # Reject names that are not valid shell variable names.
81ecdfbb 1256 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1257 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1258 ac_useropt_orig=$ac_useropt
1259 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1260 case $ac_user_opts in
1261 *"
1262"with_$ac_useropt"
1263"*) ;;
1264 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1265 ac_unrecognized_sep=', ';;
b4e70030 1266 esac
81ecdfbb 1267 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1268
1269 -without-* | --without-*)
81ecdfbb 1270 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1271 # Reject names that are not valid shell variable names.
81ecdfbb 1272 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1273 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1274 ac_useropt_orig=$ac_useropt
1275 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1276 case $ac_user_opts in
1277 *"
1278"with_$ac_useropt"
1279"*) ;;
1280 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1281 ac_unrecognized_sep=', ';;
1282 esac
1283 eval with_$ac_useropt=no ;;
c906108c
SS
1284
1285 --x)
1286 # Obsolete; use --with-x.
1287 with_x=yes ;;
1288
1289 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1290 | --x-incl | --x-inc | --x-in | --x-i)
1291 ac_prev=x_includes ;;
1292 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1293 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1294 x_includes=$ac_optarg ;;
c906108c
SS
1295
1296 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1297 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1298 ac_prev=x_libraries ;;
1299 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1300 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1301 x_libraries=$ac_optarg ;;
c906108c 1302
d0ac1c44
SM
1303 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1304Try \`$0 --help' for more information"
c906108c
SS
1305 ;;
1306
bec39cab
AC
1307 *=*)
1308 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1309 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1310 case $ac_envvar in #(
1311 '' | [0-9]* | *[!_$as_cr_alnum]* )
d0ac1c44 1312 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
81ecdfbb
RW
1313 esac
1314 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1315 export $ac_envvar ;;
1316
c906108c 1317 *)
bec39cab 1318 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1319 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1320 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1321 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
d0ac1c44 1322 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
c906108c
SS
1323 ;;
1324
1325 esac
1326done
1327
1328if test -n "$ac_prev"; then
bec39cab 1329 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
d0ac1c44 1330 as_fn_error $? "missing argument to $ac_option"
c906108c 1331fi
c906108c 1332
81ecdfbb
RW
1333if test -n "$ac_unrecognized_opts"; then
1334 case $enable_option_checking in
1335 no) ;;
d0ac1c44 1336 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
81ecdfbb 1337 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1338 esac
81ecdfbb 1339fi
b4e70030 1340
81ecdfbb
RW
1341# Check all directory arguments for consistency.
1342for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1343 datadir sysconfdir sharedstatedir localstatedir includedir \
1344 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1345 libdir localedir mandir
b4e70030 1346do
81ecdfbb
RW
1347 eval ac_val=\$$ac_var
1348 # Remove trailing slashes.
1349 case $ac_val in
1350 */ )
1351 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1352 eval $ac_var=\$ac_val;;
1353 esac
1354 # Be sure to have absolute directory names.
b4e70030 1355 case $ac_val in
81ecdfbb
RW
1356 [\\/$]* | ?:[\\/]* ) continue;;
1357 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1358 esac
d0ac1c44 1359 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1360done
1361
bec39cab
AC
1362# There might be people who depend on the old broken behavior: `$host'
1363# used to hold the argument of --host etc.
1364# FIXME: To remove some day.
1365build=$build_alias
1366host=$host_alias
1367target=$target_alias
1368
1369# FIXME: To remove some day.
1370if test "x$host_alias" != x; then
1371 if test "x$build_alias" = x; then
1372 cross_compiling=maybe
bec39cab
AC
1373 elif test "x$build_alias" != "x$host_alias"; then
1374 cross_compiling=yes
1375 fi
1376fi
c906108c 1377
bec39cab
AC
1378ac_tool_prefix=
1379test -n "$host_alias" && ac_tool_prefix=$host_alias-
1380
1381test "$silent" = yes && exec 6>/dev/null
c906108c 1382
c906108c 1383
81ecdfbb
RW
1384ac_pwd=`pwd` && test -n "$ac_pwd" &&
1385ac_ls_di=`ls -di .` &&
1386ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
d0ac1c44 1387 as_fn_error $? "working directory cannot be determined"
81ecdfbb 1388test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
d0ac1c44 1389 as_fn_error $? "pwd does not report name of working directory"
81ecdfbb
RW
1390
1391
c906108c
SS
1392# Find the source files, if location was not specified.
1393if test -z "$srcdir"; then
1394 ac_srcdir_defaulted=yes
81ecdfbb
RW
1395 # Try the directory containing this script, then the parent directory.
1396 ac_confdir=`$as_dirname -- "$as_myself" ||
1397$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1398 X"$as_myself" : 'X\(//\)[^/]' \| \
1399 X"$as_myself" : 'X\(//\)$' \| \
1400 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1401$as_echo X"$as_myself" |
1402 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1403 s//\1/
1404 q
1405 }
1406 /^X\(\/\/\)[^/].*/{
1407 s//\1/
1408 q
1409 }
1410 /^X\(\/\/\)$/{
1411 s//\1/
1412 q
1413 }
1414 /^X\(\/\).*/{
1415 s//\1/
1416 q
1417 }
1418 s/.*/./; q'`
c906108c 1419 srcdir=$ac_confdir
81ecdfbb 1420 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1421 srcdir=..
1422 fi
1423else
1424 ac_srcdir_defaulted=no
1425fi
81ecdfbb
RW
1426if test ! -r "$srcdir/$ac_unique_file"; then
1427 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
d0ac1c44 1428 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
81ecdfbb
RW
1429fi
1430ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1431ac_abs_confdir=`(
d0ac1c44 1432 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
81ecdfbb
RW
1433 pwd)`
1434# When building in place, set srcdir=.
1435if test "$ac_abs_confdir" = "$ac_pwd"; then
1436 srcdir=.
1437fi
1438# Remove unnecessary trailing slashes from srcdir.
1439# Double slashes in file names in object file debugging info
1440# mess up M-x gdb in Emacs.
1441case $srcdir in
1442*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1443esac
1444for ac_var in $ac_precious_vars; do
1445 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1446 eval ac_env_${ac_var}_value=\$${ac_var}
1447 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1448 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1449done
c906108c 1450
bec39cab
AC
1451#
1452# Report the --help message.
1453#
1454if test "$ac_init_help" = "long"; then
1455 # Omit some internal or obsolete options to make the list less imposing.
1456 # This message is too long to be a string in the A/UX 3.1 sh.
1457 cat <<_ACEOF
1458\`configure' configures this package to adapt to many kinds of systems.
1459
1460Usage: $0 [OPTION]... [VAR=VALUE]...
1461
1462To assign environment variables (e.g., CC, CFLAGS...), specify them as
1463VAR=VALUE. See below for descriptions of some of the useful variables.
1464
1465Defaults for the options are specified in brackets.
1466
1467Configuration:
1468 -h, --help display this help and exit
1469 --help=short display options specific to this package
1470 --help=recursive display the short help of all the included packages
1471 -V, --version display version information and exit
d0ac1c44 1472 -q, --quiet, --silent do not print \`checking ...' messages
bec39cab
AC
1473 --cache-file=FILE cache test results in FILE [disabled]
1474 -C, --config-cache alias for \`--cache-file=config.cache'
1475 -n, --no-create do not create output files
1476 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1477
bec39cab
AC
1478Installation directories:
1479 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1480 [$ac_default_prefix]
bec39cab 1481 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1482 [PREFIX]
bec39cab
AC
1483
1484By default, \`make install' will install all the files in
1485\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1486an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1487for instance \`--prefix=\$HOME'.
1488
1489For better control, use the options below.
1490
1491Fine tuning of the installation directories:
81ecdfbb
RW
1492 --bindir=DIR user executables [EPREFIX/bin]
1493 --sbindir=DIR system admin executables [EPREFIX/sbin]
1494 --libexecdir=DIR program executables [EPREFIX/libexec]
1495 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1496 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1497 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1498 --libdir=DIR object code libraries [EPREFIX/lib]
1499 --includedir=DIR C header files [PREFIX/include]
1500 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1501 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1502 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1503 --infodir=DIR info documentation [DATAROOTDIR/info]
1504 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1505 --mandir=DIR man documentation [DATAROOTDIR/man]
1506 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1507 --htmldir=DIR html documentation [DOCDIR]
1508 --dvidir=DIR dvi documentation [DOCDIR]
1509 --pdfdir=DIR pdf documentation [DOCDIR]
1510 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1511_ACEOF
1512
1513 cat <<\_ACEOF
1514
9009e1ae
MR
1515Program names:
1516 --program-prefix=PREFIX prepend PREFIX to installed program names
1517 --program-suffix=SUFFIX append SUFFIX to installed program names
1518 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1519
bec39cab
AC
1520X features:
1521 --x-includes=DIR X include files are in DIR
1522 --x-libraries=DIR X library files are in DIR
1523
1524System types:
1525 --build=BUILD configure for building on BUILD [guessed]
1526 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1527 --target=TARGET configure for building compilers for TARGET [HOST]
1528_ACEOF
1529fi
1530
1531if test -n "$ac_init_help"; then
1532
1533 cat <<\_ACEOF
1534
1535Optional Features:
81ecdfbb 1536 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1537 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1538 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
d0ac1c44
SM
1539 --enable-maintainer-mode
1540 enable make rules and dependencies not useful (and
1541 sometimes confusing) to the casual installer
2974be62 1542 --enable-plugins Enable support for plugins
da2f07f1 1543 --disable-largefile omit support for large files
a1220294
TT
1544 --enable-targets=TARGETS
1545 alternative target configurations
c0993dbe 1546 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1547 --disable-gdbmi disable machine-interface (MI)
1548 --enable-tui enable full-screen terminal user interface (TUI)
1549 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1550 --enable-profiling enable profiling of GDB
44cee4fd 1551 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
3841debe 1552 --disable-rpath do not hardcode runtime library paths
17ef446e 1553 --enable-libmcheck Try linking with -lmcheck if available
a1220294 1554 --enable-werror treat compile warnings as errors
32c1c914 1555 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1556 --enable-gdb-build-warnings
32c1c914 1557 enable GDB specific build-time compiler warnings if
a1220294 1558 gcc is used
32c1c914 1559 --enable-sim link gdb with simulator
496c0e1b
JB
1560 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1561 is auto)
bec39cab
AC
1562
1563Optional Packages:
1564 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1565 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1566 --with-separate-debug-dir=PATH
32c1c914 1567 look for global separate debug info in this path
62e4f60c 1568 [LIBDIR/debug]
b14b1491
TT
1569 --with-gdb-datadir=PATH look for global separate data files in this path
1570 [DATADIR/gdb]
29b0e8a2 1571 --with-relocated-sources=PATH
32c1c914 1572 automatically relocate this path for source files
7349ff92 1573 --with-auto-load-dir=PATH
aff139ff 1574 directories from which to load auto-loaded scripts
1564a261 1575 [$debugdir:$datadir/auto-load]
bccbefd2 1576 --with-auto-load-safe-path=PATH
aff139ff 1577 directories safe to hold auto-loaded files
7349ff92 1578 [--with-auto-load-dir]
bccbefd2
JK
1579 --without-auto-load-safe-path
1580 do not restrict auto-loaded files locations
05e7c244 1581 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1582 --with-curses use the curses library instead of the termcap
1583 library
c16158bc
JM
1584 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1585 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1586 --with-system-zlib use installed libz
016a3251
DD
1587 --with-gnu-ld assume the C compiler uses GNU ld default=no
1588 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1589 --without-libiconv-prefix don't search for libiconv in includedir and libdir
478aac75 1590 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1591 --with-system-readline use installed readline library
b8e0a31c
SD
1592 --with-jit-reader-dir=PATH
1593 directory to load the JIT readers from
5c39566f 1594 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1595 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1596 --without-libexpat-prefix don't search for libexpat in includedir and libdir
2400729e
UW
1597 --with-mpfr include MPFR support (auto/yes/no)
1598 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1599 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
0c4a4063
DE
1600 --with-python[=PYTHON] include python support
1601 (auto/yes/no/<python-program>)
ed3ef339
DE
1602 --with-guile[=GUILE] include guile support
1603 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1604 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1605 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1606 --without-libipt-prefix don't search for libipt in includedir and libdir
a1220294
TT
1607 --without-included-regex
1608 don't use included regex; this is the default on
1609 systems with version 2 of the GNU C library (use
1610 with caution on other system)
81ecdfbb 1611 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1612 --with-system-gdbinit=PATH
32c1c914 1613 automatically load a system-wide gdbinit file
608e2dbb
TT
1614 --with-lzma support lzma compression (auto/yes/no)
1615 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1616 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1617 --with-tcl directory containing tcl configuration (tclConfig.sh)
1618 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1619 --with-x use the X Window System
393fd4c3
YQ
1620 --with-babeltrace include babeltrace support (auto/yes/no)
1621 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1622 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1623
1624Some influential environment variables:
1625 CC C compiler command
1626 CFLAGS C compiler flags
1627 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1628 nonstandard directory <lib dir>
81ecdfbb 1629 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 1630 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
81ecdfbb 1631 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1632 CXX C++ compiler command
1633 CXXFLAGS C++ compiler flags
bec39cab 1634 CPP C preprocessor
f06e05e0
JK
1635 MAKEINFO Parent configure detects if it is of sufficient version.
1636 MAKEINFOFLAGS
1637 Parameters for MAKEINFO.
d0ac1c44
SM
1638 YACC The `Yet Another Compiler Compiler' implementation to use.
1639 Defaults to the first program found out of: `bison -y', `byacc',
1640 `yacc'.
81ecdfbb
RW
1641 YFLAGS The list of arguments that will be passed by default to $YACC.
1642 This script will default YFLAGS to the empty string to avoid a
1643 default value of `-d' given by some make applications.
1644 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1645
1646Use these variables to override the choices made by `configure' or to help
1647it to find libraries and programs with nonstandard names/locations.
1648
81ecdfbb 1649Report bugs to the package provider.
bec39cab 1650_ACEOF
81ecdfbb 1651ac_status=$?
bec39cab
AC
1652fi
1653
1654if test "$ac_init_help" = "recursive"; then
1655 # If there are subdirs, report their specific --help.
bec39cab 1656 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1657 test -d "$ac_dir" ||
1658 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1659 continue
bec39cab
AC
1660 ac_builddir=.
1661
81ecdfbb
RW
1662case "$ac_dir" in
1663.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1664*)
1665 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1666 # A ".." for each directory in $ac_dir_suffix.
1667 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1668 case $ac_top_builddir_sub in
1669 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1670 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1671 esac ;;
1672esac
1673ac_abs_top_builddir=$ac_pwd
1674ac_abs_builddir=$ac_pwd$ac_dir_suffix
1675# for backward compatibility:
1676ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1677
1678case $srcdir in
81ecdfbb 1679 .) # We are building in place.
bec39cab 1680 ac_srcdir=.
81ecdfbb
RW
1681 ac_top_srcdir=$ac_top_builddir_sub
1682 ac_abs_top_srcdir=$ac_pwd ;;
1683 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1684 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1685 ac_top_srcdir=$srcdir
1686 ac_abs_top_srcdir=$srcdir ;;
1687 *) # Relative name.
1688 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1689 ac_top_srcdir=$ac_top_build_prefix$srcdir
1690 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1691esac
81ecdfbb 1692ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1693
81ecdfbb
RW
1694 cd "$ac_dir" || { ac_status=$?; continue; }
1695 # Check for guested configure.
1696 if test -f "$ac_srcdir/configure.gnu"; then
1697 echo &&
1698 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1699 elif test -f "$ac_srcdir/configure"; then
1700 echo &&
1701 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1702 else
81ecdfbb
RW
1703 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1704 fi || ac_status=$?
1705 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1706 done
1707fi
1708
81ecdfbb 1709test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1710if $ac_init_version; then
1711 cat <<\_ACEOF
81ecdfbb 1712configure
d0ac1c44 1713generated by GNU Autoconf 2.69
bec39cab 1714
d0ac1c44 1715Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
1716This configure script is free software; the Free Software Foundation
1717gives unlimited permission to copy, distribute and modify it.
1718_ACEOF
81ecdfbb 1719 exit
bec39cab 1720fi
bec39cab 1721
81ecdfbb
RW
1722## ------------------------ ##
1723## Autoconf initialization. ##
1724## ------------------------ ##
bec39cab 1725
81ecdfbb
RW
1726# ac_fn_c_try_compile LINENO
1727# --------------------------
1728# Try to compile conftest.$ac_ext, and return whether this succeeded.
1729ac_fn_c_try_compile ()
1730{
1731 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1732 rm -f conftest.$ac_objext
1733 if { { ac_try="$ac_compile"
1734case "(($ac_try" in
1735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1736 *) ac_try_echo=$ac_try;;
1737esac
1738eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1739$as_echo "$ac_try_echo"; } >&5
1740 (eval "$ac_compile") 2>conftest.err
1741 ac_status=$?
1742 if test -s conftest.err; then
1743 grep -v '^ *+' conftest.err >conftest.er1
1744 cat conftest.er1 >&5
1745 mv -f conftest.er1 conftest.err
1746 fi
1747 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1748 test $ac_status = 0; } && {
1749 test -z "$ac_c_werror_flag" ||
1750 test ! -s conftest.err
1751 } && test -s conftest.$ac_objext; then :
1752 ac_retval=0
1753else
1754 $as_echo "$as_me: failed program was:" >&5
1755sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1756
81ecdfbb
RW
1757 ac_retval=1
1758fi
d0ac1c44
SM
1759 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1760 as_fn_set_status $ac_retval
81ecdfbb
RW
1761
1762} # ac_fn_c_try_compile
1763
3bc3d82a
PA
1764# ac_fn_cxx_try_compile LINENO
1765# ----------------------------
1766# Try to compile conftest.$ac_ext, and return whether this succeeded.
1767ac_fn_cxx_try_compile ()
1768{
1769 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1770 rm -f conftest.$ac_objext
1771 if { { ac_try="$ac_compile"
1772case "(($ac_try" in
1773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1774 *) ac_try_echo=$ac_try;;
1775esac
1776eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1777$as_echo "$ac_try_echo"; } >&5
1778 (eval "$ac_compile") 2>conftest.err
1779 ac_status=$?
1780 if test -s conftest.err; then
1781 grep -v '^ *+' conftest.err >conftest.er1
1782 cat conftest.er1 >&5
1783 mv -f conftest.er1 conftest.err
1784 fi
1785 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1786 test $ac_status = 0; } && {
1787 test -z "$ac_cxx_werror_flag" ||
1788 test ! -s conftest.err
1789 } && test -s conftest.$ac_objext; then :
1790 ac_retval=0
1791else
1792 $as_echo "$as_me: failed program was:" >&5
1793sed 's/^/| /' conftest.$ac_ext >&5
1794
1795 ac_retval=1
1796fi
d0ac1c44
SM
1797 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1798 as_fn_set_status $ac_retval
3bc3d82a
PA
1799
1800} # ac_fn_cxx_try_compile
1801
81ecdfbb
RW
1802# ac_fn_c_try_cpp LINENO
1803# ----------------------
1804# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1805ac_fn_c_try_cpp ()
bec39cab 1806{
81ecdfbb
RW
1807 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1808 if { { ac_try="$ac_cpp conftest.$ac_ext"
1809case "(($ac_try" in
1810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1811 *) ac_try_echo=$ac_try;;
1812esac
1813eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1814$as_echo "$ac_try_echo"; } >&5
1815 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1816 ac_status=$?
1817 if test -s conftest.err; then
1818 grep -v '^ *+' conftest.err >conftest.er1
1819 cat conftest.er1 >&5
1820 mv -f conftest.er1 conftest.err
1821 fi
1822 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 1823 test $ac_status = 0; } > conftest.i && {
81ecdfbb
RW
1824 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1825 test ! -s conftest.err
1826 }; then :
1827 ac_retval=0
1828else
1829 $as_echo "$as_me: failed program was:" >&5
1830sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1831
81ecdfbb
RW
1832 ac_retval=1
1833fi
d0ac1c44
SM
1834 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1835 as_fn_set_status $ac_retval
bec39cab 1836
81ecdfbb 1837} # ac_fn_c_try_cpp
bec39cab 1838
81ecdfbb
RW
1839# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1840# -------------------------------------------------------
1841# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1842# the include files in INCLUDES and setting the cache variable VAR
1843# accordingly.
1844ac_fn_c_check_header_mongrel ()
1845{
1846 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 1847 if eval \${$3+:} false; then :
81ecdfbb
RW
1848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1849$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1850if eval \${$3+:} false; then :
81ecdfbb
RW
1851 $as_echo_n "(cached) " >&6
1852fi
1853eval ac_res=\$$3
1854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1855$as_echo "$ac_res" >&6; }
1856else
1857 # Is the header compilable?
1858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1859$as_echo_n "checking $2 usability... " >&6; }
1860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1861/* end confdefs.h. */
1862$4
1863#include <$2>
1864_ACEOF
1865if ac_fn_c_try_compile "$LINENO"; then :
1866 ac_header_compiler=yes
1867else
1868 ac_header_compiler=no
1869fi
1870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1872$as_echo "$ac_header_compiler" >&6; }
bec39cab 1873
81ecdfbb
RW
1874# Is the header present?
1875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1876$as_echo_n "checking $2 presence... " >&6; }
1877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1878/* end confdefs.h. */
1879#include <$2>
1880_ACEOF
1881if ac_fn_c_try_cpp "$LINENO"; then :
1882 ac_header_preproc=yes
1883else
1884 ac_header_preproc=no
1885fi
d0ac1c44 1886rm -f conftest.err conftest.i conftest.$ac_ext
81ecdfbb
RW
1887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1888$as_echo "$ac_header_preproc" >&6; }
bec39cab 1889
81ecdfbb
RW
1890# So? What about this header?
1891case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1892 yes:no: )
1893 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1894$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1895 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1896$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1897 ;;
1898 no:yes:* )
1899 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1900$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1901 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1902$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1903 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1904$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1905 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1906$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1907 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1908$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1909 ;;
1910esac
1911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1912$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1913if eval \${$3+:} false; then :
81ecdfbb
RW
1914 $as_echo_n "(cached) " >&6
1915else
1916 eval "$3=\$ac_header_compiler"
1917fi
1918eval ac_res=\$$3
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1920$as_echo "$ac_res" >&6; }
1921fi
d0ac1c44 1922 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 1923
81ecdfbb 1924} # ac_fn_c_check_header_mongrel
bec39cab 1925
81ecdfbb
RW
1926# ac_fn_c_try_run LINENO
1927# ----------------------
1928# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1929# that executables *can* be run.
1930ac_fn_c_try_run ()
1931{
1932 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1933 if { { ac_try="$ac_link"
1934case "(($ac_try" in
1935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1936 *) ac_try_echo=$ac_try;;
1937esac
1938eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1939$as_echo "$ac_try_echo"; } >&5
1940 (eval "$ac_link") 2>&5
1941 ac_status=$?
1942 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1943 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1944 { { case "(($ac_try" in
1945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1946 *) ac_try_echo=$ac_try;;
1947esac
1948eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1949$as_echo "$ac_try_echo"; } >&5
1950 (eval "$ac_try") 2>&5
1951 ac_status=$?
1952 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1953 test $ac_status = 0; }; }; then :
1954 ac_retval=0
1955else
1956 $as_echo "$as_me: program exited with status $ac_status" >&5
1957 $as_echo "$as_me: failed program was:" >&5
1958sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1959
81ecdfbb
RW
1960 ac_retval=$ac_status
1961fi
1962 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
1963 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1964 as_fn_set_status $ac_retval
bec39cab 1965
81ecdfbb 1966} # ac_fn_c_try_run
bec39cab 1967
81ecdfbb
RW
1968# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1969# -------------------------------------------------------
1970# Tests whether HEADER exists and can be compiled using the include files in
1971# INCLUDES, setting the cache variable VAR accordingly.
1972ac_fn_c_check_header_compile ()
1973{
1974 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1976$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1977if eval \${$3+:} false; then :
81ecdfbb
RW
1978 $as_echo_n "(cached) " >&6
1979else
1980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1981/* end confdefs.h. */
1982$4
1983#include <$2>
bec39cab 1984_ACEOF
81ecdfbb
RW
1985if ac_fn_c_try_compile "$LINENO"; then :
1986 eval "$3=yes"
1987else
1988 eval "$3=no"
1989fi
1990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1991fi
1992eval ac_res=\$$3
1993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1994$as_echo "$ac_res" >&6; }
d0ac1c44 1995 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 1996
81ecdfbb 1997} # ac_fn_c_check_header_compile
bec39cab 1998
2974be62
AM
1999# ac_fn_c_try_link LINENO
2000# -----------------------
2001# Try to link conftest.$ac_ext, and return whether this succeeded.
2002ac_fn_c_try_link ()
2003{
2004 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2005 rm -f conftest.$ac_objext conftest$ac_exeext
2006 if { { ac_try="$ac_link"
2007case "(($ac_try" in
2008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2009 *) ac_try_echo=$ac_try;;
2010esac
2011eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2012$as_echo "$ac_try_echo"; } >&5
2013 (eval "$ac_link") 2>conftest.err
2014 ac_status=$?
2015 if test -s conftest.err; then
2016 grep -v '^ *+' conftest.err >conftest.er1
2017 cat conftest.er1 >&5
2018 mv -f conftest.er1 conftest.err
2019 fi
2020 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2021 test $ac_status = 0; } && {
2022 test -z "$ac_c_werror_flag" ||
2023 test ! -s conftest.err
2024 } && test -s conftest$ac_exeext && {
2025 test "$cross_compiling" = yes ||
d0ac1c44 2026 test -x conftest$ac_exeext
2974be62
AM
2027 }; then :
2028 ac_retval=0
2029else
2030 $as_echo "$as_me: failed program was:" >&5
2031sed 's/^/| /' conftest.$ac_ext >&5
2032
2033 ac_retval=1
2034fi
2035 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2036 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2037 # interfere with the next link command; also delete a directory that is
2038 # left behind by Apple's compiler. We do this before executing the actions.
2039 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2040 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2041 as_fn_set_status $ac_retval
2974be62
AM
2042
2043} # ac_fn_c_try_link
2044
81ecdfbb
RW
2045# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2046# --------------------------------------------
2047# Tries to find the compile-time value of EXPR in a program that includes
2048# INCLUDES, setting VAR accordingly. Returns whether the value could be
2049# computed
2050ac_fn_c_compute_int ()
2051{
2052 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2053 if test "$cross_compiling" = yes; then
2054 # Depending upon the size, compute the lo and hi bounds.
2055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2056/* end confdefs.h. */
2057$4
2058int
2059main ()
2060{
2061static int test_array [1 - 2 * !(($2) >= 0)];
d0ac1c44
SM
2062test_array [0] = 0;
2063return test_array [0];
bec39cab 2064
81ecdfbb
RW
2065 ;
2066 return 0;
2067}
2068_ACEOF
2069if ac_fn_c_try_compile "$LINENO"; then :
2070 ac_lo=0 ac_mid=0
2071 while :; do
2072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2073/* end confdefs.h. */
2074$4
2075int
2076main ()
2077{
2078static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2079test_array [0] = 0;
2080return test_array [0];
bec39cab 2081
81ecdfbb
RW
2082 ;
2083 return 0;
2084}
2085_ACEOF
2086if ac_fn_c_try_compile "$LINENO"; then :
2087 ac_hi=$ac_mid; break
2088else
2089 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2090 if test $ac_lo -le $ac_mid; then
2091 ac_lo= ac_hi=
2092 break
2093 fi
2094 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2095fi
81ecdfbb
RW
2096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2097 done
c906108c 2098else
81ecdfbb
RW
2099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2100/* end confdefs.h. */
2101$4
2102int
2103main ()
2104{
2105static int test_array [1 - 2 * !(($2) < 0)];
d0ac1c44
SM
2106test_array [0] = 0;
2107return test_array [0];
bec39cab 2108
81ecdfbb
RW
2109 ;
2110 return 0;
2111}
2112_ACEOF
2113if ac_fn_c_try_compile "$LINENO"; then :
2114 ac_hi=-1 ac_mid=-1
2115 while :; do
2116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2117/* end confdefs.h. */
2118$4
2119int
2120main ()
2121{
2122static int test_array [1 - 2 * !(($2) >= $ac_mid)];
d0ac1c44
SM
2123test_array [0] = 0;
2124return test_array [0];
bec39cab 2125
81ecdfbb
RW
2126 ;
2127 return 0;
2128}
2129_ACEOF
2130if ac_fn_c_try_compile "$LINENO"; then :
2131 ac_lo=$ac_mid; break
2132else
2133 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2134 if test $ac_mid -le $ac_hi; then
2135 ac_lo= ac_hi=
2136 break
2137 fi
2138 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2139fi
2140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2141 done
2142else
2143 ac_lo= ac_hi=
2144fi
2145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2146fi
2147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2148# Binary search between lo and hi bounds.
2149while test "x$ac_lo" != "x$ac_hi"; do
2150 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2152/* end confdefs.h. */
2153$4
2154int
2155main ()
2156{
2157static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2158test_array [0] = 0;
2159return test_array [0];
bec39cab 2160
81ecdfbb
RW
2161 ;
2162 return 0;
2163}
2164_ACEOF
2165if ac_fn_c_try_compile "$LINENO"; then :
2166 ac_hi=$ac_mid
2167else
2168 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2169fi
2170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2171done
2172case $ac_lo in #((
2173?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2174'') ac_retval=1 ;;
2175esac
2176 else
2177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2178/* end confdefs.h. */
2179$4
2180static long int longval () { return $2; }
2181static unsigned long int ulongval () { return $2; }
2182#include <stdio.h>
2183#include <stdlib.h>
2184int
2185main ()
2186{
bec39cab 2187
81ecdfbb
RW
2188 FILE *f = fopen ("conftest.val", "w");
2189 if (! f)
2190 return 1;
2191 if (($2) < 0)
2192 {
2193 long int i = longval ();
2194 if (i != ($2))
2195 return 1;
2196 fprintf (f, "%ld", i);
2197 }
2198 else
2199 {
2200 unsigned long int i = ulongval ();
2201 if (i != ($2))
2202 return 1;
2203 fprintf (f, "%lu", i);
2204 }
2205 /* Do not output a trailing newline, as this causes \r\n confusion
2206 on some platforms. */
2207 return ferror (f) || fclose (f) != 0;
bec39cab 2208
81ecdfbb
RW
2209 ;
2210 return 0;
2211}
2212_ACEOF
2213if ac_fn_c_try_run "$LINENO"; then :
2214 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2215else
2216 ac_retval=1
2217fi
2218rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2219 conftest.$ac_objext conftest.beam conftest.$ac_ext
2220rm -f conftest.val
bec39cab 2221
81ecdfbb 2222 fi
d0ac1c44
SM
2223 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2224 as_fn_set_status $ac_retval
bec39cab 2225
81ecdfbb 2226} # ac_fn_c_compute_int
bec39cab 2227
55a8c076
YQ
2228# ac_fn_c_check_func LINENO FUNC VAR
2229# ----------------------------------
2230# Tests whether FUNC exists, setting the cache variable VAR accordingly
2231ac_fn_c_check_func ()
81ecdfbb
RW
2232{
2233 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2235$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2236if eval \${$3+:} false; then :
81ecdfbb
RW
2237 $as_echo_n "(cached) " >&6
2238else
81ecdfbb
RW
2239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2240/* end confdefs.h. */
55a8c076
YQ
2241/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2242 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2243#define $2 innocuous_$2
2244
2245/* System header to define __stub macros and hopefully few prototypes,
2246 which can conflict with char $2 (); below.
2247 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2248 <limits.h> exists even on freestanding compilers. */
2249
2250#ifdef __STDC__
2251# include <limits.h>
2252#else
2253# include <assert.h>
2254#endif
2255
2256#undef $2
2257
2258/* Override any GCC internal prototype to avoid an error.
2259 Use char because int might match the return type of a GCC
2260 builtin and then its argument prototype would still apply. */
2261#ifdef __cplusplus
2262extern "C"
2263#endif
2264char $2 ();
2265/* The GNU C library defines this for functions which it implements
2266 to always fail with ENOSYS. Some functions are actually named
2267 something starting with __ and the normal name is an alias. */
2268#if defined __stub_$2 || defined __stub___$2
2269choke me
2270#endif
2271
2272int
2273main ()
2274{
2275return $2 ();
2276 ;
2277 return 0;
2278}
2279_ACEOF
2280if ac_fn_c_try_link "$LINENO"; then :
2281 eval "$3=yes"
2282else
2283 eval "$3=no"
2284fi
2285rm -f core conftest.err conftest.$ac_objext \
2286 conftest$ac_exeext conftest.$ac_ext
2287fi
2288eval ac_res=\$$3
2289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2290$as_echo "$ac_res" >&6; }
d0ac1c44 2291 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
55a8c076
YQ
2292
2293} # ac_fn_c_check_func
2294
c56ccc05
MM
2295# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2296# ----------------------------------------------------
2297# Tries to find if the field MEMBER exists in type AGGR, after including
2298# INCLUDES, setting cache variable VAR accordingly.
2299ac_fn_c_check_member ()
2300{
2301 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2303$as_echo_n "checking for $2.$3... " >&6; }
d0ac1c44 2304if eval \${$4+:} false; then :
c56ccc05
MM
2305 $as_echo_n "(cached) " >&6
2306else
2307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2308/* end confdefs.h. */
2309$5
2310int
2311main ()
2312{
2313static $2 ac_aggr;
2314if (ac_aggr.$3)
2315return 0;
2316 ;
2317 return 0;
2318}
2319_ACEOF
2320if ac_fn_c_try_compile "$LINENO"; then :
2321 eval "$4=yes"
2322else
2323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2324/* end confdefs.h. */
2325$5
2326int
2327main ()
2328{
2329static $2 ac_aggr;
2330if (sizeof ac_aggr.$3)
2331return 0;
2332 ;
2333 return 0;
2334}
2335_ACEOF
2336if ac_fn_c_try_compile "$LINENO"; then :
2337 eval "$4=yes"
2338else
2339 eval "$4=no"
2340fi
2341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2342fi
2343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2344fi
2345eval ac_res=\$$4
2346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2347$as_echo "$ac_res" >&6; }
d0ac1c44 2348 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
c56ccc05
MM
2349
2350} # ac_fn_c_check_member
2351
07697489
PA
2352# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2353# -------------------------------------------
2354# Tests whether TYPE exists after having included INCLUDES, setting cache
2355# variable VAR accordingly.
2356ac_fn_c_check_type ()
2357{
2358 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2360$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2361if eval \${$3+:} false; then :
07697489
PA
2362 $as_echo_n "(cached) " >&6
2363else
2364 eval "$3=no"
2365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2366/* end confdefs.h. */
2367$4
2368int
2369main ()
2370{
2371if (sizeof ($2))
2372 return 0;
2373 ;
2374 return 0;
2375}
2376_ACEOF
2377if ac_fn_c_try_compile "$LINENO"; then :
2378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2379/* end confdefs.h. */
2380$4
2381int
2382main ()
2383{
2384if (sizeof (($2)))
2385 return 0;
2386 ;
2387 return 0;
2388}
2389_ACEOF
2390if ac_fn_c_try_compile "$LINENO"; then :
2391
2392else
2393 eval "$3=yes"
2394fi
2395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2396fi
2397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2398fi
2399eval ac_res=\$$3
2400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2401$as_echo "$ac_res" >&6; }
d0ac1c44 2402 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
07697489
PA
2403
2404} # ac_fn_c_check_type
2405
d0ac1c44
SM
2406# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2407# ---------------------------------------------
2408# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2409# accordingly.
770d76d7
PA
2410ac_fn_c_check_decl ()
2411{
2412 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2413 as_decl_name=`echo $2|sed 's/ *(.*//'`
2414 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2416$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
d0ac1c44 2417if eval \${$3+:} false; then :
770d76d7
PA
2418 $as_echo_n "(cached) " >&6
2419else
2420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2421/* end confdefs.h. */
2422$4
2423int
2424main ()
2425{
2426#ifndef $as_decl_name
2427#ifdef __cplusplus
2428 (void) $as_decl_use;
2429#else
2430 (void) $as_decl_name;
2431#endif
2432#endif
2433
2434 ;
2435 return 0;
2436}
2437_ACEOF
2438if ac_fn_c_try_compile "$LINENO"; then :
2439 eval "$3=yes"
2440else
2441 eval "$3=no"
2442fi
2443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2444fi
2445eval ac_res=\$$3
2446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2447$as_echo "$ac_res" >&6; }
d0ac1c44 2448 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
770d76d7
PA
2449
2450} # ac_fn_c_check_decl
81ecdfbb
RW
2451cat >config.log <<_ACEOF
2452This file contains any messages produced by compilers while
2453running configure, to aid debugging if configure makes a mistake.
d5af19ba 2454
81ecdfbb 2455It was created by $as_me, which was
d0ac1c44 2456generated by GNU Autoconf 2.69. Invocation command line was
b4e70030 2457
81ecdfbb 2458 $ $0 $@
413ccac7 2459
81ecdfbb
RW
2460_ACEOF
2461exec 5>>config.log
2462{
2463cat <<_ASUNAME
2464## --------- ##
2465## Platform. ##
2466## --------- ##
413ccac7 2467
81ecdfbb
RW
2468hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2469uname -m = `(uname -m) 2>/dev/null || echo unknown`
2470uname -r = `(uname -r) 2>/dev/null || echo unknown`
2471uname -s = `(uname -s) 2>/dev/null || echo unknown`
2472uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2473
81ecdfbb
RW
2474/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2475/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2476
81ecdfbb
RW
2477/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2478/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2479/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2480/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2481/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2482/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2483/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2484
81ecdfbb 2485_ASUNAME
bec39cab 2486
bec39cab
AC
2487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2488for as_dir in $PATH
2489do
2490 IFS=$as_save_IFS
2491 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2492 $as_echo "PATH: $as_dir"
2493 done
2494IFS=$as_save_IFS
bec39cab 2495
81ecdfbb 2496} >&5
bec39cab 2497
81ecdfbb 2498cat >&5 <<_ACEOF
bec39cab 2499
bec39cab 2500
81ecdfbb
RW
2501## ----------- ##
2502## Core tests. ##
2503## ----------- ##
2504
2505_ACEOF
2506
2507
2508# Keep a trace of the command line.
2509# Strip out --no-create and --no-recursion so they do not pile up.
2510# Strip out --silent because we don't want to record it for future runs.
2511# Also quote any args containing shell meta-characters.
2512# Make two passes to allow for proper duplicate-argument suppression.
2513ac_configure_args=
2514ac_configure_args0=
2515ac_configure_args1=
2516ac_must_keep_next=false
2517for ac_pass in 1 2
2518do
2519 for ac_arg
2520 do
2521 case $ac_arg in
2522 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2523 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2524 | -silent | --silent | --silen | --sile | --sil)
2525 continue ;;
2526 *\'*)
2527 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2528 esac
2529 case $ac_pass in
2530 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2531 2)
2532 as_fn_append ac_configure_args1 " '$ac_arg'"
2533 if test $ac_must_keep_next = true; then
2534 ac_must_keep_next=false # Got value, back to normal.
2535 else
2536 case $ac_arg in
2537 *=* | --config-cache | -C | -disable-* | --disable-* \
2538 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2539 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2540 | -with-* | --with-* | -without-* | --without-* | --x)
2541 case "$ac_configure_args0 " in
2542 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2543 esac
2544 ;;
2545 -* ) ac_must_keep_next=true ;;
2546 esac
2547 fi
2548 as_fn_append ac_configure_args " '$ac_arg'"
2549 ;;
2550 esac
2551 done
2552done
2553{ ac_configure_args0=; unset ac_configure_args0;}
2554{ ac_configure_args1=; unset ac_configure_args1;}
2555
2556# When interrupted or exit'd, cleanup temporary files, and complete
2557# config.log. We remove comments because anyway the quotes in there
2558# would cause problems or look ugly.
2559# WARNING: Use '\'' to represent an apostrophe within the trap.
2560# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2561trap 'exit_status=$?
2562 # Save into config.log some information that might help in debugging.
2563 {
2564 echo
2565
d0ac1c44 2566 $as_echo "## ---------------- ##
81ecdfbb 2567## Cache variables. ##
d0ac1c44 2568## ---------------- ##"
81ecdfbb
RW
2569 echo
2570 # The following way of writing the cache mishandles newlines in values,
2571(
2572 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2573 eval ac_val=\$$ac_var
2574 case $ac_val in #(
2575 *${as_nl}*)
2576 case $ac_var in #(
2577 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2578$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2579 esac
2580 case $ac_var in #(
2581 _ | IFS | as_nl) ;; #(
2582 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2583 *) { eval $ac_var=; unset $ac_var;} ;;
2584 esac ;;
2585 esac
2586 done
2587 (set) 2>&1 |
2588 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2589 *${as_nl}ac_space=\ *)
2590 sed -n \
2591 "s/'\''/'\''\\\\'\'''\''/g;
2592 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2593 ;; #(
2594 *)
2595 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2596 ;;
2597 esac |
2598 sort
2599)
2600 echo
2601
d0ac1c44 2602 $as_echo "## ----------------- ##
81ecdfbb 2603## Output variables. ##
d0ac1c44 2604## ----------------- ##"
81ecdfbb
RW
2605 echo
2606 for ac_var in $ac_subst_vars
2607 do
2608 eval ac_val=\$$ac_var
2609 case $ac_val in
2610 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2611 esac
2612 $as_echo "$ac_var='\''$ac_val'\''"
2613 done | sort
2614 echo
2615
2616 if test -n "$ac_subst_files"; then
d0ac1c44 2617 $as_echo "## ------------------- ##
81ecdfbb 2618## File substitutions. ##
d0ac1c44 2619## ------------------- ##"
81ecdfbb
RW
2620 echo
2621 for ac_var in $ac_subst_files
2622 do
2623 eval ac_val=\$$ac_var
2624 case $ac_val in
2625 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2626 esac
2627 $as_echo "$ac_var='\''$ac_val'\''"
2628 done | sort
2629 echo
2630 fi
2631
2632 if test -s confdefs.h; then
d0ac1c44 2633 $as_echo "## ----------- ##
81ecdfbb 2634## confdefs.h. ##
d0ac1c44 2635## ----------- ##"
81ecdfbb
RW
2636 echo
2637 cat confdefs.h
2638 echo
2639 fi
2640 test "$ac_signal" != 0 &&
2641 $as_echo "$as_me: caught signal $ac_signal"
2642 $as_echo "$as_me: exit $exit_status"
2643 } >&5
2644 rm -f core *.core core.conftest.* &&
2645 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2646 exit $exit_status
2647' 0
2648for ac_signal in 1 2 13 15; do
2649 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2650done
2651ac_signal=0
2652
2653# confdefs.h avoids OS command line length limits that DEFS can exceed.
2654rm -f -r conftest* confdefs.h
2655
2656$as_echo "/* confdefs.h */" > confdefs.h
2657
2658# Predefined preprocessor variables.
2659
2660cat >>confdefs.h <<_ACEOF
2661#define PACKAGE_NAME "$PACKAGE_NAME"
2662_ACEOF
2663
2664cat >>confdefs.h <<_ACEOF
2665#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2666_ACEOF
2667
2668cat >>confdefs.h <<_ACEOF
2669#define PACKAGE_VERSION "$PACKAGE_VERSION"
2670_ACEOF
2671
2672cat >>confdefs.h <<_ACEOF
2673#define PACKAGE_STRING "$PACKAGE_STRING"
2674_ACEOF
2675
2676cat >>confdefs.h <<_ACEOF
2677#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2678_ACEOF
2679
2680cat >>confdefs.h <<_ACEOF
2681#define PACKAGE_URL "$PACKAGE_URL"
2682_ACEOF
2683
2684
2685# Let the site file select an alternate cache file if it wants to.
2686# Prefer an explicitly selected file to automatically selected ones.
2687ac_site_file1=NONE
2688ac_site_file2=NONE
2689if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
2690 # We do not want a PATH search for config.site.
2691 case $CONFIG_SITE in #((
2692 -*) ac_site_file1=./$CONFIG_SITE;;
2693 */*) ac_site_file1=$CONFIG_SITE;;
2694 *) ac_site_file1=./$CONFIG_SITE;;
2695 esac
81ecdfbb
RW
2696elif test "x$prefix" != xNONE; then
2697 ac_site_file1=$prefix/share/config.site
2698 ac_site_file2=$prefix/etc/config.site
2699else
2700 ac_site_file1=$ac_default_prefix/share/config.site
2701 ac_site_file2=$ac_default_prefix/etc/config.site
2702fi
2703for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2704do
2705 test "x$ac_site_file" = xNONE && continue
d0ac1c44 2706 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
81ecdfbb
RW
2707 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2708$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2709 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
2710 . "$ac_site_file" \
2711 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2712$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2713as_fn_error $? "failed to load site script $ac_site_file
2714See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
2715 fi
2716done
2717
2718if test -r "$cache_file"; then
d0ac1c44
SM
2719 # Some versions of bash will fail to source /dev/null (special files
2720 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2721 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
81ecdfbb
RW
2722 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2723$as_echo "$as_me: loading cache $cache_file" >&6;}
2724 case $cache_file in
2725 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2726 *) . "./$cache_file";;
2727 esac
2728 fi
2729else
2730 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2731$as_echo "$as_me: creating cache $cache_file" >&6;}
2732 >$cache_file
bec39cab
AC
2733fi
2734
d0ac1c44
SM
2735as_fn_append ac_header_list " stdlib.h"
2736as_fn_append ac_header_list " unistd.h"
2737as_fn_append ac_header_list " sys/param.h"
81ecdfbb
RW
2738# Check that the precious variables saved in the cache have kept the same
2739# value.
2740ac_cache_corrupted=false
2741for ac_var in $ac_precious_vars; do
2742 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2743 eval ac_new_set=\$ac_env_${ac_var}_set
2744 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2745 eval ac_new_val=\$ac_env_${ac_var}_value
2746 case $ac_old_set,$ac_new_set in
2747 set,)
2748 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2749$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2750 ac_cache_corrupted=: ;;
2751 ,set)
2752 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2753$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2754 ac_cache_corrupted=: ;;
2755 ,);;
2756 *)
2757 if test "x$ac_old_val" != "x$ac_new_val"; then
2758 # differences in whitespace do not lead to failure.
2759 ac_old_val_w=`echo x $ac_old_val`
2760 ac_new_val_w=`echo x $ac_new_val`
2761 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2762 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2763$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2764 ac_cache_corrupted=:
2765 else
2766 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2767$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2768 eval $ac_var=\$ac_old_val
2769 fi
2770 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2771$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2772 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2773$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2774 fi;;
2775 esac
2776 # Pass precious variables to config.status.
2777 if test "$ac_new_set" = set; then
2778 case $ac_new_val in
2779 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2780 *) ac_arg=$ac_var=$ac_new_val ;;
2781 esac
2782 case " $ac_configure_args " in
2783 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2784 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2785 esac
2786 fi
2787done
2788if $ac_cache_corrupted; then
2789 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2790$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2791 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2792$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 2793 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
81ecdfbb
RW
2794fi
2795## -------------------- ##
2796## Main body of script. ##
2797## -------------------- ##
2798
2799ac_ext=c
2800ac_cpp='$CPP $CPPFLAGS'
2801ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2802ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2803ac_compiler_gnu=$ac_cv_c_compiler_gnu
2804
2805
2806
2807
2808
2809ac_config_headers="$ac_config_headers config.h:config.in"
2810
2811
2812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2813$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2814 # Check whether --enable-maintainer-mode was given.
2815if test "${enable_maintainer_mode+set}" = set; then :
2816 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2817else
2818 USE_MAINTAINER_MODE=no
2819fi
2820
2821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2822$as_echo "$USE_MAINTAINER_MODE" >&6; }
2823 if test $USE_MAINTAINER_MODE = yes; then
2824 MAINTAINER_MODE_TRUE=
2825 MAINTAINER_MODE_FALSE='#'
2826else
2827 MAINTAINER_MODE_TRUE='#'
2828 MAINTAINER_MODE_FALSE=
2829fi
2830
2831 MAINT=$MAINTAINER_MODE_TRUE
2832
2833
2834
17ef446e 2835# Set the 'development' global.
270c9937 2836. $srcdir/../bfd/development.sh
f5f1cdb6 2837
81ecdfbb
RW
2838ac_ext=c
2839ac_cpp='$CPP $CPPFLAGS'
2840ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2841ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2842ac_compiler_gnu=$ac_cv_c_compiler_gnu
2843if test -n "$ac_tool_prefix"; then
2844 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2845set dummy ${ac_tool_prefix}gcc; ac_word=$2
2846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2847$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2848if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2849 $as_echo_n "(cached) " >&6
c906108c
SS
2850else
2851 if test -n "$CC"; then
2852 ac_cv_prog_CC="$CC" # Let the user override the test.
2853else
bec39cab
AC
2854as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2855for as_dir in $PATH
2856do
2857 IFS=$as_save_IFS
2858 test -z "$as_dir" && as_dir=.
81ecdfbb 2859 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2860 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2861 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2862 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2863 break 2
2864 fi
2865done
81ecdfbb
RW
2866 done
2867IFS=$as_save_IFS
bec39cab 2868
c906108c
SS
2869fi
2870fi
bec39cab 2871CC=$ac_cv_prog_CC
c906108c 2872if test -n "$CC"; then
81ecdfbb
RW
2873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2874$as_echo "$CC" >&6; }
c906108c 2875else
81ecdfbb
RW
2876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2877$as_echo "no" >&6; }
c906108c
SS
2878fi
2879
81ecdfbb 2880
b4e70030
JB
2881fi
2882if test -z "$ac_cv_prog_CC"; then
2883 ac_ct_CC=$CC
81ecdfbb
RW
2884 # Extract the first word of "gcc", so it can be a program name with args.
2885set dummy gcc; ac_word=$2
2886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2887$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2888if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 2889 $as_echo_n "(cached) " >&6
b4e70030
JB
2890else
2891 if test -n "$ac_ct_CC"; then
2892 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2893else
2894as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2895for as_dir in $PATH
2896do
2897 IFS=$as_save_IFS
2898 test -z "$as_dir" && as_dir=.
81ecdfbb 2899 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2900 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2901 ac_cv_prog_ac_ct_CC="gcc"
2902 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2903 break 2
4e8d927d 2904 fi
b4e70030 2905done
81ecdfbb
RW
2906 done
2907IFS=$as_save_IFS
b4e70030
JB
2908
2909fi
2910fi
2911ac_ct_CC=$ac_cv_prog_ac_ct_CC
2912if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2914$as_echo "$ac_ct_CC" >&6; }
b4e70030 2915else
81ecdfbb
RW
2916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2917$as_echo "no" >&6; }
b4e70030
JB
2918fi
2919
81ecdfbb
RW
2920 if test "x$ac_ct_CC" = x; then
2921 CC=""
2922 else
2923 case $cross_compiling:$ac_tool_warned in
2924yes:)
2925{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2926$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2927ac_tool_warned=yes ;;
2928esac
2929 CC=$ac_ct_CC
2930 fi
b4e70030
JB
2931else
2932 CC="$ac_cv_prog_CC"
2933fi
2934
c906108c 2935if test -z "$CC"; then
81ecdfbb
RW
2936 if test -n "$ac_tool_prefix"; then
2937 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2938set dummy ${ac_tool_prefix}cc; ac_word=$2
2939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2940$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2941if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2942 $as_echo_n "(cached) " >&6
c906108c
SS
2943else
2944 if test -n "$CC"; then
2945 ac_cv_prog_CC="$CC" # Let the user override the test.
2946else
bec39cab
AC
2947as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2948for as_dir in $PATH
2949do
2950 IFS=$as_save_IFS
2951 test -z "$as_dir" && as_dir=.
81ecdfbb 2952 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2953 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2954 ac_cv_prog_CC="${ac_tool_prefix}cc"
2955 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2956 break 2
2957 fi
2958done
81ecdfbb
RW
2959 done
2960IFS=$as_save_IFS
2961
2962fi
2963fi
2964CC=$ac_cv_prog_CC
2965if test -n "$CC"; then
2966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2967$as_echo "$CC" >&6; }
2968else
2969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2970$as_echo "no" >&6; }
2971fi
2972
2973
2974 fi
2975fi
2976if test -z "$CC"; then
2977 # Extract the first word of "cc", so it can be a program name with args.
2978set dummy cc; ac_word=$2
2979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2980$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2981if ${ac_cv_prog_CC+:} false; then :
81ecdfbb
RW
2982 $as_echo_n "(cached) " >&6
2983else
2984 if test -n "$CC"; then
2985 ac_cv_prog_CC="$CC" # Let the user override the test.
2986else
2987 ac_prog_rejected=no
2988as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2989for as_dir in $PATH
2990do
2991 IFS=$as_save_IFS
2992 test -z "$as_dir" && as_dir=.
2993 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2994 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2995 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2996 ac_prog_rejected=yes
2997 continue
2998 fi
2999 ac_cv_prog_CC="cc"
3000 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3001 break 2
3002 fi
3003done
3004 done
3005IFS=$as_save_IFS
bec39cab 3006
c906108c
SS
3007if test $ac_prog_rejected = yes; then
3008 # We found a bogon in the path, so make sure we never use it.
3009 set dummy $ac_cv_prog_CC
3010 shift
bec39cab 3011 if test $# != 0; then
c906108c
SS
3012 # We chose a different compiler from the bogus one.
3013 # However, it has the same basename, so the bogon will be chosen
3014 # first if we set CC to just the basename; use the full file name.
3015 shift
bec39cab 3016 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3017 fi
3018fi
3019fi
3020fi
bec39cab 3021CC=$ac_cv_prog_CC
c906108c 3022if test -n "$CC"; then
81ecdfbb
RW
3023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3024$as_echo "$CC" >&6; }
c906108c 3025else
81ecdfbb
RW
3026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3027$as_echo "no" >&6; }
c906108c
SS
3028fi
3029
81ecdfbb 3030
bec39cab
AC
3031fi
3032if test -z "$CC"; then
3033 if test -n "$ac_tool_prefix"; then
81ecdfbb 3034 for ac_prog in cl.exe
bec39cab
AC
3035 do
3036 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3037set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3039$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3040if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3041 $as_echo_n "(cached) " >&6
c906108c
SS
3042else
3043 if test -n "$CC"; then
3044 ac_cv_prog_CC="$CC" # Let the user override the test.
3045else
bec39cab
AC
3046as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3047for as_dir in $PATH
3048do
3049 IFS=$as_save_IFS
3050 test -z "$as_dir" && as_dir=.
81ecdfbb 3051 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3052 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3053 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3054 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3055 break 2
3056 fi
3057done
81ecdfbb
RW
3058 done
3059IFS=$as_save_IFS
bec39cab 3060
c906108c
SS
3061fi
3062fi
bec39cab 3063CC=$ac_cv_prog_CC
c906108c 3064if test -n "$CC"; then
81ecdfbb
RW
3065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3066$as_echo "$CC" >&6; }
c906108c 3067else
81ecdfbb
RW
3068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3069$as_echo "no" >&6; }
c906108c 3070fi
bec39cab 3071
81ecdfbb 3072
bec39cab
AC
3073 test -n "$CC" && break
3074 done
3075fi
3076if test -z "$CC"; then
3077 ac_ct_CC=$CC
81ecdfbb 3078 for ac_prog in cl.exe
bec39cab
AC
3079do
3080 # Extract the first word of "$ac_prog", so it can be a program name with args.
3081set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3083$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3084if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3085 $as_echo_n "(cached) " >&6
bec39cab
AC
3086else
3087 if test -n "$ac_ct_CC"; then
3088 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3089else
3090as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3091for as_dir in $PATH
3092do
3093 IFS=$as_save_IFS
3094 test -z "$as_dir" && as_dir=.
81ecdfbb 3095 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3096 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3097 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3098 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3099 break 2
c906108c 3100 fi
bec39cab 3101done
81ecdfbb
RW
3102 done
3103IFS=$as_save_IFS
bec39cab
AC
3104
3105fi
3106fi
3107ac_ct_CC=$ac_cv_prog_ac_ct_CC
3108if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3110$as_echo "$ac_ct_CC" >&6; }
bec39cab 3111else
81ecdfbb
RW
3112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3113$as_echo "no" >&6; }
c906108c
SS
3114fi
3115
81ecdfbb 3116
bec39cab
AC
3117 test -n "$ac_ct_CC" && break
3118done
c906108c 3119
81ecdfbb
RW
3120 if test "x$ac_ct_CC" = x; then
3121 CC=""
3122 else
3123 case $cross_compiling:$ac_tool_warned in
3124yes:)
3125{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3126$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3127ac_tool_warned=yes ;;
3128esac
3129 CC=$ac_ct_CC
3130 fi
bec39cab
AC
3131fi
3132
3133fi
3134
3135
81ecdfbb
RW
3136test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3137$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3138as_fn_error $? "no acceptable C compiler found in \$PATH
3139See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3140
3141# Provide some information about the compiler.
81ecdfbb
RW
3142$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3143set X $ac_compile
3144ac_compiler=$2
3145for ac_option in --version -v -V -qversion; do
3146 { { ac_try="$ac_compiler $ac_option >&5"
3147case "(($ac_try" in
3148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3149 *) ac_try_echo=$ac_try;;
3150esac
3151eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3152$as_echo "$ac_try_echo"; } >&5
3153 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3154 ac_status=$?
81ecdfbb
RW
3155 if test -s conftest.err; then
3156 sed '10a\
3157... rest of stderr output deleted ...
3158 10q' conftest.err >conftest.er1
3159 cat conftest.er1 >&5
81ecdfbb 3160 fi
d0ac1c44 3161 rm -f conftest.er1 conftest.err
81ecdfbb
RW
3162 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3163 test $ac_status = 0; }
3164done
bec39cab 3165
81ecdfbb 3166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3167/* end confdefs.h. */
3168
3169int
3170main ()
3171{
3172
3173 ;
3174 return 0;
3175}
3176_ACEOF
3177ac_clean_files_save=$ac_clean_files
d0ac1c44 3178ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
bec39cab
AC
3179# Try to create an executable without -o first, disregard a.out.
3180# It will help us diagnose broken compilers, and finding out an intuition
3181# of exeext.
d0ac1c44
SM
3182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3183$as_echo_n "checking whether the C compiler works... " >&6; }
81ecdfbb
RW
3184ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3185
3186# The possible output files:
3187ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3188
3189ac_rmfiles=
3190for ac_file in $ac_files
3191do
3192 case $ac_file in
3193 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3194 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3195 esac
3196done
3197rm -f $ac_rmfiles
3198
3199if { { ac_try="$ac_link_default"
3200case "(($ac_try" in
3201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3202 *) ac_try_echo=$ac_try;;
3203esac
3204eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3205$as_echo "$ac_try_echo"; } >&5
3206 (eval "$ac_link_default") 2>&5
3207 ac_status=$?
3208 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3209 test $ac_status = 0; }; then :
3210 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3211# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3212# in a Makefile. We should not override ac_cv_exeext if it was cached,
3213# so that the user can short-circuit this test for compilers unknown to
3214# Autoconf.
3215for ac_file in $ac_files ''
bec39cab
AC
3216do
3217 test -f "$ac_file" || continue
3218 case $ac_file in
81ecdfbb 3219 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3220 ;;
3221 [ab].out )
3222 # We found the default executable, but exeext='' is most
3223 # certainly right.
3224 break;;
3225 *.* )
81ecdfbb
RW
3226 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3227 then :; else
3228 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3229 fi
3230 # We set ac_cv_exeext here because the later test for it is not
3231 # safe: cross compilers may not add the suffix if given an `-o'
3232 # argument, so we may need to know it at that point already.
3233 # Even if this section looks crufty: it has the advantage of
3234 # actually working.
b4e70030
JB
3235 break;;
3236 * )
3237 break;;
bec39cab
AC
3238 esac
3239done
81ecdfbb
RW
3240test "$ac_cv_exeext" = no && ac_cv_exeext=
3241
bec39cab 3242else
81ecdfbb
RW
3243 ac_file=''
3244fi
81ecdfbb 3245if test -z "$ac_file"; then :
d0ac1c44
SM
3246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3247$as_echo "no" >&6; }
3248$as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3249sed 's/^/| /' conftest.$ac_ext >&5
3250
81ecdfbb
RW
3251{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3252$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3253as_fn_error 77 "C compiler cannot create executables
3254See \`config.log' for more details" "$LINENO" 5; }
3255else
3256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3257$as_echo "yes" >&6; }
bec39cab 3258fi
d0ac1c44
SM
3259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3260$as_echo_n "checking for C compiler default output file name... " >&6; }
3261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3262$as_echo "$ac_file" >&6; }
b4e70030 3263ac_exeext=$ac_cv_exeext
b4e70030 3264
d0ac1c44 3265rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
b4e70030 3266ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3268$as_echo_n "checking for suffix of executables... " >&6; }
3269if { { ac_try="$ac_link"
3270case "(($ac_try" in
3271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3272 *) ac_try_echo=$ac_try;;
3273esac
3274eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3275$as_echo "$ac_try_echo"; } >&5
3276 (eval "$ac_link") 2>&5
bec39cab 3277 ac_status=$?
81ecdfbb
RW
3278 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3279 test $ac_status = 0; }; then :
b4e70030
JB
3280 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3281# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3282# work properly (i.e., refer to `conftest.exe'), while it won't with
3283# `rm'.
3284for ac_file in conftest.exe conftest conftest.*; do
3285 test -f "$ac_file" || continue
3286 case $ac_file in
81ecdfbb 3287 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3288 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3289 break;;
3290 * ) break;;
3291 esac
3292done
c906108c 3293else
81ecdfbb
RW
3294 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3295$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3296as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3297See \`config.log' for more details" "$LINENO" 5; }
c906108c 3298fi
d0ac1c44 3299rm -f conftest conftest$ac_cv_exeext
81ecdfbb
RW
3300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3301$as_echo "$ac_cv_exeext" >&6; }
c906108c 3302
b4e70030 3303rm -f conftest.$ac_ext
bec39cab
AC
3304EXEEXT=$ac_cv_exeext
3305ac_exeext=$EXEEXT
d0ac1c44
SM
3306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3307/* end confdefs.h. */
3308#include <stdio.h>
3309int
3310main ()
3311{
3312FILE *f = fopen ("conftest.out", "w");
3313 return ferror (f) || fclose (f) != 0;
3314
3315 ;
3316 return 0;
3317}
3318_ACEOF
3319ac_clean_files="$ac_clean_files conftest.out"
3320# Check that the compiler produces executables we can run. If not, either
3321# the compiler is broken, or we cross compile.
3322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3323$as_echo_n "checking whether we are cross compiling... " >&6; }
3324if test "$cross_compiling" != yes; then
3325 { { ac_try="$ac_link"
3326case "(($ac_try" in
3327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3328 *) ac_try_echo=$ac_try;;
3329esac
3330eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3331$as_echo "$ac_try_echo"; } >&5
3332 (eval "$ac_link") 2>&5
3333 ac_status=$?
3334 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3335 test $ac_status = 0; }
3336 if { ac_try='./conftest$ac_cv_exeext'
3337 { { case "(($ac_try" in
3338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3339 *) ac_try_echo=$ac_try;;
3340esac
3341eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3342$as_echo "$ac_try_echo"; } >&5
3343 (eval "$ac_try") 2>&5
3344 ac_status=$?
3345 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3346 test $ac_status = 0; }; }; then
3347 cross_compiling=no
3348 else
3349 if test "$cross_compiling" = maybe; then
3350 cross_compiling=yes
3351 else
3352 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3353$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3354as_fn_error $? "cannot run C compiled programs.
3355If you meant to cross compile, use \`--host'.
3356See \`config.log' for more details" "$LINENO" 5; }
3357 fi
3358 fi
3359fi
3360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3361$as_echo "$cross_compiling" >&6; }
3362
3363rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3364ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3366$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 3367if ${ac_cv_objext+:} false; then :
81ecdfbb 3368 $as_echo_n "(cached) " >&6
bec39cab 3369else
81ecdfbb 3370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3371/* end confdefs.h. */
3372
3373int
3374main ()
3375{
3376
3377 ;
3378 return 0;
3379}
3380_ACEOF
3381rm -f conftest.o conftest.obj
81ecdfbb
RW
3382if { { ac_try="$ac_compile"
3383case "(($ac_try" in
3384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3385 *) ac_try_echo=$ac_try;;
3386esac
3387eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3388$as_echo "$ac_try_echo"; } >&5
3389 (eval "$ac_compile") 2>&5
3390 ac_status=$?
3391 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3392 test $ac_status = 0; }; then :
3393 for ac_file in conftest.o conftest.obj conftest.*; do
3394 test -f "$ac_file" || continue;
bec39cab 3395 case $ac_file in
81ecdfbb 3396 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3397 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3398 break;;
3399 esac
3400done
c906108c 3401else
81ecdfbb 3402 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3403sed 's/^/| /' conftest.$ac_ext >&5
3404
81ecdfbb
RW
3405{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3406$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3407as_fn_error $? "cannot compute suffix of object files: cannot compile
3408See \`config.log' for more details" "$LINENO" 5; }
c906108c 3409fi
b4e70030 3410rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3411fi
81ecdfbb
RW
3412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3413$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3414OBJEXT=$ac_cv_objext
3415ac_objext=$OBJEXT
81ecdfbb
RW
3416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3417$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 3418if ${ac_cv_c_compiler_gnu+:} false; then :
81ecdfbb 3419 $as_echo_n "(cached) " >&6
c906108c 3420else
81ecdfbb 3421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3422/* end confdefs.h. */
3423
3424int
3425main ()
3426{
3427#ifndef __GNUC__
3428 choke me
3429#endif
3430
3431 ;
3432 return 0;
3433}
3434_ACEOF
81ecdfbb 3435if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3436 ac_compiler_gnu=yes
3437else
81ecdfbb 3438 ac_compiler_gnu=no
bec39cab 3439fi
81ecdfbb 3440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3441ac_cv_c_compiler_gnu=$ac_compiler_gnu
3442
3443fi
81ecdfbb
RW
3444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3445$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3446if test $ac_compiler_gnu = yes; then
3447 GCC=yes
3448else
3449 GCC=
3450fi
bec39cab
AC
3451ac_test_CFLAGS=${CFLAGS+set}
3452ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3454$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 3455if ${ac_cv_prog_cc_g+:} false; then :
81ecdfbb 3456 $as_echo_n "(cached) " >&6
bec39cab 3457else
81ecdfbb
RW
3458 ac_save_c_werror_flag=$ac_c_werror_flag
3459 ac_c_werror_flag=yes
3460 ac_cv_prog_cc_g=no
3461 CFLAGS="-g"
3462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3463/* end confdefs.h. */
3464
3465int
3466main ()
3467{
3468
3469 ;
3470 return 0;
3471}
3472_ACEOF
81ecdfbb 3473if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3474 ac_cv_prog_cc_g=yes
3475else
81ecdfbb
RW
3476 CFLAGS=""
3477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3478/* end confdefs.h. */
3479
3480int
3481main ()
3482{
3483
3484 ;
3485 return 0;
3486}
3487_ACEOF
3488if ac_fn_c_try_compile "$LINENO"; then :
3489
3490else
3491 ac_c_werror_flag=$ac_save_c_werror_flag
3492 CFLAGS="-g"
3493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3494/* end confdefs.h. */
3495
3496int
3497main ()
3498{
c906108c 3499
81ecdfbb
RW
3500 ;
3501 return 0;
3502}
3503_ACEOF
3504if ac_fn_c_try_compile "$LINENO"; then :
3505 ac_cv_prog_cc_g=yes
3506fi
3507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3508fi
3509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3510fi
81ecdfbb
RW
3511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3512 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3513fi
81ecdfbb
RW
3514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3515$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3516if test "$ac_test_CFLAGS" = set; then
bec39cab 3517 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3518elif test $ac_cv_prog_cc_g = yes; then
3519 if test "$GCC" = yes; then
3520 CFLAGS="-g -O2"
3521 else
3522 CFLAGS="-g"
3523 fi
3524else
3525 if test "$GCC" = yes; then
3526 CFLAGS="-O2"
3527 else
3528 CFLAGS=
3529 fi
3530fi
81ecdfbb
RW
3531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3532$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
d0ac1c44 3533if ${ac_cv_prog_cc_c89+:} false; then :
81ecdfbb 3534 $as_echo_n "(cached) " >&6
bec39cab 3535else
81ecdfbb 3536 ac_cv_prog_cc_c89=no
bec39cab 3537ac_save_CC=$CC
81ecdfbb 3538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3539/* end confdefs.h. */
c906108c
SS
3540#include <stdarg.h>
3541#include <stdio.h>
d0ac1c44 3542struct stat;
c906108c
SS
3543/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3544struct buf { int x; };
3545FILE * (*rcsopen) (struct buf *, struct stat *, int);
3546static char *e (p, i)
3547 char **p;
3548 int i;
3549{
3550 return p[i];
3551}
3552static char *f (char * (*g) (char **, int), char **p, ...)
3553{
3554 char *s;
3555 va_list v;
3556 va_start (v,p);
3557 s = g (p, va_arg (v,int));
3558 va_end (v);
3559 return s;
3560}
bec39cab
AC
3561
3562/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3563 function prototypes and stuff, but not '\xHH' hex character constants.
3564 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3565 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3566 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3567 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3568 that's true only with -std. */
bec39cab
AC
3569int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3570
81ecdfbb
RW
3571/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3572 inside strings and character constants. */
3573#define FOO(x) 'x'
3574int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3575
c906108c
SS
3576int test (int i, double x);
3577struct s1 {int (*f) (int a);};
3578struct s2 {int (*f) (double a);};
3579int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3580int argc;
3581char **argv;
bec39cab
AC
3582int
3583main ()
3584{
c906108c 3585return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3586 ;
3587 return 0;
3588}
3589_ACEOF
81ecdfbb
RW
3590for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3591 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3592do
3593 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3594 if ac_fn_c_try_compile "$LINENO"; then :
3595 ac_cv_prog_cc_c89=$ac_arg
c906108c 3596fi
81ecdfbb
RW
3597rm -f core conftest.err conftest.$ac_objext
3598 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3599done
81ecdfbb 3600rm -f conftest.$ac_ext
bec39cab 3601CC=$ac_save_CC
c906108c
SS
3602
3603fi
81ecdfbb
RW
3604# AC_CACHE_VAL
3605case "x$ac_cv_prog_cc_c89" in
3606 x)
3607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3608$as_echo "none needed" >&6; } ;;
3609 xno)
3610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3611$as_echo "unsupported" >&6; } ;;
bec39cab 3612 *)
81ecdfbb
RW
3613 CC="$CC $ac_cv_prog_cc_c89"
3614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3615$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3616esac
81ecdfbb 3617if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3618
b4e70030
JB
3619fi
3620
bec39cab
AC
3621ac_ext=c
3622ac_cpp='$CPP $CPPFLAGS'
3623ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3624ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3625ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3626
3bc3d82a
PA
3627ac_ext=cpp
3628ac_cpp='$CXXCPP $CPPFLAGS'
3629ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3630ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3631ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3632if test -z "$CXX"; then
3633 if test -n "$CCC"; then
3634 CXX=$CCC
3635 else
3636 if test -n "$ac_tool_prefix"; then
3637 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3638 do
3639 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3640set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3642$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3643if ${ac_cv_prog_CXX+:} false; then :
3bc3d82a
PA
3644 $as_echo_n "(cached) " >&6
3645else
3646 if test -n "$CXX"; then
3647 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3648else
3649as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3650for as_dir in $PATH
3651do
3652 IFS=$as_save_IFS
3653 test -z "$as_dir" && as_dir=.
3654 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3655 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3656 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3657 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3658 break 2
3659 fi
3660done
3661 done
3662IFS=$as_save_IFS
3663
3664fi
3665fi
3666CXX=$ac_cv_prog_CXX
3667if test -n "$CXX"; then
3668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3669$as_echo "$CXX" >&6; }
3670else
3671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3672$as_echo "no" >&6; }
3673fi
3674
3675
3676 test -n "$CXX" && break
3677 done
3678fi
3679if test -z "$CXX"; then
3680 ac_ct_CXX=$CXX
3681 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3682do
3683 # Extract the first word of "$ac_prog", so it can be a program name with args.
3684set dummy $ac_prog; ac_word=$2
3685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3686$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3687if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3bc3d82a
PA
3688 $as_echo_n "(cached) " >&6
3689else
3690 if test -n "$ac_ct_CXX"; then
3691 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3692else
3693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3694for as_dir in $PATH
3695do
3696 IFS=$as_save_IFS
3697 test -z "$as_dir" && as_dir=.
3698 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3699 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3700 ac_cv_prog_ac_ct_CXX="$ac_prog"
3701 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3702 break 2
3703 fi
3704done
3705 done
3706IFS=$as_save_IFS
3707
3708fi
3709fi
3710ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3711if test -n "$ac_ct_CXX"; then
3712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3713$as_echo "$ac_ct_CXX" >&6; }
3714else
3715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3716$as_echo "no" >&6; }
3717fi
3718
3719
3720 test -n "$ac_ct_CXX" && break
3721done
3722
3723 if test "x$ac_ct_CXX" = x; then
3724 CXX="g++"
3725 else
3726 case $cross_compiling:$ac_tool_warned in
3727yes:)
3728{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3729$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3730ac_tool_warned=yes ;;
3731esac
3732 CXX=$ac_ct_CXX
3733 fi
3734fi
3735
3736 fi
3737fi
3738# Provide some information about the compiler.
3739$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3740set X $ac_compile
3741ac_compiler=$2
3742for ac_option in --version -v -V -qversion; do
3743 { { ac_try="$ac_compiler $ac_option >&5"
3744case "(($ac_try" in
3745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3746 *) ac_try_echo=$ac_try;;
3747esac
3748eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3749$as_echo "$ac_try_echo"; } >&5
3750 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3751 ac_status=$?
3752 if test -s conftest.err; then
3753 sed '10a\
3754... rest of stderr output deleted ...
3755 10q' conftest.err >conftest.er1
3756 cat conftest.er1 >&5
3bc3d82a 3757 fi
d0ac1c44 3758 rm -f conftest.er1 conftest.err
3bc3d82a
PA
3759 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3760 test $ac_status = 0; }
3761done
3762
3763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3764$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
d0ac1c44 3765if ${ac_cv_cxx_compiler_gnu+:} false; then :
3bc3d82a
PA
3766 $as_echo_n "(cached) " >&6
3767else
3768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3769/* end confdefs.h. */
3770
3771int
3772main ()
3773{
3774#ifndef __GNUC__
3775 choke me
3776#endif
3777
3778 ;
3779 return 0;
3780}
3781_ACEOF
3782if ac_fn_cxx_try_compile "$LINENO"; then :
3783 ac_compiler_gnu=yes
3784else
3785 ac_compiler_gnu=no
3786fi
3787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3788ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3789
3790fi
3791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3792$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3793if test $ac_compiler_gnu = yes; then
3794 GXX=yes
3795else
3796 GXX=
3797fi
3798ac_test_CXXFLAGS=${CXXFLAGS+set}
3799ac_save_CXXFLAGS=$CXXFLAGS
3800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3801$as_echo_n "checking whether $CXX accepts -g... " >&6; }
d0ac1c44 3802if ${ac_cv_prog_cxx_g+:} false; then :
3bc3d82a
PA
3803 $as_echo_n "(cached) " >&6
3804else
3805 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3806 ac_cxx_werror_flag=yes
3807 ac_cv_prog_cxx_g=no
3808 CXXFLAGS="-g"
3809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3810/* end confdefs.h. */
3811
3812int
3813main ()
3814{
3815
3816 ;
3817 return 0;
3818}
3819_ACEOF
3820if ac_fn_cxx_try_compile "$LINENO"; then :
3821 ac_cv_prog_cxx_g=yes
3822else
3823 CXXFLAGS=""
3824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3825/* end confdefs.h. */
3826
3827int
3828main ()
3829{
3830
3831 ;
3832 return 0;
3833}
3834_ACEOF
3835if ac_fn_cxx_try_compile "$LINENO"; then :
3836
3837else
3838 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3839 CXXFLAGS="-g"
3840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3841/* end confdefs.h. */
3842
3843int
3844main ()
3845{
3846
3847 ;
3848 return 0;
3849}
3850_ACEOF
3851if ac_fn_cxx_try_compile "$LINENO"; then :
3852 ac_cv_prog_cxx_g=yes
3853fi
3854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3855fi
3856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3857fi
3858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3859 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3860fi
3861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3862$as_echo "$ac_cv_prog_cxx_g" >&6; }
3863if test "$ac_test_CXXFLAGS" = set; then
3864 CXXFLAGS=$ac_save_CXXFLAGS
3865elif test $ac_cv_prog_cxx_g = yes; then
3866 if test "$GXX" = yes; then
3867 CXXFLAGS="-g -O2"
3868 else
3869 CXXFLAGS="-g"
3870 fi
3871else
3872 if test "$GXX" = yes; then
3873 CXXFLAGS="-O2"
3874 else
3875 CXXFLAGS=
3876 fi
3877fi
3878ac_ext=c
3879ac_cpp='$CPP $CPPFLAGS'
3880ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3881ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3882ac_compiler_gnu=$ac_cv_c_compiler_gnu
3883
3884
60ca704f 3885
bec39cab
AC
3886ac_ext=c
3887ac_cpp='$CPP $CPPFLAGS'
3888ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3889ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3890ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3892$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3893# On Suns, sometimes $CPP names a directory.
3894if test -n "$CPP" && test -d "$CPP"; then
3895 CPP=
8bb2c122 3896fi
bec39cab 3897if test -z "$CPP"; then
d0ac1c44 3898 if ${ac_cv_prog_CPP+:} false; then :
81ecdfbb 3899 $as_echo_n "(cached) " >&6
bec39cab
AC
3900else
3901 # Double quotes because CPP needs to be expanded
3902 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3903 do
3904 ac_preproc_ok=false
3905for ac_c_preproc_warn_flag in '' yes
3906do
3907 # Use a header file that comes with gcc, so configuring glibc
3908 # with a fresh cross-compiler works.
3909 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3910 # <limits.h> exists even on freestanding compilers.
3911 # On the NeXT, cc -E runs the code through the compiler's parser,
3912 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3914/* end confdefs.h. */
3915#ifdef __STDC__
3916# include <limits.h>
3917#else
3918# include <assert.h>
3919#endif
3920 Syntax error
3921_ACEOF
81ecdfbb 3922if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3923
81ecdfbb 3924else
bec39cab
AC
3925 # Broken: fails on valid input.
3926continue
3927fi
d0ac1c44 3928rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 3929
81ecdfbb 3930 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3931 # can be detected and how.
81ecdfbb 3932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3933/* end confdefs.h. */
3934#include <ac_nonexistent.h>
3935_ACEOF
81ecdfbb 3936if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3937 # Broken: success on invalid input.
3938continue
8bb2c122 3939else
bec39cab
AC
3940 # Passes both tests.
3941ac_preproc_ok=:
3942break
8bb2c122 3943fi
d0ac1c44 3944rm -f conftest.err conftest.i conftest.$ac_ext
8bb2c122 3945
bec39cab
AC
3946done
3947# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 3948rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb 3949if $ac_preproc_ok; then :
bec39cab
AC
3950 break
3951fi
8bb2c122 3952
bec39cab
AC
3953 done
3954 ac_cv_prog_CPP=$CPP
ddc9cd0f 3955
c906108c 3956fi
bec39cab
AC
3957 CPP=$ac_cv_prog_CPP
3958else
3959 ac_cv_prog_CPP=$CPP
c906108c 3960fi
81ecdfbb
RW
3961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3962$as_echo "$CPP" >&6; }
bec39cab
AC
3963ac_preproc_ok=false
3964for ac_c_preproc_warn_flag in '' yes
3965do
3966 # Use a header file that comes with gcc, so configuring glibc
3967 # with a fresh cross-compiler works.
3968 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3969 # <limits.h> exists even on freestanding compilers.
3970 # On the NeXT, cc -E runs the code through the compiler's parser,
3971 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3973/* end confdefs.h. */
3974#ifdef __STDC__
3975# include <limits.h>
3976#else
3977# include <assert.h>
3978#endif
3979 Syntax error
3980_ACEOF
81ecdfbb 3981if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3982
81ecdfbb 3983else
bec39cab
AC
3984 # Broken: fails on valid input.
3985continue
3986fi
d0ac1c44 3987rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 3988
81ecdfbb 3989 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3990 # can be detected and how.
81ecdfbb 3991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3992/* end confdefs.h. */
3993#include <ac_nonexistent.h>
3994_ACEOF
81ecdfbb 3995if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3996 # Broken: success on invalid input.
3997continue
c906108c 3998else
bec39cab
AC
3999 # Passes both tests.
4000ac_preproc_ok=:
4001break
c906108c 4002fi
d0ac1c44 4003rm -f conftest.err conftest.i conftest.$ac_ext
c906108c 4004
bec39cab
AC
4005done
4006# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4007rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb
RW
4008if $ac_preproc_ok; then :
4009
c906108c 4010else
81ecdfbb
RW
4011 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4012$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4013as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4014See \`config.log' for more details" "$LINENO" 5; }
c906108c 4015fi
c906108c 4016
bec39cab
AC
4017ac_ext=c
4018ac_cpp='$CPP $CPPFLAGS'
4019ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4020ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4021ac_compiler_gnu=$ac_cv_c_compiler_gnu
4022
4023
81ecdfbb
RW
4024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4025$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 4026if ${ac_cv_path_GREP+:} false; then :
81ecdfbb 4027 $as_echo_n "(cached) " >&6
4e8d927d 4028else
81ecdfbb
RW
4029 if test -z "$GREP"; then
4030 ac_path_GREP_found=false
4031 # Loop through the user's path and test for each of PROGNAME-LIST
4032 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4033for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4034do
4035 IFS=$as_save_IFS
4036 test -z "$as_dir" && as_dir=.
4037 for ac_prog in grep ggrep; do
4038 for ac_exec_ext in '' $ac_executable_extensions; do
4039 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4040 as_fn_executable_p "$ac_path_GREP" || continue
81ecdfbb
RW
4041# Check for GNU ac_path_GREP and select it if it is found.
4042 # Check for GNU $ac_path_GREP
4043case `"$ac_path_GREP" --version 2>&1` in
4044*GNU*)
4045 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4046*)
4047 ac_count=0
4048 $as_echo_n 0123456789 >"conftest.in"
4049 while :
4050 do
4051 cat "conftest.in" "conftest.in" >"conftest.tmp"
4052 mv "conftest.tmp" "conftest.in"
4053 cp "conftest.in" "conftest.nl"
4054 $as_echo 'GREP' >> "conftest.nl"
4055 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4056 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4057 as_fn_arith $ac_count + 1 && ac_count=$as_val
4058 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4059 # Best one so far, save it but keep looking for a better one
4060 ac_cv_path_GREP="$ac_path_GREP"
4061 ac_path_GREP_max=$ac_count
bec39cab 4062 fi
81ecdfbb
RW
4063 # 10*(2^10) chars as input seems more than enough
4064 test $ac_count -gt 10 && break
4065 done
4066 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4067esac
bec39cab 4068
81ecdfbb
RW
4069 $ac_path_GREP_found && break 3
4070 done
4071 done
4072 done
4073IFS=$as_save_IFS
4074 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 4075 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
81ecdfbb 4076 fi
c906108c 4077else
81ecdfbb 4078 ac_cv_path_GREP=$GREP
c906108c 4079fi
c906108c 4080
81ecdfbb
RW
4081fi
4082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4083$as_echo "$ac_cv_path_GREP" >&6; }
4084 GREP="$ac_cv_path_GREP"
c906108c 4085
c906108c 4086
81ecdfbb
RW
4087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4088$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 4089if ${ac_cv_path_EGREP+:} false; then :
81ecdfbb 4090 $as_echo_n "(cached) " >&6
783e057b 4091else
81ecdfbb
RW
4092 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4093 then ac_cv_path_EGREP="$GREP -E"
4094 else
4095 if test -z "$EGREP"; then
4096 ac_path_EGREP_found=false
4097 # Loop through the user's path and test for each of PROGNAME-LIST
4098 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4099for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4100do
4101 IFS=$as_save_IFS
4102 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4103 for ac_prog in egrep; do
4104 for ac_exec_ext in '' $ac_executable_extensions; do
4105 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4106 as_fn_executable_p "$ac_path_EGREP" || continue
81ecdfbb
RW
4107# Check for GNU ac_path_EGREP and select it if it is found.
4108 # Check for GNU $ac_path_EGREP
4109case `"$ac_path_EGREP" --version 2>&1` in
4110*GNU*)
4111 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4112*)
4113 ac_count=0
4114 $as_echo_n 0123456789 >"conftest.in"
4115 while :
4116 do
4117 cat "conftest.in" "conftest.in" >"conftest.tmp"
4118 mv "conftest.tmp" "conftest.in"
4119 cp "conftest.in" "conftest.nl"
4120 $as_echo 'EGREP' >> "conftest.nl"
4121 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4122 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4123 as_fn_arith $ac_count + 1 && ac_count=$as_val
4124 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4125 # Best one so far, save it but keep looking for a better one
4126 ac_cv_path_EGREP="$ac_path_EGREP"
4127 ac_path_EGREP_max=$ac_count
4128 fi
4129 # 10*(2^10) chars as input seems more than enough
4130 test $ac_count -gt 10 && break
4131 done
4132 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4133esac
bec39cab 4134
81ecdfbb
RW
4135 $ac_path_EGREP_found && break 3
4136 done
4137 done
4138 done
4139IFS=$as_save_IFS
4140 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4141 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4142 fi
783e057b 4143else
81ecdfbb 4144 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4145fi
4146
81ecdfbb 4147 fi
783e057b 4148fi
81ecdfbb
RW
4149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4150$as_echo "$ac_cv_path_EGREP" >&6; }
4151 EGREP="$ac_cv_path_EGREP"
4152
783e057b 4153
81ecdfbb
RW
4154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4155$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4156if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 4157 $as_echo_n "(cached) " >&6
783e057b 4158else
81ecdfbb 4159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4160/* end confdefs.h. */
783e057b 4161#include <stdlib.h>
bec39cab 4162#include <stdarg.h>
783e057b
DJ
4163#include <string.h>
4164#include <float.h>
c906108c 4165
bec39cab
AC
4166int
4167main ()
4168{
c906108c 4169
bec39cab
AC
4170 ;
4171 return 0;
4172}
4173_ACEOF
81ecdfbb 4174if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4175 ac_cv_header_stdc=yes
c906108c 4176else
81ecdfbb 4177 ac_cv_header_stdc=no
c906108c 4178fi
81ecdfbb 4179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4180
783e057b
DJ
4181if test $ac_cv_header_stdc = yes; then
4182 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4184/* end confdefs.h. */
4185#include <string.h>
c906108c 4186
783e057b
DJ
4187_ACEOF
4188if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4189 $EGREP "memchr" >/dev/null 2>&1; then :
4190
c906108c 4191else
783e057b 4192 ac_cv_header_stdc=no
c906108c 4193fi
783e057b 4194rm -f conftest*
c906108c
SS
4195
4196fi
4197
783e057b
DJ
4198if test $ac_cv_header_stdc = yes; then
4199 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4201/* end confdefs.h. */
4202#include <stdlib.h>
bec39cab 4203
783e057b
DJ
4204_ACEOF
4205if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4206 $EGREP "free" >/dev/null 2>&1; then :
4207
bec39cab 4208else
783e057b 4209 ac_cv_header_stdc=no
bec39cab 4210fi
783e057b 4211rm -f conftest*
bec39cab
AC
4212
4213fi
bec39cab 4214
783e057b
DJ
4215if test $ac_cv_header_stdc = yes; then
4216 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4217 if test "$cross_compiling" = yes; then :
783e057b 4218 :
bec39cab 4219else
81ecdfbb 4220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4221/* end confdefs.h. */
4222#include <ctype.h>
81ecdfbb 4223#include <stdlib.h>
783e057b
DJ
4224#if ((' ' & 0x0FF) == 0x020)
4225# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4226# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4227#else
4228# define ISLOWER(c) \
4229 (('a' <= (c) && (c) <= 'i') \
4230 || ('j' <= (c) && (c) <= 'r') \
4231 || ('s' <= (c) && (c) <= 'z'))
4232# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4233#endif
4234
4235#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4236int
4237main ()
4238{
4239 int i;
4240 for (i = 0; i < 256; i++)
4241 if (XOR (islower (i), ISLOWER (i))
4242 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4243 return 2;
4244 return 0;
783e057b
DJ
4245}
4246_ACEOF
81ecdfbb 4247if ac_fn_c_try_run "$LINENO"; then :
783e057b 4248
81ecdfbb
RW
4249else
4250 ac_cv_header_stdc=no
783e057b 4251fi
81ecdfbb
RW
4252rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4253 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4254fi
81ecdfbb 4255
783e057b
DJ
4256fi
4257fi
81ecdfbb
RW
4258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4259$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4260if test $ac_cv_header_stdc = yes; then
4261
81ecdfbb 4262$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4263
4264fi
4265
4266# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4267for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4268 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4269do :
4270 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4271ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4272"
d0ac1c44 4273if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
783e057b 4274 cat >>confdefs.h <<_ACEOF
81ecdfbb 4275#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4276_ACEOF
4277
4278fi
4279
4280done
4281
4282
4283
81ecdfbb 4284 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4285if test "x$ac_cv_header_minix_config_h" = xyes; then :
783e057b
DJ
4286 MINIX=yes
4287else
4288 MINIX=
4289fi
4290
4291
4292 if test "$MINIX" = yes; then
4293
81ecdfbb 4294$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4295
4296
81ecdfbb 4297$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4298
4299
81ecdfbb 4300$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4301
4302 fi
4303
4304
81ecdfbb
RW
4305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4306$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4307if ${ac_cv_safe_to_define___extensions__+:} false; then :
81ecdfbb 4308 $as_echo_n "(cached) " >&6
783e057b 4309else
81ecdfbb 4310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4311/* end confdefs.h. */
4312
d0ac1c44
SM
4313# define __EXTENSIONS__ 1
4314 $ac_includes_default
783e057b
DJ
4315int
4316main ()
4317{
4318
4319 ;
4320 return 0;
4321}
4322_ACEOF
81ecdfbb 4323if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4324 ac_cv_safe_to_define___extensions__=yes
4325else
81ecdfbb 4326 ac_cv_safe_to_define___extensions__=no
783e057b 4327fi
81ecdfbb 4328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4329fi
81ecdfbb
RW
4330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4331$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4332 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4333 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4334
81ecdfbb 4335 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4336
81ecdfbb 4337 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4338
81ecdfbb 4339 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4340
81ecdfbb 4341 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4342
4343
c971b7fa
PA
4344ac_aux_dir=
4345for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
d0ac1c44
SM
4346 if test -f "$ac_dir/install-sh"; then
4347 ac_aux_dir=$ac_dir
4348 ac_install_sh="$ac_aux_dir/install-sh -c"
4349 break
4350 elif test -f "$ac_dir/install.sh"; then
4351 ac_aux_dir=$ac_dir
4352 ac_install_sh="$ac_aux_dir/install.sh -c"
4353 break
4354 elif test -f "$ac_dir/shtool"; then
4355 ac_aux_dir=$ac_dir
4356 ac_install_sh="$ac_aux_dir/shtool install -c"
4357 break
4358 fi
c971b7fa
PA
4359done
4360if test -z "$ac_aux_dir"; then
d0ac1c44 4361 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
c971b7fa 4362fi
770d76d7 4363
c971b7fa
PA
4364# These three variables are undocumented and unsupported,
4365# and are intended to be withdrawn in a future Autoconf release.
4366# They can cause serious problems if a builder's source tree is in a directory
4367# whose full name contains unusual characters.
4368ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4369ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4370ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4371
770d76d7 4372
c971b7fa
PA
4373# Make sure we can run config.sub.
4374$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 4375 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4376
c971b7fa
PA
4377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4378$as_echo_n "checking build system type... " >&6; }
d0ac1c44 4379if ${ac_cv_build+:} false; then :
c971b7fa 4380 $as_echo_n "(cached) " >&6
770d76d7 4381else
c971b7fa
PA
4382 ac_build_alias=$build_alias
4383test "x$ac_build_alias" = x &&
4384 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4385test "x$ac_build_alias" = x &&
d0ac1c44 4386 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
c971b7fa 4387ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 4388 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
c971b7fa 4389
770d76d7 4390fi
c971b7fa
PA
4391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4392$as_echo "$ac_cv_build" >&6; }
4393case $ac_cv_build in
4394*-*-*) ;;
d0ac1c44 4395*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4396esac
c971b7fa
PA
4397build=$ac_cv_build
4398ac_save_IFS=$IFS; IFS='-'
4399set x $ac_cv_build
4400shift
4401build_cpu=$1
4402build_vendor=$2
4403shift; shift
4404# Remember, the first character of IFS is used to create $*,
4405# except with old shells:
4406build_os=$*
4407IFS=$ac_save_IFS
4408case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4409
4410
c971b7fa
PA
4411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4412$as_echo_n "checking host system type... " >&6; }
d0ac1c44 4413if ${ac_cv_host+:} false; then :
81ecdfbb
RW
4414 $as_echo_n "(cached) " >&6
4415else
c971b7fa
PA
4416 if test "x$host_alias" = x; then
4417 ac_cv_host=$ac_cv_build
81ecdfbb 4418else
c971b7fa 4419 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 4420 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4421fi
81ecdfbb
RW
4422
4423fi
c971b7fa
PA
4424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4425$as_echo "$ac_cv_host" >&6; }
4426case $ac_cv_host in
4427*-*-*) ;;
d0ac1c44 4428*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4429esac
c971b7fa
PA
4430host=$ac_cv_host
4431ac_save_IFS=$IFS; IFS='-'
4432set x $ac_cv_host
4433shift
4434host_cpu=$1
4435host_vendor=$2
4436shift; shift
4437# Remember, the first character of IFS is used to create $*,
4438# except with old shells:
4439host_os=$*
4440IFS=$ac_save_IFS
4441case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4442
4443
4444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4445$as_echo_n "checking target system type... " >&6; }
d0ac1c44 4446if ${ac_cv_target+:} false; then :
3388710e
JM
4447 $as_echo_n "(cached) " >&6
4448else
4449 if test "x$target_alias" = x; then
4450 ac_cv_target=$ac_cv_host
4451else
4452 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
d0ac1c44 4453 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
3388710e
JM
4454fi
4455
4456fi
4457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4458$as_echo "$ac_cv_target" >&6; }
4459case $ac_cv_target in
4460*-*-*) ;;
d0ac1c44 4461*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
3388710e
JM
4462esac
4463target=$ac_cv_target
4464ac_save_IFS=$IFS; IFS='-'
4465set x $ac_cv_target
4466shift
4467target_cpu=$1
4468target_vendor=$2
4469shift; shift
4470# Remember, the first character of IFS is used to create $*,
4471# except with old shells:
4472target_os=$*
4473IFS=$ac_save_IFS
4474case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4475
4476
4477# The aliases save the names the user supplied, while $host etc.
4478# will get canonicalized.
4479test -n "$target_alias" &&
4480 test "$program_prefix$program_suffix$program_transform_name" = \
4481 NONENONEs,x,x, &&
4482 program_prefix=${target_alias}-
4483
4484# The tests for host and target for $enable_largefile require
4485# canonical names.
4486
4487
81ecdfbb 4488
da2f07f1
JK
4489# As the $enable_largefile decision depends on --enable-plugins we must set it
4490# even in directories otherwise not depending on the $plugins option.
4491
4492
2974be62
AM
4493 maybe_plugins=no
4494 for ac_header in dlfcn.h
4495do :
4496 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4497"
d0ac1c44 4498if test "x$ac_cv_header_dlfcn_h" = xyes; then :
2974be62
AM
4499 cat >>confdefs.h <<_ACEOF
4500#define HAVE_DLFCN_H 1
4501_ACEOF
4502 maybe_plugins=yes
4503fi
4504
4505done
4506
4507 for ac_header in windows.h
4508do :
4509 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4510"
d0ac1c44 4511if test "x$ac_cv_header_windows_h" = xyes; then :
2974be62
AM
4512 cat >>confdefs.h <<_ACEOF
4513#define HAVE_WINDOWS_H 1
4514_ACEOF
4515 maybe_plugins=yes
4516fi
4517
4518done
4519
4520
4521 # Check whether --enable-plugins was given.
da2f07f1
JK
4522if test "${enable_plugins+set}" = set; then :
4523 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4524 no) plugins=no ;;
4525 *) plugins=yes
4526 if test "$maybe_plugins" != "yes" ; then
d0ac1c44 4527 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
2974be62
AM
4528 fi ;;
4529 esac
da2f07f1 4530else
2974be62
AM
4531 plugins=$maybe_plugins
4532
da2f07f1
JK
4533fi
4534
2974be62 4535 if test "$plugins" = "yes"; then
458412c3
TT
4536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4537$as_echo_n "checking for library containing dlsym... " >&6; }
d0ac1c44 4538if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4539 $as_echo_n "(cached) " >&6
4540else
4541 ac_func_search_save_LIBS=$LIBS
4542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4543/* end confdefs.h. */
4544
4545/* Override any GCC internal prototype to avoid an error.
4546 Use char because int might match the return type of a GCC
4547 builtin and then its argument prototype would still apply. */
4548#ifdef __cplusplus
4549extern "C"
4550#endif
458412c3 4551char dlsym ();
2974be62
AM
4552int
4553main ()
4554{
458412c3 4555return dlsym ();
2974be62
AM
4556 ;
4557 return 0;
4558}
4559_ACEOF
4560for ac_lib in '' dl; do
4561 if test -z "$ac_lib"; then
4562 ac_res="none required"
4563 else
4564 ac_res=-l$ac_lib
4565 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4566 fi
4567 if ac_fn_c_try_link "$LINENO"; then :
458412c3 4568 ac_cv_search_dlsym=$ac_res
2974be62
AM
4569fi
4570rm -f core conftest.err conftest.$ac_objext \
4571 conftest$ac_exeext
d0ac1c44 4572 if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4573 break
4574fi
4575done
d0ac1c44 4576if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4577
4578else
458412c3 4579 ac_cv_search_dlsym=no
2974be62
AM
4580fi
4581rm conftest.$ac_ext
4582LIBS=$ac_func_search_save_LIBS
4583fi
458412c3
TT
4584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4585$as_echo "$ac_cv_search_dlsym" >&6; }
4586ac_res=$ac_cv_search_dlsym
2974be62
AM
4587if test "$ac_res" != no; then :
4588 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4589
4590fi
4591
4592 fi
da2f07f1
JK
4593
4594
4595case "${host}" in
4596 sparc-*-solaris*|i[3-7]86-*-solaris*)
4597 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4598 # are mutually exclusive; and without procfs support, the bfd/ elf module
4599 # cannot provide certain routines such as elfcore_write_prpsinfo
4600 # or elfcore_write_prstatus. So unless the user explicitly requested
4601 # large-file support through the --enable-largefile switch, disable
4602 # large-file support in favor of procfs support.
4603 test "${target}" = "${host}" -a "x$plugins" = xno \
4604 && : ${enable_largefile="no"}
4605 ;;
4606esac
4607
4608# Check whether --enable-largefile was given.
4609if test "${enable_largefile+set}" = set; then :
4610 enableval=$enable_largefile;
4611fi
4612
4613if test "$enable_largefile" != no; then
4614
4615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4616$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 4617if ${ac_cv_sys_largefile_CC+:} false; then :
da2f07f1
JK
4618 $as_echo_n "(cached) " >&6
4619else
4620 ac_cv_sys_largefile_CC=no
4621 if test "$GCC" != yes; then
4622 ac_save_CC=$CC
4623 while :; do
4624 # IRIX 6.2 and later do not support large files by default,
4625 # so use the C compiler's -n32 option if that helps.
4626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4627/* end confdefs.h. */
4628#include <sys/types.h>
4629 /* Check that off_t can represent 2**63 - 1 correctly.
4630 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4631 since some C++ compilers masquerading as C compilers
4632 incorrectly reject 9223372036854775807. */
4633#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4634 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4635 && LARGE_OFF_T % 2147483647 == 1)
4636 ? 1 : -1];
4637int
4638main ()
4639{
4640
4641 ;
4642 return 0;
4643}
4644_ACEOF
4645 if ac_fn_c_try_compile "$LINENO"; then :
4646 break
4647fi
4648rm -f core conftest.err conftest.$ac_objext
4649 CC="$CC -n32"
4650 if ac_fn_c_try_compile "$LINENO"; then :
4651 ac_cv_sys_largefile_CC=' -n32'; break
4652fi
4653rm -f core conftest.err conftest.$ac_objext
4654 break
4655 done
4656 CC=$ac_save_CC
4657 rm -f conftest.$ac_ext
4658 fi
4659fi
4660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4661$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4662 if test "$ac_cv_sys_largefile_CC" != no; then
4663 CC=$CC$ac_cv_sys_largefile_CC
4664 fi
4665
4666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4667$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 4668if ${ac_cv_sys_file_offset_bits+:} false; then :
da2f07f1
JK
4669 $as_echo_n "(cached) " >&6
4670else
4671 while :; do
4672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4673/* end confdefs.h. */
4674#include <sys/types.h>
4675 /* Check that off_t can represent 2**63 - 1 correctly.
4676 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4677 since some C++ compilers masquerading as C compilers
4678 incorrectly reject 9223372036854775807. */
4679#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4680 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4681 && LARGE_OFF_T % 2147483647 == 1)
4682 ? 1 : -1];
4683int
4684main ()
4685{
4686
4687 ;
4688 return 0;
4689}
4690_ACEOF
4691if ac_fn_c_try_compile "$LINENO"; then :
4692 ac_cv_sys_file_offset_bits=no; break
4693fi
4694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4696/* end confdefs.h. */
4697#define _FILE_OFFSET_BITS 64
4698#include <sys/types.h>
4699 /* Check that off_t can represent 2**63 - 1 correctly.
4700 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4701 since some C++ compilers masquerading as C compilers
4702 incorrectly reject 9223372036854775807. */
4703#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4704 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4705 && LARGE_OFF_T % 2147483647 == 1)
4706 ? 1 : -1];
4707int
4708main ()
4709{
4710
4711 ;
4712 return 0;
4713}
4714_ACEOF
4715if ac_fn_c_try_compile "$LINENO"; then :
4716 ac_cv_sys_file_offset_bits=64; break
4717fi
4718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4719 ac_cv_sys_file_offset_bits=unknown
4720 break
4721done
4722fi
4723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4724$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4725case $ac_cv_sys_file_offset_bits in #(
4726 no | unknown) ;;
4727 *)
4728cat >>confdefs.h <<_ACEOF
4729#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4730_ACEOF
4731;;
4732esac
4733rm -rf conftest*
4734 if test $ac_cv_sys_file_offset_bits = unknown; then
4735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4736$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 4737if ${ac_cv_sys_large_files+:} false; then :
da2f07f1
JK
4738 $as_echo_n "(cached) " >&6
4739else
4740 while :; do
4741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4742/* end confdefs.h. */
4743#include <sys/types.h>
4744 /* Check that off_t can represent 2**63 - 1 correctly.
4745 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4746 since some C++ compilers masquerading as C compilers
4747 incorrectly reject 9223372036854775807. */
4748#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4749 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4750 && LARGE_OFF_T % 2147483647 == 1)
4751 ? 1 : -1];
4752int
4753main ()
4754{
4755
4756 ;
4757 return 0;
4758}
4759_ACEOF
4760if ac_fn_c_try_compile "$LINENO"; then :
4761 ac_cv_sys_large_files=no; break
4762fi
4763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4765/* end confdefs.h. */
4766#define _LARGE_FILES 1
4767#include <sys/types.h>
4768 /* Check that off_t can represent 2**63 - 1 correctly.
4769 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4770 since some C++ compilers masquerading as C compilers
4771 incorrectly reject 9223372036854775807. */
4772#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4773 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4774 && LARGE_OFF_T % 2147483647 == 1)
4775 ? 1 : -1];
4776int
4777main ()
4778{
4779
4780 ;
4781 return 0;
4782}
4783_ACEOF
4784if ac_fn_c_try_compile "$LINENO"; then :
4785 ac_cv_sys_large_files=1; break
4786fi
4787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4788 ac_cv_sys_large_files=unknown
4789 break
4790done
4791fi
4792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4793$as_echo "$ac_cv_sys_large_files" >&6; }
4794case $ac_cv_sys_large_files in #(
4795 no | unknown) ;;
4796 *)
4797cat >>confdefs.h <<_ACEOF
4798#define _LARGE_FILES $ac_cv_sys_large_files
4799_ACEOF
4800;;
4801esac
4802rm -rf conftest*
4803 fi
d0ac1c44
SM
4804
4805
da2f07f1
JK
4806fi
4807
4808
4809
81ecdfbb
RW
4810
4811
4812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4813$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
d0ac1c44 4814if ${am_cv_prog_cc_stdc+:} false; then :
81ecdfbb
RW
4815 $as_echo_n "(cached) " >&6
4816else
4817 am_cv_prog_cc_stdc=no
4818ac_save_CC="$CC"
4819# Don't try gcc -ansi; that turns off useful extensions and
4820# breaks some systems' header files.
4821# AIX -qlanglvl=ansi
4822# Ultrix and OSF/1 -std1
4823# HP-UX 10.20 and later -Ae
4824# HP-UX older versions -Aa -D_HPUX_SOURCE
4825# SVR4 -Xc -D__EXTENSIONS__
4826for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4827do
783e057b 4828 CC="$ac_save_CC $ac_arg"
81ecdfbb 4829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4830/* end confdefs.h. */
4831#include <stdarg.h>
4832#include <stdio.h>
4833#include <sys/types.h>
4834#include <sys/stat.h>
4835/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4836struct buf { int x; };
4837FILE * (*rcsopen) (struct buf *, struct stat *, int);
4838static char *e (p, i)
4839 char **p;
4840 int i;
4841{
4842 return p[i];
4843}
4844static char *f (char * (*g) (char **, int), char **p, ...)
4845{
4846 char *s;
4847 va_list v;
4848 va_start (v,p);
4849 s = g (p, va_arg (v,int));
4850 va_end (v);
4851 return s;
4852}
4853int test (int i, double x);
4854struct s1 {int (*f) (int a);};
4855struct s2 {int (*f) (double a);};
4856int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4857int argc;
4858char **argv;
4859
4860int
4861main ()
4862{
4863
4864return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4865
4866 ;
4867 return 0;
4868}
4869_ACEOF
81ecdfbb 4870if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4871 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4872fi
81ecdfbb 4873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4874done
4875CC="$ac_save_CC"
4876
4877fi
4878
4879if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4881$as_echo "none needed" >&6; }
783e057b 4882else
81ecdfbb
RW
4883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4884$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4885fi
4886case "x$am_cv_prog_cc_stdc" in
4887 x|xno) ;;
4888 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4889esac
4890
d0ac1c44
SM
4891# Expand $ac_aux_dir to an absolute path.
4892am_aux_dir=`cd "$ac_aux_dir" && pwd`
4869db5e 4893
d0ac1c44 4894if test x"${install_sh+set}" != xset; then
4869db5e
RM
4895 case $am_aux_dir in
4896 *\ * | *\ *)
4897 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4898 *)
4899 install_sh="\${SHELL} $am_aux_dir/install-sh"
4900 esac
4901fi
4902
d0ac1c44
SM
4903# Installed binaries are usually stripped using 'strip' when the user
4904# run "make install-strip". However 'strip' might not be the right
4869db5e 4905# tool to use in cross-compilation environments, therefore Automake
d0ac1c44 4906# will honor the 'STRIP' environment variable to overrule this program.
4869db5e
RM
4907if test "$cross_compiling" != no; then
4908 if test -n "$ac_tool_prefix"; then
4909 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4910set dummy ${ac_tool_prefix}strip; ac_word=$2
4911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4912$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4913if ${ac_cv_prog_STRIP+:} false; then :
4869db5e
RM
4914 $as_echo_n "(cached) " >&6
4915else
4916 if test -n "$STRIP"; then
4917 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4918else
4919as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4920for as_dir in $PATH
4921do
4922 IFS=$as_save_IFS
4923 test -z "$as_dir" && as_dir=.
4924 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4925 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
4926 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4927 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4928 break 2
4929 fi
4930done
4931 done
4932IFS=$as_save_IFS
4933
4934fi
4935fi
4936STRIP=$ac_cv_prog_STRIP
4937if test -n "$STRIP"; then
4938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4939$as_echo "$STRIP" >&6; }
4940else
4941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4942$as_echo "no" >&6; }
4943fi
4944
4945
4946fi
4947if test -z "$ac_cv_prog_STRIP"; then
4948 ac_ct_STRIP=$STRIP
4949 # Extract the first word of "strip", so it can be a program name with args.
4950set dummy strip; ac_word=$2
4951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4952$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4953if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4869db5e
RM
4954 $as_echo_n "(cached) " >&6
4955else
4956 if test -n "$ac_ct_STRIP"; then
4957 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4958else
4959as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4960for as_dir in $PATH
4961do
4962 IFS=$as_save_IFS
4963 test -z "$as_dir" && as_dir=.
4964 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4965 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
4966 ac_cv_prog_ac_ct_STRIP="strip"
4967 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4968 break 2
4969 fi
4970done
4971 done
4972IFS=$as_save_IFS
4973
4974fi
4975fi
4976ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4977if test -n "$ac_ct_STRIP"; then
4978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4979$as_echo "$ac_ct_STRIP" >&6; }
4980else
4981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4982$as_echo "no" >&6; }
4983fi
4984
4985 if test "x$ac_ct_STRIP" = x; then
4986 STRIP=":"
4987 else
4988 case $cross_compiling:$ac_tool_warned in
4989yes:)
4990{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4991$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4992ac_tool_warned=yes ;;
4993esac
4994 STRIP=$ac_ct_STRIP
4995 fi
4996else
4997 STRIP="$ac_cv_prog_STRIP"
4998fi
4999
5000fi
5001INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5002
783e057b
DJ
5003
5004ac_aux_dir=
81ecdfbb 5005for ac_dir in .. "$srcdir"/..; do
d0ac1c44
SM
5006 if test -f "$ac_dir/install-sh"; then
5007 ac_aux_dir=$ac_dir
5008 ac_install_sh="$ac_aux_dir/install-sh -c"
5009 break
5010 elif test -f "$ac_dir/install.sh"; then
5011 ac_aux_dir=$ac_dir
5012 ac_install_sh="$ac_aux_dir/install.sh -c"
5013 break
5014 elif test -f "$ac_dir/shtool"; then
5015 ac_aux_dir=$ac_dir
5016 ac_install_sh="$ac_aux_dir/shtool install -c"
5017 break
5018 fi
783e057b
DJ
5019done
5020if test -z "$ac_aux_dir"; then
d0ac1c44 5021 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 5022fi
81ecdfbb
RW
5023
5024# These three variables are undocumented and unsupported,
5025# and are intended to be withdrawn in a future Autoconf release.
5026# They can cause serious problems if a builder's source tree is in a directory
5027# whose full name contains unusual characters.
5028ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5029ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5030ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5031
783e057b 5032
783e057b 5033
9009e1ae
MR
5034test "$program_prefix" != NONE &&
5035 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5036# Use a double $ so make ignores it.
5037test "$program_suffix" != NONE &&
5038 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5039# Double any \ or $.
5040# By default was `s,x,x', remove it if useless.
5041ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5042program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5043
81ecdfbb 5044
0bcda685
PA
5045# We require a C++11 compiler. Check if one is available, and if
5046# necessary, set CXX_DIALECT to some -std=xxx switch.
5047
41260ac2 5048 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
0bcda685
PA
5049 ac_ext=cpp
5050ac_cpp='$CXXCPP $CPPFLAGS'
5051ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5052ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5053ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5054 CXX_DIALECT=""
5055 ac_success=no
5056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5057$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
d0ac1c44 5058if ${ax_cv_cxx_compile_cxx11+:} false; then :
0bcda685
PA
5059 $as_echo_n "(cached) " >&6
5060else
5061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5062/* end confdefs.h. */
5063
5064
5065// If the compiler admits that it is not ready for C++11, why torture it?
5066// Hopefully, this will speed up the test.
5067
5068#ifndef __cplusplus
5069
5070#error "This is not a C++ compiler"
5071
5072#elif __cplusplus < 201103L
5073
5074#error "This is not a C++11 compiler"
5075
5076#else
5077
5078namespace cxx11
5079{
5080
5081 namespace test_static_assert
5082 {
5083
5084 template <typename T>
5085 struct check
5086 {
5087 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5088 };
5089
5090 }
5091
5092 namespace test_final_override
5093 {
5094
5095 struct Base
5096 {
5097 virtual void f() {}
5098 };
5099
5100 struct Derived : public Base
5101 {
5102 virtual void f() override {}
5103 };
5104
5105 }
5106
5107 namespace test_double_right_angle_brackets
5108 {
5109
5110 template < typename T >
5111 struct check {};
5112
5113 typedef check<void> single_type;
5114 typedef check<check<void>> double_type;
5115 typedef check<check<check<void>>> triple_type;
5116 typedef check<check<check<check<void>>>> quadruple_type;
5117
5118 }
5119
5120 namespace test_decltype
5121 {
5122
5123 int
5124 f()
5125 {
5126 int a = 1;
5127 decltype(a) b = 2;
5128 return a + b;
5129 }
5130
5131 }
5132
5133 namespace test_type_deduction
5134 {
5135
5136 template < typename T1, typename T2 >
5137 struct is_same
5138 {
5139 static const bool value = false;
5140 };
5141
5142 template < typename T >
5143 struct is_same<T, T>
5144 {
5145 static const bool value = true;
5146 };
5147
5148 template < typename T1, typename T2 >
5149 auto
5150 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5151 {
5152 return a1 + a2;
5153 }
5154
5155 int
5156 test(const int c, volatile int v)
5157 {
5158 static_assert(is_same<int, decltype(0)>::value == true, "");
5159 static_assert(is_same<int, decltype(c)>::value == false, "");
5160 static_assert(is_same<int, decltype(v)>::value == false, "");
5161 auto ac = c;
5162 auto av = v;
5163 auto sumi = ac + av + 'x';
5164 auto sumf = ac + av + 1.0;
5165 static_assert(is_same<int, decltype(ac)>::value == true, "");
5166 static_assert(is_same<int, decltype(av)>::value == true, "");
5167 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5168 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5169 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5170 return (sumf > 0.0) ? sumi : add(c, v);
5171 }
5172
5173 }
5174
5175 namespace test_noexcept
5176 {
5177
5178 int f() { return 0; }
5179 int g() noexcept { return 0; }
5180
5181 static_assert(noexcept(f()) == false, "");
5182 static_assert(noexcept(g()) == true, "");
5183
5184 }
5185
5186 namespace test_constexpr
5187 {
5188
5189 template < typename CharT >
5190 unsigned long constexpr
5191 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5192 {
5193 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5194 }
5195
5196 template < typename CharT >
5197 unsigned long constexpr
5198 strlen_c(const CharT *const s) noexcept
5199 {
5200 return strlen_c_r(s, 0UL);
5201 }
5202
5203 static_assert(strlen_c("") == 0UL, "");
5204 static_assert(strlen_c("1") == 1UL, "");
5205 static_assert(strlen_c("example") == 7UL, "");
5206 static_assert(strlen_c("another\0example") == 7UL, "");
5207
5208 }
5209
5210 namespace test_rvalue_references
5211 {
5212
5213 template < int N >
5214 struct answer
5215 {
5216 static constexpr int value = N;
5217 };
5218
5219 answer<1> f(int&) { return answer<1>(); }
5220 answer<2> f(const int&) { return answer<2>(); }
5221 answer<3> f(int&&) { return answer<3>(); }
5222
5223 void
5224 test()
5225 {
5226 int i = 0;
5227 const int c = 0;
5228 static_assert(decltype(f(i))::value == 1, "");
5229 static_assert(decltype(f(c))::value == 2, "");
5230 static_assert(decltype(f(0))::value == 3, "");
5231 }
5232
5233 }
5234
5235 namespace test_uniform_initialization
5236 {
5237
5238 struct test
5239 {
5240 static const int zero {};
5241 static const int one {1};
5242 };
5243
5244 static_assert(test::zero == 0, "");
5245 static_assert(test::one == 1, "");
5246
5247 }
5248
5249 namespace test_lambdas
5250 {
5251
5252 void
5253 test1()
5254 {
5255 auto lambda1 = [](){};
5256 auto lambda2 = lambda1;
5257 lambda1();
5258 lambda2();
5259 }
5260
5261 int
5262 test2()
5263 {
5264 auto a = [](int i, int j){ return i + j; }(1, 2);
5265 auto b = []() -> int { return '0'; }();
5266 auto c = [=](){ return a + b; }();
5267 auto d = [&](){ return c; }();
5268 auto e = [a, &b](int x) mutable {
5269 const auto identity = [](int y){ return y; };
5270 for (auto i = 0; i < a; ++i)
5271 a += b--;
5272 return x + identity(a + b);
5273 }(0);
5274 return a + b + c + d + e;
5275 }
5276
5277 int
5278 test3()
5279 {
5280 const auto nullary = [](){ return 0; };
5281 const auto unary = [](int x){ return x; };
5282 using nullary_t = decltype(nullary);
5283 using unary_t = decltype(unary);
5284 const auto higher1st = [](nullary_t f){ return f(); };
5285 const auto higher2nd = [unary](nullary_t f1){
5286 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5287 };
5288 return higher1st(nullary) + higher2nd(nullary)(unary);
5289 }
5290
5291 }
5292
5293 namespace test_variadic_templates
5294 {
5295
5296 template <int...>
5297 struct sum;
5298
5299 template <int N0, int... N1toN>
5300 struct sum<N0, N1toN...>
5301 {
5302 static constexpr auto value = N0 + sum<N1toN...>::value;
5303 };
5304
5305 template <>
5306 struct sum<>
5307 {
5308 static constexpr auto value = 0;
5309 };
5310
5311 static_assert(sum<>::value == 0, "");
5312 static_assert(sum<1>::value == 1, "");
5313 static_assert(sum<23>::value == 23, "");
5314 static_assert(sum<1, 2>::value == 3, "");
5315 static_assert(sum<5, 5, 11>::value == 21, "");
5316 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5317
5318 }
5319
5320 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5321 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5322 // because of this.
5323 namespace test_template_alias_sfinae
5324 {
5325
5326 struct foo {};
5327
5328 template<typename T>
5329 using member = typename T::member_type;
5330
5331 template<typename T>
5332 void func(...) {}
5333
5334 template<typename T>
5335 void func(member<T>*) {}
5336
5337 void test();
5338
5339 void test() { func<foo>(0); }
5340
5341 }
5342
5343} // namespace cxx11
5344
5345#endif // __cplusplus >= 201103L
5346
5347
5348
5349_ACEOF
5350if ac_fn_cxx_try_compile "$LINENO"; then :
5351 ax_cv_cxx_compile_cxx11=yes
5352else
5353 ax_cv_cxx_compile_cxx11=no
5354fi
5355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5356fi
5357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5358$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5359 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5360 ac_success=yes
5361 fi
5362
5363 if test x$ac_success = xno; then
41260ac2
SM
5364 for alternative in ${ax_cxx_compile_alternatives}; do
5365 switch="-std=gnu++${alternative}"
0bcda685
PA
5366 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5368$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5369if eval \${$cachevar+:} false; then :
0bcda685
PA
5370 $as_echo_n "(cached) " >&6
5371else
5372 ac_save_CXX="$CXX"
5373 CXX="$CXX $switch"
5374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5375/* end confdefs.h. */
5376
5377
5378// If the compiler admits that it is not ready for C++11, why torture it?
5379// Hopefully, this will speed up the test.
5380
5381#ifndef __cplusplus
5382
5383#error "This is not a C++ compiler"
5384
5385#elif __cplusplus < 201103L
5386
5387#error "This is not a C++11 compiler"
5388
5389#else
5390
5391namespace cxx11
5392{
5393
5394 namespace test_static_assert
5395 {
5396
5397 template <typename T>
5398 struct check
5399 {
5400 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5401 };
5402
5403 }
5404
5405 namespace test_final_override
5406 {
5407
5408 struct Base
5409 {
5410 virtual void f() {}
5411 };
5412
5413 struct Derived : public Base
5414 {
5415 virtual void f() override {}
5416 };
5417
5418 }
5419
5420 namespace test_double_right_angle_brackets
5421 {
5422
5423 template < typename T >
5424 struct check {};
5425
5426 typedef check<void> single_type;
5427 typedef check<check<void>> double_type;
5428 typedef check<check<check<void>>> triple_type;
5429 typedef check<check<check<check<void>>>> quadruple_type;
5430
5431 }
5432
5433 namespace test_decltype
5434 {
5435
5436 int
5437 f()
5438 {
5439 int a = 1;
5440 decltype(a) b = 2;
5441 return a + b;
5442 }
5443
5444 }
5445
5446 namespace test_type_deduction
5447 {
5448
5449 template < typename T1, typename T2 >
5450 struct is_same
5451 {
5452 static const bool value = false;
5453 };
5454
5455 template < typename T >
5456 struct is_same<T, T>
5457 {
5458 static const bool value = true;
5459 };
5460
5461 template < typename T1, typename T2 >
5462 auto
5463 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5464 {
5465 return a1 + a2;
5466 }
5467
5468 int
5469 test(const int c, volatile int v)
5470 {
5471 static_assert(is_same<int, decltype(0)>::value == true, "");
5472 static_assert(is_same<int, decltype(c)>::value == false, "");
5473 static_assert(is_same<int, decltype(v)>::value == false, "");
5474 auto ac = c;
5475 auto av = v;
5476 auto sumi = ac + av + 'x';
5477 auto sumf = ac + av + 1.0;
5478 static_assert(is_same<int, decltype(ac)>::value == true, "");
5479 static_assert(is_same<int, decltype(av)>::value == true, "");
5480 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5481 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5482 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5483 return (sumf > 0.0) ? sumi : add(c, v);
5484 }
5485
5486 }
5487
5488 namespace test_noexcept
5489 {
5490
5491 int f() { return 0; }
5492 int g() noexcept { return 0; }
5493
5494 static_assert(noexcept(f()) == false, "");
5495 static_assert(noexcept(g()) == true, "");
5496
5497 }
5498
5499 namespace test_constexpr
5500 {
5501
5502 template < typename CharT >
5503 unsigned long constexpr
5504 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5505 {
5506 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5507 }
5508
5509 template < typename CharT >
5510 unsigned long constexpr
5511 strlen_c(const CharT *const s) noexcept
5512 {
5513 return strlen_c_r(s, 0UL);
5514 }
5515
5516 static_assert(strlen_c("") == 0UL, "");
5517 static_assert(strlen_c("1") == 1UL, "");
5518 static_assert(strlen_c("example") == 7UL, "");
5519 static_assert(strlen_c("another\0example") == 7UL, "");
5520
5521 }
5522
5523 namespace test_rvalue_references
5524 {
5525
5526 template < int N >
5527 struct answer
5528 {
5529 static constexpr int value = N;
5530 };
5531
5532 answer<1> f(int&) { return answer<1>(); }
5533 answer<2> f(const int&) { return answer<2>(); }
5534 answer<3> f(int&&) { return answer<3>(); }
5535
5536 void
5537 test()
5538 {
5539 int i = 0;
5540 const int c = 0;
5541 static_assert(decltype(f(i))::value == 1, "");
5542 static_assert(decltype(f(c))::value == 2, "");
5543 static_assert(decltype(f(0))::value == 3, "");
5544 }
5545
5546 }
5547
5548 namespace test_uniform_initialization
5549 {
5550
5551 struct test
5552 {
5553 static const int zero {};
5554 static const int one {1};
5555 };
5556
5557 static_assert(test::zero == 0, "");
5558 static_assert(test::one == 1, "");
5559
5560 }
5561
5562 namespace test_lambdas
5563 {
5564
5565 void
5566 test1()
5567 {
5568 auto lambda1 = [](){};
5569 auto lambda2 = lambda1;
5570 lambda1();
5571 lambda2();
5572 }
5573
5574 int
5575 test2()
5576 {
5577 auto a = [](int i, int j){ return i + j; }(1, 2);
5578 auto b = []() -> int { return '0'; }();
5579 auto c = [=](){ return a + b; }();
5580 auto d = [&](){ return c; }();
5581 auto e = [a, &b](int x) mutable {
5582 const auto identity = [](int y){ return y; };
5583 for (auto i = 0; i < a; ++i)
5584 a += b--;
5585 return x + identity(a + b);
5586 }(0);
5587 return a + b + c + d + e;
5588 }
5589
5590 int
5591 test3()
5592 {
5593 const auto nullary = [](){ return 0; };
5594 const auto unary = [](int x){ return x; };
5595 using nullary_t = decltype(nullary);
5596 using unary_t = decltype(unary);
5597 const auto higher1st = [](nullary_t f){ return f(); };
5598 const auto higher2nd = [unary](nullary_t f1){
5599 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5600 };
5601 return higher1st(nullary) + higher2nd(nullary)(unary);
5602 }
5603
5604 }
5605
5606 namespace test_variadic_templates
5607 {
5608
5609 template <int...>
5610 struct sum;
5611
5612 template <int N0, int... N1toN>
5613 struct sum<N0, N1toN...>
5614 {
5615 static constexpr auto value = N0 + sum<N1toN...>::value;
5616 };
5617
5618 template <>
5619 struct sum<>
5620 {
5621 static constexpr auto value = 0;
5622 };
5623
5624 static_assert(sum<>::value == 0, "");
5625 static_assert(sum<1>::value == 1, "");
5626 static_assert(sum<23>::value == 23, "");
5627 static_assert(sum<1, 2>::value == 3, "");
5628 static_assert(sum<5, 5, 11>::value == 21, "");
5629 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5630
5631 }
5632
5633 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5634 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5635 // because of this.
5636 namespace test_template_alias_sfinae
5637 {
5638
5639 struct foo {};
5640
5641 template<typename T>
5642 using member = typename T::member_type;
5643
5644 template<typename T>
5645 void func(...) {}
5646
5647 template<typename T>
5648 void func(member<T>*) {}
5649
5650 void test();
5651
5652 void test() { func<foo>(0); }
5653
5654 }
5655
5656} // namespace cxx11
5657
5658#endif // __cplusplus >= 201103L
5659
5660
5661
5662_ACEOF
5663if ac_fn_cxx_try_compile "$LINENO"; then :
5664 eval $cachevar=yes
5665else
5666 eval $cachevar=no
5667fi
5668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5669 CXX="$ac_save_CXX"
5670fi
5671eval ac_res=\$$cachevar
5672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5673$as_echo "$ac_res" >&6; }
5674 if eval test x\$$cachevar = xyes; then
5675 CXX_DIALECT="$switch"
5676 ac_success=yes
5677 break
5678 fi
5679 done
5680 fi
5681
5682 if test x$ac_success = xno; then
41260ac2
SM
5683 for alternative in ${ax_cxx_compile_alternatives}; do
5684 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5685 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
0bcda685 5687$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5688if eval \${$cachevar+:} false; then :
0bcda685
PA
5689 $as_echo_n "(cached) " >&6
5690else
5691 ac_save_CXX="$CXX"
41260ac2
SM
5692 CXX="$CXX $switch"
5693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0bcda685
PA
5694/* end confdefs.h. */
5695
5696
5697// If the compiler admits that it is not ready for C++11, why torture it?
5698// Hopefully, this will speed up the test.
5699
5700#ifndef __cplusplus
5701
5702#error "This is not a C++ compiler"
5703
5704#elif __cplusplus < 201103L
5705
5706#error "This is not a C++11 compiler"
5707
5708#else
5709
5710namespace cxx11
5711{
5712
5713 namespace test_static_assert
5714 {
5715
5716 template <typename T>
5717 struct check
5718 {
5719 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5720 };
5721
5722 }
5723
5724 namespace test_final_override
5725 {
5726
5727 struct Base
5728 {
5729 virtual void f() {}
5730 };
5731
5732 struct Derived : public Base
5733 {
5734 virtual void f() override {}
5735 };
5736
5737 }
5738
5739 namespace test_double_right_angle_brackets
5740 {
5741
5742 template < typename T >
5743 struct check {};
5744
5745 typedef check<void> single_type;
5746 typedef check<check<void>> double_type;
5747 typedef check<check<check<void>>> triple_type;
5748 typedef check<check<check<check<void>>>> quadruple_type;
5749
5750 }
5751
5752 namespace test_decltype
5753 {
5754
5755 int
5756 f()
5757 {
5758 int a = 1;
5759 decltype(a) b = 2;
5760 return a + b;
5761 }
5762
5763 }
5764
5765 namespace test_type_deduction
5766 {
5767
5768 template < typename T1, typename T2 >
5769 struct is_same
5770 {
5771 static const bool value = false;
5772 };
5773
5774 template < typename T >
5775 struct is_same<T, T>
5776 {
5777 static const bool value = true;
5778 };
5779
5780 template < typename T1, typename T2 >
5781 auto
5782 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5783 {
5784 return a1 + a2;
5785 }
5786
5787 int
5788 test(const int c, volatile int v)
5789 {
5790 static_assert(is_same<int, decltype(0)>::value == true, "");
5791 static_assert(is_same<int, decltype(c)>::value == false, "");
5792 static_assert(is_same<int, decltype(v)>::value == false, "");
5793 auto ac = c;
5794 auto av = v;
5795 auto sumi = ac + av + 'x';
5796 auto sumf = ac + av + 1.0;
5797 static_assert(is_same<int, decltype(ac)>::value == true, "");
5798 static_assert(is_same<int, decltype(av)>::value == true, "");
5799 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5800 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5801 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5802 return (sumf > 0.0) ? sumi : add(c, v);
5803 }
5804
5805 }
5806
5807 namespace test_noexcept
5808 {
5809
5810 int f() { return 0; }
5811 int g() noexcept { return 0; }
5812
5813 static_assert(noexcept(f()) == false, "");
5814 static_assert(noexcept(g()) == true, "");
5815
5816 }
5817
5818 namespace test_constexpr
5819 {
5820
5821 template < typename CharT >
5822 unsigned long constexpr
5823 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5824 {
5825 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5826 }
5827
5828 template < typename CharT >
5829 unsigned long constexpr
5830 strlen_c(const CharT *const s) noexcept
5831 {
5832 return strlen_c_r(s, 0UL);
5833 }
5834
5835 static_assert(strlen_c("") == 0UL, "");
5836 static_assert(strlen_c("1") == 1UL, "");
5837 static_assert(strlen_c("example") == 7UL, "");
5838 static_assert(strlen_c("another\0example") == 7UL, "");
5839
5840 }
5841
5842 namespace test_rvalue_references
5843 {
5844
5845 template < int N >
5846 struct answer
5847 {
5848 static constexpr int value = N;
5849 };
5850
5851 answer<1> f(int&) { return answer<1>(); }
5852 answer<2> f(const int&) { return answer<2>(); }
5853 answer<3> f(int&&) { return answer<3>(); }
5854
5855 void
5856 test()
5857 {
5858 int i = 0;
5859 const int c = 0;
5860 static_assert(decltype(f(i))::value == 1, "");
5861 static_assert(decltype(f(c))::value == 2, "");
5862 static_assert(decltype(f(0))::value == 3, "");
5863 }
5864
5865 }
5866
5867 namespace test_uniform_initialization
5868 {
5869
5870 struct test
5871 {
5872 static const int zero {};
5873 static const int one {1};
5874 };
5875
5876 static_assert(test::zero == 0, "");
5877 static_assert(test::one == 1, "");
5878
5879 }
5880
5881 namespace test_lambdas
5882 {
5883
5884 void
5885 test1()
5886 {
5887 auto lambda1 = [](){};
5888 auto lambda2 = lambda1;
5889 lambda1();
5890 lambda2();
5891 }
5892
5893 int
5894 test2()
5895 {
5896 auto a = [](int i, int j){ return i + j; }(1, 2);
5897 auto b = []() -> int { return '0'; }();
5898 auto c = [=](){ return a + b; }();
5899 auto d = [&](){ return c; }();
5900 auto e = [a, &b](int x) mutable {
5901 const auto identity = [](int y){ return y; };
5902 for (auto i = 0; i < a; ++i)
5903 a += b--;
5904 return x + identity(a + b);
5905 }(0);
5906 return a + b + c + d + e;
5907 }
5908
5909 int
5910 test3()
5911 {
5912 const auto nullary = [](){ return 0; };
5913 const auto unary = [](int x){ return x; };
5914 using nullary_t = decltype(nullary);
5915 using unary_t = decltype(unary);
5916 const auto higher1st = [](nullary_t f){ return f(); };
5917 const auto higher2nd = [unary](nullary_t f1){
5918 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5919 };
5920 return higher1st(nullary) + higher2nd(nullary)(unary);
5921 }
5922
5923 }
5924
5925 namespace test_variadic_templates
5926 {
5927
5928 template <int...>
5929 struct sum;
5930
5931 template <int N0, int... N1toN>
5932 struct sum<N0, N1toN...>
5933 {
5934 static constexpr auto value = N0 + sum<N1toN...>::value;
5935 };
5936
5937 template <>
5938 struct sum<>
5939 {
5940 static constexpr auto value = 0;
5941 };
5942
5943 static_assert(sum<>::value == 0, "");
5944 static_assert(sum<1>::value == 1, "");
5945 static_assert(sum<23>::value == 23, "");
5946 static_assert(sum<1, 2>::value == 3, "");
5947 static_assert(sum<5, 5, 11>::value == 21, "");
5948 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5949
5950 }
5951
5952 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5953 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5954 // because of this.
5955 namespace test_template_alias_sfinae
5956 {
5957
5958 struct foo {};
5959
5960 template<typename T>
5961 using member = typename T::member_type;
5962
5963 template<typename T>
5964 void func(...) {}
5965
5966 template<typename T>
5967 void func(member<T>*) {}
5968
5969 void test();
5970
5971 void test() { func<foo>(0); }
5972
5973 }
5974
5975} // namespace cxx11
5976
5977#endif // __cplusplus >= 201103L
5978
5979
5980
5981_ACEOF
5982if ac_fn_cxx_try_compile "$LINENO"; then :
5983 eval $cachevar=yes
5984else
5985 eval $cachevar=no
5986fi
5987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41260ac2 5988 CXX="$ac_save_CXX"
0bcda685
PA
5989fi
5990eval ac_res=\$$cachevar
5991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5992$as_echo "$ac_res" >&6; }
41260ac2
SM
5993 if eval test x\$$cachevar = xyes; then
5994 CXX_DIALECT="$switch"
5995 ac_success=yes
5996 break
5997 fi
5998 done
5999 if test x$ac_success = xyes; then
0bcda685
PA
6000 break
6001 fi
6002 done
6003 fi
6004 ac_ext=c
6005ac_cpp='$CPP $CPPFLAGS'
6006ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6007ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6008ac_compiler_gnu=$ac_cv_c_compiler_gnu
6009
6010 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6011 if test x$ac_success = xno; then
d0ac1c44 6012 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
0bcda685
PA
6013 fi
6014 fi
6015 if test x$ac_success = xno; then
6016 HAVE_CXX11=0
6017 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6018$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6019 else
6020 HAVE_CXX11=1
6021
6022$as_echo "#define HAVE_CXX11 1" >>confdefs.h
6023
6024 fi
6025
6026
6027
6028
a417dc56
RW
6029# Dependency checking.
6030rm -rf .tst 2>/dev/null
6031mkdir .tst 2>/dev/null
6032if test -d .tst; then
6033 am__leading_dot=.
6034else
6035 am__leading_dot=_
6036fi
6037rmdir .tst 2>/dev/null
6038
6039DEPDIR="${am__leading_dot}deps"
6040
81ecdfbb 6041ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
6042
6043
6044depcc="$CC" am_compiler_list=
6045
6046am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
6047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6048$as_echo_n "checking dependency style of $depcc... " >&6; }
d0ac1c44 6049if ${am_cv_CC_dependencies_compiler_type+:} false; then :
81ecdfbb 6050 $as_echo_n "(cached) " >&6
a417dc56
RW
6051else
6052 if test -f "$am_depcomp"; then
6053 # We make a subdir and do the tests there. Otherwise we can end up
6054 # making bogus files that we don't know about and never remove. For
6055 # instance it was reported that on HP-UX the gcc test will end up
6056 # making a dummy file named `D' -- because `-MD' means `put the output
6057 # in D'.
6058 mkdir conftest.dir
6059 # Copy depcomp to subdir because otherwise we won't find it if we're
6060 # using a relative directory.
6061 cp "$am_depcomp" conftest.dir
6062 cd conftest.dir
6063 # We will build objects and dependencies in a subdirectory because
6064 # it helps to detect inapplicable dependency modes. For instance
6065 # both Tru64's cc and ICC support -MD to output dependencies as a
6066 # side effect of compilation, but ICC will put the dependencies in
6067 # the current directory while Tru64 will put them in the object
6068 # directory.
6069 mkdir sub
6070
6071 am_cv_CC_dependencies_compiler_type=none
6072 if test "$am_compiler_list" = ""; then
6073 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6074 fi
6075 for depmode in $am_compiler_list; do
6076 if test $depmode = none; then break; fi
6077
81ecdfbb 6078 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
6079 # Setup a source with many dependencies, because some compilers
6080 # like to wrap large dependency lists on column 80 (with \), and
6081 # we should not choose a depcomp mode which is confused by this.
6082 #
6083 # We need to recreate these files for each test, as the compiler may
6084 # overwrite some of them when testing with obscure command lines.
6085 # This happens at least with the AIX C compiler.
6086 : > sub/conftest.c
6087 for i in 1 2 3 4 5 6; do
6088 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6089 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6090 # Solaris 8's {/usr,}/bin/sh.
6091 touch sub/conftst$i.h
6092 done
6093 echo "include sub/conftest.Po" > confmf
6094
6095 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6096 # mode. It turns out that the SunPro C++ compiler does not properly
6097 # handle `-M -o', and we need to detect this.
6098 depcmd="depmode=$depmode \
6099 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6100 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6101 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6102 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6103 if env $depcmd > conftest.err 2>&1 &&
6104 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6105 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6106 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6107 # icc doesn't choke on unknown options, it will just issue warnings
6108 # or remarks (even with -Werror). So we grep stderr for any message
6109 # that says an option was ignored or not supported.
6110 # When given -MP, icc 7.0 and 7.1 complain thusly:
6111 # icc: Command line warning: ignoring option '-M'; no argument required
6112 # The diagnosis changed in icc 8.0:
6113 # icc: Command line remark: option '-MP' not supported
6114 if (grep 'ignoring option' conftest.err ||
6115 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6116 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 6117 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
6118 break
6119 fi
6120 fi
81ecdfbb 6121 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
6122 sed -e 's/^/| /' < conftest.err >&5
6123 done
6124
6125 cd ..
6126 rm -rf conftest.dir
6127else
6128 am_cv_CC_dependencies_compiler_type=none
6129fi
6130
6131fi
81ecdfbb
RW
6132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6133$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 6134if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
d0ac1c44 6135then as_fn_error $? "no usable dependency style found" "$LINENO" 5
a417dc56
RW
6136else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6137
6138fi
6139
6140
648d586d
JB
6141gnulib_extra_configure_args=
6142# If large-file support is disabled, make sure gnulib does the same.
6143if test "$enable_largefile" = no; then
6144gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
6145fi
6146
c971b7fa
PA
6147# Configure gnulib. We need to build gnulib under some other
6148# directory not "gnulib", to avoid the problem of both GDB and
6149# GDBserver wanting to build it in the same directory, when building
6150# in the source dir.
783e057b 6151
c971b7fa
PA
6152 in_src="gnulib"
6153 in_build="build-gnulib"
648d586d 6154 in_extra_args="$gnulib_extra_configure_args"
c971b7fa
PA
6155
6156 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
6157 # so they do not pile up.
6158 ac_sub_configure_args=
6159 ac_prev=
6160 eval "set x $ac_configure_args"
6161 shift
6162 for ac_arg
6163 do
6164 if test -n "$ac_prev"; then
6165 ac_prev=
6166 continue
6167 fi
6168 case $ac_arg in
6169 -cache-file | --cache-file | --cache-fil | --cache-fi \
6170 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6171 ac_prev=cache_file ;;
6172 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6173 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
6174 | --c=*)
6175 ;;
6176 --config-cache | -C)
6177 ;;
6178 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6179 ac_prev=srcdir ;;
6180 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6181 ;;
6182 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
6183 ac_prev=prefix ;;
6184 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
6185 ;;
6186 --disable-option-checking)
6187 ;;
6188 *)
6189 case $ac_arg in
6190 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6191 esac
6192 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
6193 esac
6194 done
6195
6196 # Always prepend --prefix to ensure using the same prefix
6197 # in subdir configurations.
6198 ac_arg="--prefix=$prefix"
6199 case $ac_arg in
6200 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6201 esac
6202 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
6203
6204 # Pass --silent
6205 if test "$silent" = yes; then
6206 ac_sub_configure_args="--silent $ac_sub_configure_args"
6207 fi
6208
6209 # Always prepend --disable-option-checking to silence warnings, since
6210 # different subdirs can have different --enable and --with options.
6211 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
6212
6213 ac_popdir=`pwd`
6214 ac_dir=$in_build
6215
6216 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
6217 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
6218 $as_echo "$ac_msg" >&6
6219 as_dir="$ac_dir"; as_fn_mkdir_p
6220
38ea300a
PA
6221 case $srcdir in
6222 [\\/]* | ?:[\\/]* )
6223 ac_srcdir=$srcdir/$in_src ;;
6224 *) # Relative name.
6225 ac_srcdir=../$srcdir/$in_src ;;
6226 esac
c971b7fa
PA
6227
6228 cd "$ac_dir"
6229
6230 ac_sub_configure=$ac_srcdir/configure
6231
6232 # Make the cache file name correct relative to the subdirectory.
6233 case $cache_file in
6234 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
6235 *) # Relative name.
6236 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
6237 esac
6238
648d586d
JB
6239 if test -n "$in_extra_args"; then
6240 # Add the extra args at the end.
6241 ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
6242 fi
6243
c971b7fa
PA
6244 { $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
6245$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
6246 # The eval makes quoting arguments work.
6247 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
6248 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 6249 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c971b7fa
PA
6250
6251 cd "$ac_popdir"
783e057b 6252
c971b7fa
PA
6253
6254
6255CONFIG_OBS=
6256CONFIG_DEPS=
6257CONFIG_SRCS=
6258ENABLE_CFLAGS=
6259
6260CONFIG_ALL=
6261CONFIG_CLEAN=
6262CONFIG_INSTALL=
6263CONFIG_UNINSTALL=
6264
6265# If we haven't got the data from the intl directory,
6266# assume NLS is disabled.
6267USE_NLS=no
6268LIBINTL=
6269LIBINTL_DEP=
6270INCINTL=
6271XGETTEXT=
6272GMSGFMT=
6273POSUB=
783e057b
DJ
6274
6275if test -f ../intl/config.intl; then
6276 . ../intl/config.intl
6277fi
81ecdfbb
RW
6278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6279$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 6280if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
6281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6282$as_echo "no" >&6; }
783e057b 6283else
81ecdfbb
RW
6284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6285$as_echo "yes" >&6; }
783e057b 6286
81ecdfbb 6287$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
6288
6289
81ecdfbb
RW
6290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6291$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
6292 # Look for .po and .gmo files in the source directory.
6293 CATALOGS=
6294 XLINGUAS=
6295 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6296 # If there aren't any .gmo files the shell will give us the
6297 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6298 # weeded out.
6299 case "$cat" in *\**)
6300 continue;;
6301 esac
6302 # The quadruple backslash is collapsed to a double backslash
6303 # by the backticks, then collapsed again by the double quotes,
6304 # leaving us with one backslash in the sed expression (right
6305 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
6306 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6307 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6308 # The user is allowed to set LINGUAS to a list of languages to
6309 # install catalogs for. If it's empty that means "all of them."
6310 if test "x$LINGUAS" = x; then
6311 CATALOGS="$CATALOGS $cat"
6312 XLINGUAS="$XLINGUAS $lang"
6313 else
6314 case "$LINGUAS" in *$lang*)
6315 CATALOGS="$CATALOGS $cat"
6316 XLINGUAS="$XLINGUAS $lang"
6317 ;;
6318 esac
e28b3332
DJ
6319 fi
6320 done
c971b7fa
PA
6321 LINGUAS="$XLINGUAS"
6322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6323$as_echo "$LINGUAS" >&6; }
6324
6325
6326 DATADIRNAME=share
6327
6328 INSTOBJEXT=.mo
6329
6330 GENCAT=gencat
6331
6332 CATOBJEXT=.gmo
e28b3332 6333
e28b3332
DJ
6334fi
6335
c971b7fa
PA
6336localedir='${datadir}/locale'
6337
6338
6339if test x"$USE_NLS" = xyes; then
6340 CONFIG_ALL="$CONFIG_ALL all-po"
6341 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6342 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6343 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 6344fi
e28b3332 6345
c971b7fa
PA
6346GNULIB=build-gnulib/import
6347
6348# For Makefile dependencies.
6349GNULIB_STDINT_H=
6350if test x"$STDINT_H" != x; then
6351 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
6352fi
6353
6354
c971b7fa
PA
6355PACKAGE=gdb
6356
6357cat >>confdefs.h <<_ACEOF
6358#define PACKAGE "$PACKAGE"
6359_ACEOF
6360
6361
6362
6363# We never need to detect it in this sub-configure.
6364# But preserve it for config.status --recheck.
6365
6366
6367
6368MAKEINFO_EXTRA_FLAGS=""
6369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6370$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
d0ac1c44 6371if ${gdb_cv_have_makeinfo_click+:} false; then :
c971b7fa
PA
6372 $as_echo_n "(cached) " >&6
6373else
6374 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6375 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6376 gdb_cv_have_makeinfo_click=yes
6377 else
6378 gdb_cv_have_makeinfo_click=no
6379 fi
6380fi
6381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6382$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6383if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6384 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6385fi
e28b3332
DJ
6386
6387
bec39cab
AC
6388
6389
81ecdfbb
RW
6390# Check whether --with-separate-debug-dir was given.
6391if test "${with_separate_debug_dir+set}" = set; then :
6392 withval=$with_separate_debug_dir;
b14b1491
TT
6393 DEBUGDIR=$withval
6394else
6395 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
6396fi
6397
20e95c23 6398
783e057b
DJ
6399 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6400 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 6401 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 6402 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 6403
783e057b
DJ
6404cat >>confdefs.h <<_ACEOF
6405#define DEBUGDIR "$ac_define_dir"
20e95c23 6406_ACEOF
20e95c23 6407
20e95c23 6408
20e95c23 6409
0c4a4063 6410
b14b1491
TT
6411 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6412 if test "x$prefix" = xNONE; then
6413 test_prefix=/usr/local
6414 else
6415 test_prefix=$prefix
6416 fi
783e057b 6417 else
b14b1491 6418 test_prefix=$exec_prefix
783e057b 6419 fi
b14b1491
TT
6420 value=0
6421 case ${ac_define_dir} in
6422 "${test_prefix}"|"${test_prefix}/"*|\
6423 '${exec_prefix}'|'${exec_prefix}/'*)
6424 value=1
6425 ;;
6426 esac
6427
6428cat >>confdefs.h <<_ACEOF
6429#define DEBUGDIR_RELOCATABLE $value
6430_ACEOF
6431
6432
6433
0c4a4063 6434
f83d8a90
DE
6435# We can't pass paths as command line arguments.
6436# Mingw32 tries to be clever and will convert the paths for us.
6437# For example -DBINDIR="/usr/local/bin" passed on the command line may get
6438# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6439# This breaks GDB's relocatable path conversions since paths passed in
6440# config.h would not get so translated, the path prefixes no longer match.
6441
6442 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6443 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6444 ac_define_dir=`eval echo $bindir`
6445 ac_define_dir=`eval echo $ac_define_dir`
6446
6447cat >>confdefs.h <<_ACEOF
6448#define BINDIR "$ac_define_dir"
6449_ACEOF
6450
6451
6452
b14b1491
TT
6453# GDB's datadir relocation
6454
6455
6456
81ecdfbb
RW
6457# Check whether --with-gdb-datadir was given.
6458if test "${with_gdb_datadir+set}" = set; then :
6459 withval=$with_gdb_datadir;
b14b1491 6460 GDB_DATADIR=$withval
20e95c23 6461else
b14b1491 6462 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
6463fi
6464
20e95c23 6465
b14b1491
TT
6466 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6467 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6468 ac_define_dir=`eval echo $GDB_DATADIR`
6469 ac_define_dir=`eval echo $ac_define_dir`
6470
6471cat >>confdefs.h <<_ACEOF
6472#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
6473_ACEOF
6474
b14b1491
TT
6475
6476
0c4a4063 6477
b14b1491
TT
6478 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6479 if test "x$prefix" = xNONE; then
6480 test_prefix=/usr/local
6481 else
6482 test_prefix=$prefix
6483 fi
6484 else
6485 test_prefix=$exec_prefix
6486 fi
6487 value=0
6488 case ${ac_define_dir} in
6489 "${test_prefix}"|"${test_prefix}/"*|\
6490 '${exec_prefix}'|'${exec_prefix}/'*)
6491 value=1
6492 ;;
6493 esac
6494
6495cat >>confdefs.h <<_ACEOF
6496#define GDB_DATADIR_RELOCATABLE $value
6497_ACEOF
6498
6499
783e057b 6500
20e95c23 6501
0c4a4063 6502
81ecdfbb
RW
6503# Check whether --with-relocated-sources was given.
6504if test "${with_relocated_sources+set}" = set; then :
6505 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
6506
6507 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6508 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6509 ac_define_dir=`eval echo $reloc_srcdir`
6510 ac_define_dir=`eval echo $ac_define_dir`
6511
6512cat >>confdefs.h <<_ACEOF
6513#define RELOC_SRCDIR "$ac_define_dir"
6514_ACEOF
6515
6516
6517
81ecdfbb
RW
6518fi
6519
29b0e8a2 6520
7349ff92
JK
6521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6522$as_echo_n "checking for default auto-load directory... " >&6; }
6523
6524# Check whether --with-auto-load-dir was given.
6525if test "${with_auto_load_dir+set}" = set; then :
6526 withval=$with_auto_load_dir;
6527else
1564a261 6528 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
6529fi
6530
1564a261 6531escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
6532
6533 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6534 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6535 ac_define_dir=`eval echo $escape_dir`
6536 ac_define_dir=`eval echo $ac_define_dir`
6537
6538cat >>confdefs.h <<_ACEOF
6539#define AUTO_LOAD_DIR "$ac_define_dir"
6540_ACEOF
6541
6542
6543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6544$as_echo "$with_auto_load_dir" >&6; }
6545
bccbefd2
JK
6546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6547$as_echo_n "checking for default auto-load safe-path... " >&6; }
6548
6549# Check whether --with-auto-load-safe-path was given.
6550if test "${with_auto_load_safe_path+set}" = set; then :
6551 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
6552 with_auto_load_safe_path="/"
6553 fi
bccbefd2 6554else
7349ff92 6555 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
6556fi
6557
1564a261 6558escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
6559
6560 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6561 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 6562 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
6563 ac_define_dir=`eval echo $ac_define_dir`
6564
6565cat >>confdefs.h <<_ACEOF
6dea1fbd 6566#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
6567_ACEOF
6568
6569
6570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6571$as_echo "$with_auto_load_safe_path" >&6; }
6572
29b0e8a2 6573
20e95c23 6574
5ae98d25 6575subdirs="$subdirs testsuite"
20e95c23
DJ
6576
6577
783e057b 6578# Check whether to support alternative target configurations
81ecdfbb
RW
6579# Check whether --enable-targets was given.
6580if test "${enable_targets+set}" = set; then :
6581 enableval=$enable_targets; case "${enableval}" in
d0ac1c44 6582 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
6583 ;;
6584 no) enable_targets= ;;
6585 *) enable_targets=$enableval ;;
6586esac
81ecdfbb
RW
6587fi
6588
20e95c23 6589
783e057b 6590# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
6591# Check whether --enable-64-bit-bfd was given.
6592if test "${enable_64_bit_bfd+set}" = set; then :
6593 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
6594 yes) want64=true ;;
6595 no) want64=false ;;
d0ac1c44 6596 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
6597esac
6598else
6599 want64=false
81ecdfbb
RW
6600fi
6601
783e057b
DJ
6602# Provide defaults for some variables set by the per-host and per-target
6603# configuration.
6604gdb_host_obs=posix-hdep.o
20e95c23 6605
783e057b
DJ
6606if test "${target}" = "${host}"; then
6607 gdb_native=yes
6608else
6609 gdb_native=no
6610fi
20e95c23 6611
783e057b 6612. $srcdir/configure.host
20e95c23 6613
fb23d554
SDJ
6614# Add in the common host objects.
6615. $srcdir/common/common.host
6616gdb_host_obs="$gdb_host_obs $common_host_obs"
6617
783e057b 6618# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 6619
783e057b
DJ
6620TARGET_OBS=
6621all_targets=
b292c783 6622HAVE_NATIVE_GCORE_TARGET=
20e95c23 6623
783e057b 6624for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 6625do
783e057b
DJ
6626 if test "$targ_alias" = "all"; then
6627 all_targets=true
6628 else
6629 # Canonicalize the secondary target names.
6630 result=`$ac_config_sub $targ_alias 2>/dev/null`
6631 if test -n "$result"; then
6632 targ=$result
6633 else
6634 targ=$targ_alias
6635 fi
20e95c23 6636
783e057b 6637 . ${srcdir}/configure.tgt
20e95c23 6638
bf307134 6639 if test -z "${gdb_target_obs}"; then :
d0ac1c44 6640 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
bf307134
JB
6641fi
6642
783e057b
DJ
6643 # Target-specific object files
6644 for i in ${gdb_target_obs}; do
6645 case " $TARGET_OBS " in
6646 *" ${i} "*) ;;
6647 *)
6648 TARGET_OBS="$TARGET_OBS ${i}"
6649 ;;
6650 esac
6651 done
20e95c23 6652
783e057b
DJ
6653 # Check whether this target needs 64-bit CORE_ADDR
6654 if test x${want64} = xfalse; then
6655 . ${srcdir}/../bfd/config.bfd
6656 fi
b292c783
JK
6657
6658 # Check whether this target is native and supports gcore.
6659 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6660 && $gdb_have_gcore; then
6661 HAVE_NATIVE_GCORE_TARGET=1
6662 fi
783e057b 6663 fi
20e95c23
DJ
6664done
6665
783e057b
DJ
6666if test x${all_targets} = xtrue; then
6667
6668 # We want all 64-bit targets if we either:
6669 # - run on a 64-bit host or
6670 # - already require 64-bit support for some other target or
6671 # - the --enable-64-bit-bfd option was supplied
6672 # Otherwise we only support all 32-bit targets.
6673 #
6674 # NOTE: This test must be in sync with the corresponding
6675 # tests in BFD!
20e95c23 6676
783e057b 6677 if test x${want64} = xfalse; then
81ecdfbb
RW
6678 # The cast to long int works around a bug in the HP C Compiler
6679# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6680# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6681# This bug is HP SR number 8606223364.
6682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6683$as_echo_n "checking size of long... " >&6; }
d0ac1c44 6684if ${ac_cv_sizeof_long+:} false; then :
81ecdfbb 6685 $as_echo_n "(cached) " >&6
c0993dbe 6686else
81ecdfbb 6687 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 6688
81ecdfbb
RW
6689else
6690 if test "$ac_cv_type_long" = yes; then
6691 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6692$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
6693as_fn_error 77 "cannot compute sizeof (long)
6694See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
6695 else
6696 ac_cv_sizeof_long=0
6697 fi
c0993dbe 6698fi
81ecdfbb 6699
c0993dbe 6700fi
81ecdfbb
RW
6701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6702$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 6703
c0993dbe 6704
c0993dbe 6705
c0993dbe
UW
6706cat >>confdefs.h <<_ACEOF
6707#define SIZEOF_LONG $ac_cv_sizeof_long
6708_ACEOF
6709
6710
6711 if test "x${ac_cv_sizeof_long}" = "x8"; then
6712 want64=true
6713 fi
6714 fi
6715 if test x${want64} = xtrue; then
6716 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6717 else
6718 TARGET_OBS='$(ALL_TARGET_OBS)'
6719 fi
6720fi
6721
6722
6723
b292c783 6724
c0993dbe
UW
6725# For other settings, only the main target counts.
6726gdb_sim=
6727gdb_osabi=
6728build_gdbserver=
6729targ=$target; . ${srcdir}/configure.tgt
6730
6731# Fetch the default architecture and default target vector from BFD.
6732targ=$target; . $srcdir/../bfd/config.bfd
6733
6734# We only want the first architecture, so strip off the others if
6735# there is more than one.
6736targ_archs=`echo $targ_archs | sed 's/ .*//'`
6737
6738if test "x$targ_archs" != x; then
6739
6740cat >>confdefs.h <<_ACEOF
6741#define DEFAULT_BFD_ARCH $targ_archs
6742_ACEOF
6743
6744fi
6745if test "x$targ_defvec" != x; then
6746
6747cat >>confdefs.h <<_ACEOF
6748#define DEFAULT_BFD_VEC $targ_defvec
6749_ACEOF
6750
6751fi
6752
c0993dbe 6753# Enable MI.
81ecdfbb
RW
6754# Check whether --enable-gdbmi was given.
6755if test "${enable_gdbmi+set}" = set; then :
6756 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
6757 yes | no)
6758 ;;
6759 *)
d0ac1c44 6760 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
6761 esac
6762else
6763 enable_gdbmi=yes
81ecdfbb
RW
6764fi
6765
c0993dbe
UW
6766if test x"$enable_gdbmi" = xyes; then
6767 if test -d $srcdir/mi; then
6768 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6769 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6770 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6771 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6772 fi
6773fi
6774
6775# Enable TUI.
81ecdfbb
RW
6776# Check whether --enable-tui was given.
6777if test "${enable_tui+set}" = set; then :
6778 enableval=$enable_tui; case $enableval in
3ca64bd3 6779 yes | no | auto)
c0993dbe
UW
6780 ;;
6781 *)
d0ac1c44 6782 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
6783 esac
6784else
3ca64bd3 6785 enable_tui=auto
81ecdfbb
RW
6786fi
6787
c0993dbe
UW
6788
6789# Enable gdbtk.
81ecdfbb
RW
6790# Check whether --enable-gdbtk was given.
6791if test "${enable_gdbtk+set}" = set; then :
6792 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
6793 yes | no)
6794 ;;
6795 *)
d0ac1c44 6796 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
6797 esac
6798else
5062cc19 6799 if test -d $srcdir/gdbtk; then
c0993dbe
UW
6800 enable_gdbtk=yes
6801 else
6802 enable_gdbtk=no
6803 fi
81ecdfbb
RW
6804fi
6805
c0993dbe
UW
6806# We unconditionally disable gdbtk tests on selected platforms.
6807case $host_os in
6808 go32* | windows*)
81ecdfbb
RW
6809 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6810$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
6811 enable_gdbtk=no ;;
6812esac
6813
05e7c244 6814# Libunwind support for ia64.
bec39cab 6815
05e7c244
JK
6816
6817# Check whether --with-libunwind-ia64 was given.
6818if test "${with_libunwind_ia64+set}" = set; then :
6819 withval=$with_libunwind_ia64;
bec39cab 6820else
05e7c244
JK
6821 with_libunwind_ia64=auto
6822fi
bec39cab 6823
05e7c244
JK
6824
6825# Backward compatibility option.
6826if test "${with_libunwind+set}" = set; then
6827 if test x"$with_libunwind_ia64" != xauto; then
d0ac1c44 6828 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
05e7c244
JK
6829 fi
6830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6831$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6832 with_libunwind_ia64="$with_libunwind"
6833fi
6834
6835case "$with_libunwind_ia64" in
6836 yes | no)
6837 ;;
6838 auto)
6839 for ac_header in libunwind-ia64.h
81ecdfbb 6840do :
b54a8fd7 6841 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 6842if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6843 cat >>confdefs.h <<_ACEOF
b54a8fd7 6844#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6845_ACEOF
6846
6847fi
6848
6849done
6850
05e7c244
JK
6851 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6852 ;;
6853 *)
d0ac1c44 6854 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
05e7c244
JK
6855 ;;
6856esac
bec39cab 6857
05e7c244 6858if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 6859 for ac_header in libunwind-ia64.h
81ecdfbb 6860do :
b54a8fd7 6861 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 6862if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6863 cat >>confdefs.h <<_ACEOF
b54a8fd7 6864#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6865_ACEOF
6866
6867fi
6868
6869done
6870
05e7c244 6871 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
d0ac1c44 6872 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
05e7c244
JK
6873 fi
6874 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6875 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6876 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
6877fi
6878
cb01cfba
JB
6879opt_curses=no
6880
81ecdfbb
RW
6881# Check whether --with-curses was given.
6882if test "${with_curses+set}" = set; then :
6883 withval=$with_curses; opt_curses=$withval
6884fi
6885
cb01cfba 6886
76a39ba7 6887prefer_curses=no
cb01cfba 6888if test "$opt_curses" = "yes"; then
76a39ba7 6889 prefer_curses=yes
cb01cfba
JB
6890fi
6891
a9322a30 6892# Profiling support.
81ecdfbb
RW
6893# Check whether --enable-profiling was given.
6894if test "${enable_profiling+set}" = set; then :
6895 enableval=$enable_profiling; case $enableval in
a9322a30
TT
6896 yes | no)
6897 ;;
6898 *)
d0ac1c44 6899 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
6900 esac
6901else
6902 enable_profiling=no
81ecdfbb 6903fi
bec39cab 6904
a9322a30
TT
6905
6906for ac_func in monstartup _mcleanup
81ecdfbb
RW
6907do :
6908 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6909ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 6910if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
81ecdfbb
RW
6911 cat >>confdefs.h <<_ACEOF
6912#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 6913_ACEOF
a9322a30 6914
81ecdfbb
RW
6915fi
6916done
a9322a30 6917
81ecdfbb
RW
6918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6919$as_echo_n "checking for _etext... " >&6; }
d0ac1c44 6920if ${ac_cv_var__etext+:} false; then :
81ecdfbb
RW
6921 $as_echo_n "(cached) " >&6
6922else
6923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6924/* end confdefs.h. */
6925#include <stdlib.h>
6926extern char _etext;
a9322a30
TT
6927
6928int
6929main ()
6930{
6931free (&_etext);
6932 ;
6933 return 0;
6934}
bec39cab 6935_ACEOF
81ecdfbb 6936if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6937 ac_cv_var__etext=yes
bec39cab 6938else
81ecdfbb 6939 ac_cv_var__etext=no
bec39cab 6940fi
81ecdfbb
RW
6941rm -f core conftest.err conftest.$ac_objext \
6942 conftest$ac_exeext conftest.$ac_ext
bec39cab 6943fi
81ecdfbb
RW
6944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6945$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 6946if test $ac_cv_var__etext = yes; then
60ca704f 6947
81ecdfbb 6948$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 6949
bec39cab 6950fi
81ecdfbb
RW
6951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6952$as_echo_n "checking for etext... " >&6; }
d0ac1c44 6953if ${ac_cv_var_etext+:} false; then :
81ecdfbb 6954 $as_echo_n "(cached) " >&6
bec39cab 6955else
81ecdfbb 6956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6957/* end confdefs.h. */
a9322a30
TT
6958#include <stdlib.h>
6959extern char etext;
bec39cab
AC
6960
6961int
6962main ()
6963{
a9322a30 6964free (&etext);
bec39cab
AC
6965 ;
6966 return 0;
6967}
6968_ACEOF
81ecdfbb 6969if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6970 ac_cv_var_etext=yes
bec39cab 6971else
81ecdfbb 6972 ac_cv_var_etext=no
bec39cab 6973fi
81ecdfbb
RW
6974rm -f core conftest.err conftest.$ac_objext \
6975 conftest$ac_exeext conftest.$ac_ext
bec39cab 6976fi
81ecdfbb
RW
6977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
6978$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
6979if test $ac_cv_var_etext = yes; then
6980
81ecdfbb 6981$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
6982
6983fi
a9322a30
TT
6984if test "$enable_profiling" = yes ; then
6985 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
d0ac1c44 6986 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
6987 fi
6988 PROFILE_CFLAGS=-pg
6989 OLD_CFLAGS="$CFLAGS"
6990 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 6991
81ecdfbb
RW
6992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
6993$as_echo_n "checking whether $CC supports -pg... " >&6; }
d0ac1c44 6994if ${ac_cv_cc_supports_pg+:} false; then :
81ecdfbb 6995 $as_echo_n "(cached) " >&6
bec39cab 6996else
81ecdfbb 6997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6998/* end confdefs.h. */
bec39cab
AC
6999
7000int
7001main ()
7002{
a9322a30 7003int x;
bec39cab
AC
7004 ;
7005 return 0;
7006}
7007_ACEOF
81ecdfbb 7008if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 7009 ac_cv_cc_supports_pg=yes
bec39cab 7010else
81ecdfbb 7011 ac_cv_cc_supports_pg=no
bec39cab 7012fi
81ecdfbb 7013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 7014fi
81ecdfbb
RW
7015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7016$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 7017
a9322a30 7018 if test $ac_cv_cc_supports_pg = no; then
d0ac1c44 7019 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 7020 fi
bec39cab 7021
a9322a30 7022 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
7023fi
7024
44cee4fd
TT
7025CODESIGN_CERT=
7026# Check whether --enable-codesign was given.
7027if test "${enable_codesign+set}" = set; then :
7028 enableval=$enable_codesign; CODESIGN_CERT=$enableval
7029fi
7030
7031
7032
c16158bc
JM
7033
7034
81ecdfbb
RW
7035# Check whether --with-pkgversion was given.
7036if test "${with_pkgversion+set}" = set; then :
7037 withval=$with_pkgversion; case "$withval" in
d0ac1c44 7038 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
7039 no) PKGVERSION= ;;
7040 *) PKGVERSION="($withval) " ;;
7041 esac
7042else
7043 PKGVERSION="(GDB) "
7044
81ecdfbb 7045fi
c16158bc
JM
7046
7047
7048
7049
81ecdfbb
RW
7050
7051# Check whether --with-bugurl was given.
7052if test "${with_bugurl+set}" = set; then :
7053 withval=$with_bugurl; case "$withval" in
d0ac1c44 7054 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
7055 no) BUGURL=
7056 ;;
7057 *) BUGURL="$withval"
7058 ;;
7059 esac
7060else
7061 BUGURL="http://www.gnu.org/software/gdb/bugs/"
7062
81ecdfbb
RW
7063fi
7064
c16158bc
JM
7065 case ${BUGURL} in
7066 "")
7067 REPORT_BUGS_TO=
7068 REPORT_BUGS_TEXI=
7069 ;;
7070 *)
7071 REPORT_BUGS_TO="<$BUGURL>"
7072 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7073 ;;
7074 esac;
7075
7076
7077
7078
7079cat >>confdefs.h <<_ACEOF
7080#define PKGVERSION "$PKGVERSION"
7081_ACEOF
7082
7083
7084cat >>confdefs.h <<_ACEOF
7085#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7086_ACEOF
7087
7088
bec39cab
AC
7089# --------------------- #
7090# Checks for programs. #
7091# --------------------- #
7092
7093for ac_prog in gawk mawk nawk awk
7094do
7095 # Extract the first word of "$ac_prog", so it can be a program name with args.
7096set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7098$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7099if ${ac_cv_prog_AWK+:} false; then :
81ecdfbb 7100 $as_echo_n "(cached) " >&6
bec39cab
AC
7101else
7102 if test -n "$AWK"; then
7103 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7104else
7105as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7106for as_dir in $PATH
7107do
7108 IFS=$as_save_IFS
7109 test -z "$as_dir" && as_dir=.
81ecdfbb 7110 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7111 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7112 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7113 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7114 break 2
7115 fi
7116done
81ecdfbb
RW
7117 done
7118IFS=$as_save_IFS
bec39cab
AC
7119
7120fi
7121fi
7122AWK=$ac_cv_prog_AWK
7123if test -n "$AWK"; then
81ecdfbb
RW
7124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7125$as_echo "$AWK" >&6; }
bec39cab 7126else
81ecdfbb
RW
7127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7128$as_echo "no" >&6; }
bec39cab
AC
7129fi
7130
bec39cab 7131
81ecdfbb 7132 test -n "$AWK" && break
bec39cab
AC
7133done
7134
c971b7fa
PA
7135# Find a good install program. We prefer a C program (faster),
7136# so one script is as good as another. But avoid the broken or
7137# incompatible versions:
7138# SysV /etc/install, /usr/sbin/install
7139# SunOS /usr/etc/install
7140# IRIX /sbin/install
7141# AIX /bin/install
7142# AmigaOS /C/install, which installs bootblocks on floppy discs
7143# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7144# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7145# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7146# OS/2's system install, which has a completely different semantic
7147# ./install, which can be erroneously created by make from ./install.sh.
7148# Reject install programs that cannot install multiple files.
7149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7150$as_echo_n "checking for a BSD-compatible install... " >&6; }
7151if test -z "$INSTALL"; then
d0ac1c44 7152if ${ac_cv_path_install+:} false; then :
c971b7fa
PA
7153 $as_echo_n "(cached) " >&6
7154else
7155 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7156for as_dir in $PATH
7157do
7158 IFS=$as_save_IFS
7159 test -z "$as_dir" && as_dir=.
7160 # Account for people who put trailing slashes in PATH elements.
7161case $as_dir/ in #((
7162 ./ | .// | /[cC]/* | \
7163 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7164 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7165 /usr/ucb/* ) ;;
7166 *)
7167 # OSF1 and SCO ODT 3.0 have their own names for install.
7168 # Don't use installbsd from OSF since it installs stuff as root
7169 # by default.
7170 for ac_prog in ginstall scoinst install; do
7171 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7172 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
c971b7fa
PA
7173 if test $ac_prog = install &&
7174 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7175 # AIX install. It has an incompatible calling convention.
7176 :
7177 elif test $ac_prog = install &&
7178 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7179 # program-specific install script used by HP pwplus--don't use.
7180 :
7181 else
7182 rm -rf conftest.one conftest.two conftest.dir
7183 echo one > conftest.one
7184 echo two > conftest.two
7185 mkdir conftest.dir
7186 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7187 test -s conftest.one && test -s conftest.two &&
7188 test -s conftest.dir/conftest.one &&
7189 test -s conftest.dir/conftest.two
7190 then
7191 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7192 break 3
7193 fi
7194 fi
7195 fi
7196 done
7197 done
7198 ;;
7199esac
7200
7201 done
7202IFS=$as_save_IFS
7203
7204rm -rf conftest.one conftest.two conftest.dir
7205
7206fi
7207 if test "${ac_cv_path_install+set}" = set; then
7208 INSTALL=$ac_cv_path_install
7209 else
7210 # As a last resort, use the slow shell script. Don't cache a
7211 # value for INSTALL within a source directory, because that will
7212 # break other packages using the cache if that directory is
7213 # removed, or if the value is a relative name.
7214 INSTALL=$ac_install_sh
7215 fi
7216fi
7217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7218$as_echo "$INSTALL" >&6; }
7219
7220# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7221# It thinks the first close brace ends the variable substitution.
7222test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7223
7224test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7225
7226test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 7227
81ecdfbb
RW
7228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7229$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
7230LN_S=$as_ln_s
7231if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
7232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7233$as_echo "yes" >&6; }
bec39cab 7234else
81ecdfbb
RW
7235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7236$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
7237fi
7238
7239if test -n "$ac_tool_prefix"; then
7240 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7241set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
7242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7243$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7244if ${ac_cv_prog_RANLIB+:} false; then :
81ecdfbb 7245 $as_echo_n "(cached) " >&6
bec39cab
AC
7246else
7247 if test -n "$RANLIB"; then
7248 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7249else
7250as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7251for as_dir in $PATH
7252do
7253 IFS=$as_save_IFS
7254 test -z "$as_dir" && as_dir=.
81ecdfbb 7255 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7256 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7257 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 7258 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7259 break 2
7260 fi
7261done
81ecdfbb
RW
7262 done
7263IFS=$as_save_IFS
bec39cab
AC
7264
7265fi
7266fi
7267RANLIB=$ac_cv_prog_RANLIB
7268if test -n "$RANLIB"; then
81ecdfbb
RW
7269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7270$as_echo "$RANLIB" >&6; }
bec39cab 7271else
81ecdfbb
RW
7272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7273$as_echo "no" >&6; }
bec39cab
AC
7274fi
7275
81ecdfbb 7276
bec39cab
AC
7277fi
7278if test -z "$ac_cv_prog_RANLIB"; then
7279 ac_ct_RANLIB=$RANLIB
7280 # Extract the first word of "ranlib", so it can be a program name with args.
7281set dummy ranlib; ac_word=$2
81ecdfbb
RW
7282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7283$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7284if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
81ecdfbb 7285 $as_echo_n "(cached) " >&6
bec39cab
AC
7286else
7287 if test -n "$ac_ct_RANLIB"; then
7288 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7289else
7290as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7291for as_dir in $PATH
7292do
7293 IFS=$as_save_IFS
7294 test -z "$as_dir" && as_dir=.
81ecdfbb 7295 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7296 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7297 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 7298 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7299 break 2
7300 fi
7301done
81ecdfbb
RW
7302 done
7303IFS=$as_save_IFS
bec39cab 7304
bec39cab
AC
7305fi
7306fi
7307ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7308if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
7309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7310$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 7311else
81ecdfbb
RW
7312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7313$as_echo "no" >&6; }
bec39cab
AC
7314fi
7315
81ecdfbb
RW
7316 if test "x$ac_ct_RANLIB" = x; then
7317 RANLIB=":"
7318 else
7319 case $cross_compiling:$ac_tool_warned in
7320yes:)
7321{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7322$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7323ac_tool_warned=yes ;;
7324esac
7325 RANLIB=$ac_ct_RANLIB
7326 fi
bec39cab
AC
7327else
7328 RANLIB="$ac_cv_prog_RANLIB"
7329fi
7330
7331for ac_prog in 'bison -y' byacc
7332do
7333 # Extract the first word of "$ac_prog", so it can be a program name with args.
7334set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7336$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7337if ${ac_cv_prog_YACC+:} false; then :
81ecdfbb 7338 $as_echo_n "(cached) " >&6
bec39cab
AC
7339else
7340 if test -n "$YACC"; then
7341 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7342else
7343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7344for as_dir in $PATH
7345do
7346 IFS=$as_save_IFS
7347 test -z "$as_dir" && as_dir=.
81ecdfbb 7348 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7349 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7350 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 7351 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7352 break 2
7353 fi
7354done
81ecdfbb
RW
7355 done
7356IFS=$as_save_IFS
bec39cab
AC
7357
7358fi
7359fi
7360YACC=$ac_cv_prog_YACC
7361if test -n "$YACC"; then
81ecdfbb
RW
7362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7363$as_echo "$YACC" >&6; }
bec39cab 7364else
81ecdfbb
RW
7365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7366$as_echo "no" >&6; }
bec39cab
AC
7367fi
7368
81ecdfbb 7369
bec39cab
AC
7370 test -n "$YACC" && break
7371done
7372test -n "$YACC" || YACC="yacc"
7373
7374
7375if test -n "$ac_tool_prefix"; then
7376 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7377set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
7378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7379$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7380if ${ac_cv_prog_AR+:} false; then :
81ecdfbb 7381 $as_echo_n "(cached) " >&6
bec39cab
AC
7382else
7383 if test -n "$AR"; then
7384 ac_cv_prog_AR="$AR" # Let the user override the test.
7385else
7386as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7387for as_dir in $PATH
7388do
7389 IFS=$as_save_IFS
7390 test -z "$as_dir" && as_dir=.
81ecdfbb 7391 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7392 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7393 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 7394 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7395 break 2
7396 fi
7397done
81ecdfbb
RW
7398 done
7399IFS=$as_save_IFS
bec39cab
AC
7400
7401fi
7402fi
7403AR=$ac_cv_prog_AR
7404if test -n "$AR"; then
81ecdfbb
RW
7405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7406$as_echo "$AR" >&6; }
bec39cab 7407else
81ecdfbb
RW
7408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7409$as_echo "no" >&6; }
bec39cab
AC
7410fi
7411
81ecdfbb 7412
bec39cab
AC
7413fi
7414if test -z "$ac_cv_prog_AR"; then
7415 ac_ct_AR=$AR
7416 # Extract the first word of "ar", so it can be a program name with args.
7417set dummy ar; ac_word=$2
81ecdfbb
RW
7418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7419$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7420if ${ac_cv_prog_ac_ct_AR+:} false; then :
81ecdfbb 7421 $as_echo_n "(cached) " >&6
bec39cab
AC
7422else
7423 if test -n "$ac_ct_AR"; then
7424 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7425else
7426as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7427for as_dir in $PATH
7428do
7429 IFS=$as_save_IFS
7430 test -z "$as_dir" && as_dir=.
81ecdfbb 7431 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7432 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7433 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 7434 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7435 break 2
7436 fi
7437done
81ecdfbb
RW
7438 done
7439IFS=$as_save_IFS
bec39cab
AC
7440
7441fi
7442fi
7443ac_ct_AR=$ac_cv_prog_ac_ct_AR
7444if test -n "$ac_ct_AR"; then
81ecdfbb
RW
7445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7446$as_echo "$ac_ct_AR" >&6; }
bec39cab 7447else
81ecdfbb
RW
7448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7449$as_echo "no" >&6; }
bec39cab
AC
7450fi
7451
81ecdfbb
RW
7452 if test "x$ac_ct_AR" = x; then
7453 AR=""
7454 else
7455 case $cross_compiling:$ac_tool_warned in
7456yes:)
7457{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7458$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7459ac_tool_warned=yes ;;
7460esac
7461 AR=$ac_ct_AR
7462 fi
bec39cab
AC
7463else
7464 AR="$ac_cv_prog_AR"
7465fi
7466
7467if test -n "$ac_tool_prefix"; then
7468 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7469set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
7470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7471$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7472if ${ac_cv_prog_DLLTOOL+:} false; then :
81ecdfbb 7473 $as_echo_n "(cached) " >&6
bec39cab
AC
7474else
7475 if test -n "$DLLTOOL"; then
7476 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7477else
7478as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7479for as_dir in $PATH
7480do
7481 IFS=$as_save_IFS
7482 test -z "$as_dir" && as_dir=.
81ecdfbb 7483 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7484 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7485 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 7486 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7487 break 2
7488 fi
7489done
81ecdfbb
RW
7490 done
7491IFS=$as_save_IFS
bec39cab
AC
7492
7493fi
7494fi
7495DLLTOOL=$ac_cv_prog_DLLTOOL
7496if test -n "$DLLTOOL"; then
81ecdfbb
RW
7497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7498$as_echo "$DLLTOOL" >&6; }
bec39cab 7499else
81ecdfbb
RW
7500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7501$as_echo "no" >&6; }
bec39cab
AC
7502fi
7503
81ecdfbb 7504
bec39cab
AC
7505fi
7506if test -z "$ac_cv_prog_DLLTOOL"; then
7507 ac_ct_DLLTOOL=$DLLTOOL
7508 # Extract the first word of "dlltool", so it can be a program name with args.
7509set dummy dlltool; ac_word=$2
81ecdfbb
RW
7510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7511$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7512if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
81ecdfbb 7513 $as_echo_n "(cached) " >&6
bec39cab
AC
7514else
7515 if test -n "$ac_ct_DLLTOOL"; then
7516 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7517else
7518as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7519for as_dir in $PATH
7520do
7521 IFS=$as_save_IFS
7522 test -z "$as_dir" && as_dir=.
81ecdfbb 7523 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7524 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7525 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 7526 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7527 break 2
7528 fi
7529done
81ecdfbb
RW
7530 done
7531IFS=$as_save_IFS
bec39cab
AC
7532
7533fi
7534fi
7535ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7536if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
7537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7538$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 7539else
81ecdfbb
RW
7540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7541$as_echo "no" >&6; }
bec39cab
AC
7542fi
7543
81ecdfbb
RW
7544 if test "x$ac_ct_DLLTOOL" = x; then
7545 DLLTOOL=""
7546 else
7547 case $cross_compiling:$ac_tool_warned in
7548yes:)
7549{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7550$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7551ac_tool_warned=yes ;;
7552esac
7553 DLLTOOL=$ac_ct_DLLTOOL
7554 fi
bec39cab
AC
7555else
7556 DLLTOOL="$ac_cv_prog_DLLTOOL"
7557fi
7558
7559if test -n "$ac_tool_prefix"; then
7560 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7561set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
7562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7563$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7564if ${ac_cv_prog_WINDRES+:} false; then :
81ecdfbb 7565 $as_echo_n "(cached) " >&6
bec39cab
AC
7566else
7567 if test -n "$WINDRES"; then
7568 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7569else
7570as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7571for as_dir in $PATH
7572do
7573 IFS=$as_save_IFS
7574 test -z "$as_dir" && as_dir=.
81ecdfbb 7575 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7576 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7577 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 7578 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7579 break 2
7580 fi
7581done
81ecdfbb
RW
7582 done
7583IFS=$as_save_IFS
bec39cab
AC
7584
7585fi
7586fi
7587WINDRES=$ac_cv_prog_WINDRES
7588if test -n "$WINDRES"; then
81ecdfbb
RW
7589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7590$as_echo "$WINDRES" >&6; }
bec39cab 7591else
81ecdfbb
RW
7592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7593$as_echo "no" >&6; }
bec39cab
AC
7594fi
7595
81ecdfbb 7596
bec39cab
AC
7597fi
7598if test -z "$ac_cv_prog_WINDRES"; then
7599 ac_ct_WINDRES=$WINDRES
7600 # Extract the first word of "windres", so it can be a program name with args.
7601set dummy windres; ac_word=$2
81ecdfbb
RW
7602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7603$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7604if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
81ecdfbb 7605 $as_echo_n "(cached) " >&6
bec39cab
AC
7606else
7607 if test -n "$ac_ct_WINDRES"; then
7608 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7609else
7610as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7611for as_dir in $PATH
7612do
7613 IFS=$as_save_IFS
7614 test -z "$as_dir" && as_dir=.
81ecdfbb 7615 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7616 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7617 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 7618 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7619 break 2
7620 fi
7621done
81ecdfbb
RW
7622 done
7623IFS=$as_save_IFS
bec39cab
AC
7624
7625fi
7626fi
7627ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7628if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
7629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7630$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 7631else
81ecdfbb
RW
7632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7633$as_echo "no" >&6; }
c906108c 7634fi
bec39cab 7635
81ecdfbb
RW
7636 if test "x$ac_ct_WINDRES" = x; then
7637 WINDRES=""
7638 else
7639 case $cross_compiling:$ac_tool_warned in
7640yes:)
7641{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7642$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7643ac_tool_warned=yes ;;
7644esac
7645 WINDRES=$ac_ct_WINDRES
7646 fi
c906108c 7647else
bec39cab 7648 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
7649fi
7650
bec39cab 7651
036c3acb
TS
7652case $host_os in
7653 gnu*)
7654 # Needed for GNU Hurd hosts.
7655 if test -n "$ac_tool_prefix"; then
bec39cab
AC
7656 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7657set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
7658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7659$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7660if ${ac_cv_prog_MIG+:} false; then :
81ecdfbb 7661 $as_echo_n "(cached) " >&6
c906108c 7662else
bec39cab
AC
7663 if test -n "$MIG"; then
7664 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7665else
7666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7667for as_dir in $PATH
7668do
7669 IFS=$as_save_IFS
7670 test -z "$as_dir" && as_dir=.
81ecdfbb 7671 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7672 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7673 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 7674 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7675 break 2
7676 fi
7677done
81ecdfbb
RW
7678 done
7679IFS=$as_save_IFS
bec39cab 7680
c906108c 7681fi
bec39cab
AC
7682fi
7683MIG=$ac_cv_prog_MIG
7684if test -n "$MIG"; then
81ecdfbb
RW
7685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7686$as_echo "$MIG" >&6; }
c906108c 7687else
81ecdfbb
RW
7688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7689$as_echo "no" >&6; }
c906108c
SS
7690fi
7691
81ecdfbb 7692
bec39cab
AC
7693fi
7694if test -z "$ac_cv_prog_MIG"; then
7695 ac_ct_MIG=$MIG
7696 # Extract the first word of "mig", so it can be a program name with args.
7697set dummy mig; ac_word=$2
81ecdfbb
RW
7698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7699$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7700if ${ac_cv_prog_ac_ct_MIG+:} false; then :
81ecdfbb 7701 $as_echo_n "(cached) " >&6
bec39cab
AC
7702else
7703 if test -n "$ac_ct_MIG"; then
7704 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7705else
7706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7707for as_dir in $PATH
7708do
7709 IFS=$as_save_IFS
7710 test -z "$as_dir" && as_dir=.
81ecdfbb 7711 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7712 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7713 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 7714 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7715 break 2
7716 fi
7717done
81ecdfbb
RW
7718 done
7719IFS=$as_save_IFS
c906108c 7720
bec39cab
AC
7721fi
7722fi
7723ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7724if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
7725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7726$as_echo "$ac_ct_MIG" >&6; }
bec39cab 7727else
81ecdfbb
RW
7728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7729$as_echo "no" >&6; }
bec39cab 7730fi
c906108c 7731
81ecdfbb
RW
7732 if test "x$ac_ct_MIG" = x; then
7733 MIG=""
7734 else
7735 case $cross_compiling:$ac_tool_warned in
7736yes:)
7737{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7738$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7739ac_tool_warned=yes ;;
7740esac
7741 MIG=$ac_ct_MIG
7742 fi
bec39cab
AC
7743else
7744 MIG="$ac_cv_prog_MIG"
7745fi
c906108c 7746
036c3acb 7747 if test x"$MIG" = x; then
d0ac1c44 7748 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
036c3acb
TS
7749 fi
7750 ;;
7751esac
c906108c 7752
bec39cab
AC
7753# ---------------------- #
7754# Checks for libraries. #
7755# ---------------------- #
c906108c 7756
bec39cab 7757# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
7758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7759$as_echo_n "checking for main in -lm... " >&6; }
d0ac1c44 7760if ${ac_cv_lib_m_main+:} false; then :
81ecdfbb 7761 $as_echo_n "(cached) " >&6
bec39cab
AC
7762else
7763 ac_check_lib_save_LIBS=$LIBS
7764LIBS="-lm $LIBS"
81ecdfbb 7765cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7766/* end confdefs.h. */
c906108c 7767
c906108c 7768
bec39cab
AC
7769int
7770main ()
7771{
81ecdfbb 7772return main ();
bec39cab
AC
7773 ;
7774 return 0;
7775}
7776_ACEOF
81ecdfbb 7777if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
7778 ac_cv_lib_m_main=yes
7779else
81ecdfbb 7780 ac_cv_lib_m_main=no
bec39cab 7781fi
81ecdfbb
RW
7782rm -f core conftest.err conftest.$ac_objext \
7783 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
7784LIBS=$ac_check_lib_save_LIBS
7785fi
81ecdfbb
RW
7786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7787$as_echo "$ac_cv_lib_m_main" >&6; }
d0ac1c44 7788if test "x$ac_cv_lib_m_main" = xyes; then :
bec39cab
AC
7789 cat >>confdefs.h <<_ACEOF
7790#define HAVE_LIBM 1
7791_ACEOF
7792
7793 LIBS="-lm $LIBS"
c906108c 7794
c906108c 7795fi
bec39cab
AC
7796
7797
bec39cab 7798# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
7799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7800$as_echo_n "checking for library containing gethostbyname... " >&6; }
d0ac1c44 7801if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb 7802 $as_echo_n "(cached) " >&6
bec39cab
AC
7803else
7804 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7806/* end confdefs.h. */
ddc9cd0f 7807
81ecdfbb
RW
7808/* Override any GCC internal prototype to avoid an error.
7809 Use char because int might match the return type of a GCC
7810 builtin and then its argument prototype would still apply. */
bec39cab
AC
7811#ifdef __cplusplus
7812extern "C"
7813#endif
bec39cab
AC
7814char gethostbyname ();
7815int
7816main ()
7817{
81ecdfbb 7818return gethostbyname ();
bec39cab
AC
7819 ;
7820 return 0;
7821}
7822_ACEOF
81ecdfbb
RW
7823for ac_lib in '' nsl; do
7824 if test -z "$ac_lib"; then
7825 ac_res="none required"
7826 else
7827 ac_res=-l$ac_lib
b4e70030 7828 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7829 fi
7830 if ac_fn_c_try_link "$LINENO"; then :
7831 ac_cv_search_gethostbyname=$ac_res
7832fi
7833rm -f core conftest.err conftest.$ac_objext \
7834 conftest$ac_exeext
d0ac1c44 7835 if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb
RW
7836 break
7837fi
7838done
d0ac1c44 7839if ${ac_cv_search_gethostbyname+:} false; then :
ddc9cd0f 7840
bec39cab 7841else
81ecdfbb 7842 ac_cv_search_gethostbyname=no
bec39cab 7843fi
81ecdfbb 7844rm conftest.$ac_ext
bec39cab
AC
7845LIBS=$ac_func_search_save_LIBS
7846fi
81ecdfbb
RW
7847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7848$as_echo "$ac_cv_search_gethostbyname" >&6; }
7849ac_res=$ac_cv_search_gethostbyname
7850if test "$ac_res" != no; then :
7851 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 7852
bec39cab 7853fi
96baa820 7854
c906108c 7855
b4e70030 7856# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
7857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7858$as_echo_n "checking for library containing socketpair... " >&6; }
d0ac1c44 7859if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb 7860 $as_echo_n "(cached) " >&6
b4e70030
JB
7861else
7862 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7864/* end confdefs.h. */
7865
81ecdfbb
RW
7866/* Override any GCC internal prototype to avoid an error.
7867 Use char because int might match the return type of a GCC
7868 builtin and then its argument prototype would still apply. */
b4e70030
JB
7869#ifdef __cplusplus
7870extern "C"
7871#endif
b4e70030
JB
7872char socketpair ();
7873int
7874main ()
7875{
81ecdfbb 7876return socketpair ();
b4e70030
JB
7877 ;
7878 return 0;
7879}
7880_ACEOF
81ecdfbb
RW
7881for ac_lib in '' socket; do
7882 if test -z "$ac_lib"; then
7883 ac_res="none required"
7884 else
7885 ac_res=-l$ac_lib
b4e70030 7886 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7887 fi
7888 if ac_fn_c_try_link "$LINENO"; then :
7889 ac_cv_search_socketpair=$ac_res
7890fi
7891rm -f core conftest.err conftest.$ac_objext \
7892 conftest$ac_exeext
d0ac1c44 7893 if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb
RW
7894 break
7895fi
7896done
d0ac1c44 7897if ${ac_cv_search_socketpair+:} false; then :
b4e70030 7898
b4e70030 7899else
81ecdfbb 7900 ac_cv_search_socketpair=no
b4e70030 7901fi
81ecdfbb 7902rm conftest.$ac_ext
b4e70030
JB
7903LIBS=$ac_func_search_save_LIBS
7904fi
81ecdfbb
RW
7905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7906$as_echo "$ac_cv_search_socketpair" >&6; }
7907ac_res=$ac_cv_search_socketpair
7908if test "$ac_res" != no; then :
7909 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7910
7911fi
7912
7913
233a11ab 7914# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 7915
711a72d3 7916 # Use the system's zlib library.
39f3de7c
L
7917 zlibdir="-L\$(top_builddir)/../zlib"
7918 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 7919
711a72d3
L
7920# Check whether --with-system-zlib was given.
7921if test "${with_system_zlib+set}" = set; then :
afa59b79
L
7922 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7923 zlibdir=
7924 zlibinc=
7925 fi
b040ad30 7926
233a11ab 7927fi
233a11ab 7928
233a11ab 7929
233a11ab 7930
b040ad30 7931
233a11ab 7932
25268153 7933# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
37773e78 7934# On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
25268153
JB
7935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7936$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
d0ac1c44 7937if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7938 $as_echo_n "(cached) " >&6
7939else
7940 ac_func_search_save_LIBS=$LIBS
7941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7942/* end confdefs.h. */
7943
7944/* Override any GCC internal prototype to avoid an error.
7945 Use char because int might match the return type of a GCC
7946 builtin and then its argument prototype would still apply. */
7947#ifdef __cplusplus
7948extern "C"
7949#endif
7950char kinfo_getvmmap ();
7951int
7952main ()
7953{
7954return kinfo_getvmmap ();
7955 ;
7956 return 0;
7957}
7958_ACEOF
37773e78 7959for ac_lib in '' util util-freebsd; do
25268153
JB
7960 if test -z "$ac_lib"; then
7961 ac_res="none required"
7962 else
7963 ac_res=-l$ac_lib
7964 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7965 fi
7966 if ac_fn_c_try_link "$LINENO"; then :
7967 ac_cv_search_kinfo_getvmmap=$ac_res
7968fi
7969rm -f core conftest.err conftest.$ac_objext \
7970 conftest$ac_exeext
d0ac1c44 7971 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7972 break
7973fi
7974done
d0ac1c44 7975if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7976
7977else
7978 ac_cv_search_kinfo_getvmmap=no
7979fi
7980rm conftest.$ac_ext
7981LIBS=$ac_func_search_save_LIBS
7982fi
7983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
7984$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
7985ac_res=$ac_cv_search_kinfo_getvmmap
7986if test "$ac_res" != no; then :
7987 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7988
7989$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
7990
7991fi
7992
7993
92fce24d
JB
7994# fbsd-nat.c can also use kinfo_getfile.
7995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
7996$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
d0ac1c44 7997if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
7998 $as_echo_n "(cached) " >&6
7999else
8000 ac_func_search_save_LIBS=$LIBS
8001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8002/* end confdefs.h. */
8003
8004/* Override any GCC internal prototype to avoid an error.
8005 Use char because int might match the return type of a GCC
8006 builtin and then its argument prototype would still apply. */
8007#ifdef __cplusplus
8008extern "C"
8009#endif
8010char kinfo_getfile ();
8011int
8012main ()
8013{
8014return kinfo_getfile ();
8015 ;
8016 return 0;
8017}
8018_ACEOF
8019for ac_lib in '' util util-freebsd; do
8020 if test -z "$ac_lib"; then
8021 ac_res="none required"
8022 else
8023 ac_res=-l$ac_lib
8024 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8025 fi
8026 if ac_fn_c_try_link "$LINENO"; then :
8027 ac_cv_search_kinfo_getfile=$ac_res
8028fi
8029rm -f core conftest.err conftest.$ac_objext \
8030 conftest$ac_exeext
d0ac1c44 8031 if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
8032 break
8033fi
8034done
d0ac1c44 8035if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
8036
8037else
8038 ac_cv_search_kinfo_getfile=no
8039fi
8040rm conftest.$ac_ext
8041LIBS=$ac_func_search_save_LIBS
8042fi
8043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
8044$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
8045ac_res=$ac_cv_search_kinfo_getfile
8046if test "$ac_res" != no; then :
8047 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8048
8049$as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
8050
8051fi
8052
8053
77f120bf 8054
016a3251
DD
8055 if test "X$prefix" = "XNONE"; then
8056 acl_final_prefix="$ac_default_prefix"
8057 else
8058 acl_final_prefix="$prefix"
8059 fi
8060 if test "X$exec_prefix" = "XNONE"; then
8061 acl_final_exec_prefix='${prefix}'
8062 else
8063 acl_final_exec_prefix="$exec_prefix"
8064 fi
8065 acl_save_prefix="$prefix"
8066 prefix="$acl_final_prefix"
8067 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8068 prefix="$acl_save_prefix"
8069
8070
8071# Check whether --with-gnu-ld was given.
8072if test "${with_gnu_ld+set}" = set; then :
8073 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8074else
8075 with_gnu_ld=no
8076fi
8077
8078# Prepare PATH_SEPARATOR.
8079# The user is always right.
8080if test "${PATH_SEPARATOR+set}" != set; then
8081 echo "#! /bin/sh" >conf$$.sh
8082 echo "exit 0" >>conf$$.sh
8083 chmod +x conf$$.sh
8084 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8085 PATH_SEPARATOR=';'
8086 else
8087 PATH_SEPARATOR=:
8088 fi
8089 rm -f conf$$.sh
8090fi
8091ac_prog=ld
8092if test "$GCC" = yes; then
8093 # Check if gcc -print-prog-name=ld gives a path.
8094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8095$as_echo_n "checking for ld used by GCC... " >&6; }
8096 case $host in
8097 *-*-mingw*)
8098 # gcc leaves a trailing carriage return which upsets mingw
8099 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8100 *)
8101 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8102 esac
8103 case $ac_prog in
8104 # Accept absolute paths.
8105 [\\/]* | [A-Za-z]:[\\/]*)
8106 re_direlt='/[^/][^/]*/\.\./'
8107 # Canonicalize the path of ld
8108 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8109 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8110 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8111 done
8112 test -z "$LD" && LD="$ac_prog"
8113 ;;
8114 "")
8115 # If it fails, then pretend we aren't using GCC.
8116 ac_prog=ld
8117 ;;
8118 *)
8119 # If it is relative, then search for the first ld in PATH.
8120 with_gnu_ld=unknown
8121 ;;
8122 esac
8123elif test "$with_gnu_ld" = yes; then
8124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8125$as_echo_n "checking for GNU ld... " >&6; }
8126else
8127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8128$as_echo_n "checking for non-GNU ld... " >&6; }
8129fi
d0ac1c44 8130if ${acl_cv_path_LD+:} false; then :
016a3251
DD
8131 $as_echo_n "(cached) " >&6
8132else
8133 if test -z "$LD"; then
8134 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8135 for ac_dir in $PATH; do
8136 test -z "$ac_dir" && ac_dir=.
8137 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8138 acl_cv_path_LD="$ac_dir/$ac_prog"
8139 # Check to see if the program is GNU ld. I'd rather use --version,
8140 # but apparently some GNU ld's only accept -v.
8141 # Break only if it was the GNU/non-GNU ld that we prefer.
8142 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8143 test "$with_gnu_ld" != no && break
8144 else
8145 test "$with_gnu_ld" != yes && break
8146 fi
8147 fi
8148 done
8149 IFS="$ac_save_ifs"
8150else
8151 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8152fi
8153fi
8154
8155LD="$acl_cv_path_LD"
8156if test -n "$LD"; then
8157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8158$as_echo "$LD" >&6; }
8159else
8160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8161$as_echo "no" >&6; }
8162fi
d0ac1c44 8163test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
016a3251
DD
8164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8165$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
d0ac1c44 8166if ${acl_cv_prog_gnu_ld+:} false; then :
016a3251
DD
8167 $as_echo_n "(cached) " >&6
8168else
8169 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8170if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8171 acl_cv_prog_gnu_ld=yes
8172else
8173 acl_cv_prog_gnu_ld=no
8174fi
8175fi
8176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8177$as_echo "$acl_cv_prog_gnu_ld" >&6; }
8178with_gnu_ld=$acl_cv_prog_gnu_ld
8179
8180
8181
8182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8183$as_echo_n "checking for shared library run path origin... " >&6; }
d0ac1c44 8184if ${acl_cv_rpath+:} false; then :
016a3251
DD
8185 $as_echo_n "(cached) " >&6
8186else
8187
8188 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8189 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8190 . ./conftest.sh
8191 rm -f ./conftest.sh
8192 acl_cv_rpath=done
8193
8194fi
8195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8196$as_echo "$acl_cv_rpath" >&6; }
8197 wl="$acl_cv_wl"
8198 libext="$acl_cv_libext"
8199 shlibext="$acl_cv_shlibext"
8200 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8201 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8202 hardcode_direct="$acl_cv_hardcode_direct"
8203 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8204 # Check whether --enable-rpath was given.
8205if test "${enable_rpath+set}" = set; then :
8206 enableval=$enable_rpath; :
8207else
8208 enable_rpath=yes
8209fi
8210
8211
8212
8213
8214
8215
8216
8217
8218 use_additional=yes
8219
8220 acl_save_prefix="$prefix"
8221 prefix="$acl_final_prefix"
8222 acl_save_exec_prefix="$exec_prefix"
8223 exec_prefix="$acl_final_exec_prefix"
8224
8225 eval additional_includedir=\"$includedir\"
8226 eval additional_libdir=\"$libdir\"
8227
8228 exec_prefix="$acl_save_exec_prefix"
8229 prefix="$acl_save_prefix"
77f120bf 8230
6c7a06a3 8231
81ecdfbb
RW
8232# Check whether --with-libiconv-prefix was given.
8233if test "${with_libiconv_prefix+set}" = set; then :
8234 withval=$with_libiconv_prefix;
016a3251
DD
8235 if test "X$withval" = "Xno"; then
8236 use_additional=no
8237 else
8238 if test "X$withval" = "X"; then
8239
8240 acl_save_prefix="$prefix"
8241 prefix="$acl_final_prefix"
8242 acl_save_exec_prefix="$exec_prefix"
8243 exec_prefix="$acl_final_exec_prefix"
8244
8245 eval additional_includedir=\"$includedir\"
8246 eval additional_libdir=\"$libdir\"
8247
8248 exec_prefix="$acl_save_exec_prefix"
8249 prefix="$acl_save_prefix"
8250
8251 else
8252 additional_includedir="$withval/include"
8253 additional_libdir="$withval/lib"
8254 fi
8255 fi
6c7a06a3 8256
81ecdfbb
RW
8257fi
8258
016a3251
DD
8259 LIBICONV=
8260 LTLIBICONV=
8261 INCICONV=
8262 rpathdirs=
8263 ltrpathdirs=
8264 names_already_handled=
8265 names_next_round='iconv '
8266 while test -n "$names_next_round"; do
8267 names_this_round="$names_next_round"
8268 names_next_round=
8269 for name in $names_this_round; do
8270 already_handled=
8271 for n in $names_already_handled; do
8272 if test "$n" = "$name"; then
8273 already_handled=yes
8274 break
8275 fi
8276 done
8277 if test -z "$already_handled"; then
8278 names_already_handled="$names_already_handled $name"
8279 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8280 eval value=\"\$HAVE_LIB$uppername\"
8281 if test -n "$value"; then
8282 if test "$value" = yes; then
8283 eval value=\"\$LIB$uppername\"
8284 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8285 eval value=\"\$LTLIB$uppername\"
8286 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8287 else
8288 :
8289 fi
8290 else
8291 found_dir=
8292 found_la=
8293 found_so=
8294 found_a=
8295 if test $use_additional = yes; then
8296 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8297 found_dir="$additional_libdir"
8298 found_so="$additional_libdir/lib$name.$shlibext"
8299 if test -f "$additional_libdir/lib$name.la"; then
8300 found_la="$additional_libdir/lib$name.la"
8301 fi
8302 else
8303 if test -f "$additional_libdir/lib$name.$libext"; then
8304 found_dir="$additional_libdir"
8305 found_a="$additional_libdir/lib$name.$libext"
8306 if test -f "$additional_libdir/lib$name.la"; then
8307 found_la="$additional_libdir/lib$name.la"
8308 fi
8309 fi
8310 fi
8311 fi
8312 if test "X$found_dir" = "X"; then
8313 for x in $LDFLAGS $LTLIBICONV; do
8314
8315 acl_save_prefix="$prefix"
8316 prefix="$acl_final_prefix"
8317 acl_save_exec_prefix="$exec_prefix"
8318 exec_prefix="$acl_final_exec_prefix"
8319 eval x=\"$x\"
8320 exec_prefix="$acl_save_exec_prefix"
8321 prefix="$acl_save_prefix"
8322
8323 case "$x" in
8324 -L*)
8325 dir=`echo "X$x" | sed -e 's/^X-L//'`
8326 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8327 found_dir="$dir"
8328 found_so="$dir/lib$name.$shlibext"
8329 if test -f "$dir/lib$name.la"; then
8330 found_la="$dir/lib$name.la"
8331 fi
8332 else
8333 if test -f "$dir/lib$name.$libext"; then
8334 found_dir="$dir"
8335 found_a="$dir/lib$name.$libext"
8336 if test -f "$dir/lib$name.la"; then
8337 found_la="$dir/lib$name.la"
8338 fi
8339 fi
8340 fi
8341 ;;
8342 esac
8343 if test "X$found_dir" != "X"; then
8344 break
8345 fi
8346 done
8347 fi
8348 if test "X$found_dir" != "X"; then
8349 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8350 if test "X$found_so" != "X"; then
8351 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8352 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8353 else
8354 haveit=
8355 for x in $ltrpathdirs; do
8356 if test "X$x" = "X$found_dir"; then
8357 haveit=yes
8358 break
8359 fi
8360 done
8361 if test -z "$haveit"; then
8362 ltrpathdirs="$ltrpathdirs $found_dir"
8363 fi
8364 if test "$hardcode_direct" = yes; then
8365 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8366 else
8367 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8368 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8369 haveit=
8370 for x in $rpathdirs; do
8371 if test "X$x" = "X$found_dir"; then
8372 haveit=yes
8373 break
8374 fi
8375 done
8376 if test -z "$haveit"; then
8377 rpathdirs="$rpathdirs $found_dir"
8378 fi
8379 else
8380 haveit=
8381 for x in $LDFLAGS $LIBICONV; do
8382
8383 acl_save_prefix="$prefix"
8384 prefix="$acl_final_prefix"
8385 acl_save_exec_prefix="$exec_prefix"
8386 exec_prefix="$acl_final_exec_prefix"
8387 eval x=\"$x\"
8388 exec_prefix="$acl_save_exec_prefix"
8389 prefix="$acl_save_prefix"
8390
8391 if test "X$x" = "X-L$found_dir"; then
8392 haveit=yes
8393 break
8394 fi
8395 done
8396 if test -z "$haveit"; then
8397 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8398 fi
8399 if test "$hardcode_minus_L" != no; then
8400 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8401 else
8402 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8403 fi
8404 fi
8405 fi
8406 fi
8407 else
8408 if test "X$found_a" != "X"; then
8409 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8410 else
8411 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8412 fi
8413 fi
8414 additional_includedir=
8415 case "$found_dir" in
8416 */lib | */lib/)
8417 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8418 additional_includedir="$basedir/include"
8419 ;;
8420 esac
8421 if test "X$additional_includedir" != "X"; then
8422 if test "X$additional_includedir" != "X/usr/include"; then
8423 haveit=
8424 if test "X$additional_includedir" = "X/usr/local/include"; then
8425 if test -n "$GCC"; then
8426 case $host_os in
8427 linux*) haveit=yes;;
8428 esac
8429 fi
8430 fi
8431 if test -z "$haveit"; then
8432 for x in $CPPFLAGS $INCICONV; do
8433
8434 acl_save_prefix="$prefix"
8435 prefix="$acl_final_prefix"
8436 acl_save_exec_prefix="$exec_prefix"
8437 exec_prefix="$acl_final_exec_prefix"
8438 eval x=\"$x\"
8439 exec_prefix="$acl_save_exec_prefix"
8440 prefix="$acl_save_prefix"
8441
8442 if test "X$x" = "X-I$additional_includedir"; then
8443 haveit=yes
8444 break
8445 fi
8446 done
8447 if test -z "$haveit"; then
8448 if test -d "$additional_includedir"; then
8449 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8450 fi
8451 fi
8452 fi
8453 fi
8454 fi
8455 if test -n "$found_la"; then
8456 save_libdir="$libdir"
8457 case "$found_la" in
8458 */* | *\\*) . "$found_la" ;;
8459 *) . "./$found_la" ;;
8460 esac
8461 libdir="$save_libdir"
8462 for dep in $dependency_libs; do
8463 case "$dep" in
8464 -L*)
8465 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8466 if test "X$additional_libdir" != "X/usr/lib"; then
8467 haveit=
8468 if test "X$additional_libdir" = "X/usr/local/lib"; then
8469 if test -n "$GCC"; then
8470 case $host_os in
8471 linux*) haveit=yes;;
8472 esac
8473 fi
8474 fi
8475 if test -z "$haveit"; then
8476 haveit=
8477 for x in $LDFLAGS $LIBICONV; do
8478
8479 acl_save_prefix="$prefix"
8480 prefix="$acl_final_prefix"
8481 acl_save_exec_prefix="$exec_prefix"
8482 exec_prefix="$acl_final_exec_prefix"
8483 eval x=\"$x\"
8484 exec_prefix="$acl_save_exec_prefix"
8485 prefix="$acl_save_prefix"
8486
8487 if test "X$x" = "X-L$additional_libdir"; then
8488 haveit=yes
8489 break
8490 fi
8491 done
8492 if test -z "$haveit"; then
8493 if test -d "$additional_libdir"; then
8494 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8495 fi
8496 fi
8497 haveit=
8498 for x in $LDFLAGS $LTLIBICONV; do
8499
8500 acl_save_prefix="$prefix"
8501 prefix="$acl_final_prefix"
8502 acl_save_exec_prefix="$exec_prefix"
8503 exec_prefix="$acl_final_exec_prefix"
8504 eval x=\"$x\"
8505 exec_prefix="$acl_save_exec_prefix"
8506 prefix="$acl_save_prefix"
8507
8508 if test "X$x" = "X-L$additional_libdir"; then
8509 haveit=yes
8510 break
8511 fi
8512 done
8513 if test -z "$haveit"; then
8514 if test -d "$additional_libdir"; then
8515 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8516 fi
8517 fi
8518 fi
8519 fi
8520 ;;
8521 -R*)
8522 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8523 if test "$enable_rpath" != no; then
8524 haveit=
8525 for x in $rpathdirs; do
8526 if test "X$x" = "X$dir"; then
8527 haveit=yes
8528 break
8529 fi
8530 done
8531 if test -z "$haveit"; then
8532 rpathdirs="$rpathdirs $dir"
8533 fi
8534 haveit=
8535 for x in $ltrpathdirs; do
8536 if test "X$x" = "X$dir"; then
8537 haveit=yes
8538 break
8539 fi
8540 done
8541 if test -z "$haveit"; then
8542 ltrpathdirs="$ltrpathdirs $dir"
8543 fi
8544 fi
8545 ;;
8546 -l*)
8547 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8548 ;;
8549 *.la)
8550 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8551 ;;
8552 *)
8553 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8554 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8555 ;;
8556 esac
8557 done
8558 fi
8559 else
8560 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8561 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8562 fi
8563 fi
8564 fi
8565 done
8566 done
8567 if test "X$rpathdirs" != "X"; then
8568 if test -n "$hardcode_libdir_separator"; then
8569 alldirs=
8570 for found_dir in $rpathdirs; do
8571 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8572 done
8573 acl_save_libdir="$libdir"
8574 libdir="$alldirs"
8575 eval flag=\"$hardcode_libdir_flag_spec\"
8576 libdir="$acl_save_libdir"
8577 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8578 else
8579 for found_dir in $rpathdirs; do
8580 acl_save_libdir="$libdir"
8581 libdir="$found_dir"
8582 eval flag=\"$hardcode_libdir_flag_spec\"
8583 libdir="$acl_save_libdir"
8584 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8585 done
8586 fi
8587 fi
8588 if test "X$ltrpathdirs" != "X"; then
8589 for found_dir in $ltrpathdirs; do
8590 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8591 done
8592 fi
8593
8594
8595
8596
8597
6c7a06a3 8598
6c7a06a3 8599
81ecdfbb
RW
8600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8601$as_echo_n "checking for iconv... " >&6; }
d0ac1c44 8602if ${am_cv_func_iconv+:} false; then :
81ecdfbb 8603 $as_echo_n "(cached) " >&6
d542061a 8604else
6c7a06a3
TT
8605
8606 am_cv_func_iconv="no, consider installing GNU libiconv"
8607 am_cv_lib_iconv=no
016a3251
DD
8608 am_save_CPPFLAGS="$CPPFLAGS"
8609 CPPFLAGS="$CPPFLAGS $INCICONV"
8610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8611/* end confdefs.h. */
6c7a06a3
TT
8612#include <stdlib.h>
8613#include <iconv.h>
d542061a
UW
8614int
8615main ()
8616{
6c7a06a3 8617iconv_t cd = iconv_open("","");
016a3251
DD
8618 iconv(cd,NULL,NULL,NULL,NULL);
8619 iconv_close(cd);
d542061a
UW
8620 ;
8621 return 0;
8622}
8623_ACEOF
81ecdfbb 8624if ac_fn_c_try_link "$LINENO"; then :
016a3251 8625 am_cv_func_iconv=yes
d542061a 8626fi
81ecdfbb
RW
8627rm -f core conftest.err conftest.$ac_objext \
8628 conftest$ac_exeext conftest.$ac_ext
016a3251 8629 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 8630
016a3251
DD
8631 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8632 for _libs in .libs _libs; do
8633 am_save_CPPFLAGS="$CPPFLAGS"
8634 am_save_LIBS="$LIBS"
8635 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8636 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8638/* end confdefs.h. */
6c7a06a3
TT
8639#include <stdlib.h>
8640#include <iconv.h>
d542061a
UW
8641int
8642main ()
8643{
6c7a06a3 8644iconv_t cd = iconv_open("","");
016a3251
DD
8645 iconv(cd,NULL,NULL,NULL,NULL);
8646 iconv_close(cd);
d542061a
UW
8647 ;
8648 return 0;
8649}
8650_ACEOF
81ecdfbb 8651if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
8652 INCICONV="-I../libiconv/include"
8653 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8654 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8655 am_cv_lib_iconv=yes
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
DD
8660 CPPFLAGS="$am_save_CPPFLAGS"
8661 LIBS="$am_save_LIBS"
8662 if test "$am_cv_func_iconv" = "yes"; then
8663 break
8664 fi
8665 done
77f120bf 8666 fi
94ae1714 8667
4edb1e84 8668 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 8669 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 8670 am_save_LIBS="$LIBS"
016a3251
DD
8671 CPPFLAGS="$LIBS $INCICONV"
8672 LIBS="$LIBS $LIBICONV"
81ecdfbb 8673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8674/* end confdefs.h. */
6c7a06a3
TT
8675#include <stdlib.h>
8676#include <iconv.h>
bec39cab
AC
8677int
8678main ()
8679{
6c7a06a3
TT
8680iconv_t cd = iconv_open("","");
8681 iconv(cd,NULL,NULL,NULL,NULL);
8682 iconv_close(cd);
bec39cab
AC
8683 ;
8684 return 0;
8685}
8686_ACEOF
81ecdfbb 8687if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8688 am_cv_lib_iconv=yes
6c7a06a3 8689 am_cv_func_iconv=yes
627af7ea 8690fi
81ecdfbb
RW
8691rm -f core conftest.err conftest.$ac_objext \
8692 conftest$ac_exeext conftest.$ac_ext
fc3b640d 8693 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 8694 LIBS="$am_save_LIBS"
6c7a06a3
TT
8695 fi
8696
8697fi
81ecdfbb
RW
8698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8699$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
8700 if test "$am_cv_func_iconv" = yes; then
8701
8702$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 8703
016a3251 8704 fi
fc3b640d 8705 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
8706
8707 for element in $INCICONV; do
8708 haveit=
8709 for x in $CPPFLAGS; do
8710
8711 acl_save_prefix="$prefix"
8712 prefix="$acl_final_prefix"
8713 acl_save_exec_prefix="$exec_prefix"
8714 exec_prefix="$acl_final_exec_prefix"
8715 eval x=\"$x\"
8716 exec_prefix="$acl_save_exec_prefix"
8717 prefix="$acl_save_prefix"
8718
8719 if test "X$x" = "X$element"; then
8720 haveit=yes
8721 break
8722 fi
8723 done
8724 if test -z "$haveit"; then
8725 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8726 fi
8727 done
8728
8729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8730$as_echo_n "checking how to link with libiconv... " >&6; }
8731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8732$as_echo "$LIBICONV" >&6; }
94ae1714 8733 else
016a3251
DD
8734 LIBICONV=
8735 LTLIBICONV=
fc3b640d 8736 fi
94ae1714 8737
6c7a06a3 8738
6c7a06a3 8739
016a3251 8740 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
8741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8742$as_echo_n "checking for iconv declaration... " >&6; }
d0ac1c44 8743 if ${am_cv_proto_iconv+:} false; then :
81ecdfbb 8744 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8745else
8746
81ecdfbb 8747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8748/* end confdefs.h. */
8749
6c7a06a3
TT
8750#include <stdlib.h>
8751#include <iconv.h>
8752extern
b4e70030 8753#ifdef __cplusplus
6c7a06a3 8754"C"
b4e70030 8755#endif
6c7a06a3
TT
8756#if defined(__STDC__) || defined(__cplusplus)
8757size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8758#else
8759size_t iconv();
8760#endif
8761
b4e70030
JB
8762int
8763main ()
8764{
6c7a06a3 8765
b4e70030
JB
8766 ;
8767 return 0;
8768}
8769_ACEOF
81ecdfbb 8770if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 8771 am_cv_proto_iconv_arg1=""
4e8d927d 8772else
81ecdfbb 8773 am_cv_proto_iconv_arg1="const"
b4e70030 8774fi
81ecdfbb 8775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
8776 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);"
8777fi
8778
8779 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 8780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 8781 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
8782$as_echo "${ac_t:-
8783 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
8784
8785cat >>confdefs.h <<_ACEOF
8786#define ICONV_CONST $am_cv_proto_iconv_arg1
8787_ACEOF
8788
8789 fi
6c7a06a3
TT
8790
8791
478aac75
DE
8792# GDB may fork/exec the iconv program to get the list of supported character
8793# sets. Allow the user to specify where to find it.
8794# There are several factors affecting the choice of option name:
8795# - There is already --with-libiconv-prefix but we can't use it, it specifies
8796# the build-time location of libiconv files.
8797# - The program we need to find is iconv, which comes with glibc. The user
8798# doesn't necessarily have libiconv installed. Therefore naming this
8799# --with-libiconv-foo feels wrong.
8800# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8801# defined to work on directories not files (though it really doesn't know
8802# the difference).
8803# - Calling this --with-iconv-prefix is perceived to cause too much confusion
8804# with --with-libiconv-prefix.
8805# Putting these together is why the option name is --with-iconv-bin.
8806
8807
8808# Check whether --with-iconv-bin was given.
8809if test "${with_iconv_bin+set}" = set; then :
8810 withval=$with_iconv_bin; iconv_bin="${withval}"
8811
8812cat >>confdefs.h <<_ACEOF
8813#define ICONV_BIN "${iconv_bin}"
8814_ACEOF
8815
8816
8817 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8818 if test "x$prefix" = xNONE; then
8819 test_prefix=/usr/local
8820 else
8821 test_prefix=$prefix
8822 fi
8823 else
8824 test_prefix=$exec_prefix
8825 fi
8826 value=0
8827 case ${iconv_bin} in
8828 "${test_prefix}"|"${test_prefix}/"*|\
8829 '${exec_prefix}'|'${exec_prefix}/'*)
8830 value=1
8831 ;;
8832 esac
8833
8834cat >>confdefs.h <<_ACEOF
8835#define ICONV_BIN_RELOCATABLE $value
8836_ACEOF
8837
8838
8839
8840fi
8841
8842
cb01cfba 8843# For the TUI, we need enhanced curses functionality.
bd8a8e1b 8844if test x"$enable_tui" != xno; then
cb01cfba
JB
8845 prefer_curses=yes
8846fi
8847
8848curses_found=no
8849if test x"$prefer_curses" = xyes; then
8850 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8851 # curses library because the latter might not provide all the
8852 # functionality we need. However, this leads to problems on systems
8853 # where the linker searches /usr/local/lib, but the compiler doesn't
8854 # search /usr/local/include, if ncurses is installed in /usr/local. A
8855 # default installation of ncurses on alpha*-dec-osf* will lead to such
8856 # a situation.
81ecdfbb
RW
8857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8858$as_echo_n "checking for library containing waddstr... " >&6; }
d0ac1c44 8859if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8860 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8861else
8862 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8864/* end confdefs.h. */
8865
81ecdfbb
RW
8866/* Override any GCC internal prototype to avoid an error.
8867 Use char because int might match the return type of a GCC
8868 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8869#ifdef __cplusplus
8870extern "C"
8871#endif
6c7a06a3
TT
8872char waddstr ();
8873int
8874main ()
8875{
81ecdfbb 8876return waddstr ();
6c7a06a3
TT
8877 ;
8878 return 0;
8879}
8880_ACEOF
5007d765 8881for ac_lib in '' ncursesw ncurses cursesX curses; do
81ecdfbb
RW
8882 if test -z "$ac_lib"; then
8883 ac_res="none required"
8884 else
8885 ac_res=-l$ac_lib
8886 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8887 fi
8888 if ac_fn_c_try_link "$LINENO"; then :
8889 ac_cv_search_waddstr=$ac_res
8890fi
8891rm -f core conftest.err conftest.$ac_objext \
8892 conftest$ac_exeext
d0ac1c44 8893 if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb
RW
8894 break
8895fi
8896done
d0ac1c44 8897if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8898
6c7a06a3 8899else
81ecdfbb
RW
8900 ac_cv_search_waddstr=no
8901fi
8902rm conftest.$ac_ext
8903LIBS=$ac_func_search_save_LIBS
8904fi
8905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8906$as_echo "$ac_cv_search_waddstr" >&6; }
8907ac_res=$ac_cv_search_waddstr
8908if test "$ac_res" != no; then :
8909 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
8910
8911fi
8912
8913
cb01cfba
JB
8914 if test "$ac_cv_search_waddstr" != no; then
8915 curses_found=yes
8916 fi
8917fi
8918
8919# Check whether we should enable the TUI, but only do so if we really
8920# can.
8921if test x"$enable_tui" != xno; then
8922 if test -d $srcdir/tui; then
8923 if test "$curses_found" != no; then
6c7a06a3
TT
8924 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8925 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8926 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8927 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
8928 else
8929 if test x"$enable_tui" = xyes; then
d0ac1c44 8930 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 8931 else
81ecdfbb
RW
8932 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8933$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
8934 fi
8935 fi
8936 fi
8937fi
8938
8939# Since GDB uses Readline, we need termcap functionality. In many
8940# cases this will be provided by the curses library, but some systems
96fe4562 8941# have a separate termcap library, or no curses library at all.
6c7a06a3
TT
8942
8943case $host_os in
8944 cygwin*)
8945 if test -d $srcdir/libtermcap; then
8946 LIBS="../libtermcap/libtermcap.a $LIBS"
8947 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8948 fi ;;
8949 go32* | *djgpp*)
8950 ac_cv_search_tgetent="none required"
8951 ;;
6c7a06a3
TT
8952esac
8953
8954# These are the libraries checked by Readline.
81ecdfbb
RW
8955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8956$as_echo_n "checking for library containing tgetent... " >&6; }
d0ac1c44 8957if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb 8958 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8959else
8960 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8961cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8962/* end confdefs.h. */
8963
81ecdfbb
RW
8964/* Override any GCC internal prototype to avoid an error.
8965 Use char because int might match the return type of a GCC
8966 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8967#ifdef __cplusplus
8968extern "C"
8969#endif
6c7a06a3
TT
8970char tgetent ();
8971int
8972main ()
8973{
81ecdfbb 8974return tgetent ();
6c7a06a3
TT
8975 ;
8976 return 0;
8977}
8978_ACEOF
5007d765 8979for ac_lib in '' termcap tinfo curses ncursesw ncurses; do
81ecdfbb
RW
8980 if test -z "$ac_lib"; then
8981 ac_res="none required"
8982 else
8983 ac_res=-l$ac_lib
6c7a06a3 8984 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8985 fi
8986 if ac_fn_c_try_link "$LINENO"; then :
8987 ac_cv_search_tgetent=$ac_res
8988fi
8989rm -f core conftest.err conftest.$ac_objext \
8990 conftest$ac_exeext
d0ac1c44 8991 if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb
RW
8992 break
8993fi
8994done
d0ac1c44 8995if ${ac_cv_search_tgetent+:} false; then :
6c7a06a3 8996
6c7a06a3 8997else
81ecdfbb 8998 ac_cv_search_tgetent=no
6c7a06a3 8999fi
81ecdfbb 9000rm conftest.$ac_ext
6c7a06a3
TT
9001LIBS=$ac_func_search_save_LIBS
9002fi
81ecdfbb
RW
9003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9004$as_echo "$ac_cv_search_tgetent" >&6; }
9005ac_res=$ac_cv_search_tgetent
9006if test "$ac_res" != no; then :
9007 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 9008
06825bd1
MK
9009fi
9010
06825bd1 9011
bec39cab 9012if test "$ac_cv_search_tgetent" = no; then
7a85168d 9013 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
9014fi
9015
3841debe 9016
81ecdfbb
RW
9017# Check whether --with-system-readline was given.
9018if test "${with_system_readline+set}" = set; then :
9019 withval=$with_system_readline;
9020fi
6a30b0a5 9021
6a30b0a5
AS
9022
9023if test "$with_system_readline" = yes; then
9024 READLINE=-lreadline
9025 READLINE_DEPS=
9026 READLINE_CFLAGS=
39037522 9027 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
9028else
9029 READLINE='$(READLINE_DIR)/libreadline.a'
9030 READLINE_DEPS='$(READLINE)'
9031 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 9032 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
9033fi
9034
9035
9036
9037
9038
f997c383
SD
9039# Generate jit-reader.h
9040
9041# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9042TARGET_PTR=
9043
9044# The cast to long int works around a bug in the HP C Compiler
9045# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9046# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9047# This bug is HP SR number 8606223364.
9048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9049$as_echo_n "checking size of unsigned long long... " >&6; }
d0ac1c44 9050if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
f997c383
SD
9051 $as_echo_n "(cached) " >&6
9052else
9053 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9054
9055else
9056 if test "$ac_cv_type_unsigned_long_long" = yes; then
9057 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9058$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9059as_fn_error 77 "cannot compute sizeof (unsigned long long)
9060See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9061 else
9062 ac_cv_sizeof_unsigned_long_long=0
9063 fi
9064fi
9065
9066fi
9067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9068$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9069
9070
9071
9072cat >>confdefs.h <<_ACEOF
9073#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9074_ACEOF
9075
9076
9077# The cast to long int works around a bug in the HP C Compiler
9078# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9079# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9080# This bug is HP SR number 8606223364.
9081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9082$as_echo_n "checking size of unsigned long... " >&6; }
d0ac1c44 9083if ${ac_cv_sizeof_unsigned_long+:} false; then :
f997c383
SD
9084 $as_echo_n "(cached) " >&6
9085else
9086 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9087
9088else
9089 if test "$ac_cv_type_unsigned_long" = yes; then
9090 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9091$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9092as_fn_error 77 "cannot compute sizeof (unsigned long)
9093See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9094 else
9095 ac_cv_sizeof_unsigned_long=0
9096 fi
9097fi
9098
9099fi
9100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9101$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9102
9103
9104
9105cat >>confdefs.h <<_ACEOF
9106#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9107_ACEOF
9108
9109
9110# The cast to long int works around a bug in the HP C Compiler
9111# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9112# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9113# This bug is HP SR number 8606223364.
9114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9115$as_echo_n "checking size of unsigned __int128... " >&6; }
d0ac1c44 9116if ${ac_cv_sizeof_unsigned___int128+:} false; then :
f997c383
SD
9117 $as_echo_n "(cached) " >&6
9118else
9119 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9120
9121else
9122 if test "$ac_cv_type_unsigned___int128" = yes; then
9123 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9124$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9125as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9126See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9127 else
9128 ac_cv_sizeof_unsigned___int128=0
9129 fi
9130fi
9131
9132fi
9133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9134$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9135
9136
9137
9138cat >>confdefs.h <<_ACEOF
9139#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9140_ACEOF
9141
9142
9143
9144if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9145 TARGET_PTR="unsigned long"
9146elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9147 TARGET_PTR="unsigned long long"
9148elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9149 TARGET_PTR="unsigned __int128"
9150else
9151 TARGET_PTR="unsigned long"
9152fi
9153
9154
9155ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9156
9157
a2d08b9e
SD
9158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9159$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 9160if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9161 $as_echo_n "(cached) " >&6
9162else
9163 ac_func_search_save_LIBS=$LIBS
9164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9165/* end confdefs.h. */
9166
9167/* Override any GCC internal prototype to avoid an error.
9168 Use char because int might match the return type of a GCC
9169 builtin and then its argument prototype would still apply. */
9170#ifdef __cplusplus
9171extern "C"
9172#endif
9173char dlopen ();
9174int
9175main ()
9176{
9177return dlopen ();
9178 ;
9179 return 0;
9180}
9181_ACEOF
9182for ac_lib in '' dl; do
9183 if test -z "$ac_lib"; then
9184 ac_res="none required"
9185 else
9186 ac_res=-l$ac_lib
9187 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9188 fi
9189 if ac_fn_c_try_link "$LINENO"; then :
9190 ac_cv_search_dlopen=$ac_res
9191fi
9192rm -f core conftest.err conftest.$ac_objext \
9193 conftest$ac_exeext
d0ac1c44 9194 if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9195 break
9196fi
9197done
d0ac1c44 9198if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9199
9200else
9201 ac_cv_search_dlopen=no
9202fi
9203rm conftest.$ac_ext
9204LIBS=$ac_func_search_save_LIBS
9205fi
9206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9207$as_echo "$ac_cv_search_dlopen" >&6; }
9208ac_res=$ac_cv_search_dlopen
9209if test "$ac_res" != no; then :
9210 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9211
9212fi
9213
9214
39037522 9215
b8e0a31c
SD
9216
9217# Check whether --with-jit-reader-dir was given.
9218if test "${with_jit_reader_dir+set}" = set; then :
9219 withval=$with_jit_reader_dir;
9220 JIT_READER_DIR=$withval
9221else
9222 JIT_READER_DIR=${libdir}/gdb
9223fi
9224
9225
9226 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9227 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9228 ac_define_dir=`eval echo $JIT_READER_DIR`
9229 ac_define_dir=`eval echo $ac_define_dir`
9230
9231cat >>confdefs.h <<_ACEOF
9232#define JIT_READER_DIR "$ac_define_dir"
9233_ACEOF
9234
9235
9236
9237
9238 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9239 if test "x$prefix" = xNONE; then
9240 test_prefix=/usr/local
9241 else
9242 test_prefix=$prefix
9243 fi
9244 else
9245 test_prefix=$exec_prefix
9246 fi
9247 value=0
9248 case ${ac_define_dir} in
9249 "${test_prefix}"|"${test_prefix}/"*|\
9250 '${exec_prefix}'|'${exec_prefix}/'*)
9251 value=1
9252 ;;
9253 esac
9254
9255cat >>confdefs.h <<_ACEOF
9256#define JIT_READER_DIR_RELOCATABLE $value
9257_ACEOF
9258
9259
9260
9261
9262
81ecdfbb
RW
9263# Check whether --with-expat was given.
9264if test "${with_expat+set}" = set; then :
9265 withval=$with_expat;
5c39566f
DJ
9266else
9267 with_expat=auto
81ecdfbb
RW
9268fi
9269
9270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9271$as_echo_n "checking whether to use expat... " >&6; }
9272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9273$as_echo "$with_expat" >&6; }
5c39566f
DJ
9274
9275if test "${with_expat}" = no; then
81ecdfbb
RW
9276 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9277$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9278 HAVE_LIBEXPAT=no
9279else
9280
3841debe
DJ
9281
9282
9283
9284
9285
9286
9287
9288 use_additional=yes
9289
9290 acl_save_prefix="$prefix"
9291 prefix="$acl_final_prefix"
9292 acl_save_exec_prefix="$exec_prefix"
9293 exec_prefix="$acl_final_exec_prefix"
9294
9295 eval additional_includedir=\"$includedir\"
9296 eval additional_libdir=\"$libdir\"
9297
9298 exec_prefix="$acl_save_exec_prefix"
9299 prefix="$acl_save_prefix"
9300
9301
81ecdfbb
RW
9302# Check whether --with-libexpat-prefix was given.
9303if test "${with_libexpat_prefix+set}" = set; then :
9304 withval=$with_libexpat_prefix;
3841debe
DJ
9305 if test "X$withval" = "Xno"; then
9306 use_additional=no
9307 else
9308 if test "X$withval" = "X"; then
9309
9310 acl_save_prefix="$prefix"
9311 prefix="$acl_final_prefix"
9312 acl_save_exec_prefix="$exec_prefix"
9313 exec_prefix="$acl_final_exec_prefix"
9314
9315 eval additional_includedir=\"$includedir\"
9316 eval additional_libdir=\"$libdir\"
9317
9318 exec_prefix="$acl_save_exec_prefix"
9319 prefix="$acl_save_prefix"
9320
9321 else
9322 additional_includedir="$withval/include"
9323 additional_libdir="$withval/lib"
9324 fi
9325 fi
9326
81ecdfbb
RW
9327fi
9328
3841debe
DJ
9329 LIBEXPAT=
9330 LTLIBEXPAT=
9331 INCEXPAT=
9332 rpathdirs=
9333 ltrpathdirs=
9334 names_already_handled=
9335 names_next_round='expat '
9336 while test -n "$names_next_round"; do
9337 names_this_round="$names_next_round"
9338 names_next_round=
9339 for name in $names_this_round; do
9340 already_handled=
9341 for n in $names_already_handled; do
9342 if test "$n" = "$name"; then
9343 already_handled=yes
9344 break
9345 fi
9346 done
9347 if test -z "$already_handled"; then
9348 names_already_handled="$names_already_handled $name"
9349 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9350 eval value=\"\$HAVE_LIB$uppername\"
9351 if test -n "$value"; then
9352 if test "$value" = yes; then
9353 eval value=\"\$LIB$uppername\"
9354 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9355 eval value=\"\$LTLIB$uppername\"
9356 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9357 else
9358 :
9359 fi
9360 else
9361 found_dir=
9362 found_la=
9363 found_so=
9364 found_a=
9365 if test $use_additional = yes; then
9366 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9367 found_dir="$additional_libdir"
9368 found_so="$additional_libdir/lib$name.$shlibext"
9369 if test -f "$additional_libdir/lib$name.la"; then
9370 found_la="$additional_libdir/lib$name.la"
9371 fi
9372 else
9373 if test -f "$additional_libdir/lib$name.$libext"; then
9374 found_dir="$additional_libdir"
9375 found_a="$additional_libdir/lib$name.$libext"
9376 if test -f "$additional_libdir/lib$name.la"; then
9377 found_la="$additional_libdir/lib$name.la"
9378 fi
9379 fi
9380 fi
9381 fi
9382 if test "X$found_dir" = "X"; then
9383 for x in $LDFLAGS $LTLIBEXPAT; do
9384
9385 acl_save_prefix="$prefix"
9386 prefix="$acl_final_prefix"
9387 acl_save_exec_prefix="$exec_prefix"
9388 exec_prefix="$acl_final_exec_prefix"
9389 eval x=\"$x\"
9390 exec_prefix="$acl_save_exec_prefix"
9391 prefix="$acl_save_prefix"
9392
9393 case "$x" in
9394 -L*)
9395 dir=`echo "X$x" | sed -e 's/^X-L//'`
9396 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9397 found_dir="$dir"
9398 found_so="$dir/lib$name.$shlibext"
9399 if test -f "$dir/lib$name.la"; then
9400 found_la="$dir/lib$name.la"
9401 fi
9402 else
9403 if test -f "$dir/lib$name.$libext"; then
9404 found_dir="$dir"
9405 found_a="$dir/lib$name.$libext"
9406 if test -f "$dir/lib$name.la"; then
9407 found_la="$dir/lib$name.la"
9408 fi
9409 fi
9410 fi
9411 ;;
9412 esac
9413 if test "X$found_dir" != "X"; then
9414 break
9415 fi
9416 done
9417 fi
9418 if test "X$found_dir" != "X"; then
9419 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9420 if test "X$found_so" != "X"; then
9421 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9422 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9423 else
9424 haveit=
9425 for x in $ltrpathdirs; do
9426 if test "X$x" = "X$found_dir"; then
9427 haveit=yes
9428 break
9429 fi
9430 done
9431 if test -z "$haveit"; then
9432 ltrpathdirs="$ltrpathdirs $found_dir"
9433 fi
9434 if test "$hardcode_direct" = yes; then
9435 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9436 else
9437 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9438 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9439 haveit=
9440 for x in $rpathdirs; do
9441 if test "X$x" = "X$found_dir"; then
9442 haveit=yes
9443 break
9444 fi
9445 done
9446 if test -z "$haveit"; then
9447 rpathdirs="$rpathdirs $found_dir"
9448 fi
9449 else
9450 haveit=
9451 for x in $LDFLAGS $LIBEXPAT; do
9452
9453 acl_save_prefix="$prefix"
9454 prefix="$acl_final_prefix"
9455 acl_save_exec_prefix="$exec_prefix"
9456 exec_prefix="$acl_final_exec_prefix"
9457 eval x=\"$x\"
9458 exec_prefix="$acl_save_exec_prefix"
9459 prefix="$acl_save_prefix"
9460
9461 if test "X$x" = "X-L$found_dir"; then
9462 haveit=yes
9463 break
9464 fi
9465 done
9466 if test -z "$haveit"; then
9467 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9468 fi
9469 if test "$hardcode_minus_L" != no; then
9470 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9471 else
9472 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9473 fi
9474 fi
9475 fi
9476 fi
9477 else
9478 if test "X$found_a" != "X"; then
9479 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9480 else
9481 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9482 fi
9483 fi
9484 additional_includedir=
9485 case "$found_dir" in
9486 */lib | */lib/)
9487 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9488 additional_includedir="$basedir/include"
9489 ;;
9490 esac
9491 if test "X$additional_includedir" != "X"; then
9492 if test "X$additional_includedir" != "X/usr/include"; then
9493 haveit=
9494 if test "X$additional_includedir" = "X/usr/local/include"; then
9495 if test -n "$GCC"; then
9496 case $host_os in
9497 linux*) haveit=yes;;
9498 esac
9499 fi
9500 fi
9501 if test -z "$haveit"; then
9502 for x in $CPPFLAGS $INCEXPAT; do
9503
9504 acl_save_prefix="$prefix"
9505 prefix="$acl_final_prefix"
9506 acl_save_exec_prefix="$exec_prefix"
9507 exec_prefix="$acl_final_exec_prefix"
9508 eval x=\"$x\"
9509 exec_prefix="$acl_save_exec_prefix"
9510 prefix="$acl_save_prefix"
9511
9512 if test "X$x" = "X-I$additional_includedir"; then
9513 haveit=yes
9514 break
9515 fi
9516 done
9517 if test -z "$haveit"; then
9518 if test -d "$additional_includedir"; then
9519 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9520 fi
9521 fi
9522 fi
9523 fi
9524 fi
9525 if test -n "$found_la"; then
9526 save_libdir="$libdir"
9527 case "$found_la" in
9528 */* | *\\*) . "$found_la" ;;
9529 *) . "./$found_la" ;;
9530 esac
9531 libdir="$save_libdir"
9532 for dep in $dependency_libs; do
9533 case "$dep" in
9534 -L*)
9535 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9536 if test "X$additional_libdir" != "X/usr/lib"; then
9537 haveit=
9538 if test "X$additional_libdir" = "X/usr/local/lib"; then
9539 if test -n "$GCC"; then
9540 case $host_os in
9541 linux*) haveit=yes;;
9542 esac
9543 fi
9544 fi
9545 if test -z "$haveit"; then
9546 haveit=
9547 for x in $LDFLAGS $LIBEXPAT; do
9548
9549 acl_save_prefix="$prefix"
9550 prefix="$acl_final_prefix"
9551 acl_save_exec_prefix="$exec_prefix"
9552 exec_prefix="$acl_final_exec_prefix"
9553 eval x=\"$x\"
9554 exec_prefix="$acl_save_exec_prefix"
9555 prefix="$acl_save_prefix"
9556
9557 if test "X$x" = "X-L$additional_libdir"; then
9558 haveit=yes
9559 break
9560 fi
9561 done
9562 if test -z "$haveit"; then
9563 if test -d "$additional_libdir"; then
9564 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9565 fi
9566 fi
9567 haveit=
9568 for x in $LDFLAGS $LTLIBEXPAT; do
9569
9570 acl_save_prefix="$prefix"
9571 prefix="$acl_final_prefix"
9572 acl_save_exec_prefix="$exec_prefix"
9573 exec_prefix="$acl_final_exec_prefix"
9574 eval x=\"$x\"
9575 exec_prefix="$acl_save_exec_prefix"
9576 prefix="$acl_save_prefix"
9577
9578 if test "X$x" = "X-L$additional_libdir"; then
9579 haveit=yes
9580 break
9581 fi
9582 done
9583 if test -z "$haveit"; then
9584 if test -d "$additional_libdir"; then
9585 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9586 fi
9587 fi
9588 fi
9589 fi
9590 ;;
9591 -R*)
9592 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9593 if test "$enable_rpath" != no; then
9594 haveit=
9595 for x in $rpathdirs; do
9596 if test "X$x" = "X$dir"; then
9597 haveit=yes
9598 break
9599 fi
9600 done
9601 if test -z "$haveit"; then
9602 rpathdirs="$rpathdirs $dir"
9603 fi
9604 haveit=
9605 for x in $ltrpathdirs; do
9606 if test "X$x" = "X$dir"; then
9607 haveit=yes
9608 break
9609 fi
9610 done
9611 if test -z "$haveit"; then
9612 ltrpathdirs="$ltrpathdirs $dir"
9613 fi
9614 fi
9615 ;;
9616 -l*)
9617 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9618 ;;
9619 *.la)
9620 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9621 ;;
9622 *)
9623 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9624 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9625 ;;
81ecdfbb
RW
9626 esac
9627 done
9628 fi
9629 else
9630 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9631 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9632 fi
9633 fi
9634 fi
9635 done
9636 done
9637 if test "X$rpathdirs" != "X"; then
9638 if test -n "$hardcode_libdir_separator"; then
9639 alldirs=
9640 for found_dir in $rpathdirs; do
9641 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9642 done
9643 acl_save_libdir="$libdir"
9644 libdir="$alldirs"
9645 eval flag=\"$hardcode_libdir_flag_spec\"
9646 libdir="$acl_save_libdir"
9647 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9648 else
9649 for found_dir in $rpathdirs; do
9650 acl_save_libdir="$libdir"
9651 libdir="$found_dir"
9652 eval flag=\"$hardcode_libdir_flag_spec\"
9653 libdir="$acl_save_libdir"
9654 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9655 done
9656 fi
9657 fi
9658 if test "X$ltrpathdirs" != "X"; then
9659 for found_dir in $ltrpathdirs; do
9660 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9661 done
9662 fi
a9322a30
TT
9663
9664
81ecdfbb 9665 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 9666
81ecdfbb
RW
9667 for element in $INCEXPAT; do
9668 haveit=
9669 for x in $CPPFLAGS; do
a9322a30 9670
81ecdfbb
RW
9671 acl_save_prefix="$prefix"
9672 prefix="$acl_final_prefix"
9673 acl_save_exec_prefix="$exec_prefix"
9674 exec_prefix="$acl_final_exec_prefix"
9675 eval x=\"$x\"
9676 exec_prefix="$acl_save_exec_prefix"
9677 prefix="$acl_save_prefix"
a8111142 9678
81ecdfbb
RW
9679 if test "X$x" = "X$element"; then
9680 haveit=yes
9681 break
9682 fi
9683 done
9684 if test -z "$haveit"; then
9685 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9686 fi
9687 done
a9322a30
TT
9688
9689
81ecdfbb
RW
9690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9691$as_echo_n "checking for libexpat... " >&6; }
d0ac1c44 9692if ${ac_cv_libexpat+:} false; then :
81ecdfbb 9693 $as_echo_n "(cached) " >&6
bec39cab 9694else
bec39cab 9695
81ecdfbb
RW
9696 ac_save_LIBS="$LIBS"
9697 LIBS="$LIBS $LIBEXPAT"
9698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9699/* end confdefs.h. */
81ecdfbb
RW
9700#include "expat.h"
9701int
9702main ()
9703{
9704XML_Parser p = XML_ParserCreate (0);
9705 ;
9706 return 0;
9707}
bec39cab 9708_ACEOF
81ecdfbb
RW
9709if ac_fn_c_try_link "$LINENO"; then :
9710 ac_cv_libexpat=yes
c906108c 9711else
81ecdfbb 9712 ac_cv_libexpat=no
bec39cab 9713fi
81ecdfbb
RW
9714rm -f core conftest.err conftest.$ac_objext \
9715 conftest$ac_exeext conftest.$ac_ext
9716 LIBS="$ac_save_LIBS"
c906108c 9717
95ca63c4 9718fi
81ecdfbb
RW
9719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9720$as_echo "$ac_cv_libexpat" >&6; }
9721 if test "$ac_cv_libexpat" = yes; then
9722 HAVE_LIBEXPAT=yes
bec39cab 9723
81ecdfbb 9724$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 9725
81ecdfbb
RW
9726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9727$as_echo_n "checking how to link with libexpat... " >&6; }
9728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9729$as_echo "$LIBEXPAT" >&6; }
9730 else
9731 HAVE_LIBEXPAT=no
9732 CPPFLAGS="$ac_save_CPPFLAGS"
9733 LIBEXPAT=
9734 LTLIBEXPAT=
9735 fi
95ca63c4
CF
9736
9737
9738
7cb9022a
MK
9739
9740
bec39cab 9741
81ecdfbb
RW
9742 if test "$HAVE_LIBEXPAT" != yes; then
9743 if test "$with_expat" = yes; then
d0ac1c44 9744 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
81ecdfbb
RW
9745 else
9746 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9747$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9748 fi
9749 else
9750 save_LIBS=$LIBS
9751 LIBS="$LIBS $LIBEXPAT"
9752 for ac_func in XML_StopParser
9753do :
9754 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
d0ac1c44 9755if test "x$ac_cv_func_XML_StopParser" = xyes; then :
bec39cab 9756 cat >>confdefs.h <<_ACEOF
81ecdfbb 9757#define HAVE_XML_STOPPARSER 1
bec39cab 9758_ACEOF
95ca63c4 9759
bec39cab 9760fi
bec39cab 9761done
95ca63c4 9762
81ecdfbb
RW
9763 LIBS=$save_LIBS
9764 fi
a9322a30
TT
9765fi
9766
2400729e
UW
9767
9768# Check whether --with-mpfr was given.
9769if test "${with_mpfr+set}" = set; then :
9770 withval=$with_mpfr;
9771else
9772 with_mpfr=auto
9773fi
9774
9775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
9776$as_echo_n "checking whether to use MPFR... " >&6; }
9777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
9778$as_echo "$with_mpfr" >&6; }
9779
9780if test "${with_mpfr}" = no; then
9781 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
9782$as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
9783 HAVE_LIBMPFR=no
9784else
9785
9786
9787
9788
9789
9790
9791
9792
9793 use_additional=yes
9794
9795 acl_save_prefix="$prefix"
9796 prefix="$acl_final_prefix"
9797 acl_save_exec_prefix="$exec_prefix"
9798 exec_prefix="$acl_final_exec_prefix"
9799
9800 eval additional_includedir=\"$includedir\"
9801 eval additional_libdir=\"$libdir\"
9802
9803 exec_prefix="$acl_save_exec_prefix"
9804 prefix="$acl_save_prefix"
9805
9806
9807# Check whether --with-libmpfr-prefix was given.
9808if test "${with_libmpfr_prefix+set}" = set; then :
9809 withval=$with_libmpfr_prefix;
9810 if test "X$withval" = "Xno"; then
9811 use_additional=no
9812 else
9813 if test "X$withval" = "X"; then
9814
9815 acl_save_prefix="$prefix"
9816 prefix="$acl_final_prefix"
9817 acl_save_exec_prefix="$exec_prefix"
9818 exec_prefix="$acl_final_exec_prefix"
9819
9820 eval additional_includedir=\"$includedir\"
9821 eval additional_libdir=\"$libdir\"
9822
9823 exec_prefix="$acl_save_exec_prefix"
9824 prefix="$acl_save_prefix"
9825
9826 else
9827 additional_includedir="$withval/include"
9828 additional_libdir="$withval/lib"
9829 fi
9830 fi
9831
9832fi
9833
9834 LIBMPFR=
9835 LTLIBMPFR=
9836 INCMPFR=
9837 rpathdirs=
9838 ltrpathdirs=
9839 names_already_handled=
9840 names_next_round='mpfr '
9841 while test -n "$names_next_round"; do
9842 names_this_round="$names_next_round"
9843 names_next_round=
9844 for name in $names_this_round; do
9845 already_handled=
9846 for n in $names_already_handled; do
9847 if test "$n" = "$name"; then
9848 already_handled=yes
9849 break
9850 fi
9851 done
9852 if test -z "$already_handled"; then
9853 names_already_handled="$names_already_handled $name"
9854 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9855 eval value=\"\$HAVE_LIB$uppername\"
9856 if test -n "$value"; then
9857 if test "$value" = yes; then
9858 eval value=\"\$LIB$uppername\"
9859 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
9860 eval value=\"\$LTLIB$uppername\"
9861 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
9862 else
9863 :
9864 fi
9865 else
9866 found_dir=
9867 found_la=
9868 found_so=
9869 found_a=
9870 if test $use_additional = yes; then
9871 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9872 found_dir="$additional_libdir"
9873 found_so="$additional_libdir/lib$name.$shlibext"
9874 if test -f "$additional_libdir/lib$name.la"; then
9875 found_la="$additional_libdir/lib$name.la"
9876 fi
9877 else
9878 if test -f "$additional_libdir/lib$name.$libext"; then
9879 found_dir="$additional_libdir"
9880 found_a="$additional_libdir/lib$name.$libext"
9881 if test -f "$additional_libdir/lib$name.la"; then
9882 found_la="$additional_libdir/lib$name.la"
9883 fi
9884 fi
9885 fi
9886 fi
9887 if test "X$found_dir" = "X"; then
9888 for x in $LDFLAGS $LTLIBMPFR; do
9889
9890 acl_save_prefix="$prefix"
9891 prefix="$acl_final_prefix"
9892 acl_save_exec_prefix="$exec_prefix"
9893 exec_prefix="$acl_final_exec_prefix"
9894 eval x=\"$x\"
9895 exec_prefix="$acl_save_exec_prefix"
9896 prefix="$acl_save_prefix"
9897
9898 case "$x" in
9899 -L*)
9900 dir=`echo "X$x" | sed -e 's/^X-L//'`
9901 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9902 found_dir="$dir"
9903 found_so="$dir/lib$name.$shlibext"
9904 if test -f "$dir/lib$name.la"; then
9905 found_la="$dir/lib$name.la"
9906 fi
9907 else
9908 if test -f "$dir/lib$name.$libext"; then
9909 found_dir="$dir"
9910 found_a="$dir/lib$name.$libext"
9911 if test -f "$dir/lib$name.la"; then
9912 found_la="$dir/lib$name.la"
9913 fi
9914 fi
9915 fi
9916 ;;
9917 esac
9918 if test "X$found_dir" != "X"; then
9919 break
9920 fi
9921 done
9922 fi
9923 if test "X$found_dir" != "X"; then
9924 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
9925 if test "X$found_so" != "X"; then
9926 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9927 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9928 else
9929 haveit=
9930 for x in $ltrpathdirs; do
9931 if test "X$x" = "X$found_dir"; then
9932 haveit=yes
9933 break
9934 fi
9935 done
9936 if test -z "$haveit"; then
9937 ltrpathdirs="$ltrpathdirs $found_dir"
9938 fi
9939 if test "$hardcode_direct" = yes; then
9940 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9941 else
9942 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9943 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9944 haveit=
9945 for x in $rpathdirs; do
9946 if test "X$x" = "X$found_dir"; then
9947 haveit=yes
9948 break
9949 fi
9950 done
9951 if test -z "$haveit"; then
9952 rpathdirs="$rpathdirs $found_dir"
9953 fi
9954 else
9955 haveit=
9956 for x in $LDFLAGS $LIBMPFR; do
9957
9958 acl_save_prefix="$prefix"
9959 prefix="$acl_final_prefix"
9960 acl_save_exec_prefix="$exec_prefix"
9961 exec_prefix="$acl_final_exec_prefix"
9962 eval x=\"$x\"
9963 exec_prefix="$acl_save_exec_prefix"
9964 prefix="$acl_save_prefix"
9965
9966 if test "X$x" = "X-L$found_dir"; then
9967 haveit=yes
9968 break
9969 fi
9970 done
9971 if test -z "$haveit"; then
9972 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
9973 fi
9974 if test "$hardcode_minus_L" != no; then
9975 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9976 else
9977 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
9978 fi
9979 fi
9980 fi
9981 fi
9982 else
9983 if test "X$found_a" != "X"; then
9984 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
9985 else
9986 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
9987 fi
9988 fi
9989 additional_includedir=
9990 case "$found_dir" in
9991 */lib | */lib/)
9992 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9993 additional_includedir="$basedir/include"
9994 ;;
9995 esac
9996 if test "X$additional_includedir" != "X"; then
9997 if test "X$additional_includedir" != "X/usr/include"; then
9998 haveit=
9999 if test "X$additional_includedir" = "X/usr/local/include"; then
10000 if test -n "$GCC"; then
10001 case $host_os in
10002 linux*) haveit=yes;;
10003 esac
10004 fi
10005 fi
10006 if test -z "$haveit"; then
10007 for x in $CPPFLAGS $INCMPFR; do
10008
10009 acl_save_prefix="$prefix"
10010 prefix="$acl_final_prefix"
10011 acl_save_exec_prefix="$exec_prefix"
10012 exec_prefix="$acl_final_exec_prefix"
10013 eval x=\"$x\"
10014 exec_prefix="$acl_save_exec_prefix"
10015 prefix="$acl_save_prefix"
10016
10017 if test "X$x" = "X-I$additional_includedir"; then
10018 haveit=yes
10019 break
10020 fi
10021 done
10022 if test -z "$haveit"; then
10023 if test -d "$additional_includedir"; then
10024 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10025 fi
10026 fi
10027 fi
10028 fi
10029 fi
10030 if test -n "$found_la"; then
10031 save_libdir="$libdir"
10032 case "$found_la" in
10033 */* | *\\*) . "$found_la" ;;
10034 *) . "./$found_la" ;;
10035 esac
10036 libdir="$save_libdir"
10037 for dep in $dependency_libs; do
10038 case "$dep" in
10039 -L*)
10040 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10041 if test "X$additional_libdir" != "X/usr/lib"; then
10042 haveit=
10043 if test "X$additional_libdir" = "X/usr/local/lib"; then
10044 if test -n "$GCC"; then
10045 case $host_os in
10046 linux*) haveit=yes;;
10047 esac
10048 fi
10049 fi
10050 if test -z "$haveit"; then
10051 haveit=
10052 for x in $LDFLAGS $LIBMPFR; do
10053
10054 acl_save_prefix="$prefix"
10055 prefix="$acl_final_prefix"
10056 acl_save_exec_prefix="$exec_prefix"
10057 exec_prefix="$acl_final_exec_prefix"
10058 eval x=\"$x\"
10059 exec_prefix="$acl_save_exec_prefix"
10060 prefix="$acl_save_prefix"
10061
10062 if test "X$x" = "X-L$additional_libdir"; then
10063 haveit=yes
10064 break
10065 fi
10066 done
10067 if test -z "$haveit"; then
10068 if test -d "$additional_libdir"; then
10069 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10070 fi
10071 fi
10072 haveit=
10073 for x in $LDFLAGS $LTLIBMPFR; do
10074
10075 acl_save_prefix="$prefix"
10076 prefix="$acl_final_prefix"
10077 acl_save_exec_prefix="$exec_prefix"
10078 exec_prefix="$acl_final_exec_prefix"
10079 eval x=\"$x\"
10080 exec_prefix="$acl_save_exec_prefix"
10081 prefix="$acl_save_prefix"
10082
10083 if test "X$x" = "X-L$additional_libdir"; then
10084 haveit=yes
10085 break
10086 fi
10087 done
10088 if test -z "$haveit"; then
10089 if test -d "$additional_libdir"; then
10090 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10091 fi
10092 fi
10093 fi
10094 fi
10095 ;;
10096 -R*)
10097 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10098 if test "$enable_rpath" != no; then
10099 haveit=
10100 for x in $rpathdirs; do
10101 if test "X$x" = "X$dir"; then
10102 haveit=yes
10103 break
10104 fi
10105 done
10106 if test -z "$haveit"; then
10107 rpathdirs="$rpathdirs $dir"
10108 fi
10109 haveit=
10110 for x in $ltrpathdirs; do
10111 if test "X$x" = "X$dir"; then
10112 haveit=yes
10113 break
10114 fi
10115 done
10116 if test -z "$haveit"; then
10117 ltrpathdirs="$ltrpathdirs $dir"
10118 fi
10119 fi
10120 ;;
10121 -l*)
10122 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10123 ;;
10124 *.la)
10125 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10126 ;;
10127 *)
10128 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10129 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10130 ;;
10131 esac
10132 done
10133 fi
10134 else
10135 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10136 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10137 fi
10138 fi
10139 fi
10140 done
10141 done
10142 if test "X$rpathdirs" != "X"; then
10143 if test -n "$hardcode_libdir_separator"; then
10144 alldirs=
10145 for found_dir in $rpathdirs; do
10146 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10147 done
10148 acl_save_libdir="$libdir"
10149 libdir="$alldirs"
10150 eval flag=\"$hardcode_libdir_flag_spec\"
10151 libdir="$acl_save_libdir"
10152 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10153 else
10154 for found_dir in $rpathdirs; do
10155 acl_save_libdir="$libdir"
10156 libdir="$found_dir"
10157 eval flag=\"$hardcode_libdir_flag_spec\"
10158 libdir="$acl_save_libdir"
10159 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10160 done
10161 fi
10162 fi
10163 if test "X$ltrpathdirs" != "X"; then
10164 for found_dir in $ltrpathdirs; do
10165 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10166 done
10167 fi
10168
10169
10170 ac_save_CPPFLAGS="$CPPFLAGS"
10171
10172 for element in $INCMPFR; do
10173 haveit=
10174 for x in $CPPFLAGS; do
10175
10176 acl_save_prefix="$prefix"
10177 prefix="$acl_final_prefix"
10178 acl_save_exec_prefix="$exec_prefix"
10179 exec_prefix="$acl_final_exec_prefix"
10180 eval x=\"$x\"
10181 exec_prefix="$acl_save_exec_prefix"
10182 prefix="$acl_save_prefix"
10183
10184 if test "X$x" = "X$element"; then
10185 haveit=yes
10186 break
10187 fi
10188 done
10189 if test -z "$haveit"; then
10190 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10191 fi
10192 done
10193
10194
10195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10196$as_echo_n "checking for libmpfr... " >&6; }
d0ac1c44 10197if ${ac_cv_libmpfr+:} false; then :
2400729e
UW
10198 $as_echo_n "(cached) " >&6
10199else
10200
10201 ac_save_LIBS="$LIBS"
10202 LIBS="$LIBS $LIBMPFR"
10203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10204/* end confdefs.h. */
10205#include <mpfr.h>
10206int
10207main ()
10208{
10209mpfr_exp_t exp; mpfr_t x;
10210 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10211 ;
10212 return 0;
10213}
10214_ACEOF
10215if ac_fn_c_try_link "$LINENO"; then :
10216 ac_cv_libmpfr=yes
10217else
10218 ac_cv_libmpfr=no
10219fi
10220rm -f core conftest.err conftest.$ac_objext \
10221 conftest$ac_exeext conftest.$ac_ext
10222 LIBS="$ac_save_LIBS"
10223
10224fi
10225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10226$as_echo "$ac_cv_libmpfr" >&6; }
10227 if test "$ac_cv_libmpfr" = yes; then
10228 HAVE_LIBMPFR=yes
10229
10230$as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10231
10232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10233$as_echo_n "checking how to link with libmpfr... " >&6; }
10234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10235$as_echo "$LIBMPFR" >&6; }
10236 else
10237 HAVE_LIBMPFR=no
10238 CPPFLAGS="$ac_save_CPPFLAGS"
10239 LIBMPFR=
10240 LTLIBMPFR=
10241 fi
10242
10243
10244
10245
10246
10247
10248 if test "$HAVE_LIBMPFR" != yes; then
10249 if test "$with_mpfr" = yes; then
d0ac1c44 10250 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
2400729e
UW
10251 else
10252 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10253$as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10254 fi
10255 fi
10256fi
10257
d344e670
DE
10258# --------------------- #
10259# Check for libpython. #
10260# --------------------- #
10261
a9322a30 10262
a9322a30
TT
10263
10264
ec685c5e 10265
0c4a4063 10266
81ecdfbb
RW
10267# Check whether --with-python was given.
10268if test "${with_python+set}" = set; then :
10269 withval=$with_python;
bec39cab 10270else
81ecdfbb 10271 with_python=auto
bec39cab 10272fi
bec39cab 10273
81ecdfbb
RW
10274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10275$as_echo_n "checking whether to use python... " >&6; }
10276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10277$as_echo "$with_python" >&6; }
9a156167 10278
81ecdfbb
RW
10279if test "${with_python}" = no; then
10280 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10281$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10282 have_libpython=no
bec39cab 10283else
81ecdfbb 10284 case "${with_python}" in
8c85a4e2 10285 [\\/]* | ?:[\\/]*)
ec685c5e
DE
10286 if test -d ${with_python}; then
10287 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10288 python_prog="${with_python}/bin/python"
0c4a4063 10289 python_prefix=
9c4ea6c5
JB
10290 # If python does not exit ${with_python}/bin, then try in
10291 # ${with_python}. On Windows/MinGW, this is where the Python
10292 # executable is.
10293 if test ! -x "${python_prog}"; then
10294 python_prog="${with_python}/python"
10295 python_prefix=
10296 fi
e7a30f46 10297 if test ! -x "${python_prog}"; then
ec685c5e
DE
10298 # Fall back to gdb 7.0/7.1 behaviour.
10299 python_prog=missing
0c4a4063 10300 python_prefix=${with_python}
ec685c5e 10301 fi
e7a30f46 10302 elif test -x "${with_python}"; then
ec685c5e
DE
10303 # While we can't run python compiled for $host (unless host == build),
10304 # the user could write a script that provides the needed information,
10305 # so we support that.
ec685c5e 10306 python_prog=${with_python}
0c4a4063 10307 python_prefix=
ec685c5e 10308 else
d0ac1c44 10309 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
ec685c5e 10310 fi
81ecdfbb 10311 ;;
ec685c5e
DE
10312 */*)
10313 # Disallow --with-python=foo/bar.
d0ac1c44 10314 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
81ecdfbb 10315 ;;
ec685c5e
DE
10316 *)
10317 # The user has either specified auto, yes, or the name of the python
10318 # program assumed to be in $PATH.
10319 python_prefix=
10320 case "${with_python}" in
10321 yes | auto)
10322 if test ${build} = ${host}; then
10323 # Extract the first word of "python", so it can be a program name with args.
10324set dummy python; ac_word=$2
10325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10326$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10327if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10328 $as_echo_n "(cached) " >&6
10329else
10330 case $python_prog_path in
10331 [\\/]* | ?:[\\/]*)
10332 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10333 ;;
10334 *)
10335 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10336for as_dir in $PATH
10337do
10338 IFS=$as_save_IFS
10339 test -z "$as_dir" && as_dir=.
10340 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10341 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10342 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10343 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10344 break 2
10345 fi
10346done
10347 done
10348IFS=$as_save_IFS
10349
10350 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10351 ;;
10352esac
10353fi
10354python_prog_path=$ac_cv_path_python_prog_path
10355if test -n "$python_prog_path"; then
10356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10357$as_echo "$python_prog_path" >&6; }
10358else
10359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10360$as_echo "no" >&6; }
10361fi
10362
10363
10364 if test "${python_prog_path}" = missing; then
10365 python_prog=missing
10366 else
10367 python_prog=${python_prog_path}
10368 fi
10369 else
10370 # Not much we can do except assume the cross-compiler will find the
10371 # right files.
10372 python_prog=missing
10373 fi
10374 ;;
10375 *)
10376 # While we can't run python compiled for $host (unless host == build),
10377 # the user could write a script that provides the needed information,
10378 # so we support that.
10379 python_prog="${with_python}"
10380 # Extract the first word of "${python_prog}", so it can be a program name with args.
10381set dummy ${python_prog}; ac_word=$2
10382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10383$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10384if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10385 $as_echo_n "(cached) " >&6
10386else
10387 case $python_prog_path in
10388 [\\/]* | ?:[\\/]*)
10389 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10390 ;;
10391 *)
10392 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10393for as_dir in $PATH
10394do
10395 IFS=$as_save_IFS
10396 test -z "$as_dir" && as_dir=.
10397 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10398 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10399 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10400 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10401 break 2
10402 fi
10403done
10404 done
10405IFS=$as_save_IFS
10406
10407 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10408 ;;
10409esac
10410fi
10411python_prog_path=$ac_cv_path_python_prog_path
10412if test -n "$python_prog_path"; then
10413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10414$as_echo "$python_prog_path" >&6; }
10415else
10416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10417$as_echo "no" >&6; }
10418fi
10419
10420
10421 if test "${python_prog_path}" = missing; then
d0ac1c44 10422 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
ec685c5e
DE
10423 fi
10424 ;;
10425 esac
81ecdfbb
RW
10426 esac
10427
ec685c5e 10428 if test "${python_prog}" != missing; then
e7a30f46
DE
10429 # We have a python program to use, but it may be too old.
10430 # Don't flag an error for --with-python=auto (the default).
10431 have_python_config=yes
ec685c5e
DE
10432 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10433 if test $? != 0; then
e7a30f46
DE
10434 have_python_config=failed
10435 if test "${with_python}" != auto; then
d0ac1c44 10436 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
e7a30f46 10437 fi
ec685c5e
DE
10438 fi
10439 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10440 if test $? != 0; then
e7a30f46
DE
10441 have_python_config=failed
10442 if test "${with_python}" != auto; then
d0ac1c44 10443 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
e7a30f46 10444 fi
ec685c5e 10445 fi
0c4a4063
DE
10446 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10447 if test $? != 0; then
e7a30f46
DE
10448 have_python_config=failed
10449 if test "${with_python}" != auto; then
d0ac1c44 10450 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
e7a30f46 10451 fi
0c4a4063 10452 fi
ec685c5e 10453 else
ac534cba
JB
10454 # We do not have a python executable we can use to determine where
10455 # to find the Python headers and libs. We cannot guess the include
10456 # path from the python_prefix either, because that include path
10457 # depends on the Python version. So, there is nothing much we can
10458 # do except assume that the compiler will be able to find those files.
10459 python_includes=
10460 python_libs=
0c4a4063 10461 have_python_config=no
ec685c5e 10462 fi
bec39cab 10463
ec685c5e
DE
10464 # If we have python-config, only try the configuration it provides.
10465 # Otherwise fallback on the old way of trying different versions of
10466 # python in turn.
81ecdfbb 10467
ec685c5e
DE
10468 have_libpython=no
10469 if test "${have_python_config}" = yes; then
c1039e3c
JB
10470 # Determine the Python version by extracting "-lpython<version>"
10471 # part of the python_libs. <version> is usually X.Y with X and Y
10472 # being decimal numbers, but can also be XY (seen on Windows).
10473 #
10474 # The extraction is performed using sed with a regular expression.
10475 # Initially, the regexp used was using the '?' quantifier to make
10476 # the dot in the version number optional. Unfortunately, this
10477 # does not work with non-GNU versions of sed because, because of
10478 # what looks like a limitation (the '?' quantifier does not work
10479 # with back-references). We work around this limitation by using
10480 # the '*' quantifier instead. It means that, in theory, we might
10481 # match unexpected version strings such as "-lpython2..7", but
10482 # this seems unlikely in practice. And even if that happens,
10483 # an error will be triggered later on, when checking that version
10484 # number.
ec685c5e 10485 python_version=`echo " ${python_libs} " \
c1039e3c 10486 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
10487 case "${python_version}" in
10488 python*)
ec685c5e
DE
10489
10490 version=${python_version}
10491
10492 new_CPPFLAGS=${python_includes}
10493 new_LIBS=${python_libs}
81ecdfbb
RW
10494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10495$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10496 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10497 save_LIBS=$LIBS
ec685c5e 10498 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10499 LIBS="$new_LIBS $LIBS"
ec685c5e 10500 found_usable_python=no
81ecdfbb 10501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10502/* end confdefs.h. */
ac534cba 10503#include "Python.h"
81ecdfbb
RW
10504int
10505main ()
10506{
10507Py_Initialize ();
10508 ;
10509 return 0;
10510}
bec39cab 10511_ACEOF
81ecdfbb 10512if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10513 have_libpython=${version}
10514 found_usable_python=yes
ac534cba
JB
10515 PYTHON_CPPFLAGS=$new_CPPFLAGS
10516 PYTHON_LIBS=$new_LIBS
9a156167 10517fi
81ecdfbb
RW
10518rm -f core conftest.err conftest.$ac_objext \
10519 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10520 CPPFLAGS=$save_CPPFLAGS
10521 LIBS=$save_LIBS
ec685c5e
DE
10522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10523$as_echo "${found_usable_python}" >&6; }
9a156167 10524
0c4a4063
DE
10525 ;;
10526 *)
d0ac1c44 10527 as_fn_error $? "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
10528 ;;
10529 esac
e7a30f46 10530 elif test "${have_python_config}" != failed; then
ec685c5e 10531 if test "${have_libpython}" = no; then
9a156167 10532
420697bb
TT
10533 version=python2.7
10534
10535 new_CPPFLAGS=${python_includes}
bf27f0e2 10536 new_LIBS="-lpython2.7 ${python_libs}"
420697bb
TT
10537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10538$as_echo_n "checking for ${version}... " >&6; }
10539 save_CPPFLAGS=$CPPFLAGS
10540 save_LIBS=$LIBS
10541 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10542 LIBS="$new_LIBS $LIBS"
420697bb
TT
10543 found_usable_python=no
10544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10545/* end confdefs.h. */
ac534cba 10546#include "Python.h"
420697bb
TT
10547int
10548main ()
10549{
10550Py_Initialize ();
10551 ;
10552 return 0;
10553}
10554_ACEOF
10555if ac_fn_c_try_link "$LINENO"; then :
10556 have_libpython=${version}
10557 found_usable_python=yes
ac534cba
JB
10558 PYTHON_CPPFLAGS=$new_CPPFLAGS
10559 PYTHON_LIBS=$new_LIBS
420697bb
TT
10560fi
10561rm -f core conftest.err conftest.$ac_objext \
10562 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10563 CPPFLAGS=$save_CPPFLAGS
10564 LIBS=$save_LIBS
420697bb
TT
10565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10566$as_echo "${found_usable_python}" >&6; }
10567
10568 fi
10569 if test "${have_libpython}" = no; then
10570
ec685c5e
DE
10571 version=python2.6
10572
10573 new_CPPFLAGS=${python_includes}
bf27f0e2 10574 new_LIBS="-lpython2.6 ${python_libs}"
ec685c5e
DE
10575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10576$as_echo_n "checking for ${version}... " >&6; }
10577 save_CPPFLAGS=$CPPFLAGS
10578 save_LIBS=$LIBS
10579 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10580 LIBS="$new_LIBS $LIBS"
ec685c5e
DE
10581 found_usable_python=no
10582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10583/* end confdefs.h. */
ac534cba 10584#include "Python.h"
ec685c5e
DE
10585int
10586main ()
10587{
10588Py_Initialize ();
10589 ;
10590 return 0;
10591}
10592_ACEOF
10593if ac_fn_c_try_link "$LINENO"; then :
10594 have_libpython=${version}
10595 found_usable_python=yes
ac534cba
JB
10596 PYTHON_CPPFLAGS=$new_CPPFLAGS
10597 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
10598fi
10599rm -f core conftest.err conftest.$ac_objext \
10600 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10601 CPPFLAGS=$save_CPPFLAGS
10602 LIBS=$save_LIBS
ec685c5e
DE
10603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10604$as_echo "${found_usable_python}" >&6; }
9a156167 10605
81ecdfbb 10606 fi
ec685c5e 10607 if test ${have_libpython} = no; then
9a156167 10608
81ecdfbb 10609 version=python2.5
9a156167 10610
ec685c5e 10611 new_CPPFLAGS=${python_includes}
bf27f0e2 10612 new_LIBS="-lpython2.5 ${python_libs}"
81ecdfbb
RW
10613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10614$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10615 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10616 save_LIBS=$LIBS
ec685c5e 10617 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10618 LIBS="$new_LIBS $LIBS"
ec685c5e 10619 found_usable_python=no
81ecdfbb 10620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10621/* end confdefs.h. */
ac534cba 10622#include "Python.h"
81ecdfbb
RW
10623int
10624main ()
10625{
10626Py_Initialize ();
10627 ;
10628 return 0;
10629}
436868fb 10630_ACEOF
81ecdfbb 10631if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10632 have_libpython=${version}
10633 found_usable_python=yes
ac534cba
JB
10634 PYTHON_CPPFLAGS=$new_CPPFLAGS
10635 PYTHON_LIBS=$new_LIBS
436868fb 10636fi
81ecdfbb
RW
10637rm -f core conftest.err conftest.$ac_objext \
10638 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10639 CPPFLAGS=$save_CPPFLAGS
10640 LIBS=$save_LIBS
ec685c5e
DE
10641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10642$as_echo "${found_usable_python}" >&6; }
a9322a30 10643
81ecdfbb 10644 fi
ec685c5e 10645 if test ${have_libpython} = no; then
a9322a30 10646
81ecdfbb 10647 version=python2.4
a9322a30 10648
ec685c5e 10649 new_CPPFLAGS=${python_includes}
bf27f0e2 10650 new_LIBS="-lpython2.4 ${python_libs}"
81ecdfbb
RW
10651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10652$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10653 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10654 save_LIBS=$LIBS
ec685c5e 10655 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10656 LIBS="$new_LIBS $LIBS"
ec685c5e 10657 found_usable_python=no
81ecdfbb 10658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10659/* end confdefs.h. */
ac534cba 10660#include "Python.h"
a9322a30
TT
10661int
10662main ()
10663{
81ecdfbb 10664Py_Initialize ();
a9322a30
TT
10665 ;
10666 return 0;
10667}
436868fb 10668_ACEOF
81ecdfbb 10669if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10670 have_libpython=${version}
10671 found_usable_python=yes
ac534cba
JB
10672 PYTHON_CPPFLAGS=$new_CPPFLAGS
10673 PYTHON_LIBS=$new_LIBS
436868fb 10674fi
81ecdfbb
RW
10675rm -f core conftest.err conftest.$ac_objext \
10676 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10677 CPPFLAGS=$save_CPPFLAGS
10678 LIBS=$save_LIBS
ec685c5e
DE
10679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10680$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10681
ec685c5e
DE
10682 fi
10683 fi
9c4ea6c5 10684 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
10685
10686$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
10687
9c4ea6c5 10688 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
10689
10690$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
10691
9c4ea6c5 10692 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
10693
10694$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
10695
9c4ea6c5 10696 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
10697
10698$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
10699
81ecdfbb 10700 fi
ec685c5e
DE
10701
10702 if test "${have_libpython}" = no; then
81ecdfbb
RW
10703 case "${with_python}" in
10704 yes)
d0ac1c44 10705 as_fn_error $? "python is missing or unusable" "$LINENO" 5
81ecdfbb
RW
10706 ;;
10707 auto)
10708 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10709$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10710 ;;
10711 *)
d0ac1c44 10712 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
81ecdfbb
RW
10713 ;;
10714 esac
0c4a4063
DE
10715 else
10716 if test -n "${python_prefix}"; then
10717
10718cat >>confdefs.h <<_ACEOF
10719#define WITH_PYTHON_PATH "${python_prefix}"
10720_ACEOF
10721
10722
10723 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10724 if test "x$prefix" = xNONE; then
10725 test_prefix=/usr/local
10726 else
10727 test_prefix=$prefix
10728 fi
10729 else
10730 test_prefix=$exec_prefix
10731 fi
10732 value=0
10733 case ${python_prefix} in
10734 "${test_prefix}"|"${test_prefix}/"*|\
10735 '${exec_prefix}'|'${exec_prefix}/'*)
10736 value=1
10737 ;;
10738 esac
10739
10740cat >>confdefs.h <<_ACEOF
10741#define PYTHON_PATH_RELOCATABLE $value
10742_ACEOF
10743
10744
10745 fi
81ecdfbb 10746 fi
436868fb 10747fi
436868fb 10748
ec685c5e 10749if test "${have_libpython}" != no; then
436868fb 10750
81ecdfbb 10751$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 10752
81ecdfbb
RW
10753 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10754 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10755 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 10756 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 10757 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 10758
81ecdfbb
RW
10759 # Flags needed to compile Python code (taken from python-config --cflags).
10760 # We cannot call python-config directly because it will output whatever was
10761 # used when compiling the Python interpreter itself, including flags which
10762 # would make the python-related objects be compiled differently from the
10763 # rest of GDB (e.g., -O2 and -fPIC).
10764 if test "${GCC}" = yes; then
10765 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
10766 fi
436868fb 10767
81ecdfbb
RW
10768 if test "x${tentative_python_cflags}" != x; then
10769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10770$as_echo_n "checking compiler flags for python code... " >&6; }
10771 for flag in ${tentative_python_cflags}; do
10772 # Check that the compiler accepts it
10773 saved_CFLAGS="$CFLAGS"
10774 CFLAGS="$CFLAGS $flag"
10775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10776/* end confdefs.h. */
81ecdfbb 10777
a9322a30
TT
10778int
10779main ()
10780{
a9322a30
TT
10781
10782 ;
10783 return 0;
10784}
bec39cab 10785_ACEOF
81ecdfbb
RW
10786if ac_fn_c_try_compile "$LINENO"; then :
10787 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 10788fi
81ecdfbb
RW
10789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10790 CFLAGS="$saved_CFLAGS"
10791 done
10792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10793$as_echo "${PYTHON_CFLAGS}" >&6; }
10794 fi
043b6510 10795
c83393b9
JB
10796 # On x64 Windows, Python's include headers, and pyconfig.h in
10797 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10798 # version of Windows. Unfortunately, MS_WIN64 is only defined if
10799 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
10800 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10801 # The issue was reported to the Python community, but still isn't
10802 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10803
043b6510 10804 case "$gdb_host" in
c83393b9
JB
10805 mingw64)
10806 if test "${GCC}" = yes; then
10807 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10808 fi
10809 ;;
043b6510 10810 esac
a8db4212
YPK
10811
10812 # Note that "python -m threading" cannot be used to check for
10813 # threading support due to a bug in Python 2.7.3
10814 # (http://bugs.python.org/issue15567).
10815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
10816$as_echo_n "checking whether python supports threads... " >&6; }
10817 saved_CPPFLAGS="${CPPFLAGS}"
10818 CPPFLAGS="${PYTHON_CPPFLAGS}"
10819 # Note that the test is reversed so that python_has_threads=yes on
10820 # unexpected failures.
10821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10822/* end confdefs.h. */
10823
10824#include <Python.h>
10825#ifdef WITH_THREAD
10826# error
10827#endif
10828
10829_ACEOF
10830if ac_fn_c_try_cpp "$LINENO"; then :
10831 python_has_threads=no
10832else
10833 python_has_threads=yes
10834fi
d0ac1c44 10835rm -f conftest.err conftest.i conftest.$ac_ext
a8db4212
YPK
10836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
10837$as_echo "${python_has_threads}" >&6; }
10838 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 10839else
6dddc817
DE
10840 # Even if Python support is not compiled in, we need to have this file
10841 # included so that the "python" command, et.al., still exists.
8fd8d003 10842 CONFIG_OBS="$CONFIG_OBS python/python.o"
6dddc817 10843 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 10844fi
9a156167 10845
a4a1c157
PA
10846# Work around Python http://bugs.python.org/issue10112. See also
10847# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10848# no effect. Note that the only test after this that uses Python is
10849# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10850# run without -export-dynamic too.
10851PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10852
10853
ed3ef339
DE
10854
10855
4df42755
DE
10856 if test "${have_libpython}" != no; then
10857 HAVE_PYTHON_TRUE=
10858 HAVE_PYTHON_FALSE='#'
10859else
10860 HAVE_PYTHON_TRUE='#'
10861 HAVE_PYTHON_FALSE=
10862fi
10863
ed3ef339
DE
10864
10865# -------------------- #
10866# Check for libguile. #
10867# -------------------- #
10868
10869
e1402065
DE
10870
10871
10872
10873
10874# Check whether --with-guile was given.
10875if test "${with_guile+set}" = set; then :
10876 withval=$with_guile;
10877else
10878 with_guile=auto
10879fi
10880
10881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10882$as_echo_n "checking whether to use guile... " >&6; }
10883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10884$as_echo "$with_guile" >&6; }
10885
ed3ef339
DE
10886# Extract the first word of "pkg-config", so it can be a program name with args.
10887set dummy pkg-config; ac_word=$2
10888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10889$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10890if ${ac_cv_path_pkg_config_prog_path+:} false; then :
ed3ef339
DE
10891 $as_echo_n "(cached) " >&6
10892else
10893 case $pkg_config_prog_path in
10894 [\\/]* | ?:[\\/]*)
10895 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10896 ;;
10897 *)
10898 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10899for as_dir in $PATH
10900do
10901 IFS=$as_save_IFS
10902 test -z "$as_dir" && as_dir=.
10903 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10904 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ed3ef339
DE
10905 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10906 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10907 break 2
10908 fi
10909done
10910 done
10911IFS=$as_save_IFS
10912
10913 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10914 ;;
10915esac
10916fi
10917pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10918if test -n "$pkg_config_prog_path"; then
10919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10920$as_echo "$pkg_config_prog_path" >&6; }
10921else
10922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10923$as_echo "no" >&6; }
10924fi
10925
10926
10927
6e66f753 10928try_guile_versions="guile-2.0"
ed3ef339
DE
10929have_libguile=no
10930case "${with_guile}" in
10931no)
10932 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10933$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10934 ;;
10935auto)
e1402065
DE
10936 if test "${pkg_config_prog_path}" = "missing"; then
10937 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10938$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10939 else
ed3ef339
DE
10940
10941 pkg_config=${pkg_config_prog_path}
10942 guile_version_list=${try_guile_versions}
10943 flag_errors=no
10944
ed3ef339
DE
10945 found_usable_guile=checking
10946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10947$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10948 for guile_version in ${guile_version_list}; do
10949 ${pkg_config} --exists ${guile_version} 2>/dev/null
10950 if test $? != 0; then
10951 continue
10952 fi
10953 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10954 if test $? != 0; then
d0ac1c44 10955 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
10956 fi
10957 new_LIBS=`${pkg_config} --libs ${guile_version}`
10958 if test $? != 0; then
d0ac1c44 10959 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
10960 fi
10961 found_usable_guile=${guile_version}
10962 break
10963 done
10964 if test "${found_usable_guile}" = "checking"; then
10965 if test "${flag_errors}" = "yes"; then
d0ac1c44 10966 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
10967 else
10968 found_usable_guile=no
10969 fi
10970 fi
10971 if test "${found_usable_guile}" != no; then
10972 save_CPPFLAGS=$CPPFLAGS
10973 save_LIBS=$LIBS
10974 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10975 LIBS="$LIBS $new_LIBS"
10976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10977/* end confdefs.h. */
10978#include "libguile.h"
10979int
10980main ()
10981{
10982scm_init_guile ();
10983 ;
10984 return 0;
10985}
10986_ACEOF
10987if ac_fn_c_try_link "$LINENO"; then :
10988 have_libguile=yes
10989 GUILE_CPPFLAGS=$new_CPPFLAGS
10990 GUILE_LIBS=$new_LIBS
10991else
10992 found_usable_guile=no
10993fi
10994rm -f core conftest.err conftest.$ac_objext \
10995 conftest$ac_exeext conftest.$ac_ext
92fab5a6 10996 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 10997if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
10998
10999$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11000
11001
11002fi
11003
ed3ef339
DE
11004 CPPFLAGS=$save_CPPFLAGS
11005 LIBS=$save_LIBS
11006 if test "${found_usable_guile}" = no; then
11007 if test "${flag_errors}" = yes; then
11008 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11009$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11010as_fn_error $? "linking guile version ${guile_version} test program failed
11011See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11012 fi
11013 fi
11014 fi
11015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11016$as_echo "${found_usable_guile}" >&6; }
11017
e1402065 11018 fi
ed3ef339
DE
11019 ;;
11020yes)
e1402065 11021 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11022 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11023 fi
ed3ef339
DE
11024
11025 pkg_config=${pkg_config_prog_path}
11026 guile_version_list=${try_guile_versions}
11027 flag_errors=yes
11028
ed3ef339
DE
11029 found_usable_guile=checking
11030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11031$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11032 for guile_version in ${guile_version_list}; do
11033 ${pkg_config} --exists ${guile_version} 2>/dev/null
11034 if test $? != 0; then
11035 continue
11036 fi
11037 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11038 if test $? != 0; then
d0ac1c44 11039 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11040 fi
11041 new_LIBS=`${pkg_config} --libs ${guile_version}`
11042 if test $? != 0; then
d0ac1c44 11043 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11044 fi
11045 found_usable_guile=${guile_version}
11046 break
11047 done
11048 if test "${found_usable_guile}" = "checking"; then
11049 if test "${flag_errors}" = "yes"; then
d0ac1c44 11050 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11051 else
11052 found_usable_guile=no
11053 fi
11054 fi
11055 if test "${found_usable_guile}" != no; then
11056 save_CPPFLAGS=$CPPFLAGS
11057 save_LIBS=$LIBS
11058 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11059 LIBS="$LIBS $new_LIBS"
11060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11061/* end confdefs.h. */
11062#include "libguile.h"
11063int
11064main ()
11065{
11066scm_init_guile ();
11067 ;
11068 return 0;
11069}
11070_ACEOF
11071if ac_fn_c_try_link "$LINENO"; then :
11072 have_libguile=yes
11073 GUILE_CPPFLAGS=$new_CPPFLAGS
11074 GUILE_LIBS=$new_LIBS
11075else
11076 found_usable_guile=no
11077fi
11078rm -f core conftest.err conftest.$ac_objext \
11079 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11080 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11081if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11082
11083$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11084
11085
11086fi
11087
ed3ef339
DE
11088 CPPFLAGS=$save_CPPFLAGS
11089 LIBS=$save_LIBS
11090 if test "${found_usable_guile}" = no; then
11091 if test "${flag_errors}" = yes; then
11092 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11093$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11094as_fn_error $? "linking guile version ${guile_version} test program failed
11095See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11096 fi
11097 fi
11098 fi
11099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11100$as_echo "${found_usable_guile}" >&6; }
11101
11102 ;;
11103[\\/]* | ?:[\\/]*)
e1402065 11104 if test -x "${with_guile}"; then
ed3ef339
DE
11105
11106 pkg_config=${with_guile}
11107 guile_version_list=${try_guile_versions}
11108 flag_errors=yes
11109
ed3ef339
DE
11110 found_usable_guile=checking
11111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11112$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11113 for guile_version in ${guile_version_list}; do
11114 ${pkg_config} --exists ${guile_version} 2>/dev/null
11115 if test $? != 0; then
11116 continue
11117 fi
11118 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11119 if test $? != 0; then
d0ac1c44 11120 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11121 fi
11122 new_LIBS=`${pkg_config} --libs ${guile_version}`
11123 if test $? != 0; then
d0ac1c44 11124 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11125 fi
11126 found_usable_guile=${guile_version}
11127 break
11128 done
11129 if test "${found_usable_guile}" = "checking"; then
11130 if test "${flag_errors}" = "yes"; then
d0ac1c44 11131 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11132 else
11133 found_usable_guile=no
11134 fi
11135 fi
11136 if test "${found_usable_guile}" != no; then
11137 save_CPPFLAGS=$CPPFLAGS
11138 save_LIBS=$LIBS
11139 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11140 LIBS="$LIBS $new_LIBS"
11141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11142/* end confdefs.h. */
11143#include "libguile.h"
11144int
11145main ()
11146{
11147scm_init_guile ();
11148 ;
11149 return 0;
11150}
11151_ACEOF
11152if ac_fn_c_try_link "$LINENO"; then :
11153 have_libguile=yes
11154 GUILE_CPPFLAGS=$new_CPPFLAGS
11155 GUILE_LIBS=$new_LIBS
11156else
11157 found_usable_guile=no
11158fi
11159rm -f core conftest.err conftest.$ac_objext \
11160 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11161 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11162if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11163
11164$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11165
11166
11167fi
11168
ed3ef339
DE
11169 CPPFLAGS=$save_CPPFLAGS
11170 LIBS=$save_LIBS
11171 if test "${found_usable_guile}" = no; then
11172 if test "${flag_errors}" = yes; then
11173 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11174$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11175as_fn_error $? "linking guile version ${guile_version} test program failed
11176See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11177 fi
11178 fi
11179 fi
11180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11181$as_echo "${found_usable_guile}" >&6; }
11182
e1402065 11183 else
d0ac1c44 11184 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
e1402065 11185 fi
ed3ef339
DE
11186 ;;
11187"" | */*)
11188 # Disallow --with=guile="" and --with-guile=foo/bar.
d0ac1c44 11189 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
ed3ef339
DE
11190 ;;
11191*)
11192 # A space separate list of guile versions to try, in order.
e1402065 11193 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11194 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11195 fi
ed3ef339
DE
11196
11197 pkg_config=${pkg_config_prog_path}
11198 guile_version_list=${with_guile}
11199 flag_errors=yes
11200
ed3ef339
DE
11201 found_usable_guile=checking
11202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11203$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11204 for guile_version in ${guile_version_list}; do
11205 ${pkg_config} --exists ${guile_version} 2>/dev/null
11206 if test $? != 0; then
11207 continue
11208 fi
11209 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11210 if test $? != 0; then
d0ac1c44 11211 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11212 fi
11213 new_LIBS=`${pkg_config} --libs ${guile_version}`
11214 if test $? != 0; then
d0ac1c44 11215 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11216 fi
11217 found_usable_guile=${guile_version}
11218 break
11219 done
11220 if test "${found_usable_guile}" = "checking"; then
11221 if test "${flag_errors}" = "yes"; then
d0ac1c44 11222 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11223 else
11224 found_usable_guile=no
11225 fi
11226 fi
11227 if test "${found_usable_guile}" != no; then
11228 save_CPPFLAGS=$CPPFLAGS
11229 save_LIBS=$LIBS
11230 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11231 LIBS="$LIBS $new_LIBS"
11232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11233/* end confdefs.h. */
11234#include "libguile.h"
11235int
11236main ()
11237{
11238scm_init_guile ();
11239 ;
11240 return 0;
11241}
11242_ACEOF
11243if ac_fn_c_try_link "$LINENO"; then :
11244 have_libguile=yes
11245 GUILE_CPPFLAGS=$new_CPPFLAGS
11246 GUILE_LIBS=$new_LIBS
11247else
11248 found_usable_guile=no
11249fi
11250rm -f core conftest.err conftest.$ac_objext \
11251 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11252 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11253if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11254
11255$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11256
11257
11258fi
11259
ed3ef339
DE
11260 CPPFLAGS=$save_CPPFLAGS
11261 LIBS=$save_LIBS
11262 if test "${found_usable_guile}" = no; then
11263 if test "${flag_errors}" = yes; then
11264 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11265$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11266as_fn_error $? "linking guile version ${guile_version} test program failed
11267See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11268 fi
11269 fi
11270 fi
11271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11272$as_echo "${found_usable_guile}" >&6; }
11273
11274 ;;
11275esac
11276
e76c5d17 11277if test "${have_libguile}" != no; then
d342a0da
DE
11278 case "${with_guile}" in
11279 [\\/]* | ?:[\\/]*)
e76c5d17
DE
11280
11281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11282$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11283if ${ac_cv_guild_program_name+:} false; then :
e76c5d17
DE
11284 $as_echo_n "(cached) " >&6
11285else
d342a0da 11286 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
11287
11288 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11289 # the 'guild' and 'bindir' variables. In that case, try to guess
11290 # what the program name is, at the risk of getting it wrong if
11291 # Guile was configured with '--program-suffix' or similar.
11292 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 11293 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
11294 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11295 fi
11296
11297fi
11298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11299$as_echo "$ac_cv_guild_program_name" >&6; }
11300
11301 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11302 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
e76c5d17
DE
11303 fi
11304
11305 GUILD="$ac_cv_guild_program_name"
11306
11307
d342a0da
DE
11308 ;;
11309 *)
11310
11311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11312$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11313if ${ac_cv_guild_program_name+:} false; then :
d342a0da
DE
11314 $as_echo_n "(cached) " >&6
11315else
11316 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11317
11318 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11319 # the 'guild' and 'bindir' variables. In that case, try to guess
11320 # what the program name is, at the risk of getting it wrong if
11321 # Guile was configured with '--program-suffix' or similar.
11322 if test "x$ac_cv_guild_program_name" = "x"; then
11323 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11324 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11325 fi
11326
11327fi
11328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11329$as_echo "$ac_cv_guild_program_name" >&6; }
11330
11331 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11332 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
d342a0da
DE
11333 fi
11334
11335 GUILD="$ac_cv_guild_program_name"
11336
11337
11338 ;;
11339 esac
e76c5d17
DE
11340
11341
11342 if test "$cross_compiling" = no; then
11343 GUILD_TARGET_FLAG=
11344 else
11345 GUILD_TARGET_FLAG="--target=$host"
11346 fi
11347
11348
11349
11350
11351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11352$as_echo_n "checking whether guild supports this host... " >&6; }
d0ac1c44 11353if ${ac_cv_guild_ok+:} false; then :
e76c5d17
DE
11354 $as_echo_n "(cached) " >&6
11355else
11356 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11357 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11358 ac_cv_guild_ok=yes
11359 else
11360 ac_cv_guild_ok=no
11361 fi
11362fi
11363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11364$as_echo "$ac_cv_guild_ok" >&6; }
11365
11366 if test "$ac_cv_guild_ok" = no; then
11367 have_libguile=no
11368 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11369$as_echo "$as_me: WARNING: disabling guile support" >&2;}
11370 fi
11371fi
11372
ed3ef339
DE
11373if test "${have_libguile}" != no; then
11374
11375$as_echo "#define HAVE_GUILE 1" >>confdefs.h
11376
11377 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11378 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11379 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11380 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11381 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
11382
11383 save_LIBS="$LIBS"
11384 save_CPPFLAGS="$CPPFLAGS"
11385 LIBS="$GUILE_LIBS"
11386 CPPFLAGS="$GUILE_CPPFLAGS"
11387 for ac_func in scm_new_smob
11388do :
11389 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
d0ac1c44 11390if test "x$ac_cv_func_scm_new_smob" = xyes; then :
16954d5d
LC
11391 cat >>confdefs.h <<_ACEOF
11392#define HAVE_SCM_NEW_SMOB 1
11393_ACEOF
11394
11395fi
11396done
11397
11398 LIBS="$save_LIBS"
11399 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
11400else
11401 # Even if Guile support is not compiled in, we need to have these files
11402 # included.
bd810fff 11403 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
ed3ef339
DE
11404 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11405fi
9a156167 11406
ac534cba 11407
4df42755
DE
11408 if test "${have_libguile}" != no; then
11409 HAVE_GUILE_TRUE=
11410 HAVE_GUILE_FALSE='#'
11411else
11412 HAVE_GUILE_TRUE='#'
11413 HAVE_GUILE_FALSE=
11414fi
11415
ac534cba 11416
d344e670
DE
11417# --------------------- #
11418# Check for libmcheck. #
11419# --------------------- #
11420
a8db4212
YPK
11421# Enable -lmcheck by default (it provides cheap-enough memory mangling),
11422# but turn it off if Python is enabled with threads, since -lmcheck is
11423# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
11424# and for releases.
17ef446e
PA
11425if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
11426 && $development; then
11427 libmcheck_default=yes
11428else
11429 libmcheck_default=no
a8db4212
YPK
11430fi
11431
17ef446e
PA
11432 # Check whether --enable-libmcheck was given.
11433if test "${enable_libmcheck+set}" = set; then :
11434 enableval=$enable_libmcheck; case "${enableval}" in
11435 yes | y) ENABLE_LIBMCHECK="yes" ;;
11436 no | n) ENABLE_LIBMCHECK="no" ;;
d0ac1c44 11437 *) as_fn_error $? "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
17ef446e
PA
11438 esac
11439fi
11440
11441
11442 if test -z "${ENABLE_LIBMCHECK}"; then
11443 ENABLE_LIBMCHECK=${libmcheck_default}
a8db4212 11444 fi
17ef446e
PA
11445
11446 if test "$ENABLE_LIBMCHECK" = "yes" ; then
11447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
a8db4212 11448$as_echo_n "checking for main in -lmcheck... " >&6; }
d0ac1c44 11449if ${ac_cv_lib_mcheck_main+:} false; then :
a8db4212
YPK
11450 $as_echo_n "(cached) " >&6
11451else
11452 ac_check_lib_save_LIBS=$LIBS
11453LIBS="-lmcheck $LIBS"
11454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11455/* end confdefs.h. */
11456
11457
11458int
11459main ()
11460{
11461return main ();
11462 ;
11463 return 0;
11464}
11465_ACEOF
11466if ac_fn_c_try_link "$LINENO"; then :
11467 ac_cv_lib_mcheck_main=yes
11468else
11469 ac_cv_lib_mcheck_main=no
11470fi
11471rm -f core conftest.err conftest.$ac_objext \
11472 conftest$ac_exeext conftest.$ac_ext
11473LIBS=$ac_check_lib_save_LIBS
11474fi
11475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
11476$as_echo "$ac_cv_lib_mcheck_main" >&6; }
d0ac1c44 11477if test "x$ac_cv_lib_mcheck_main" = xyes; then :
a8db4212
YPK
11478 cat >>confdefs.h <<_ACEOF
11479#define HAVE_LIBMCHECK 1
11480_ACEOF
11481
11482 LIBS="-lmcheck $LIBS"
11483
11484fi
11485
17ef446e
PA
11486 fi
11487
11488
11489if test "$ENABLE_LIBMCHECK" = "yes" \
11490 -a "${have_libpython}" != "no" \
11491 -a "${python_has_threads}" = "yes" ; then
11492 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
11493$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
a8db4212
YPK
11494fi
11495
58bfce93
MM
11496
11497# Check whether --with-intel_pt was given.
11498if test "${with_intel_pt+set}" = set; then :
11499 withval=$with_intel_pt;
11500else
11501 with_intel_pt=auto
11502fi
11503
11504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
11505$as_echo_n "checking whether to use intel pt... " >&6; }
11506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
11507$as_echo "$with_intel_pt" >&6; }
11508
11509if test "${with_intel_pt}" = no; then
bc504a31
PA
11510 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
11511$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
58bfce93
MM
11512 HAVE_LIBIPT=no
11513else
5599c404
MM
11514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11515/* end confdefs.h. */
11516
11517#include <linux/perf_event.h>
11518#ifndef PERF_ATTR_SIZE_VER5
11519# error
11520#endif
11521
11522_ACEOF
11523if ac_fn_c_try_cpp "$LINENO"; then :
11524 perf_event=yes
11525else
11526 perf_event=no
11527fi
d0ac1c44 11528rm -f conftest.err conftest.i conftest.$ac_ext
5599c404
MM
11529 if test "$perf_event" != yes; then
11530 if test "$with_intel_pt" = yes; then
d0ac1c44 11531 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
5599c404
MM
11532 else
11533 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
11534$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
11535 fi
11536 fi
11537
58bfce93
MM
11538
11539
11540
11541
11542
11543
11544
11545
11546 use_additional=yes
11547
11548 acl_save_prefix="$prefix"
11549 prefix="$acl_final_prefix"
11550 acl_save_exec_prefix="$exec_prefix"
11551 exec_prefix="$acl_final_exec_prefix"
11552
11553 eval additional_includedir=\"$includedir\"
11554 eval additional_libdir=\"$libdir\"
11555
11556 exec_prefix="$acl_save_exec_prefix"
11557 prefix="$acl_save_prefix"
11558
11559
11560# Check whether --with-libipt-prefix was given.
11561if test "${with_libipt_prefix+set}" = set; then :
11562 withval=$with_libipt_prefix;
11563 if test "X$withval" = "Xno"; then
11564 use_additional=no
11565 else
11566 if test "X$withval" = "X"; then
11567
11568 acl_save_prefix="$prefix"
11569 prefix="$acl_final_prefix"
11570 acl_save_exec_prefix="$exec_prefix"
11571 exec_prefix="$acl_final_exec_prefix"
11572
11573 eval additional_includedir=\"$includedir\"
11574 eval additional_libdir=\"$libdir\"
11575
11576 exec_prefix="$acl_save_exec_prefix"
11577 prefix="$acl_save_prefix"
11578
11579 else
11580 additional_includedir="$withval/include"
11581 additional_libdir="$withval/lib"
11582 fi
11583 fi
11584
11585fi
11586
11587 LIBIPT=
11588 LTLIBIPT=
11589 INCIPT=
11590 rpathdirs=
11591 ltrpathdirs=
11592 names_already_handled=
11593 names_next_round='ipt '
11594 while test -n "$names_next_round"; do
11595 names_this_round="$names_next_round"
11596 names_next_round=
11597 for name in $names_this_round; do
11598 already_handled=
11599 for n in $names_already_handled; do
11600 if test "$n" = "$name"; then
11601 already_handled=yes
11602 break
11603 fi
11604 done
11605 if test -z "$already_handled"; then
11606 names_already_handled="$names_already_handled $name"
11607 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11608 eval value=\"\$HAVE_LIB$uppername\"
11609 if test -n "$value"; then
11610 if test "$value" = yes; then
11611 eval value=\"\$LIB$uppername\"
11612 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
11613 eval value=\"\$LTLIB$uppername\"
11614 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
11615 else
11616 :
11617 fi
11618 else
11619 found_dir=
11620 found_la=
11621 found_so=
11622 found_a=
11623 if test $use_additional = yes; then
11624 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11625 found_dir="$additional_libdir"
11626 found_so="$additional_libdir/lib$name.$shlibext"
11627 if test -f "$additional_libdir/lib$name.la"; then
11628 found_la="$additional_libdir/lib$name.la"
11629 fi
11630 else
11631 if test -f "$additional_libdir/lib$name.$libext"; then
11632 found_dir="$additional_libdir"
11633 found_a="$additional_libdir/lib$name.$libext"
11634 if test -f "$additional_libdir/lib$name.la"; then
11635 found_la="$additional_libdir/lib$name.la"
11636 fi
11637 fi
11638 fi
11639 fi
11640 if test "X$found_dir" = "X"; then
11641 for x in $LDFLAGS $LTLIBIPT; do
11642
11643 acl_save_prefix="$prefix"
11644 prefix="$acl_final_prefix"
11645 acl_save_exec_prefix="$exec_prefix"
11646 exec_prefix="$acl_final_exec_prefix"
11647 eval x=\"$x\"
11648 exec_prefix="$acl_save_exec_prefix"
11649 prefix="$acl_save_prefix"
11650
11651 case "$x" in
11652 -L*)
11653 dir=`echo "X$x" | sed -e 's/^X-L//'`
11654 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11655 found_dir="$dir"
11656 found_so="$dir/lib$name.$shlibext"
11657 if test -f "$dir/lib$name.la"; then
11658 found_la="$dir/lib$name.la"
11659 fi
11660 else
11661 if test -f "$dir/lib$name.$libext"; then
11662 found_dir="$dir"
11663 found_a="$dir/lib$name.$libext"
11664 if test -f "$dir/lib$name.la"; then
11665 found_la="$dir/lib$name.la"
11666 fi
11667 fi
11668 fi
11669 ;;
11670 esac
11671 if test "X$found_dir" != "X"; then
11672 break
11673 fi
11674 done
11675 fi
11676 if test "X$found_dir" != "X"; then
11677 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
11678 if test "X$found_so" != "X"; then
11679 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11680 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11681 else
11682 haveit=
11683 for x in $ltrpathdirs; do
11684 if test "X$x" = "X$found_dir"; then
11685 haveit=yes
11686 break
11687 fi
11688 done
11689 if test -z "$haveit"; then
11690 ltrpathdirs="$ltrpathdirs $found_dir"
11691 fi
11692 if test "$hardcode_direct" = yes; then
11693 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11694 else
11695 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11696 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11697 haveit=
11698 for x in $rpathdirs; do
11699 if test "X$x" = "X$found_dir"; then
11700 haveit=yes
11701 break
11702 fi
11703 done
11704 if test -z "$haveit"; then
11705 rpathdirs="$rpathdirs $found_dir"
11706 fi
11707 else
11708 haveit=
11709 for x in $LDFLAGS $LIBIPT; do
11710
11711 acl_save_prefix="$prefix"
11712 prefix="$acl_final_prefix"
11713 acl_save_exec_prefix="$exec_prefix"
11714 exec_prefix="$acl_final_exec_prefix"
11715 eval x=\"$x\"
11716 exec_prefix="$acl_save_exec_prefix"
11717 prefix="$acl_save_prefix"
11718
11719 if test "X$x" = "X-L$found_dir"; then
11720 haveit=yes
11721 break
11722 fi
11723 done
11724 if test -z "$haveit"; then
11725 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
11726 fi
11727 if test "$hardcode_minus_L" != no; then
11728 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11729 else
11730 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11731 fi
11732 fi
11733 fi
11734 fi
11735 else
11736 if test "X$found_a" != "X"; then
11737 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
11738 else
11739 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
11740 fi
11741 fi
11742 additional_includedir=
11743 case "$found_dir" in
11744 */lib | */lib/)
11745 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11746 additional_includedir="$basedir/include"
11747 ;;
11748 esac
11749 if test "X$additional_includedir" != "X"; then
11750 if test "X$additional_includedir" != "X/usr/include"; then
11751 haveit=
11752 if test "X$additional_includedir" = "X/usr/local/include"; then
11753 if test -n "$GCC"; then
11754 case $host_os in
11755 linux*) haveit=yes;;
11756 esac
11757 fi
11758 fi
11759 if test -z "$haveit"; then
11760 for x in $CPPFLAGS $INCIPT; do
11761
11762 acl_save_prefix="$prefix"
11763 prefix="$acl_final_prefix"
11764 acl_save_exec_prefix="$exec_prefix"
11765 exec_prefix="$acl_final_exec_prefix"
11766 eval x=\"$x\"
11767 exec_prefix="$acl_save_exec_prefix"
11768 prefix="$acl_save_prefix"
11769
11770 if test "X$x" = "X-I$additional_includedir"; then
11771 haveit=yes
11772 break
11773 fi
11774 done
11775 if test -z "$haveit"; then
11776 if test -d "$additional_includedir"; then
11777 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
11778 fi
11779 fi
11780 fi
11781 fi
11782 fi
11783 if test -n "$found_la"; then
11784 save_libdir="$libdir"
11785 case "$found_la" in
11786 */* | *\\*) . "$found_la" ;;
11787 *) . "./$found_la" ;;
11788 esac
11789 libdir="$save_libdir"
11790 for dep in $dependency_libs; do
11791 case "$dep" in
11792 -L*)
11793 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11794 if test "X$additional_libdir" != "X/usr/lib"; then
11795 haveit=
11796 if test "X$additional_libdir" = "X/usr/local/lib"; then
11797 if test -n "$GCC"; then
11798 case $host_os in
11799 linux*) haveit=yes;;
11800 esac
11801 fi
11802 fi
11803 if test -z "$haveit"; then
11804 haveit=
11805 for x in $LDFLAGS $LIBIPT; do
11806
11807 acl_save_prefix="$prefix"
11808 prefix="$acl_final_prefix"
11809 acl_save_exec_prefix="$exec_prefix"
11810 exec_prefix="$acl_final_exec_prefix"
11811 eval x=\"$x\"
11812 exec_prefix="$acl_save_exec_prefix"
11813 prefix="$acl_save_prefix"
11814
11815 if test "X$x" = "X-L$additional_libdir"; then
11816 haveit=yes
11817 break
11818 fi
11819 done
11820 if test -z "$haveit"; then
11821 if test -d "$additional_libdir"; then
11822 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
11823 fi
11824 fi
11825 haveit=
11826 for x in $LDFLAGS $LTLIBIPT; do
11827
11828 acl_save_prefix="$prefix"
11829 prefix="$acl_final_prefix"
11830 acl_save_exec_prefix="$exec_prefix"
11831 exec_prefix="$acl_final_exec_prefix"
11832 eval x=\"$x\"
11833 exec_prefix="$acl_save_exec_prefix"
11834 prefix="$acl_save_prefix"
11835
11836 if test "X$x" = "X-L$additional_libdir"; then
11837 haveit=yes
11838 break
11839 fi
11840 done
11841 if test -z "$haveit"; then
11842 if test -d "$additional_libdir"; then
11843 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
11844 fi
11845 fi
11846 fi
11847 fi
11848 ;;
11849 -R*)
11850 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11851 if test "$enable_rpath" != no; then
11852 haveit=
11853 for x in $rpathdirs; do
11854 if test "X$x" = "X$dir"; then
11855 haveit=yes
11856 break
11857 fi
11858 done
11859 if test -z "$haveit"; then
11860 rpathdirs="$rpathdirs $dir"
11861 fi
11862 haveit=
11863 for x in $ltrpathdirs; do
11864 if test "X$x" = "X$dir"; then
11865 haveit=yes
11866 break
11867 fi
11868 done
11869 if test -z "$haveit"; then
11870 ltrpathdirs="$ltrpathdirs $dir"
11871 fi
11872 fi
11873 ;;
11874 -l*)
11875 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11876 ;;
11877 *.la)
11878 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11879 ;;
11880 *)
11881 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
11882 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
11883 ;;
11884 esac
11885 done
11886 fi
11887 else
11888 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11889 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
11890 fi
11891 fi
11892 fi
11893 done
11894 done
11895 if test "X$rpathdirs" != "X"; then
11896 if test -n "$hardcode_libdir_separator"; then
11897 alldirs=
11898 for found_dir in $rpathdirs; do
11899 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11900 done
11901 acl_save_libdir="$libdir"
11902 libdir="$alldirs"
11903 eval flag=\"$hardcode_libdir_flag_spec\"
11904 libdir="$acl_save_libdir"
11905 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11906 else
11907 for found_dir in $rpathdirs; do
11908 acl_save_libdir="$libdir"
11909 libdir="$found_dir"
11910 eval flag=\"$hardcode_libdir_flag_spec\"
11911 libdir="$acl_save_libdir"
11912 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11913 done
11914 fi
11915 fi
11916 if test "X$ltrpathdirs" != "X"; then
11917 for found_dir in $ltrpathdirs; do
11918 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
11919 done
11920 fi
11921
11922
11923 ac_save_CPPFLAGS="$CPPFLAGS"
11924
11925 for element in $INCIPT; do
11926 haveit=
11927 for x in $CPPFLAGS; do
11928
11929 acl_save_prefix="$prefix"
11930 prefix="$acl_final_prefix"
11931 acl_save_exec_prefix="$exec_prefix"
11932 exec_prefix="$acl_final_exec_prefix"
11933 eval x=\"$x\"
11934 exec_prefix="$acl_save_exec_prefix"
11935 prefix="$acl_save_prefix"
11936
11937 if test "X$x" = "X$element"; then
11938 haveit=yes
11939 break
11940 fi
11941 done
11942 if test -z "$haveit"; then
11943 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11944 fi
11945 done
11946
11947
11948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
11949$as_echo_n "checking for libipt... " >&6; }
d0ac1c44 11950if ${ac_cv_libipt+:} false; then :
58bfce93
MM
11951 $as_echo_n "(cached) " >&6
11952else
11953
11954 ac_save_LIBS="$LIBS"
11955 LIBS="$LIBS $LIBIPT"
11956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11957/* end confdefs.h. */
11958#include "intel-pt.h"
11959int
11960main ()
11961{
11962pt_insn_alloc_decoder (0);
11963 ;
11964 return 0;
11965}
11966_ACEOF
11967if ac_fn_c_try_link "$LINENO"; then :
11968 ac_cv_libipt=yes
11969else
11970 ac_cv_libipt=no
11971fi
11972rm -f core conftest.err conftest.$ac_objext \
11973 conftest$ac_exeext conftest.$ac_ext
11974 LIBS="$ac_save_LIBS"
11975
11976fi
11977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
11978$as_echo "$ac_cv_libipt" >&6; }
11979 if test "$ac_cv_libipt" = yes; then
11980 HAVE_LIBIPT=yes
11981
11982$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
11983
11984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
11985$as_echo_n "checking how to link with libipt... " >&6; }
11986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
11987$as_echo "$LIBIPT" >&6; }
11988 else
11989 HAVE_LIBIPT=no
11990 CPPFLAGS="$ac_save_CPPFLAGS"
11991 LIBIPT=
11992 LTLIBIPT=
11993 fi
11994
11995
11996
11997
11998
11999
12000 if test "$HAVE_LIBIPT" != yes; then
12001 if test "$with_intel_pt" = yes; then
d0ac1c44 12002 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
58bfce93
MM
12003 else
12004 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
12005$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
12006 fi
c56ccc05
MM
12007 else
12008 save_LIBS=$LIBS
12009 LIBS="$LIBS $LIBIPT"
12010 for ac_func in pt_insn_event
12011do :
12012 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
d0ac1c44 12013if test "x$ac_cv_func_pt_insn_event" = xyes; then :
c56ccc05
MM
12014 cat >>confdefs.h <<_ACEOF
12015#define HAVE_PT_INSN_EVENT 1
12016_ACEOF
12017
12018fi
12019done
12020
12021 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
12022"
d0ac1c44 12023if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
c56ccc05
MM
12024
12025cat >>confdefs.h <<_ACEOF
12026#define HAVE_STRUCT_PT_INSN_ENABLED 1
12027_ACEOF
12028
12029
12030fi
12031ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
12032"
d0ac1c44 12033if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
c56ccc05
MM
12034
12035cat >>confdefs.h <<_ACEOF
12036#define HAVE_STRUCT_PT_INSN_RESYNCED 1
12037_ACEOF
12038
12039
12040fi
12041
12042 LIBS=$save_LIBS
58bfce93
MM
12043 fi
12044fi
12045
81ecdfbb
RW
12046# ------------------------- #
12047# Checks for header files. #
12048# ------------------------- #
c890192f 12049
81ecdfbb
RW
12050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12051$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 12052if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 12053 $as_echo_n "(cached) " >&6
bec39cab 12054else
81ecdfbb 12055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12056/* end confdefs.h. */
81ecdfbb
RW
12057#include <stdlib.h>
12058#include <stdarg.h>
12059#include <string.h>
12060#include <float.h>
12061
a9322a30
TT
12062int
12063main ()
12064{
a9322a30
TT
12065
12066 ;
12067 return 0;
12068}
bec39cab 12069_ACEOF
81ecdfbb
RW
12070if ac_fn_c_try_compile "$LINENO"; then :
12071 ac_cv_header_stdc=yes
bec39cab 12072else
81ecdfbb 12073 ac_cv_header_stdc=no
a9322a30 12074fi
81ecdfbb 12075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12076
81ecdfbb
RW
12077if test $ac_cv_header_stdc = yes; then
12078 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12080/* end confdefs.h. */
12081#include <string.h>
bec39cab 12082
81ecdfbb
RW
12083_ACEOF
12084if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12085 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 12086
bec39cab 12087else
81ecdfbb
RW
12088 ac_cv_header_stdc=no
12089fi
12090rm -f conftest*
12091
12092fi
12093
12094if test $ac_cv_header_stdc = yes; then
12095 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12097/* end confdefs.h. */
12098#include <stdlib.h>
12099
bec39cab 12100_ACEOF
81ecdfbb
RW
12101if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12102 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 12103
81ecdfbb
RW
12104else
12105 ac_cv_header_stdc=no
12106fi
12107rm -f conftest*
bec39cab 12108
bec39cab 12109fi
81ecdfbb
RW
12110
12111if test $ac_cv_header_stdc = yes; then
12112 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12113 if test "$cross_compiling" = yes; then :
12114 :
bec39cab 12115else
81ecdfbb 12116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12117/* end confdefs.h. */
81ecdfbb
RW
12118#include <ctype.h>
12119#include <stdlib.h>
12120#if ((' ' & 0x0FF) == 0x020)
12121# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12122# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12123#else
12124# define ISLOWER(c) \
12125 (('a' <= (c) && (c) <= 'i') \
12126 || ('j' <= (c) && (c) <= 'r') \
12127 || ('s' <= (c) && (c) <= 'z'))
12128# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12129#endif
12130
12131#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
12132int
12133main ()
12134{
81ecdfbb
RW
12135 int i;
12136 for (i = 0; i < 256; i++)
12137 if (XOR (islower (i), ISLOWER (i))
12138 || toupper (i) != TOUPPER (i))
12139 return 2;
a9322a30
TT
12140 return 0;
12141}
bec39cab 12142_ACEOF
81ecdfbb
RW
12143if ac_fn_c_try_run "$LINENO"; then :
12144
bec39cab 12145else
81ecdfbb
RW
12146 ac_cv_header_stdc=no
12147fi
12148rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12149 conftest.$ac_objext conftest.beam conftest.$ac_ext
12150fi
bec39cab 12151
bec39cab 12152fi
a9322a30 12153fi
81ecdfbb
RW
12154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12155$as_echo "$ac_cv_header_stdc" >&6; }
12156if test $ac_cv_header_stdc = yes; then
bec39cab 12157
81ecdfbb 12158$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 12159
81ecdfbb 12160fi
bec39cab 12161
81ecdfbb 12162# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 12163for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
161d1bec 12164 thread_db.h \
81ecdfbb
RW
12165 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12166 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
44122162 12167 sys/reg.h sys/debugreg.h sys/select.h \
726e1356 12168 termios.h elf_hp.h \
9467110b 12169 dlfcn.h
81ecdfbb
RW
12170do :
12171 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12172ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 12173if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12174 cat >>confdefs.h <<_ACEOF
81ecdfbb 12175#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12176_ACEOF
c906108c 12177
bec39cab 12178fi
81ecdfbb
RW
12179
12180done
12181
81ecdfbb
RW
12182for ac_header in sys/user.h
12183do :
12184 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
12185# include <sys/param.h>
a9322a30
TT
12186#endif
12187
81ecdfbb 12188"
d0ac1c44 12189if test "x$ac_cv_header_sys_user_h" = xyes; then :
81ecdfbb
RW
12190 cat >>confdefs.h <<_ACEOF
12191#define HAVE_SYS_USER_H 1
bec39cab 12192_ACEOF
bec39cab 12193
a9322a30 12194fi
bec39cab 12195
81ecdfbb 12196done
5ee754fc 12197
5ee754fc 12198
5007d765 12199for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
81ecdfbb
RW
12200do :
12201 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12202ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 12203if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12204 cat >>confdefs.h <<_ACEOF
81ecdfbb 12205#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12206_ACEOF
5ee754fc
MK
12207
12208fi
12209
81ecdfbb 12210done
bec39cab 12211
81ecdfbb
RW
12212for ac_header in term.h
12213do :
12214 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
12215# include <curses.h>
12216#endif
bec39cab 12217
81ecdfbb 12218"
d0ac1c44 12219if test "x$ac_cv_header_term_h" = xyes; then :
81ecdfbb
RW
12220 cat >>confdefs.h <<_ACEOF
12221#define HAVE_TERM_H 1
a8111142 12222_ACEOF
a8111142 12223
a8111142 12224fi
a8111142 12225
81ecdfbb 12226done
a8111142
TT
12227
12228
81ecdfbb
RW
12229# ------------------------- #
12230# Checks for declarations. #
12231# ------------------------- #
a9322a30 12232
07697489
PA
12233
12234 # Check for presence and size of long long.
12235 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
d0ac1c44 12236if test "x$ac_cv_type_long_long" = xyes; then :
07697489
PA
12237
12238cat >>confdefs.h <<_ACEOF
12239#define HAVE_LONG_LONG 1
12240_ACEOF
12241
12242# The cast to long int works around a bug in the HP C Compiler
12243# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12244# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12245# This bug is HP SR number 8606223364.
12246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
12247$as_echo_n "checking size of long long... " >&6; }
d0ac1c44 12248if ${ac_cv_sizeof_long_long+:} false; then :
07697489
PA
12249 $as_echo_n "(cached) " >&6
12250else
12251 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
12252
12253else
12254 if test "$ac_cv_type_long_long" = yes; then
12255 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12256$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
12257as_fn_error 77 "cannot compute sizeof (long long)
12258See \`config.log' for more details" "$LINENO" 5; }
07697489
PA
12259 else
12260 ac_cv_sizeof_long_long=0
12261 fi
12262fi
12263
12264fi
12265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
12266$as_echo "$ac_cv_sizeof_long_long" >&6; }
12267
12268
12269
12270cat >>confdefs.h <<_ACEOF
12271#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12272_ACEOF
12273
12274
12275fi
12276
12277
d0ac1c44
SM
12278 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
12279ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
12280if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
07697489
PA
12281 ac_have_decl=1
12282else
12283 ac_have_decl=0
12284fi
12285
12286cat >>confdefs.h <<_ACEOF
12287#define HAVE_DECL_BASENAME $ac_have_decl
12288_ACEOF
12289ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
d0ac1c44 12290if test "x$ac_cv_have_decl_ffs" = xyes; then :
07697489
PA
12291 ac_have_decl=1
12292else
12293 ac_have_decl=0
12294fi
12295
12296cat >>confdefs.h <<_ACEOF
12297#define HAVE_DECL_FFS $ac_have_decl
12298_ACEOF
12299ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
d0ac1c44 12300if test "x$ac_cv_have_decl_asprintf" = xyes; then :
07697489
PA
12301 ac_have_decl=1
12302else
12303 ac_have_decl=0
12304fi
12305
12306cat >>confdefs.h <<_ACEOF
12307#define HAVE_DECL_ASPRINTF $ac_have_decl
12308_ACEOF
12309ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
d0ac1c44 12310if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
07697489
PA
12311 ac_have_decl=1
12312else
12313 ac_have_decl=0
12314fi
12315
12316cat >>confdefs.h <<_ACEOF
12317#define HAVE_DECL_VASPRINTF $ac_have_decl
12318_ACEOF
12319ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
d0ac1c44 12320if test "x$ac_cv_have_decl_snprintf" = xyes; then :
07697489
PA
12321 ac_have_decl=1
12322else
12323 ac_have_decl=0
12324fi
12325
12326cat >>confdefs.h <<_ACEOF
12327#define HAVE_DECL_SNPRINTF $ac_have_decl
12328_ACEOF
12329ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
d0ac1c44 12330if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
07697489
PA
12331 ac_have_decl=1
12332else
12333 ac_have_decl=0
12334fi
12335
12336cat >>confdefs.h <<_ACEOF
12337#define HAVE_DECL_VSNPRINTF $ac_have_decl
12338_ACEOF
12339
12340 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
d0ac1c44 12341if test "x$ac_cv_have_decl_strtol" = 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_STRTOL $ac_have_decl
12349_ACEOF
12350ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
d0ac1c44 12351if test "x$ac_cv_have_decl_strtoul" = 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_STRTOUL $ac_have_decl
12359_ACEOF
12360ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
d0ac1c44 12361if test "x$ac_cv_have_decl_strtoll" = 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_STRTOLL $ac_have_decl
12369_ACEOF
12370ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
d0ac1c44 12371if test "x$ac_cv_have_decl_strtoull" = xyes; then :
07697489
PA
12372 ac_have_decl=1
12373else
12374 ac_have_decl=0
12375fi
12376
12377cat >>confdefs.h <<_ACEOF
12378#define HAVE_DECL_STRTOULL $ac_have_decl
12379_ACEOF
12380
12381 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
d0ac1c44 12382if test "x$ac_cv_have_decl_strverscmp" = 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_STRVERSCMP $ac_have_decl
12390_ACEOF
12391
12392
12393
81ecdfbb 12394ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
d0ac1c44 12395if test "x$ac_cv_have_decl_snprintf" = xyes; then :
81ecdfbb
RW
12396 ac_have_decl=1
12397else
12398 ac_have_decl=0
5ee754fc 12399fi
81ecdfbb
RW
12400
12401cat >>confdefs.h <<_ACEOF
12402#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 12403_ACEOF
5ee754fc 12404
5ee754fc 12405
81ecdfbb
RW
12406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12407$as_echo_n "checking for LC_MESSAGES... " >&6; }
d0ac1c44 12408if ${am_cv_val_LC_MESSAGES+:} false; then :
81ecdfbb 12409 $as_echo_n "(cached) " >&6
bec39cab 12410else
81ecdfbb 12411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12412/* end confdefs.h. */
81ecdfbb 12413#include <locale.h>
a9322a30
TT
12414int
12415main ()
12416{
81ecdfbb 12417return LC_MESSAGES
a9322a30
TT
12418 ;
12419 return 0;
12420}
bec39cab 12421_ACEOF
81ecdfbb
RW
12422if ac_fn_c_try_link "$LINENO"; then :
12423 am_cv_val_LC_MESSAGES=yes
bec39cab 12424else
81ecdfbb
RW
12425 am_cv_val_LC_MESSAGES=no
12426fi
12427rm -f core conftest.err conftest.$ac_objext \
12428 conftest$ac_exeext conftest.$ac_ext
12429fi
12430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12431$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12432 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 12433
81ecdfbb
RW
12434$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
12435
12436 fi
12437
12438
12439# ----------------------- #
12440# Checks for structures. #
12441# ----------------------- #
12442
12443ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
d0ac1c44 12444if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
81ecdfbb
RW
12445
12446cat >>confdefs.h <<_ACEOF
12447#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 12448_ACEOF
7eb368b3 12449
81ecdfbb 12450
7eb368b3 12451fi
81ecdfbb 12452ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
d0ac1c44 12453if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
7eb368b3 12454
a9322a30
TT
12455cat >>confdefs.h <<_ACEOF
12456#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
12457_ACEOF
12458
a9322a30 12459
7eb368b3
NR
12460fi
12461
7eb368b3 12462
a9322a30
TT
12463# ------------------ #
12464# Checks for types. #
12465# ------------------ #
7eb368b3 12466
81ecdfbb 12467ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
12468#include <sys/socket.h>
12469
81ecdfbb 12470"
d0ac1c44 12471if test "x$ac_cv_type_socklen_t" = xyes; then :
bec39cab 12472
a9322a30
TT
12473cat >>confdefs.h <<_ACEOF
12474#define HAVE_SOCKLEN_T 1
12475_ACEOF
12476
12477
12478fi
12479
12480
12481# ------------------------------------- #
12482# Checks for compiler characteristics. #
12483# ------------------------------------- #
12484
81ecdfbb
RW
12485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12486$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
d0ac1c44 12487if ${ac_cv_c_const+:} false; then :
81ecdfbb 12488 $as_echo_n "(cached) " >&6
a9322a30 12489else
81ecdfbb 12490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12491/* end confdefs.h. */
a9322a30
TT
12492
12493int
12494main ()
12495{
d0ac1c44 12496
a9322a30 12497#ifndef __cplusplus
d0ac1c44 12498 /* Ultrix mips cc rejects this sort of thing. */
a9322a30 12499 typedef int charset[2];
d0ac1c44 12500 const charset cs = { 0, 0 };
a9322a30 12501 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
12502 char const *const *pcpcc;
12503 char **ppc;
a9322a30
TT
12504 /* NEC SVR4.0.2 mips cc rejects this. */
12505 struct point {int x, y;};
12506 static struct point const zero = {0,0};
12507 /* AIX XL C 1.02.0.0 rejects this.
12508 It does not let you subtract one const X* pointer from another in
12509 an arm of an if-expression whose if-part is not a constant
12510 expression */
12511 const char *g = "string";
81ecdfbb 12512 pcpcc = &g + (g ? g-g : 0);
a9322a30 12513 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
12514 ++pcpcc;
12515 ppc = (char**) pcpcc;
12516 pcpcc = (char const *const *) ppc;
d0ac1c44
SM
12517 { /* SCO 3.2v4 cc rejects this sort of thing. */
12518 char tx;
12519 char *t = &tx;
a9322a30
TT
12520 char const *s = 0 ? (char *) 0 : (char const *) 0;
12521
12522 *t++ = 0;
81ecdfbb 12523 if (s) return 0;
a9322a30
TT
12524 }
12525 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12526 int x[] = {25, 17};
12527 const int *foo = &x[0];
12528 ++foo;
12529 }
12530 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12531 typedef const int *iptr;
12532 iptr p = 0;
12533 ++p;
12534 }
d0ac1c44 12535 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
a9322a30 12536 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
d0ac1c44
SM
12537 struct s { int j; const int *ap[3]; } bx;
12538 struct s *b = &bx; b->j = 5;
a9322a30
TT
12539 }
12540 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12541 const int foo = 10;
81ecdfbb 12542 if (!foo) return 0;
a9322a30 12543 }
81ecdfbb 12544 return !cs[0] && !zero.x;
a9322a30
TT
12545#endif
12546
12547 ;
12548 return 0;
12549}
bec39cab 12550_ACEOF
81ecdfbb 12551if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12552 ac_cv_c_const=yes
5ee754fc 12553else
81ecdfbb 12554 ac_cv_c_const=no
5ee754fc 12555fi
81ecdfbb 12556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 12557fi
81ecdfbb
RW
12558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12559$as_echo "$ac_cv_c_const" >&6; }
a9322a30 12560if test $ac_cv_c_const = no; then
bec39cab 12561
81ecdfbb 12562$as_echo "#define const /**/" >>confdefs.h
bec39cab 12563
5ee754fc 12564fi
bec39cab 12565
81ecdfbb
RW
12566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12567$as_echo_n "checking for inline... " >&6; }
d0ac1c44 12568if ${ac_cv_c_inline+:} false; then :
81ecdfbb 12569 $as_echo_n "(cached) " >&6
bec39cab 12570else
a9322a30
TT
12571 ac_cv_c_inline=no
12572for ac_kw in inline __inline__ __inline; do
81ecdfbb 12573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12574/* end confdefs.h. */
a9322a30
TT
12575#ifndef __cplusplus
12576typedef int foo_t;
12577static $ac_kw foo_t static_foo () {return 0; }
12578$ac_kw foo_t foo () {return 0; }
12579#endif
12580
bec39cab 12581_ACEOF
81ecdfbb
RW
12582if ac_fn_c_try_compile "$LINENO"; then :
12583 ac_cv_c_inline=$ac_kw
bec39cab 12584fi
81ecdfbb
RW
12585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12586 test "$ac_cv_c_inline" != no && break
a9322a30 12587done
bec39cab 12588
5ee754fc 12589fi
81ecdfbb
RW
12590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12591$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 12592
a9322a30
TT
12593case $ac_cv_c_inline in
12594 inline | yes) ;;
12595 *)
12596 case $ac_cv_c_inline in
12597 no) ac_val=;;
12598 *) ac_val=$ac_cv_c_inline;;
12599 esac
12600 cat >>confdefs.h <<_ACEOF
12601#ifndef __cplusplus
12602#define inline $ac_val
12603#endif
12604_ACEOF
bec39cab
AC
12605 ;;
12606esac
bec39cab 12607
81ecdfbb
RW
12608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12609$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
d0ac1c44 12610if ${ac_cv_c_bigendian+:} false; then :
81ecdfbb 12611 $as_echo_n "(cached) " >&6
bec39cab 12612else
81ecdfbb
RW
12613 ac_cv_c_bigendian=unknown
12614 # See if we're dealing with a universal compiler.
12615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12616/* end confdefs.h. */
12617#ifndef __APPLE_CC__
12618 not a universal capable compiler
12619 #endif
12620 typedef int dummy;
12621
12622_ACEOF
12623if ac_fn_c_try_compile "$LINENO"; then :
12624
12625 # Check for potential -arch flags. It is not universal unless
12626 # there are at least two -arch flags with different values.
12627 ac_arch=
12628 ac_prev=
12629 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12630 if test -n "$ac_prev"; then
12631 case $ac_word in
12632 i?86 | x86_64 | ppc | ppc64)
12633 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12634 ac_arch=$ac_word
12635 else
12636 ac_cv_c_bigendian=universal
12637 break
12638 fi
12639 ;;
12640 esac
12641 ac_prev=
12642 elif test "x$ac_word" = "x-arch"; then
12643 ac_prev=arch
12644 fi
12645 done
12646fi
12647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12648 if test $ac_cv_c_bigendian = unknown; then
12649 # See if sys/param.h defines the BYTE_ORDER macro.
12650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12651/* end confdefs.h. */
a9322a30 12652#include <sys/types.h>
81ecdfbb 12653 #include <sys/param.h>
a9322a30
TT
12654
12655int
12656main ()
12657{
81ecdfbb
RW
12658#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12659 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12660 && LITTLE_ENDIAN)
12661 bogus endian macros
12662 #endif
a9322a30
TT
12663
12664 ;
12665 return 0;
12666}
bec39cab 12667_ACEOF
81ecdfbb 12668if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12669 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 12670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12671/* end confdefs.h. */
a9322a30 12672#include <sys/types.h>
81ecdfbb 12673 #include <sys/param.h>
a9322a30
TT
12674
12675int
12676main ()
12677{
12678#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
12679 not big endian
12680 #endif
a9322a30
TT
12681
12682 ;
12683 return 0;
12684}
bec39cab 12685_ACEOF
81ecdfbb 12686if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12687 ac_cv_c_bigendian=yes
5ee754fc 12688else
81ecdfbb 12689 ac_cv_c_bigendian=no
5ee754fc 12690fi
81ecdfbb
RW
12691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12692fi
12693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12694 fi
12695 if test $ac_cv_c_bigendian = unknown; then
12696 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12698/* end confdefs.h. */
12699#include <limits.h>
bec39cab 12700
81ecdfbb
RW
12701int
12702main ()
12703{
12704#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12705 bogus endian macros
12706 #endif
12707
12708 ;
12709 return 0;
12710}
7eb368b3 12711_ACEOF
81ecdfbb
RW
12712if ac_fn_c_try_compile "$LINENO"; then :
12713 # It does; now see whether it defined to _BIG_ENDIAN or not.
12714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 12715/* end confdefs.h. */
81ecdfbb
RW
12716#include <limits.h>
12717
7eb368b3
NR
12718int
12719main ()
12720{
81ecdfbb
RW
12721#ifndef _BIG_ENDIAN
12722 not big endian
12723 #endif
12724
7eb368b3
NR
12725 ;
12726 return 0;
12727}
12728_ACEOF
81ecdfbb 12729if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12730 ac_cv_c_bigendian=yes
81ecdfbb
RW
12731else
12732 ac_cv_c_bigendian=no
a9322a30 12733fi
81ecdfbb 12734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 12735fi
81ecdfbb
RW
12736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12737 fi
12738 if test $ac_cv_c_bigendian = unknown; then
12739 # Compile a test program.
12740 if test "$cross_compiling" = yes; then :
12741 # Try to guess by grepping values from an object file.
12742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12743/* end confdefs.h. */
12744short int ascii_mm[] =
12745 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12746 short int ascii_ii[] =
12747 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12748 int use_ascii (int i) {
12749 return ascii_mm[i] + ascii_ii[i];
12750 }
12751 short int ebcdic_ii[] =
12752 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12753 short int ebcdic_mm[] =
12754 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12755 int use_ebcdic (int i) {
12756 return ebcdic_mm[i] + ebcdic_ii[i];
12757 }
12758 extern int foo;
7eb368b3 12759
81ecdfbb
RW
12760int
12761main ()
12762{
12763return use_ascii (foo) == use_ebcdic (foo);
12764 ;
12765 return 0;
12766}
12767_ACEOF
12768if ac_fn_c_try_compile "$LINENO"; then :
12769 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12770 ac_cv_c_bigendian=yes
12771 fi
12772 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12773 if test "$ac_cv_c_bigendian" = unknown; then
12774 ac_cv_c_bigendian=no
12775 else
12776 # finding both strings is unlikely to happen, but who knows?
12777 ac_cv_c_bigendian=unknown
12778 fi
12779 fi
7eb368b3 12780fi
81ecdfbb 12781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12782else
81ecdfbb 12783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12784/* end confdefs.h. */
81ecdfbb 12785$ac_includes_default
d3ea6809
MM
12786int
12787main ()
12788{
81ecdfbb
RW
12789
12790 /* Are we little or big endian? From Harbison&Steele. */
12791 union
12792 {
12793 long int l;
12794 char c[sizeof (long int)];
12795 } u;
12796 u.l = 1;
12797 return u.c[sizeof (long int) - 1] == 1;
12798
12799 ;
12800 return 0;
d3ea6809
MM
12801}
12802_ACEOF
81ecdfbb 12803if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12804 ac_cv_c_bigendian=no
d3ea6809 12805else
81ecdfbb 12806 ac_cv_c_bigendian=yes
d3ea6809 12807fi
81ecdfbb
RW
12808rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12809 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12810fi
a9322a30 12811
81ecdfbb
RW
12812 fi
12813fi
12814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12815$as_echo "$ac_cv_c_bigendian" >&6; }
12816 case $ac_cv_c_bigendian in #(
12817 yes)
12818 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12819;; #(
12820 no)
12821 ;; #(
12822 universal)
12823
12824$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12825
12826 ;; #(
12827 *)
d0ac1c44 12828 as_fn_error $? "unknown endianness
81ecdfbb
RW
12829 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12830 esac
d3ea6809
MM
12831
12832
a9322a30
TT
12833# ------------------------------ #
12834# Checks for library functions. #
12835# ------------------------------ #
d3ea6809 12836
d0ac1c44
SM
12837
12838
12839
12840 for ac_header in $ac_header_list
81ecdfbb
RW
12841do :
12842 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
d0ac1c44
SM
12843ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12844"
12845if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12846 cat >>confdefs.h <<_ACEOF
81ecdfbb 12847#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12848_ACEOF
b757528f 12849
b757528f 12850fi
bec39cab 12851
a9322a30 12852done
a3828db0 12853
d0ac1c44
SM
12854
12855
12856
12857
12858
12859
12860
a9322a30 12861for ac_func in getpagesize
81ecdfbb
RW
12862do :
12863 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
d0ac1c44 12864if test "x$ac_cv_func_getpagesize" = xyes; then :
bec39cab 12865 cat >>confdefs.h <<_ACEOF
81ecdfbb 12866#define HAVE_GETPAGESIZE 1
bec39cab 12867_ACEOF
bcb3dc3d 12868
bcb3dc3d
MK
12869fi
12870done
12871
81ecdfbb
RW
12872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12873$as_echo_n "checking for working mmap... " >&6; }
d0ac1c44 12874if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
81ecdfbb 12875 $as_echo_n "(cached) " >&6
a9322a30 12876else
81ecdfbb 12877 if test "$cross_compiling" = yes; then :
a9322a30 12878 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12879else
81ecdfbb 12880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12881/* end confdefs.h. */
a9322a30
TT
12882$ac_includes_default
12883/* malloc might have been renamed as rpl_malloc. */
12884#undef malloc
bec39cab 12885
a9322a30
TT
12886/* Thanks to Mike Haertel and Jim Avera for this test.
12887 Here is a matrix of mmap possibilities:
12888 mmap private not fixed
12889 mmap private fixed at somewhere currently unmapped
12890 mmap private fixed at somewhere already mapped
12891 mmap shared not fixed
12892 mmap shared fixed at somewhere currently unmapped
12893 mmap shared fixed at somewhere already mapped
12894 For private mappings, we should verify that changes cannot be read()
12895 back from the file, nor mmap's back from the file at a different
12896 address. (There have been systems where private was not correctly
12897 implemented like the infamous i386 svr4.0, and systems where the
12898 VM page cache was not coherent with the file system buffer cache
12899 like early versions of FreeBSD and possibly contemporary NetBSD.)
12900 For shared mappings, we should conversely verify that changes get
12901 propagated back to all the places they're supposed to be.
bec39cab 12902
a9322a30
TT
12903 Grep wants private fixed already mapped.
12904 The main things grep needs to know about mmap are:
12905 * does it exist and is it safe to write into the mmap'd area
12906 * how to use it (BSD variants) */
8b9cf735 12907
a9322a30
TT
12908#include <fcntl.h>
12909#include <sys/mman.h>
8b9cf735 12910
81ecdfbb 12911#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12912char *malloc ();
a3828db0
MK
12913#endif
12914
a9322a30 12915/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12916#ifndef HAVE_GETPAGESIZE
a9322a30
TT
12917# ifdef _SC_PAGESIZE
12918# define getpagesize() sysconf(_SC_PAGESIZE)
12919# else /* no _SC_PAGESIZE */
81ecdfbb 12920# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12921# include <sys/param.h>
12922# ifdef EXEC_PAGESIZE
12923# define getpagesize() EXEC_PAGESIZE
12924# else /* no EXEC_PAGESIZE */
12925# ifdef NBPG
12926# define getpagesize() NBPG * CLSIZE
12927# ifndef CLSIZE
12928# define CLSIZE 1
12929# endif /* no CLSIZE */
12930# else /* no NBPG */
12931# ifdef NBPC
12932# define getpagesize() NBPC
12933# else /* no NBPC */
12934# ifdef PAGESIZE
12935# define getpagesize() PAGESIZE
12936# endif /* PAGESIZE */
12937# endif /* no NBPC */
12938# endif /* no NBPG */
12939# endif /* no EXEC_PAGESIZE */
12940# else /* no HAVE_SYS_PARAM_H */
12941# define getpagesize() 8192 /* punt totally */
12942# endif /* no HAVE_SYS_PARAM_H */
12943# endif /* no _SC_PAGESIZE */
12944
12945#endif /* no HAVE_GETPAGESIZE */
12946
bec39cab
AC
12947int
12948main ()
12949{
a9322a30 12950 char *data, *data2, *data3;
d0ac1c44 12951 const char *cdata2;
a9322a30 12952 int i, pagesize;
d0ac1c44 12953 int fd, fd2;
a9322a30
TT
12954
12955 pagesize = getpagesize ();
12956
12957 /* First, make a file with some known garbage in it. */
12958 data = (char *) malloc (pagesize);
12959 if (!data)
81ecdfbb 12960 return 1;
a9322a30
TT
12961 for (i = 0; i < pagesize; ++i)
12962 *(data + i) = rand ();
12963 umask (0);
12964 fd = creat ("conftest.mmap", 0600);
12965 if (fd < 0)
d0ac1c44 12966 return 2;
a9322a30 12967 if (write (fd, data, pagesize) != pagesize)
d0ac1c44 12968 return 3;
a9322a30
TT
12969 close (fd);
12970
d0ac1c44
SM
12971 /* Next, check that the tail of a page is zero-filled. File must have
12972 non-zero length, otherwise we risk SIGBUS for entire page. */
12973 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
12974 if (fd2 < 0)
12975 return 4;
12976 cdata2 = "";
12977 if (write (fd2, cdata2, 1) != 1)
12978 return 5;
12979 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
12980 if (data2 == MAP_FAILED)
12981 return 6;
12982 for (i = 0; i < pagesize; ++i)
12983 if (*(data2 + i))
12984 return 7;
12985 close (fd2);
12986 if (munmap (data2, pagesize))
12987 return 8;
12988
a9322a30
TT
12989 /* Next, try to mmap the file at a fixed address which already has
12990 something else allocated at it. If we can, also make sure that
12991 we see the same garbage. */
12992 fd = open ("conftest.mmap", O_RDWR);
12993 if (fd < 0)
d0ac1c44 12994 return 9;
a9322a30
TT
12995 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12996 MAP_PRIVATE | MAP_FIXED, fd, 0L))
d0ac1c44 12997 return 10;
a9322a30
TT
12998 for (i = 0; i < pagesize; ++i)
12999 if (*(data + i) != *(data2 + i))
d0ac1c44 13000 return 11;
a9322a30
TT
13001
13002 /* Finally, make sure that changes to the mapped area do not
13003 percolate back to the file as seen by read(). (This is a bug on
13004 some variants of i386 svr4.0.) */
13005 for (i = 0; i < pagesize; ++i)
13006 *(data2 + i) = *(data2 + i) + 1;
13007 data3 = (char *) malloc (pagesize);
13008 if (!data3)
d0ac1c44 13009 return 12;
a9322a30 13010 if (read (fd, data3, pagesize) != pagesize)
d0ac1c44 13011 return 13;
a9322a30
TT
13012 for (i = 0; i < pagesize; ++i)
13013 if (*(data + i) != *(data3 + i))
d0ac1c44 13014 return 14;
a9322a30 13015 close (fd);
81ecdfbb 13016 return 0;
bec39cab
AC
13017}
13018_ACEOF
81ecdfbb 13019if ac_fn_c_try_run "$LINENO"; then :
a9322a30 13020 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 13021else
81ecdfbb 13022 ac_cv_func_mmap_fixed_mapped=no
a3828db0 13023fi
81ecdfbb
RW
13024rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13025 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 13026fi
81ecdfbb 13027
a9322a30 13028fi
81ecdfbb
RW
13029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
13030$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
13031if test $ac_cv_func_mmap_fixed_mapped = yes; then
13032
81ecdfbb 13033$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 13034
086ec9eb 13035fi
d0ac1c44 13036rm -f conftest.mmap conftest.txt
a3828db0 13037
81ecdfbb 13038ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
d0ac1c44 13039if test "x$ac_cv_type_pid_t" = xyes; then :
bec39cab 13040
a9322a30
TT
13041else
13042
13043cat >>confdefs.h <<_ACEOF
13044#define pid_t int
bec39cab 13045_ACEOF
086ec9eb
MK
13046
13047fi
13048
81ecdfbb
RW
13049for ac_header in vfork.h
13050do :
13051 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
d0ac1c44 13052if test "x$ac_cv_header_vfork_h" = xyes; then :
a3828db0 13053 cat >>confdefs.h <<_ACEOF
81ecdfbb 13054#define HAVE_VFORK_H 1
bec39cab 13055_ACEOF
c906108c
SS
13056
13057fi
a9322a30 13058
a3828db0 13059done
c906108c 13060
a9322a30 13061for ac_func in fork vfork
81ecdfbb
RW
13062do :
13063 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13064ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13065if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
a3828db0 13066 cat >>confdefs.h <<_ACEOF
81ecdfbb 13067#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 13068_ACEOF
b83266a0 13069
97bf5e38 13070fi
a3828db0 13071done
b83266a0 13072
a9322a30 13073if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
13074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13075$as_echo_n "checking for working fork... " >&6; }
d0ac1c44 13076if ${ac_cv_func_fork_works+:} false; then :
81ecdfbb 13077 $as_echo_n "(cached) " >&6
a9322a30 13078else
81ecdfbb 13079 if test "$cross_compiling" = yes; then :
a9322a30
TT
13080 ac_cv_func_fork_works=cross
13081else
81ecdfbb
RW
13082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13083/* end confdefs.h. */
13084$ac_includes_default
13085int
13086main ()
13087{
13088
13089 /* By Ruediger Kuhlmann. */
13090 return fork () < 0;
13091
13092 ;
13093 return 0;
13094}
a9322a30 13095_ACEOF
81ecdfbb 13096if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13097 ac_cv_func_fork_works=yes
13098else
81ecdfbb 13099 ac_cv_func_fork_works=no
a9322a30 13100fi
81ecdfbb
RW
13101rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13102 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13103fi
81ecdfbb 13104
a9322a30 13105fi
81ecdfbb
RW
13106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13107$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
13108
13109else
13110 ac_cv_func_fork_works=$ac_cv_func_fork
13111fi
13112if test "x$ac_cv_func_fork_works" = xcross; then
13113 case $host in
13114 *-*-amigaos* | *-*-msdosdjgpp*)
13115 # Override, as these systems have only a dummy fork() stub
13116 ac_cv_func_fork_works=no
13117 ;;
13118 *)
13119 ac_cv_func_fork_works=yes
13120 ;;
13121 esac
81ecdfbb
RW
13122 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13123$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13124fi
13125ac_cv_func_vfork_works=$ac_cv_func_vfork
13126if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
13127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13128$as_echo_n "checking for working vfork... " >&6; }
d0ac1c44 13129if ${ac_cv_func_vfork_works+:} false; then :
81ecdfbb 13130 $as_echo_n "(cached) " >&6
a9322a30 13131else
81ecdfbb 13132 if test "$cross_compiling" = yes; then :
a9322a30
TT
13133 ac_cv_func_vfork_works=cross
13134else
81ecdfbb 13135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
13136/* end confdefs.h. */
13137/* Thanks to Paul Eggert for this test. */
81ecdfbb 13138$ac_includes_default
a9322a30 13139#include <sys/wait.h>
81ecdfbb 13140#ifdef HAVE_VFORK_H
a9322a30
TT
13141# include <vfork.h>
13142#endif
13143/* On some sparc systems, changes by the child to local and incoming
13144 argument registers are propagated back to the parent. The compiler
13145 is told about this with #include <vfork.h>, but some compilers
13146 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13147 static variable whose address is put into a register that is
13148 clobbered by the vfork. */
13149static void
13150#ifdef __cplusplus
13151sparc_address_test (int arg)
13152# else
13153sparc_address_test (arg) int arg;
13154#endif
13155{
13156 static pid_t child;
13157 if (!child) {
13158 child = vfork ();
13159 if (child < 0) {
13160 perror ("vfork");
13161 _exit(2);
13162 }
13163 if (!child) {
13164 arg = getpid();
13165 write(-1, "", 0);
13166 _exit (arg);
13167 }
13168 }
13169}
13170
13171int
13172main ()
13173{
13174 pid_t parent = getpid ();
13175 pid_t child;
13176
13177 sparc_address_test (0);
13178
13179 child = vfork ();
13180
13181 if (child == 0) {
13182 /* Here is another test for sparc vfork register problems. This
13183 test uses lots of local variables, at least as many local
13184 variables as main has allocated so far including compiler
13185 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13186 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13187 reuse the register of parent for one of the local variables,
13188 since it will think that parent can't possibly be used any more
13189 in this routine. Assigning to the local variable will thus
13190 munge parent in the parent process. */
13191 pid_t
13192 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13193 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13194 /* Convince the compiler that p..p7 are live; otherwise, it might
13195 use the same hardware register for all 8 local variables. */
13196 if (p != p1 || p != p2 || p != p3 || p != p4
13197 || p != p5 || p != p6 || p != p7)
13198 _exit(1);
13199
13200 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13201 from child file descriptors. If the child closes a descriptor
13202 before it execs or exits, this munges the parent's descriptor
13203 as well. Test for this by closing stdout in the child. */
13204 _exit(close(fileno(stdout)) != 0);
13205 } else {
13206 int status;
13207 struct stat st;
13208
13209 while (wait(&status) != child)
13210 ;
81ecdfbb 13211 return (
a9322a30
TT
13212 /* Was there some problem with vforking? */
13213 child < 0
13214
13215 /* Did the child fail? (This shouldn't happen.) */
13216 || status
13217
13218 /* Did the vfork/compiler bug occur? */
13219 || parent != getpid()
13220
13221 /* Did the file descriptor bug occur? */
13222 || fstat(fileno(stdout), &st) != 0
13223 );
13224 }
13225}
13226_ACEOF
81ecdfbb 13227if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13228 ac_cv_func_vfork_works=yes
13229else
81ecdfbb 13230 ac_cv_func_vfork_works=no
a9322a30 13231fi
81ecdfbb
RW
13232rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13233 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13234fi
81ecdfbb 13235
a9322a30 13236fi
81ecdfbb
RW
13237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13238$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
13239
13240fi;
13241if test "x$ac_cv_func_fork_works" = xcross; then
13242 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
13243 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13244$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13245fi
13246
13247if test "x$ac_cv_func_vfork_works" = xyes; then
13248
81ecdfbb 13249$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
13250
13251else
13252
81ecdfbb 13253$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
13254
13255fi
13256if test "x$ac_cv_func_fork_works" = xyes; then
13257
81ecdfbb 13258$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
13259
13260fi
13261
cdf43629 13262for ac_func in getauxval getrusage getuid getgid \
bdca27a2 13263 pipe poll pread pread64 pwrite resize_term \
e671cd59 13264 sbrk getpgid setpgid setpgrp setsid \
9467110b 13265 sigaction sigprocmask sigsetmask socketpair \
110ed339 13266 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 13267 setrlimit getrlimit posix_madvise waitpid \
4b8b5e72 13268 ptrace64 sigaltstack mkdtemp setns
81ecdfbb
RW
13269do :
13270 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13271ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13272if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6c7a06a3 13273 cat >>confdefs.h <<_ACEOF
81ecdfbb 13274#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
13275_ACEOF
13276
13277fi
13278done
13279
13280
81ecdfbb
RW
13281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13282$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 13283if ${am_cv_langinfo_codeset+:} false; then :
81ecdfbb 13284 $as_echo_n "(cached) " >&6
6c7a06a3 13285else
81ecdfbb 13286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
13287/* end confdefs.h. */
13288#include <langinfo.h>
13289int
13290main ()
13291{
13292char* cs = nl_langinfo(CODESET);
bec39cab
AC
13293 ;
13294 return 0;
13295}
13296_ACEOF
81ecdfbb 13297if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 13298 am_cv_langinfo_codeset=yes
a4db0f07 13299else
81ecdfbb 13300 am_cv_langinfo_codeset=no
a4db0f07 13301fi
81ecdfbb
RW
13302rm -f core conftest.err conftest.$ac_objext \
13303 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 13304
a4db0f07 13305fi
81ecdfbb
RW
13306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13307$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
13308 if test $am_cv_langinfo_codeset = yes; then
13309
81ecdfbb 13310$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 13311
6c7a06a3 13312 fi
c906108c 13313
d0ac1c44
SM
13314ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13315if test "x$ac_cv_type_size_t" = xyes; then :
13316
13317else
13318
13319cat >>confdefs.h <<_ACEOF
13320#define size_t unsigned int
13321_ACEOF
13322
13323fi
13324
06825bd1 13325
3266f10b
TT
13326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13327$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 13328if ${ac_cv_header_stdc+:} false; then :
3266f10b
TT
13329 $as_echo_n "(cached) " >&6
13330else
13331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13332/* end confdefs.h. */
13333#include <stdlib.h>
13334#include <stdarg.h>
13335#include <string.h>
13336#include <float.h>
13337
13338int
13339main ()
13340{
13341
13342 ;
13343 return 0;
13344}
13345_ACEOF
13346if ac_fn_c_try_compile "$LINENO"; then :
13347 ac_cv_header_stdc=yes
13348else
13349 ac_cv_header_stdc=no
13350fi
13351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13352
13353if test $ac_cv_header_stdc = yes; then
13354 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13356/* end confdefs.h. */
13357#include <string.h>
13358
13359_ACEOF
13360if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13361 $EGREP "memchr" >/dev/null 2>&1; then :
13362
13363else
13364 ac_cv_header_stdc=no
13365fi
13366rm -f conftest*
13367
13368fi
13369
13370if test $ac_cv_header_stdc = yes; then
13371 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13373/* end confdefs.h. */
13374#include <stdlib.h>
13375
13376_ACEOF
13377if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13378 $EGREP "free" >/dev/null 2>&1; then :
13379
13380else
13381 ac_cv_header_stdc=no
13382fi
13383rm -f conftest*
13384
13385fi
13386
13387if test $ac_cv_header_stdc = yes; then
13388 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13389 if test "$cross_compiling" = yes; then :
13390 :
13391else
13392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13393/* end confdefs.h. */
13394#include <ctype.h>
13395#include <stdlib.h>
13396#if ((' ' & 0x0FF) == 0x020)
13397# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13398# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13399#else
13400# define ISLOWER(c) \
13401 (('a' <= (c) && (c) <= 'i') \
13402 || ('j' <= (c) && (c) <= 'r') \
13403 || ('s' <= (c) && (c) <= 'z'))
13404# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13405#endif
13406
13407#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13408int
13409main ()
13410{
13411 int i;
13412 for (i = 0; i < 256; i++)
13413 if (XOR (islower (i), ISLOWER (i))
13414 || toupper (i) != TOUPPER (i))
13415 return 2;
13416 return 0;
13417}
13418_ACEOF
13419if ac_fn_c_try_run "$LINENO"; then :
13420
13421else
13422 ac_cv_header_stdc=no
13423fi
13424rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13425 conftest.$ac_objext conftest.beam conftest.$ac_ext
13426fi
13427
13428fi
13429fi
13430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
13431$as_echo "$ac_cv_header_stdc" >&6; }
13432if test $ac_cv_header_stdc = yes; then
13433
13434$as_echo "#define STDC_HEADERS 1" >>confdefs.h
13435
3266f10b
TT
13436fi
13437
13438 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13439# for constant arguments. Useless!
13440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13441$as_echo_n "checking for working alloca.h... " >&6; }
d0ac1c44 13442if ${ac_cv_working_alloca_h+:} false; then :
3266f10b
TT
13443 $as_echo_n "(cached) " >&6
13444else
13445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13446/* end confdefs.h. */
13447#include <alloca.h>
13448int
13449main ()
13450{
13451char *p = (char *) alloca (2 * sizeof (int));
13452 if (p) return 0;
13453 ;
13454 return 0;
13455}
13456_ACEOF
13457if ac_fn_c_try_link "$LINENO"; then :
13458 ac_cv_working_alloca_h=yes
13459else
13460 ac_cv_working_alloca_h=no
13461fi
13462rm -f core conftest.err conftest.$ac_objext \
13463 conftest$ac_exeext conftest.$ac_ext
13464fi
13465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13466$as_echo "$ac_cv_working_alloca_h" >&6; }
13467if test $ac_cv_working_alloca_h = yes; then
13468
13469$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
13470
13471fi
13472
13473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13474$as_echo_n "checking for alloca... " >&6; }
d0ac1c44 13475if ${ac_cv_func_alloca_works+:} false; then :
3266f10b
TT
13476 $as_echo_n "(cached) " >&6
13477else
13478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13479/* end confdefs.h. */
13480#ifdef __GNUC__
13481# define alloca __builtin_alloca
13482#else
13483# ifdef _MSC_VER
13484# include <malloc.h>
13485# define alloca _alloca
13486# else
13487# ifdef HAVE_ALLOCA_H
13488# include <alloca.h>
13489# else
13490# ifdef _AIX
13491 #pragma alloca
13492# else
13493# ifndef alloca /* predefined by HP cc +Olibcalls */
d0ac1c44 13494void *alloca (size_t);
3266f10b
TT
13495# endif
13496# endif
13497# endif
13498# endif
13499#endif
13500
13501int
13502main ()
13503{
13504char *p = (char *) alloca (1);
13505 if (p) return 0;
13506 ;
13507 return 0;
13508}
13509_ACEOF
13510if ac_fn_c_try_link "$LINENO"; then :
13511 ac_cv_func_alloca_works=yes
13512else
13513 ac_cv_func_alloca_works=no
13514fi
13515rm -f core conftest.err conftest.$ac_objext \
13516 conftest$ac_exeext conftest.$ac_ext
13517fi
13518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13519$as_echo "$ac_cv_func_alloca_works" >&6; }
13520
13521if test $ac_cv_func_alloca_works = yes; then
13522
13523$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13524
13525else
13526 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13527# that cause trouble. Some versions do not even contain alloca or
13528# contain a buggy version. If you still want to use their alloca,
13529# use ar to extract alloca.o from them instead of compiling alloca.c.
13530
13531ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
13532
13533$as_echo "#define C_ALLOCA 1" >>confdefs.h
13534
13535
13536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13537$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
d0ac1c44 13538if ${ac_cv_os_cray+:} false; then :
3266f10b
TT
13539 $as_echo_n "(cached) " >&6
13540else
13541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13542/* end confdefs.h. */
13543#if defined CRAY && ! defined CRAY2
13544webecray
13545#else
13546wenotbecray
13547#endif
13548
13549_ACEOF
13550if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13551 $EGREP "webecray" >/dev/null 2>&1; then :
13552 ac_cv_os_cray=yes
13553else
13554 ac_cv_os_cray=no
13555fi
13556rm -f conftest*
13557
13558fi
13559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13560$as_echo "$ac_cv_os_cray" >&6; }
13561if test $ac_cv_os_cray = yes; then
13562 for ac_func in _getb67 GETB67 getb67; do
13563 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13564ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13565if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
13566
13567cat >>confdefs.h <<_ACEOF
13568#define CRAY_STACKSEG_END $ac_func
13569_ACEOF
13570
13571 break
13572fi
13573
13574 done
13575fi
13576
13577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13578$as_echo_n "checking stack direction for C alloca... " >&6; }
d0ac1c44 13579if ${ac_cv_c_stack_direction+:} false; then :
3266f10b
TT
13580 $as_echo_n "(cached) " >&6
13581else
13582 if test "$cross_compiling" = yes; then :
13583 ac_cv_c_stack_direction=0
13584else
13585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13586/* end confdefs.h. */
13587$ac_includes_default
13588int
d0ac1c44 13589find_stack_direction (int *addr, int depth)
3266f10b 13590{
d0ac1c44
SM
13591 int dir, dummy = 0;
13592 if (! addr)
13593 addr = &dummy;
13594 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
13595 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
13596 return dir + dummy;
3266f10b
TT
13597}
13598
13599int
d0ac1c44 13600main (int argc, char **argv)
3266f10b 13601{
d0ac1c44 13602 return find_stack_direction (0, argc + !argv + 20) < 0;
3266f10b
TT
13603}
13604_ACEOF
13605if ac_fn_c_try_run "$LINENO"; then :
13606 ac_cv_c_stack_direction=1
13607else
13608 ac_cv_c_stack_direction=-1
13609fi
13610rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13611 conftest.$ac_objext conftest.beam conftest.$ac_ext
13612fi
13613
13614fi
13615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13616$as_echo "$ac_cv_c_stack_direction" >&6; }
13617cat >>confdefs.h <<_ACEOF
13618#define STACK_DIRECTION $ac_cv_c_stack_direction
13619_ACEOF
13620
13621
13622fi
13623
13624
13625
13626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13627$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 13628if ${am_cv_langinfo_codeset+:} false; then :
3266f10b
TT
13629 $as_echo_n "(cached) " >&6
13630else
13631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13632/* end confdefs.h. */
13633#include <langinfo.h>
13634int
13635main ()
13636{
13637char* cs = nl_langinfo(CODESET);
13638 ;
13639 return 0;
13640}
13641_ACEOF
13642if ac_fn_c_try_link "$LINENO"; then :
13643 am_cv_langinfo_codeset=yes
13644else
13645 am_cv_langinfo_codeset=no
13646fi
13647rm -f core conftest.err conftest.$ac_objext \
13648 conftest$ac_exeext conftest.$ac_ext
13649
13650fi
13651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13652$as_echo "$am_cv_langinfo_codeset" >&6; }
13653 if test $am_cv_langinfo_codeset = yes; then
13654
13655$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13656
13657 fi
13658
13659
44122162 13660 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
13661do :
13662 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13663ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 13664if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3266f10b
TT
13665 cat >>confdefs.h <<_ACEOF
13666#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13667_ACEOF
13668
13669fi
13670
13671done
13672
13673
f348d89a 13674 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction
3266f10b
TT
13675do :
13676 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13677ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13678if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
13679 cat >>confdefs.h <<_ACEOF
13680#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13681_ACEOF
13682
13683fi
13684done
13685
13686
13687 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
d0ac1c44 13688if test "x$ac_cv_have_decl_strerror" = xyes; then :
3266f10b
TT
13689 ac_have_decl=1
13690else
13691 ac_have_decl=0
13692fi
13693
13694cat >>confdefs.h <<_ACEOF
13695#define HAVE_DECL_STRERROR $ac_have_decl
13696_ACEOF
13697ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
d0ac1c44 13698if test "x$ac_cv_have_decl_strstr" = xyes; then :
3266f10b
TT
13699 ac_have_decl=1
13700else
13701 ac_have_decl=0
13702fi
13703
13704cat >>confdefs.h <<_ACEOF
13705#define HAVE_DECL_STRSTR $ac_have_decl
13706_ACEOF
13707
13708
e9bcb658
GB
13709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13710$as_echo_n "checking for sigsetjmp... " >&6; }
d0ac1c44 13711if ${gdb_cv_func_sigsetjmp+:} false; then :
e9bcb658
GB
13712 $as_echo_n "(cached) " >&6
13713else
13714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13715/* end confdefs.h. */
13716
13717#include <setjmp.h>
13718
13719int
13720main ()
13721{
13722sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
13723 ;
13724 return 0;
13725}
13726_ACEOF
13727if ac_fn_c_try_compile "$LINENO"; then :
13728 gdb_cv_func_sigsetjmp=yes
13729else
13730 gdb_cv_func_sigsetjmp=no
13731fi
13732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13733fi
13734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13735$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
13736if test $gdb_cv_func_sigsetjmp = yes; then
13737
13738$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
13739
13740fi
13741
3266f10b 13742
54019719
PA
13743# Check the return and argument types of ptrace.
13744
13745
54019719
PA
13746for ac_header in sys/ptrace.h ptrace.h
13747do :
13748 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13749ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 13750if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
54019719
PA
13751 cat >>confdefs.h <<_ACEOF
13752#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13753_ACEOF
13754
13755fi
13756
13757done
13758
13759
a3828db0 13760gdb_ptrace_headers='
4ff70b84 13761#include <sys/types.h>
a3828db0
MK
13762#if HAVE_SYS_PTRACE_H
13763# include <sys/ptrace.h>
13764#endif
13765#if HAVE_UNISTD_H
13766# include <unistd.h>
13767#endif
13768'
13769# There is no point in checking if we don't have a prototype.
9b30624b 13770ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
81ecdfbb 13771"
d0ac1c44 13772if test "x$ac_cv_have_decl_ptrace" = xyes; then :
81ecdfbb 13773 ac_have_decl=1
06825bd1 13774else
81ecdfbb 13775 ac_have_decl=0
06825bd1 13776fi
06825bd1 13777
a3828db0 13778cat >>confdefs.h <<_ACEOF
81ecdfbb 13779#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 13780_ACEOF
81ecdfbb 13781if test $ac_have_decl = 1; then :
bec39cab 13782
a3828db0 13783else
a3828db0
MK
13784
13785 : ${gdb_cv_func_ptrace_ret='int'}
13786 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13787
06825bd1
MK
13788fi
13789
064ef605
DJ
13790# Check return type. Varargs (used on GNU/Linux) conflict with the
13791# empty argument list, so check for that explicitly.
81ecdfbb
RW
13792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
13793$as_echo_n "checking return type of ptrace... " >&6; }
d0ac1c44 13794if ${gdb_cv_func_ptrace_ret+:} false; then :
81ecdfbb 13795 $as_echo_n "(cached) " >&6
bec39cab 13796else
81ecdfbb 13797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13798/* end confdefs.h. */
a3828db0 13799$gdb_ptrace_headers
bec39cab
AC
13800int
13801main ()
13802{
064ef605
DJ
13803extern long ptrace (enum __ptrace_request, ...);
13804 ;
13805 return 0;
13806}
13807_ACEOF
9b30624b 13808if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
13809 gdb_cv_func_ptrace_ret='long'
13810else
81ecdfbb 13811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13812/* end confdefs.h. */
13813$gdb_ptrace_headers
13814int
13815main ()
13816{
a3828db0 13817extern int ptrace ();
bec39cab
AC
13818 ;
13819 return 0;
13820}
13821_ACEOF
9b30624b 13822if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13823 gdb_cv_func_ptrace_ret='int'
70f9f479 13824else
81ecdfbb 13825 gdb_cv_func_ptrace_ret='long'
70f9f479 13826fi
81ecdfbb 13827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 13828fi
81ecdfbb 13829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 13830fi
81ecdfbb
RW
13831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13832$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 13833
a3828db0
MK
13834cat >>confdefs.h <<_ACEOF
13835#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 13836_ACEOF
70f9f479 13837
a3828db0 13838# Check argument types.
81ecdfbb
RW
13839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13840$as_echo_n "checking types of arguments for ptrace... " >&6; }
d0ac1c44 13841if ${gdb_cv_func_ptrace_args+:} false; then :
81ecdfbb 13842 $as_echo_n "(cached) " >&6
bec39cab 13843else
a3828db0 13844
81ecdfbb 13845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13846/* end confdefs.h. */
13847$gdb_ptrace_headers
13848int
13849main ()
13850{
13851extern long ptrace (enum __ptrace_request, ...);
13852 ;
13853 return 0;
13854}
13855_ACEOF
9b30624b 13856if ac_fn_c_try_compile "$LINENO"; then :
54019719 13857 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
064ef605 13858else
064ef605 13859
a3828db0
MK
13860for gdb_arg1 in 'int' 'long'; do
13861 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 13862 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 13863 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 13864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13865/* end confdefs.h. */
a3828db0 13866$gdb_ptrace_headers
bec39cab
AC
13867int
13868main ()
13869{
a3828db0
MK
13870
13871extern $gdb_cv_func_ptrace_ret
13872 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13873
bec39cab
AC
13874 ;
13875 return 0;
13876}
13877_ACEOF
9b30624b 13878if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13879 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13880 break 4;
5c7f2947 13881fi
81ecdfbb 13882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 13883 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 13884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13885/* end confdefs.h. */
a3828db0 13886$gdb_ptrace_headers
bec39cab
AC
13887int
13888main ()
13889{
a3828db0
MK
13890
13891extern $gdb_cv_func_ptrace_ret
13892 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13893
bec39cab
AC
13894 ;
13895 return 0;
13896}
13897_ACEOF
9b30624b 13898if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13899
13900gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13901 break 5;
78434e59 13902fi
81ecdfbb 13903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
13904 done
13905 done
13906 done
13907 done
13908done
13909# Provide a safe default value.
13910: ${gdb_cv_func_ptrace_args='int,int,long,long'}
13911
064ef605 13912fi
81ecdfbb 13913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 13914fi
81ecdfbb
RW
13915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13916$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
13917ac_save_IFS=$IFS; IFS=','
13918set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13919IFS=$ac_save_IFS
13920shift
bec39cab 13921
54019719
PA
13922cat >>confdefs.h <<_ACEOF
13923#define PTRACE_TYPE_ARG1 $1
13924_ACEOF
13925
13926
a3828db0
MK
13927cat >>confdefs.h <<_ACEOF
13928#define PTRACE_TYPE_ARG3 $3
13929_ACEOF
13930
96d7229d
LM
13931
13932cat >>confdefs.h <<_ACEOF
13933#define PTRACE_TYPE_ARG4 $4
13934_ACEOF
13935
a3828db0
MK
13936if test -n "$5"; then
13937
13938cat >>confdefs.h <<_ACEOF
13939#define PTRACE_TYPE_ARG5 $5
bec39cab 13940_ACEOF
78434e59
MK
13941
13942fi
13943
54019719 13944
a3828db0 13945if test "$cross_compiling" = no; then
81ecdfbb
RW
13946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13947$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
d0ac1c44 13948if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 13949 $as_echo_n "(cached) " >&6
a3828db0 13950else
81ecdfbb 13951 if test "$cross_compiling" = yes; then :
d0ac1c44 13952 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 13953else
81ecdfbb 13954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13955/* end confdefs.h. */
81ecdfbb 13956$ac_includes_default
bec39cab
AC
13957int
13958main ()
13959{
a3828db0
MK
13960/* If this system has a BSD-style setpgrp which takes arguments,
13961 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
13962 exit successfully. */
81ecdfbb 13963 return setpgrp (1,1) != -1;
bec39cab
AC
13964 ;
13965 return 0;
13966}
13967_ACEOF
81ecdfbb 13968if ac_fn_c_try_run "$LINENO"; then :
a3828db0 13969 ac_cv_func_setpgrp_void=no
c906108c 13970else
81ecdfbb 13971 ac_cv_func_setpgrp_void=yes
c906108c 13972fi
81ecdfbb
RW
13973rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13974 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13975fi
81ecdfbb 13976
a3828db0 13977fi
81ecdfbb
RW
13978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13979$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
13980if test $ac_cv_func_setpgrp_void = yes; then
13981
81ecdfbb 13982$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
13983
13984fi
a3828db0
MK
13985
13986else
81ecdfbb
RW
13987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13988$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
d0ac1c44 13989if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 13990 $as_echo_n "(cached) " >&6
97bf5e38 13991else
81ecdfbb 13992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13993/* end confdefs.h. */
a3828db0
MK
13994
13995#include <unistd.h>
13996
bec39cab
AC
13997int
13998main ()
13999{
a3828db0
MK
14000
14001 if (setpgrp(1,1) == -1)
14002 exit (0);
14003 else
14004 exit (1);
14005
bec39cab
AC
14006 ;
14007 return 0;
14008}
14009_ACEOF
81ecdfbb 14010if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14011 ac_cv_func_setpgrp_void=no
c906108c 14012else
81ecdfbb 14013 ac_cv_func_setpgrp_void=yes
c906108c 14014fi
81ecdfbb 14015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14016fi
81ecdfbb
RW
14017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
14018$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 14019if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 14020 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 14021
a3828db0 14022fi
c906108c
SS
14023fi
14024
db1ff28b
JK
14025# Assume we'll default to using the included libiberty regex.
14026gdb_use_included_regex=yes
14027
14028# However, if the system regex is GNU regex, then default to *not*
14029# using the included regex.
14030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
14031$as_echo_n "checking for GNU regex... " >&6; }
d0ac1c44 14032if ${gdb_cv_have_gnu_regex+:} false; then :
db1ff28b
JK
14033 $as_echo_n "(cached) " >&6
14034else
14035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14036/* end confdefs.h. */
14037#include <gnu-versions.h>
14038int
14039main ()
14040{
14041#define REGEX_INTERFACE_VERSION 1
14042#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
14043# error "Version mismatch"
14044#endif
14045 ;
14046 return 0;
14047}
14048_ACEOF
14049if ac_fn_c_try_compile "$LINENO"; then :
14050 gdb_cv_have_gnu_regex=yes
14051else
14052 gdb_cv_have_gnu_regex=no
14053fi
14054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14055fi
14056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
14057$as_echo "$gdb_cv_have_gnu_regex" >&6; }
14058if test $gdb_cv_have_gnu_regex = yes; then
14059 gdb_use_included_regex=no
14060fi
14061
14062
14063# Check whether --with-included-regex was given.
14064if test "${with_included_regex+set}" = set; then :
14065 withval=$with_included_regex; gdb_with_regex=$withval
14066else
14067 gdb_with_regex=$gdb_use_included_regex
14068fi
14069
14070if test "$gdb_with_regex" = yes; then
14071
14072$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
14073
14074fi
14075
81ecdfbb
RW
14076# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
14077ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
14078#include <sys/proc.h>
14079
14080"
d0ac1c44 14081if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
c906108c 14082
5c45e068 14083cat >>confdefs.h <<_ACEOF
a3828db0 14084#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 14085_ACEOF
c906108c 14086
5c45e068 14087
97bf5e38 14088fi
c906108c 14089
5c45e068 14090
a3828db0 14091# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
14092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
14093$as_echo_n "checking for struct lwp... " >&6; }
d0ac1c44 14094if ${gdb_cv_struct_lwp+:} false; then :
81ecdfbb 14095 $as_echo_n "(cached) " >&6
bec39cab 14096else
81ecdfbb 14097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14098/* end confdefs.h. */
a3828db0 14099#include <sys/param.h>
c49fbc6c 14100#define _KMEMUSER
a3828db0 14101#include <sys/lwp.h>
bec39cab
AC
14102int
14103main ()
14104{
a3828db0 14105struct lwp l;
bec39cab
AC
14106 ;
14107 return 0;
14108}
14109_ACEOF
81ecdfbb 14110if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14111 gdb_cv_struct_lwp=yes
c906108c 14112else
81ecdfbb 14113 gdb_cv_struct_lwp=no
c906108c 14114fi
81ecdfbb 14115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14116fi
81ecdfbb
RW
14117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
14118$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 14119if test $gdb_cv_struct_lwp = yes; then
c906108c 14120
81ecdfbb 14121$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 14122
97bf5e38 14123fi
c906108c 14124
a3828db0 14125# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
14126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
14127$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
d0ac1c44 14128if ${gdb_cv_struct_reg+:} false; then :
81ecdfbb 14129 $as_echo_n "(cached) " >&6
bec39cab 14130else
81ecdfbb 14131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14132/* end confdefs.h. */
a3828db0
MK
14133#include <sys/types.h>
14134#include <machine/reg.h>
bec39cab
AC
14135int
14136main ()
14137{
a3828db0 14138struct reg r;
bec39cab
AC
14139 ;
14140 return 0;
14141}
14142_ACEOF
81ecdfbb 14143if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14144 gdb_cv_struct_reg=yes
27ca5dad 14145else
81ecdfbb 14146 gdb_cv_struct_reg=no
27ca5dad 14147fi
81ecdfbb 14148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 14149fi
81ecdfbb
RW
14150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
14151$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 14152if test $gdb_cv_struct_reg = yes; then
bec39cab 14153
81ecdfbb 14154$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
14155
14156fi
97bf5e38 14157
a3828db0
MK
14158# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
14159# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
a6e69c1f
JB
14160ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
14161#include <machine/reg.h>
81ecdfbb 14162"
d0ac1c44 14163if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
5c45e068
MK
14164
14165cat >>confdefs.h <<_ACEOF
a3828db0 14166#define HAVE_STRUCT_REG_R_FS 1
bec39cab 14167_ACEOF
3862412b 14168
5c45e068 14169
97bf5e38 14170fi
a6e69c1f
JB
14171ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
14172#include <machine/reg.h>
81ecdfbb 14173"
d0ac1c44 14174if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
5c45e068
MK
14175
14176cat >>confdefs.h <<_ACEOF
a3828db0 14177#define HAVE_STRUCT_REG_R_GS 1
bec39cab 14178_ACEOF
3862412b 14179
5c45e068 14180
97bf5e38 14181fi
3862412b 14182
5c45e068 14183
6fea9e18
L
14184# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
14185# Older amd64 Linux's don't have the fs_base and gs_base members of
14186# `struct user_regs_struct'.
f517c180
EA
14187ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/types.h>
14188#include <sys/user.h>
6fea9e18 14189"
d0ac1c44 14190if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then :
6fea9e18
L
14191
14192cat >>confdefs.h <<_ACEOF
14193#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
14194_ACEOF
14195
14196
14197fi
f517c180
EA
14198ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/types.h>
14199#include <sys/user.h>
6fea9e18 14200"
d0ac1c44 14201if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then :
6fea9e18
L
14202
14203cat >>confdefs.h <<_ACEOF
14204#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
14205_ACEOF
14206
14207
14208fi
14209
14210
a3828db0 14211# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
14212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
14213$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
d0ac1c44 14214if ${gdb_cv_have_ptrace_getregs+:} false; then :
81ecdfbb 14215 $as_echo_n "(cached) " >&6
451928c5 14216else
81ecdfbb 14217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14218/* end confdefs.h. */
a3828db0 14219#include <sys/ptrace.h>
bec39cab
AC
14220int
14221main ()
14222{
a3828db0 14223PTRACE_GETREGS;
bec39cab
AC
14224 ;
14225 return 0;
14226}
14227_ACEOF
81ecdfbb 14228if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14229 gdb_cv_have_ptrace_getregs=yes
451928c5 14230else
81ecdfbb 14231 gdb_cv_have_ptrace_getregs=no
451928c5 14232fi
81ecdfbb 14233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14234fi
14235
81ecdfbb
RW
14236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
14237$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 14238if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 14239
81ecdfbb 14240$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 14241
97bf5e38 14242fi
451928c5 14243
a3828db0 14244# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
14245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
14246$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
d0ac1c44 14247if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
81ecdfbb 14248 $as_echo_n "(cached) " >&6
451928c5 14249else
81ecdfbb 14250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14251/* end confdefs.h. */
a3828db0 14252#include <sys/ptrace.h>
bec39cab
AC
14253int
14254main ()
14255{
a3828db0 14256PTRACE_GETFPXREGS;
bec39cab
AC
14257 ;
14258 return 0;
14259}
14260_ACEOF
81ecdfbb 14261if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14262 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 14263else
81ecdfbb 14264 gdb_cv_have_ptrace_getfpxregs=no
451928c5 14265fi
81ecdfbb 14266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14267fi
14268
81ecdfbb
RW
14269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
14270$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 14271if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 14272
81ecdfbb 14273$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 14274
97bf5e38 14275fi
451928c5 14276
a3828db0 14277# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
14278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
14279$as_echo_n "checking for PT_GETDBREGS... " >&6; }
d0ac1c44 14280if ${gdb_cv_have_pt_getdbregs+:} false; then :
81ecdfbb 14281 $as_echo_n "(cached) " >&6
3862412b 14282else
81ecdfbb 14283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14284/* end confdefs.h. */
a3828db0
MK
14285#include <sys/types.h>
14286#include <sys/ptrace.h>
bec39cab
AC
14287int
14288main ()
14289{
a3828db0 14290PT_GETDBREGS;
bec39cab
AC
14291 ;
14292 return 0;
14293}
14294_ACEOF
81ecdfbb 14295if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14296 gdb_cv_have_pt_getdbregs=yes
3862412b 14297else
81ecdfbb 14298 gdb_cv_have_pt_getdbregs=no
3862412b 14299fi
81ecdfbb 14300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14301fi
14302
81ecdfbb
RW
14303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
14304$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 14305if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 14306
81ecdfbb 14307$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 14308
97bf5e38 14309fi
3862412b 14310
a3828db0 14311# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
14312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
14313$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
d0ac1c44 14314if ${gdb_cv_have_pt_getxmmregs+:} false; then :
81ecdfbb 14315 $as_echo_n "(cached) " >&6
3862412b 14316else
81ecdfbb 14317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14318/* end confdefs.h. */
a3828db0
MK
14319#include <sys/types.h>
14320#include <sys/ptrace.h>
bec39cab
AC
14321int
14322main ()
14323{
a3828db0 14324PT_GETXMMREGS;
bec39cab
AC
14325 ;
14326 return 0;
14327}
14328_ACEOF
81ecdfbb 14329if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14330 gdb_cv_have_pt_getxmmregs=yes
3862412b 14331else
81ecdfbb 14332 gdb_cv_have_pt_getxmmregs=no
3862412b 14333fi
81ecdfbb 14334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14335fi
14336
81ecdfbb
RW
14337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
14338$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 14339if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 14340
81ecdfbb 14341$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 14342
97bf5e38 14343fi
3862412b 14344
6e9567fe
JB
14345# See if <sys/ptrace.h> supports LWP names on FreeBSD
14346# Older FreeBSD versions don't have the pl_tdname member of
14347# `struct ptrace_lwpinfo'.
14348ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
14349"
d0ac1c44 14350if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
6e9567fe
JB
14351
14352cat >>confdefs.h <<_ACEOF
14353#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
14354_ACEOF
14355
14356
14357fi
14358
14359
e6cdd38e
JB
14360# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
14361# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
14362# FreeBSD 10.3.
14363ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
14364"
d0ac1c44 14365if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
e6cdd38e
JB
14366
14367cat >>confdefs.h <<_ACEOF
14368#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
14369_ACEOF
14370
14371
14372fi
14373
6e9567fe 14374
97bf5e38 14375if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
14376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
14377$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14378 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
81ecdfbb 14379 $as_echo_n "(cached) " >&6
596c9d4b 14380else
81ecdfbb 14381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14382/* end confdefs.h. */
596c9d4b
KB
14383
14384#define _SYSCALL32
d30c5336
JK
14385/* Needed for new procfs interface on sparc-solaris. */
14386#define _STRUCTURED_PROC 1
596c9d4b 14387#include <sys/procfs.h>
bec39cab
AC
14388int
14389main ()
14390{
97bf5e38 14391gregset_t avar
bec39cab
AC
14392 ;
14393 return 0;
14394}
14395_ACEOF
81ecdfbb 14396if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14397 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 14398else
81ecdfbb 14399 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 14400
596c9d4b 14401fi
81ecdfbb 14402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
14403fi
14404
97bf5e38 14405 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 14406
81ecdfbb 14407$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
14408
14409 fi
81ecdfbb
RW
14410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14411$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 14412
81ecdfbb
RW
14413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
14414$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14415 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
81ecdfbb 14416 $as_echo_n "(cached) " >&6
d84dd0c5 14417else
81ecdfbb 14418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14419/* end confdefs.h. */
97bf5e38
MK
14420
14421#define _SYSCALL32
d30c5336
JK
14422/* Needed for new procfs interface on sparc-solaris. */
14423#define _STRUCTURED_PROC 1
d84dd0c5 14424#include <sys/procfs.h>
bec39cab
AC
14425int
14426main ()
14427{
97bf5e38 14428fpregset_t avar
bec39cab
AC
14429 ;
14430 return 0;
14431}
14432_ACEOF
81ecdfbb 14433if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14434 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 14435else
81ecdfbb 14436 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 14437
d84dd0c5 14438fi
81ecdfbb 14439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
14440fi
14441
97bf5e38 14442 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 14443
81ecdfbb 14444$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 14445
97bf5e38 14446 fi
81ecdfbb
RW
14447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14448$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 14449
81ecdfbb
RW
14450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
14451$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14452 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
81ecdfbb 14453 $as_echo_n "(cached) " >&6
c906108c 14454else
81ecdfbb 14455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14456/* end confdefs.h. */
c906108c 14457
97bf5e38 14458#define _SYSCALL32
d30c5336
JK
14459/* Needed for new procfs interface on sparc-solaris. */
14460#define _STRUCTURED_PROC 1
97bf5e38 14461#include <sys/procfs.h>
bec39cab
AC
14462int
14463main ()
14464{
97bf5e38 14465prgregset_t avar
bec39cab
AC
14466 ;
14467 return 0;
14468}
14469_ACEOF
81ecdfbb 14470if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14471 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 14472else
81ecdfbb 14473 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 14474
c906108c 14475fi
81ecdfbb 14476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14477fi
14478
97bf5e38 14479 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 14480
81ecdfbb 14481$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 14482
97bf5e38 14483 fi
81ecdfbb
RW
14484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14485$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 14486
81ecdfbb
RW
14487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
14488$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14489 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
81ecdfbb 14490 $as_echo_n "(cached) " >&6
d45fe813 14491else
81ecdfbb 14492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14493/* end confdefs.h. */
97bf5e38
MK
14494
14495#define _SYSCALL32
d30c5336
JK
14496/* Needed for new procfs interface on sparc-solaris. */
14497#define _STRUCTURED_PROC 1
97bf5e38 14498#include <sys/procfs.h>
bec39cab
AC
14499int
14500main ()
14501{
97bf5e38 14502prfpregset_t avar
bec39cab
AC
14503 ;
14504 return 0;
14505}
14506_ACEOF
81ecdfbb 14507if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14508 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 14509else
81ecdfbb 14510 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 14511
d45fe813 14512fi
81ecdfbb 14513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14514fi
14515
97bf5e38 14516 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 14517
81ecdfbb 14518$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 14519
97bf5e38 14520 fi
81ecdfbb
RW
14521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14522$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 14523
81ecdfbb
RW
14524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14525$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
d0ac1c44 14526 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
81ecdfbb 14527 $as_echo_n "(cached) " >&6
d45fe813 14528else
81ecdfbb 14529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14530/* end confdefs.h. */
97bf5e38
MK
14531
14532#define _SYSCALL32
d30c5336
JK
14533/* Needed for new procfs interface on sparc-solaris. */
14534#define _STRUCTURED_PROC 1
97bf5e38 14535#include <sys/procfs.h>
bec39cab
AC
14536int
14537main ()
14538{
97bf5e38 14539prgregset32_t avar
bec39cab
AC
14540 ;
14541 return 0;
14542}
14543_ACEOF
81ecdfbb 14544if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14545 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 14546else
81ecdfbb 14547 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 14548
d45fe813 14549fi
81ecdfbb 14550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14551fi
14552
97bf5e38 14553 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 14554
81ecdfbb 14555$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 14556
97bf5e38 14557 fi
81ecdfbb
RW
14558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14559$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 14560
81ecdfbb
RW
14561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14562$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
d0ac1c44 14563 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
81ecdfbb 14564 $as_echo_n "(cached) " >&6
d45fe813 14565else
81ecdfbb 14566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14567/* end confdefs.h. */
97bf5e38 14568
d45fe813 14569#define _SYSCALL32
d30c5336
JK
14570/* Needed for new procfs interface on sparc-solaris. */
14571#define _STRUCTURED_PROC 1
97bf5e38 14572#include <sys/procfs.h>
bec39cab
AC
14573int
14574main ()
14575{
97bf5e38 14576lwpid_t avar
bec39cab
AC
14577 ;
14578 return 0;
14579}
14580_ACEOF
81ecdfbb 14581if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14582 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 14583else
81ecdfbb 14584 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 14585
d45fe813 14586fi
81ecdfbb 14587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14588fi
14589
97bf5e38 14590 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 14591
81ecdfbb 14592$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 14593
97bf5e38 14594 fi
81ecdfbb
RW
14595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14596$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 14597
81ecdfbb
RW
14598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14599$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
d0ac1c44 14600 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
81ecdfbb 14601 $as_echo_n "(cached) " >&6
c906108c 14602else
81ecdfbb 14603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14604/* end confdefs.h. */
c906108c 14605
97bf5e38 14606#define _SYSCALL32
d30c5336
JK
14607/* Needed for new procfs interface on sparc-solaris. */
14608#define _STRUCTURED_PROC 1
97bf5e38 14609#include <sys/procfs.h>
bec39cab
AC
14610int
14611main ()
14612{
97bf5e38 14613psaddr_t avar
bec39cab
AC
14614 ;
14615 return 0;
14616}
14617_ACEOF
81ecdfbb 14618if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14619 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 14620else
81ecdfbb 14621 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 14622
c906108c 14623fi
81ecdfbb 14624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14625fi
14626
97bf5e38 14627 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 14628
81ecdfbb 14629$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 14630
97bf5e38 14631 fi
81ecdfbb
RW
14632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14633$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 14634
97bf5e38
MK
14635
14636
14637
97bf5e38 14638 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
14639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
14640$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
d0ac1c44 14641 if ${gdb_cv_prfpregset_t_broken+:} false; then :
81ecdfbb 14642 $as_echo_n "(cached) " >&6
c906108c 14643else
81ecdfbb 14644 if test "$cross_compiling" = yes; then :
97bf5e38 14645 gdb_cv_prfpregset_t_broken=yes
c906108c 14646else
81ecdfbb 14647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14648/* end confdefs.h. */
97bf5e38
MK
14649#include <sys/procfs.h>
14650 int main ()
14651 {
14652 if (sizeof (prfpregset_t) == sizeof (void *))
14653 return 1;
14654 return 0;
14655 }
bec39cab 14656_ACEOF
81ecdfbb 14657if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14658 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
14659else
14660 gdb_cv_prfpregset_t_broken=yes
c906108c 14661fi
81ecdfbb
RW
14662rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14663 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14664fi
81ecdfbb 14665
c906108c
SS
14666fi
14667
81ecdfbb
RW
14668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
14669$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 14670 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 14671
81ecdfbb 14672$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 14673
97bf5e38
MK
14674 fi
14675 fi
c906108c 14676fi
c906108c 14677
bc8bcb4b 14678# Check if the compiler supports the `long long' type.
c906108c 14679
81ecdfbb
RW
14680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14681$as_echo_n "checking for long long support in compiler... " >&6; }
d0ac1c44 14682if ${gdb_cv_c_long_long+:} false; then :
81ecdfbb 14683 $as_echo_n "(cached) " >&6
97bf5e38 14684else
81ecdfbb 14685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14686/* end confdefs.h. */
bc8bcb4b 14687extern long long foo;
bec39cab
AC
14688int
14689main ()
14690{
bc8bcb4b 14691switch (foo & 2) { case 0: return 1; }
bec39cab
AC
14692 ;
14693 return 0;
14694}
14695_ACEOF
81ecdfbb 14696if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14697 gdb_cv_c_long_long=yes
14698else
81ecdfbb 14699 gdb_cv_c_long_long=no
97bf5e38 14700fi
81ecdfbb 14701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14702fi
81ecdfbb
RW
14703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14704$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
14705if test $gdb_cv_c_long_long != yes; then
14706 # libdecnumber requires long long.
d0ac1c44 14707 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
14708fi
14709
bc8bcb4b 14710# Check if the compiler and runtime support printing long longs.
97bf5e38 14711
81ecdfbb
RW
14712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14713$as_echo_n "checking for long long support in printf... " >&6; }
d0ac1c44 14714if ${gdb_cv_printf_has_long_long+:} false; then :
81ecdfbb 14715 $as_echo_n "(cached) " >&6
97bf5e38 14716else
81ecdfbb 14717 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14718 gdb_cv_printf_has_long_long=no
14719else
81ecdfbb 14720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14721/* end confdefs.h. */
bc8bcb4b
MK
14722$ac_includes_default
14723int
14724main ()
14725{
14726char buf[32];
97bf5e38
MK
14727 long long l = 0;
14728 l = (l << 16) + 0x0123;
14729 l = (l << 16) + 0x4567;
14730 l = (l << 16) + 0x89ab;
14731 l = (l << 16) + 0xcdef;
14732 sprintf (buf, "0x%016llx", l);
14733 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
14734 ;
14735 return 0;
c906108c 14736}
bec39cab 14737_ACEOF
81ecdfbb 14738if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14739 gdb_cv_printf_has_long_long=yes
14740else
81ecdfbb 14741 gdb_cv_printf_has_long_long=no
97bf5e38 14742fi
81ecdfbb
RW
14743rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14744 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14745fi
81ecdfbb 14746
97bf5e38 14747fi
81ecdfbb
RW
14748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14749$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 14750if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 14751
81ecdfbb 14752$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14753
14754fi
97bf5e38 14755
1a619819
LM
14756# Check if the compiler and runtime support printing decfloats.
14757
81ecdfbb
RW
14758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14759$as_echo_n "checking for decfloat support in printf... " >&6; }
d0ac1c44 14760if ${gdb_cv_printf_has_decfloat+:} false; then :
81ecdfbb 14761 $as_echo_n "(cached) " >&6
1a619819 14762else
81ecdfbb 14763 if test "$cross_compiling" = yes; then :
1a619819
LM
14764 gdb_cv_printf_has_decfloat=no
14765else
81ecdfbb 14766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
14767/* end confdefs.h. */
14768$ac_includes_default
14769int
14770main ()
14771{
14772char buf[64];
14773 _Decimal32 d32 = 1.2345df;
14774 _Decimal64 d64 = 1.2345dd;
14775 _Decimal128 d128 = 1.2345dl;
14776 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14777 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14778 ;
14779 return 0;
14780}
14781_ACEOF
81ecdfbb 14782if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
14783 gdb_cv_printf_has_decfloat=yes
14784else
81ecdfbb 14785 gdb_cv_printf_has_decfloat=no
1a619819 14786fi
81ecdfbb
RW
14787rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14788 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 14789fi
81ecdfbb 14790
1a619819 14791fi
81ecdfbb
RW
14792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14793$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
14794if test $gdb_cv_printf_has_decfloat = yes; then
14795
81ecdfbb 14796$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
14797
14798fi
14799
bc8bcb4b
MK
14800# Check if the compiler supports the `long double' type. We can't use
14801# AC_C_LONG_DOUBLE because that one does additional checks on the
14802# constants defined in <float.h> that fail on some systems,
14803# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 14804
81ecdfbb
RW
14805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14806$as_echo_n "checking for long double support in compiler... " >&6; }
d0ac1c44 14807if ${gdb_cv_c_long_double+:} false; then :
81ecdfbb 14808 $as_echo_n "(cached) " >&6
97bf5e38 14809else
81ecdfbb 14810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14811/* end confdefs.h. */
97bf5e38 14812long double foo;
bec39cab 14813_ACEOF
81ecdfbb 14814if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 14815 gdb_cv_c_long_double=yes
97bf5e38 14816else
81ecdfbb 14817 gdb_cv_c_long_double=no
97bf5e38 14818fi
81ecdfbb 14819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14820fi
81ecdfbb
RW
14821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14822$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 14823if test $gdb_cv_c_long_double = yes; then
c906108c 14824
81ecdfbb 14825$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14826
14827fi
14828
bc8bcb4b 14829# Check if the compiler and runtime support printing long doubles.
97bf5e38 14830
81ecdfbb
RW
14831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14832$as_echo_n "checking for long double support in printf... " >&6; }
d0ac1c44 14833if ${gdb_cv_printf_has_long_double+:} false; then :
81ecdfbb 14834 $as_echo_n "(cached) " >&6
97bf5e38 14835else
81ecdfbb 14836 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14837 gdb_cv_printf_has_long_double=no
14838else
81ecdfbb 14839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14840/* end confdefs.h. */
bc8bcb4b
MK
14841$ac_includes_default
14842int
14843main ()
14844{
14845char buf[16];
97bf5e38
MK
14846 long double f = 3.141592653;
14847 sprintf (buf, "%Lg", f);
14848 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
14849 ;
14850 return 0;
97bf5e38 14851}
bec39cab 14852_ACEOF
81ecdfbb 14853if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14854 gdb_cv_printf_has_long_double=yes
c906108c 14855else
81ecdfbb 14856 gdb_cv_printf_has_long_double=no
c906108c 14857fi
81ecdfbb
RW
14858rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14859 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14860fi
81ecdfbb 14861
c906108c 14862fi
81ecdfbb
RW
14863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14864$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 14865if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 14866
81ecdfbb 14867$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14868
14869fi
97bf5e38 14870
bc8bcb4b 14871# Check if the compiler and runtime support scanning long doubles.
97bf5e38 14872
81ecdfbb
RW
14873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14874$as_echo_n "checking for long double support in scanf... " >&6; }
d0ac1c44 14875if ${gdb_cv_scanf_has_long_double+:} false; then :
81ecdfbb 14876 $as_echo_n "(cached) " >&6
97bf5e38 14877else
81ecdfbb 14878 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14879 gdb_cv_scanf_has_long_double=no
14880else
81ecdfbb 14881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14882/* end confdefs.h. */
bc8bcb4b
MK
14883#include <stdio.h>
14884int
14885main ()
14886{
14887char *buf = "3.141592653";
97bf5e38
MK
14888 long double f = 0;
14889 sscanf (buf, "%Lg", &f);
14890 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
14891 ;
14892 return 0;
97bf5e38 14893}
bec39cab 14894_ACEOF
81ecdfbb 14895if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14896 gdb_cv_scanf_has_long_double=yes
14897else
81ecdfbb 14898 gdb_cv_scanf_has_long_double=no
97bf5e38 14899fi
81ecdfbb
RW
14900rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14901 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14902fi
81ecdfbb 14903
c906108c 14904fi
81ecdfbb
RW
14905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14906$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 14907if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 14908
81ecdfbb 14909$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14910
14911fi
c906108c 14912
438013df
AO
14913case ${host_os} in
14914aix*)
81ecdfbb
RW
14915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14916$as_echo_n "checking for -bbigtoc option... " >&6; }
d0ac1c44 14917if ${gdb_cv_bigtoc+:} false; then :
81ecdfbb 14918 $as_echo_n "(cached) " >&6
438013df 14919else
bec39cab 14920
438013df
AO
14921 SAVE_LDFLAGS=$LDFLAGS
14922
14923 case $GCC in
14924 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14925 *) gdb_cv_bigtoc=-bbigtoc ;;
14926 esac
14927
14928 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 14929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14930/* end confdefs.h. */
438013df 14931
bec39cab
AC
14932int
14933main ()
14934{
438013df 14935int i;
bec39cab
AC
14936 ;
14937 return 0;
14938}
14939_ACEOF
81ecdfbb 14940if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14941
81ecdfbb
RW
14942else
14943 gdb_cv_bigtoc=
438013df 14944fi
81ecdfbb
RW
14945rm -f core conftest.err conftest.$ac_objext \
14946 conftest$ac_exeext conftest.$ac_ext
ec76baa5 14947 LDFLAGS="${SAVE_LDFLAGS}"
438013df 14948
bec39cab 14949fi
81ecdfbb
RW
14950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
14951$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
14952 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
14953 ;;
14954esac
14955
38f6b338 14956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 14957$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
14958dynamic_list=false
14959if test "${gdb_native}" = yes; then
14960 # The dynamically loaded libthread_db needs access to symbols in the gdb
14961 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
14962 # may not be supported there.
14963 old_LDFLAGS="$LDFLAGS"
14964 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
14965 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
14966 LDFLAGS="$LDFLAGS $RDYNAMIC"
14967 if test "${have_libpython}" = no; then
14968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
14969/* end confdefs.h. */
14970
14971int
14972main ()
14973{
14974
14975 ;
14976 return 0;
14977}
14978_ACEOF
14979if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
14980 dynamic_list=true
14981fi
14982rm -f core conftest.err conftest.$ac_objext \
14983 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
14984 else
14985 # Workaround http://bugs.python.org/issue4434 where static
14986 # libpythonX.Y.a would get its symbols required for
14987 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
14988 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
14989
14990 # Note the workaround for Python
14991 # http://bugs.python.org/issue10112 earlier has removed
14992 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
14993 # here too, as otherwise it'd make this -Wl,--dynamic-list test
14994 # always pass.
38f6b338
JK
14995 old_CFLAGS="$CFLAGS"
14996 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
14997 old_LIBS="$LIBS"
14998 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
14999 old_CPPFLAGS="$CPPFLAGS"
15000 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 15001 if test "$cross_compiling" = yes; then :
3bebe2f2 15002 true
f6528abd 15003else
3bebe2f2
JK
15004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15005/* end confdefs.h. */
1b4f615e 15006#include "Python.h"
3bebe2f2
JK
15007int
15008main ()
15009{
15010int err;
38f6b338
JK
15011 Py_Initialize ();
15012 err = PyRun_SimpleString ("import itertools\n");
15013 Py_Finalize ();
15014 return err == 0 ? 0 : 1;
3bebe2f2
JK
15015 ;
15016 return 0;
15017}
15018_ACEOF
15019if ac_fn_c_try_run "$LINENO"; then :
15020 dynamic_list=true
15021fi
15022rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15023 conftest.$ac_objext conftest.beam conftest.$ac_ext
15024fi
15025
8c1fb155 15026 LIBS="$old_LIBS"
38f6b338 15027 CFLAGS="$old_CFLAGS"
1b4f615e 15028 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
15029 fi
15030 LDFLAGS="$old_LDFLAGS"
15031fi
15032if $dynamic_list; then
15033 found="-Wl,--dynamic-list"
15034 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 15035else
38f6b338
JK
15036 found="-rdynamic"
15037 RDYNAMIC="-rdynamic"
f6528abd 15038fi
f6528abd 15039
38f6b338 15040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 15041$as_echo "$found" >&6; }
0407b3f1 15042
f6528abd 15043
0407b3f1 15044if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 15045 case ${host_os} in
d92419e5 15046 aix*)
81ecdfbb
RW
15047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
15048$as_echo_n "checking for AiX thread debugging library... " >&6; }
d0ac1c44 15049 if ${gdb_cv_have_aix_thread_debug+:} false; then :
81ecdfbb 15050 $as_echo_n "(cached) " >&6
bec39cab 15051else
81ecdfbb 15052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15053/* end confdefs.h. */
d92419e5 15054#include <sys/pthdebug.h>
bec39cab
AC
15055int
15056main ()
15057{
d92419e5
JB
15058#ifndef PTHDB_VERSION_3
15059 #error
15060 #endif
bec39cab
AC
15061 ;
15062 return 0;
15063}
15064_ACEOF
81ecdfbb 15065if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
15066 gdb_cv_have_aix_thread_debug=yes
15067else
81ecdfbb 15068 gdb_cv_have_aix_thread_debug=no
d92419e5 15069fi
81ecdfbb 15070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
15071fi
15072
81ecdfbb
RW
15073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
15074$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
15075 if test $gdb_cv_have_aix_thread_debug = yes; then
15076 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 15077 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 15078 LIBS="$LIBS -lpthdebug"
d645e32e
JB
15079
15080 # Older versions of AIX do not provide the declaration for
15081 # the getthrds function (it appears that it was introduced
15082 # with AIX 6.x).
15083 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
15084"
d0ac1c44 15085if test "x$ac_cv_have_decl_getthrds" = xyes; then :
d645e32e
JB
15086 ac_have_decl=1
15087else
15088 ac_have_decl=0
15089fi
15090
15091cat >>confdefs.h <<_ACEOF
15092#define HAVE_DECL_GETTHRDS $ac_have_decl
15093_ACEOF
15094
d92419e5
JB
15095 fi
15096 ;;
c906108c 15097 esac
bec39cab 15098
c906108c
SS
15099fi
15100
3f47be5c 15101if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
15102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
15103$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
d0ac1c44 15104if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
81ecdfbb 15105 $as_echo_n "(cached) " >&6
bec39cab 15106else
81ecdfbb 15107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15108/* end confdefs.h. */
3f47be5c 15109#include <thread_db.h>
bec39cab
AC
15110int
15111main ()
15112{
3f47be5c 15113int i = TD_NOTALLOC;
bec39cab
AC
15114 ;
15115 return 0;
15116}
15117_ACEOF
81ecdfbb 15118if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
15119 gdb_cv_thread_db_h_has_td_notalloc=yes
15120else
81ecdfbb 15121 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 15122
3f47be5c 15123fi
81ecdfbb 15124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 15125
bec39cab 15126fi
81ecdfbb
RW
15127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
15128$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
15129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
15130$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
d0ac1c44 15131if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
81ecdfbb 15132 $as_echo_n "(cached) " >&6
59f80f10 15133else
81ecdfbb 15134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
15135/* end confdefs.h. */
15136#include <thread_db.h>
15137int
15138main ()
15139{
15140int i = TD_VERSION;
15141 ;
15142 return 0;
15143}
15144_ACEOF
81ecdfbb 15145if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15146 gdb_cv_thread_db_h_has_td_version=yes
15147else
81ecdfbb 15148 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
15149
15150fi
81ecdfbb 15151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15152
15153fi
81ecdfbb
RW
15154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
15155$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
15156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
15157$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
d0ac1c44 15158if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
81ecdfbb 15159 $as_echo_n "(cached) " >&6
59f80f10 15160else
81ecdfbb 15161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
15162/* end confdefs.h. */
15163#include <thread_db.h>
15164int
15165main ()
15166{
15167int i = TD_NOTLS;
15168 ;
15169 return 0;
15170}
15171_ACEOF
81ecdfbb 15172if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15173 gdb_cv_thread_db_h_has_td_notls=yes
15174else
81ecdfbb 15175 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
15176
15177fi
81ecdfbb 15178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15179
15180fi
81ecdfbb
RW
15181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
15182$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
15183fi
15184if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 15185
81ecdfbb 15186$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 15187
59f80f10
DJ
15188fi
15189if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
15190
81ecdfbb 15191$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
15192
15193fi
15194if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
15195
81ecdfbb 15196$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 15197
3f47be5c
EZ
15198fi
15199
81ecdfbb
RW
15200ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
15201"
d0ac1c44 15202if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
81ecdfbb 15203 ac_have_decl=1
10568435 15204else
81ecdfbb 15205 ac_have_decl=0
10568435 15206fi
10568435
JK
15207
15208cat >>confdefs.h <<_ACEOF
81ecdfbb 15209#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
15210_ACEOF
15211
15212
81ecdfbb
RW
15213if test "$cross_compiling" = yes; then :
15214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15215/* end confdefs.h. */
15216#include <sys/personality.h>
15217int
15218main ()
15219{
15220
15221# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15222# define ADDR_NO_RANDOMIZE 0x0040000
15223# endif
15224 /* Test the flag could be set and stays set. */
15225 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15226 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15227 return 1
15228 ;
15229 return 0;
15230}
15231_ACEOF
81ecdfbb 15232if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
15233 have_personality=true
15234else
81ecdfbb 15235 have_personality=false
10568435 15236fi
81ecdfbb
RW
15237rm -f core conftest.err conftest.$ac_objext \
15238 conftest$ac_exeext conftest.$ac_ext
10568435 15239else
81ecdfbb 15240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15241/* end confdefs.h. */
15242#include <sys/personality.h>
15243int
15244main ()
15245{
15246
15247# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15248# define ADDR_NO_RANDOMIZE 0x0040000
15249# endif
15250 /* Test the flag could be set and stays set. */
15251 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15252 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15253 return 1
15254 ;
15255 return 0;
15256}
15257_ACEOF
81ecdfbb 15258if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
15259 have_personality=true
15260else
81ecdfbb 15261 have_personality=false
10568435 15262fi
81ecdfbb
RW
15263rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15264 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 15265fi
81ecdfbb 15266
10568435
JK
15267if $have_personality
15268then
15269
81ecdfbb 15270$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
15271
15272fi
15273
e655c1a2
PA
15274case $host_os in
15275 go32* | *djgpp*)
15276 gdbinit=gdb.ini
15277 ;;
15278 *)
15279 gdbinit=.gdbinit
15280 ;;
15281esac
15282
15283cat >>confdefs.h <<_ACEOF
15284#define GDBINIT "$gdbinit"
15285_ACEOF
15286
15287
fb40c209 15288
f83d8a90
DE
15289# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
15290# except that the argument to --with-sysroot is optional.
15291# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
15292if test "x$with_sysroot" = xyes; then
15293 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
15294fi
bec39cab 15295
81ecdfbb
RW
15296# Check whether --with-sysroot was given.
15297if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
15298 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
15299else
15300 TARGET_SYSTEM_ROOT=
15301fi
030292b7 15302
030292b7 15303
f83d8a90
DE
15304 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15305 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15306 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
15307 ac_define_dir=`eval echo $ac_define_dir`
030292b7 15308
f83d8a90
DE
15309cat >>confdefs.h <<_ACEOF
15310#define TARGET_SYSTEM_ROOT "$ac_define_dir"
15311_ACEOF
bec39cab 15312
030292b7 15313
b14b1491 15314
f83d8a90
DE
15315
15316 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15317 if test "x$prefix" = xNONE; then
15318 test_prefix=/usr/local
15319 else
15320 test_prefix=$prefix
15321 fi
15322 else
15323 test_prefix=$exec_prefix
15324 fi
15325 value=0
15326 case ${ac_define_dir} in
15327 "${test_prefix}"|"${test_prefix}/"*|\
15328 '${exec_prefix}'|'${exec_prefix}/'*)
15329 value=1
15330 ;;
15331 esac
15332
15333cat >>confdefs.h <<_ACEOF
15334#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
15335_ACEOF
030292b7
DJ
15336
15337
15338
16e7150e 15339
16e7150e 15340
81ecdfbb
RW
15341# Check whether --with-system-gdbinit was given.
15342if test "${with_system_gdbinit+set}" = set; then :
15343 withval=$with_system_gdbinit;
b14b1491
TT
15344 SYSTEM_GDBINIT=$withval
15345else
15346 SYSTEM_GDBINIT=
81ecdfbb
RW
15347fi
15348
16e7150e
JG
15349
15350 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15351 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 15352 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
15353 ac_define_dir=`eval echo $ac_define_dir`
15354
15355cat >>confdefs.h <<_ACEOF
15356#define SYSTEM_GDBINIT "$ac_define_dir"
15357_ACEOF
15358
15359
15360
0c4a4063 15361
b14b1491
TT
15362 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15363 if test "x$prefix" = xNONE; then
15364 test_prefix=/usr/local
15365 else
15366 test_prefix=$prefix
15367 fi
15368 else
15369 test_prefix=$exec_prefix
15370 fi
15371 value=0
15372 case ${ac_define_dir} in
15373 "${test_prefix}"|"${test_prefix}/"*|\
15374 '${exec_prefix}'|'${exec_prefix}/'*)
15375 value=1
15376 ;;
15377 esac
16e7150e 15378
b14b1491
TT
15379cat >>confdefs.h <<_ACEOF
15380#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
15381_ACEOF
15382
b14b1491 15383
16e7150e 15384
0c4a4063 15385
b835bb52 15386
81ecdfbb
RW
15387# Check whether --enable-werror was given.
15388if test "${enable_werror+set}" = set; then :
15389 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
15390 yes | y) ERROR_ON_WARNING="yes" ;;
15391 no | n) ERROR_ON_WARNING="no" ;;
d0ac1c44 15392 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 15393 esac
81ecdfbb
RW
15394fi
15395
094a342e 15396
9a084706
PA
15397# Enable -Werror by default when using gcc. Turn it off for releases.
15398if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
15399 ERROR_ON_WARNING=yes
15400fi
15401
15402WERROR_CFLAGS=""
15403if test "${ERROR_ON_WARNING}" = yes ; then
15404 WERROR_CFLAGS="-Werror"
15405fi
15406
cf6de44d 15407# The options we'll try to enable.
aac331e4 15408build_warnings="-Wall -Wpointer-arith \
a0de763e 15409-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
aac331e4 15410-Wno-switch -Wno-char-subscripts \
cf6de44d 15411-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
d3d8724a 15412-Wno-sign-compare -Wno-error=maybe-uninitialized \
7f8a5d38 15413-Wno-mismatched-tags \
632e107b 15414-Wno-error=deprecated-register \
85e26832 15415-Wsuggest-override \
1a34f210 15416-Wimplicit-fallthrough=3 \
aff689d3 15417-Wduplicated-cond"
3bc3d82a 15418
3526781e 15419case "${host}" in
4fa7574e
RO
15420 *-*-mingw32*)
15421 # Enable -Wno-format by default when using gcc on mingw since many
15422 # GCC versions complain about %I64.
15423 build_warnings="$build_warnings -Wno-format" ;;
15424 *-*-solaris*)
15425 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
15426 # doesn't understand.
15427 build_warnings="$build_warnings -Wno-unknown-pragmas"
15428 # Solaris 11 <unistd.h> marks vfork deprecated.
15429 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
f1628857
TT
15430 *)
15431 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
15432 # but there's a special case for this below.
15433 build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
15434esac
15435
81ecdfbb
RW
15436# Check whether --enable-build-warnings was given.
15437if test "${enable_build_warnings+set}" = set; then :
15438 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
15439 yes) ;;
15440 no) build_warnings="-w";;
15441 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15442 build_warnings="${build_warnings} ${t}";;
15443 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15444 build_warnings="${t} ${build_warnings}";;
15445 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15446esac
d4f3574e 15447if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 15448 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 15449fi
81ecdfbb
RW
15450fi
15451# Check whether --enable-gdb-build-warnings was given.
15452if test "${enable_gdb_build_warnings+set}" = set; then :
15453 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
15454 yes) ;;
15455 no) build_warnings="-w";;
15456 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15457 build_warnings="${build_warnings} ${t}";;
15458 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15459 build_warnings="${t} ${build_warnings}";;
15460 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15461esac
15462if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15463 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
15464fi
81ecdfbb 15465fi
3bc3d82a
PA
15466
15467# The set of warnings supported by a C++ compiler is not the same as
15468# of the C compiler.
cf6de44d 15469ac_ext=cpp
3bc3d82a
PA
15470ac_cpp='$CXXCPP $CPPFLAGS'
15471ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15472ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15473ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15474
3bc3d82a 15475
81ecdfbb 15476WARN_CFLAGS=""
c906108c
SS
15477if test "x${build_warnings}" != x -a "x$GCC" = xyes
15478then
81ecdfbb
RW
15479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
15480$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
15481 # Separate out the -Werror flag as some files just cannot be
15482 # compiled with it enabled.
15483 for w in ${build_warnings}; do
7544db95
PA
15484 # GCC does not complain about -Wno-unknown-warning. Invert
15485 # and test -Wunknown-warning instead.
15486 case $w in
15487 -Wno-*)
15488 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
f1628857
TT
15489 -Wformat-nonliteral)
15490 # gcc requires -Wformat before -Wformat-nonliteral
15491 # will work, so stick them together.
15492 w="-Wformat $w"
15493 wtest="$w"
15494 ;;
7544db95
PA
15495 *)
15496 wtest=$w ;;
15497 esac
15498
746a987d
AC
15499 case $w in
15500 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
15501 *)
15502 # Check whether GCC accepts it.
4536bbc6 15503 saved_CFLAGS="$CFLAGS"
3e019bdc 15504 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 15505 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 15506 CXXFLAGS="$CXXFLAGS -Werror $wtest"
a0de763e
TT
15507 if test "x$w" = "x-Wunused-variable"; then
15508 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
15509 # fixed in GCC 4.9. This test is derived from the gdb
15510 # source code that triggered this bug in GCC.
15511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15512/* end confdefs.h. */
15513struct scoped_restore_base {};
15514 struct scoped_restore_tmpl : public scoped_restore_base {
15515 ~scoped_restore_tmpl() {}
15516 };
15517int
15518main ()
15519{
15520const scoped_restore_base &b = scoped_restore_tmpl();
15521 ;
15522 return 0;
15523}
15524_ACEOF
15525if ac_fn_cxx_try_compile "$LINENO"; then :
15526 WARN_CFLAGS="${WARN_CFLAGS} $w"
15527fi
15528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15529 else
15530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15531/* end confdefs.h. */
4536bbc6 15532
bec39cab
AC
15533int
15534main ()
15535{
4536bbc6 15536
bec39cab
AC
15537 ;
15538 return 0;
15539}
15540_ACEOF
3bc3d82a 15541if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 15542 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 15543fi
81ecdfbb 15544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a0de763e 15545 fi
4536bbc6 15546 CFLAGS="$saved_CFLAGS"
3bc3d82a 15547 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
15548 esac
15549 done
81ecdfbb
RW
15550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
15551$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
15552fi
15553
15554
104c1213 15555
cf6de44d 15556ac_ext=c
3bc3d82a
PA
15557ac_cpp='$CPP $CPPFLAGS'
15558ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15559ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15560ac_compiler_gnu=$ac_cv_c_compiler_gnu
15561
3bc3d82a 15562
b835bb52 15563
7a292a7a 15564# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
15565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
15566$as_echo_n "checking for cygwin... " >&6; }
d0ac1c44 15567if ${gdb_cv_os_cygwin+:} false; then :
81ecdfbb 15568 $as_echo_n "(cached) " >&6
bec39cab 15569else
81ecdfbb 15570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15571/* end confdefs.h. */
7a292a7a
SS
15572
15573#if defined (__CYGWIN__) || defined (__CYGWIN32__)
15574lose
15575#endif
bec39cab 15576_ACEOF
7a292a7a 15577if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 15578 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
15579 gdb_cv_os_cygwin=yes
15580else
7a292a7a
SS
15581 gdb_cv_os_cygwin=no
15582fi
15583rm -f conftest*
15584
15585fi
81ecdfbb
RW
15586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
15587$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 15588
aff38e61 15589
3eb25fda 15590SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 15591case ${host} in
95cbc983
AC
15592 *go32* ) SER_HARDWIRE=ser-go32.o ;;
15593 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 15594 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
15595esac
15596
15597
cd0fc7c3
SS
15598# libreadline needs libuser32.a in a cygwin environment
15599WIN32LIBS=
15600if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
15601 WIN32LIBS="-luser32"
15602 case "${target}" in
15603 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15604 ;;
15605 esac
cd0fc7c3 15606fi
c906108c 15607
b4505029
MM
15608# The ser-tcp.c module requires sockets.
15609case ${host} in
15610 *mingw32*)
15611
81ecdfbb 15612$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
15613
15614 WIN32LIBS="$WIN32LIBS -lws2_32"
15615 ;;
15616esac
15617
7a292a7a 15618
31d99776 15619# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
15620
15621 OLD_CFLAGS=$CFLAGS
15622 OLD_LDFLAGS=$LDFLAGS
15623 OLD_LIBS=$LIBS
15624 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15625 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15626 # always want our bfd.
15627 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15628 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15629 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 15630 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15631 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 15632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb 15633$as_echo_n "checking for ELF support in BFD... " >&6; }
d0ac1c44 15634if ${gdb_cv_var_elf+:} false; then :
81ecdfbb 15635 $as_echo_n "(cached) " >&6
31d99776 15636else
81ecdfbb 15637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
15638/* end confdefs.h. */
15639#include <stdlib.h>
def63ff0
TT
15640 #include "bfd.h"
15641 #include "elf-bfd.h"
31d99776
DJ
15642
15643int
15644main ()
15645{
def63ff0 15646return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
15647 ;
15648 return 0;
15649}
15650_ACEOF
81ecdfbb 15651if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
15652 gdb_cv_var_elf=yes
15653else
81ecdfbb 15654 gdb_cv_var_elf=no
31d99776 15655fi
81ecdfbb
RW
15656rm -f core conftest.err conftest.$ac_objext \
15657 conftest$ac_exeext conftest.$ac_ext
31d99776 15658fi
81ecdfbb
RW
15659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15660$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
15661 CFLAGS=$OLD_CFLAGS
15662 LDFLAGS=$OLD_LDFLAGS
15663 LIBS=$OLD_LIBS
31d99776 15664if test $gdb_cv_var_elf = yes; then
d4777acb 15665 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 15666
81ecdfbb 15667$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 15668
075ff26d
JK
15669 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15670 if test "$plugins" = "yes"; then
a48b32c0
L
15671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
15672$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 15673if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15674 $as_echo_n "(cached) " >&6
15675else
15676 ac_func_search_save_LIBS=$LIBS
15677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15678/* end confdefs.h. */
15679
15680/* Override any GCC internal prototype to avoid an error.
15681 Use char because int might match the return type of a GCC
15682 builtin and then its argument prototype would still apply. */
15683#ifdef __cplusplus
15684extern "C"
15685#endif
15686char dlopen ();
15687int
15688main ()
15689{
15690return dlopen ();
15691 ;
15692 return 0;
15693}
15694_ACEOF
15695for ac_lib in '' dl; do
15696 if test -z "$ac_lib"; then
15697 ac_res="none required"
15698 else
15699 ac_res=-l$ac_lib
15700 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15701 fi
15702 if ac_fn_c_try_link "$LINENO"; then :
15703 ac_cv_search_dlopen=$ac_res
15704fi
15705rm -f core conftest.err conftest.$ac_objext \
15706 conftest$ac_exeext
d0ac1c44 15707 if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15708 break
15709fi
15710done
d0ac1c44 15711if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15712
15713else
15714 ac_cv_search_dlopen=no
15715fi
15716rm conftest.$ac_ext
15717LIBS=$ac_func_search_save_LIBS
15718fi
15719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
15720$as_echo "$ac_cv_search_dlopen" >&6; }
15721ac_res=$ac_cv_search_dlopen
15722if test "$ac_res" != no; then :
15723 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15724
15725fi
15726
075ff26d 15727 fi
31d99776 15728fi
31d99776 15729
4f05add4
TT
15730# Add macho support to GDB, but only if BFD includes it.
15731
15732 OLD_CFLAGS=$CFLAGS
15733 OLD_LDFLAGS=$LDFLAGS
15734 OLD_LIBS=$LIBS
15735 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15736 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15737 # always want our bfd.
15738 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15739 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15740 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 15741 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15742 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
15743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
15744$as_echo_n "checking for Mach-O support in BFD... " >&6; }
d0ac1c44 15745if ${gdb_cv_var_macho+:} false; then :
4f05add4
TT
15746 $as_echo_n "(cached) " >&6
15747else
15748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15749/* end confdefs.h. */
15750#include <stdlib.h>
15751 #include "bfd.h"
15752 #include "mach-o.h"
15753
15754int
15755main ()
15756{
15757return bfd_mach_o_lookup_command (NULL, 0, NULL);
15758 ;
15759 return 0;
15760}
15761_ACEOF
15762if ac_fn_c_try_link "$LINENO"; then :
15763 gdb_cv_var_macho=yes
15764else
15765 gdb_cv_var_macho=no
15766fi
15767rm -f core conftest.err conftest.$ac_objext \
15768 conftest$ac_exeext conftest.$ac_ext
15769fi
15770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
15771$as_echo "$gdb_cv_var_macho" >&6; }
15772 CFLAGS=$OLD_CFLAGS
15773 LDFLAGS=$OLD_LDFLAGS
15774 LIBS=$OLD_LIBS
15775if test $gdb_cv_var_macho = yes; then
15776 CONFIG_OBS="$CONFIG_OBS machoread.o"
15777fi
15778
121ce6e5
DJ
15779# Add any host-specific objects to GDB.
15780CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15781
608e2dbb
TT
15782# If building on ELF, look for lzma support for embedded compressed debug info.
15783if test $gdb_cv_var_elf = yes; then
15784
15785# Check whether --with-lzma was given.
15786if test "${with_lzma+set}" = set; then :
15787 withval=$with_lzma;
15788else
15789 with_lzma=auto
15790fi
15791
15792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
15793$as_echo_n "checking whether to use lzma... " >&6; }
15794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
15795$as_echo "$with_lzma" >&6; }
15796
15797 if test "${with_lzma}" != no; then
15798
15799
15800
15801
15802
15803
15804
15805
15806 use_additional=yes
15807
15808 acl_save_prefix="$prefix"
15809 prefix="$acl_final_prefix"
15810 acl_save_exec_prefix="$exec_prefix"
15811 exec_prefix="$acl_final_exec_prefix"
15812
15813 eval additional_includedir=\"$includedir\"
15814 eval additional_libdir=\"$libdir\"
15815
15816 exec_prefix="$acl_save_exec_prefix"
15817 prefix="$acl_save_prefix"
15818
15819
15820# Check whether --with-liblzma-prefix was given.
15821if test "${with_liblzma_prefix+set}" = set; then :
15822 withval=$with_liblzma_prefix;
15823 if test "X$withval" = "Xno"; then
15824 use_additional=no
15825 else
15826 if test "X$withval" = "X"; then
15827
15828 acl_save_prefix="$prefix"
15829 prefix="$acl_final_prefix"
15830 acl_save_exec_prefix="$exec_prefix"
15831 exec_prefix="$acl_final_exec_prefix"
15832
15833 eval additional_includedir=\"$includedir\"
15834 eval additional_libdir=\"$libdir\"
15835
15836 exec_prefix="$acl_save_exec_prefix"
15837 prefix="$acl_save_prefix"
15838
15839 else
15840 additional_includedir="$withval/include"
15841 additional_libdir="$withval/lib"
15842 fi
15843 fi
15844
15845fi
15846
15847 LIBLZMA=
15848 LTLIBLZMA=
15849 INCLZMA=
15850 rpathdirs=
15851 ltrpathdirs=
15852 names_already_handled=
15853 names_next_round='lzma '
15854 while test -n "$names_next_round"; do
15855 names_this_round="$names_next_round"
15856 names_next_round=
15857 for name in $names_this_round; do
15858 already_handled=
15859 for n in $names_already_handled; do
15860 if test "$n" = "$name"; then
15861 already_handled=yes
15862 break
15863 fi
15864 done
15865 if test -z "$already_handled"; then
15866 names_already_handled="$names_already_handled $name"
15867 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
15868 eval value=\"\$HAVE_LIB$uppername\"
15869 if test -n "$value"; then
15870 if test "$value" = yes; then
15871 eval value=\"\$LIB$uppername\"
15872 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
15873 eval value=\"\$LTLIB$uppername\"
15874 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
15875 else
15876 :
15877 fi
15878 else
15879 found_dir=
15880 found_la=
15881 found_so=
15882 found_a=
15883 if test $use_additional = yes; then
15884 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
15885 found_dir="$additional_libdir"
15886 found_so="$additional_libdir/lib$name.$shlibext"
15887 if test -f "$additional_libdir/lib$name.la"; then
15888 found_la="$additional_libdir/lib$name.la"
15889 fi
15890 else
15891 if test -f "$additional_libdir/lib$name.$libext"; then
15892 found_dir="$additional_libdir"
15893 found_a="$additional_libdir/lib$name.$libext"
15894 if test -f "$additional_libdir/lib$name.la"; then
15895 found_la="$additional_libdir/lib$name.la"
15896 fi
15897 fi
15898 fi
15899 fi
15900 if test "X$found_dir" = "X"; then
15901 for x in $LDFLAGS $LTLIBLZMA; do
15902
15903 acl_save_prefix="$prefix"
15904 prefix="$acl_final_prefix"
15905 acl_save_exec_prefix="$exec_prefix"
15906 exec_prefix="$acl_final_exec_prefix"
15907 eval x=\"$x\"
15908 exec_prefix="$acl_save_exec_prefix"
15909 prefix="$acl_save_prefix"
15910
15911 case "$x" in
15912 -L*)
15913 dir=`echo "X$x" | sed -e 's/^X-L//'`
15914 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
15915 found_dir="$dir"
15916 found_so="$dir/lib$name.$shlibext"
15917 if test -f "$dir/lib$name.la"; then
15918 found_la="$dir/lib$name.la"
15919 fi
15920 else
15921 if test -f "$dir/lib$name.$libext"; then
15922 found_dir="$dir"
15923 found_a="$dir/lib$name.$libext"
15924 if test -f "$dir/lib$name.la"; then
15925 found_la="$dir/lib$name.la"
15926 fi
15927 fi
15928 fi
15929 ;;
15930 esac
15931 if test "X$found_dir" != "X"; then
15932 break
15933 fi
15934 done
15935 fi
15936 if test "X$found_dir" != "X"; then
15937 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
15938 if test "X$found_so" != "X"; then
15939 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
15940 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15941 else
15942 haveit=
15943 for x in $ltrpathdirs; do
15944 if test "X$x" = "X$found_dir"; then
15945 haveit=yes
15946 break
15947 fi
15948 done
15949 if test -z "$haveit"; then
15950 ltrpathdirs="$ltrpathdirs $found_dir"
15951 fi
15952 if test "$hardcode_direct" = yes; then
15953 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15954 else
15955 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
15956 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15957 haveit=
15958 for x in $rpathdirs; do
15959 if test "X$x" = "X$found_dir"; then
15960 haveit=yes
15961 break
15962 fi
15963 done
15964 if test -z "$haveit"; then
15965 rpathdirs="$rpathdirs $found_dir"
15966 fi
15967 else
15968 haveit=
15969 for x in $LDFLAGS $LIBLZMA; do
15970
15971 acl_save_prefix="$prefix"
15972 prefix="$acl_final_prefix"
15973 acl_save_exec_prefix="$exec_prefix"
15974 exec_prefix="$acl_final_exec_prefix"
15975 eval x=\"$x\"
15976 exec_prefix="$acl_save_exec_prefix"
15977 prefix="$acl_save_prefix"
15978
15979 if test "X$x" = "X-L$found_dir"; then
15980 haveit=yes
15981 break
15982 fi
15983 done
15984 if test -z "$haveit"; then
15985 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
15986 fi
15987 if test "$hardcode_minus_L" != no; then
15988 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15989 else
15990 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
15991 fi
15992 fi
15993 fi
15994 fi
15995 else
15996 if test "X$found_a" != "X"; then
15997 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
15998 else
15999 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
16000 fi
16001 fi
16002 additional_includedir=
16003 case "$found_dir" in
16004 */lib | */lib/)
16005 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16006 additional_includedir="$basedir/include"
16007 ;;
16008 esac
16009 if test "X$additional_includedir" != "X"; then
16010 if test "X$additional_includedir" != "X/usr/include"; then
16011 haveit=
16012 if test "X$additional_includedir" = "X/usr/local/include"; then
16013 if test -n "$GCC"; then
16014 case $host_os in
16015 linux*) haveit=yes;;
16016 esac
16017 fi
16018 fi
16019 if test -z "$haveit"; then
16020 for x in $CPPFLAGS $INCLZMA; do
16021
16022 acl_save_prefix="$prefix"
16023 prefix="$acl_final_prefix"
16024 acl_save_exec_prefix="$exec_prefix"
16025 exec_prefix="$acl_final_exec_prefix"
16026 eval x=\"$x\"
16027 exec_prefix="$acl_save_exec_prefix"
16028 prefix="$acl_save_prefix"
16029
16030 if test "X$x" = "X-I$additional_includedir"; then
16031 haveit=yes
16032 break
16033 fi
16034 done
16035 if test -z "$haveit"; then
16036 if test -d "$additional_includedir"; then
16037 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
16038 fi
16039 fi
16040 fi
16041 fi
16042 fi
16043 if test -n "$found_la"; then
16044 save_libdir="$libdir"
16045 case "$found_la" in
16046 */* | *\\*) . "$found_la" ;;
16047 *) . "./$found_la" ;;
16048 esac
16049 libdir="$save_libdir"
16050 for dep in $dependency_libs; do
16051 case "$dep" in
16052 -L*)
16053 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16054 if test "X$additional_libdir" != "X/usr/lib"; then
16055 haveit=
16056 if test "X$additional_libdir" = "X/usr/local/lib"; then
16057 if test -n "$GCC"; then
16058 case $host_os in
16059 linux*) haveit=yes;;
16060 esac
16061 fi
16062 fi
16063 if test -z "$haveit"; then
16064 haveit=
16065 for x in $LDFLAGS $LIBLZMA; do
16066
16067 acl_save_prefix="$prefix"
16068 prefix="$acl_final_prefix"
16069 acl_save_exec_prefix="$exec_prefix"
16070 exec_prefix="$acl_final_exec_prefix"
16071 eval x=\"$x\"
16072 exec_prefix="$acl_save_exec_prefix"
16073 prefix="$acl_save_prefix"
16074
16075 if test "X$x" = "X-L$additional_libdir"; then
16076 haveit=yes
16077 break
16078 fi
16079 done
16080 if test -z "$haveit"; then
16081 if test -d "$additional_libdir"; then
16082 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
16083 fi
16084 fi
16085 haveit=
16086 for x in $LDFLAGS $LTLIBLZMA; do
16087
16088 acl_save_prefix="$prefix"
16089 prefix="$acl_final_prefix"
16090 acl_save_exec_prefix="$exec_prefix"
16091 exec_prefix="$acl_final_exec_prefix"
16092 eval x=\"$x\"
16093 exec_prefix="$acl_save_exec_prefix"
16094 prefix="$acl_save_prefix"
16095
16096 if test "X$x" = "X-L$additional_libdir"; then
16097 haveit=yes
16098 break
16099 fi
16100 done
16101 if test -z "$haveit"; then
16102 if test -d "$additional_libdir"; then
16103 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
16104 fi
16105 fi
16106 fi
16107 fi
16108 ;;
16109 -R*)
16110 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16111 if test "$enable_rpath" != no; then
16112 haveit=
16113 for x in $rpathdirs; do
16114 if test "X$x" = "X$dir"; then
16115 haveit=yes
16116 break
16117 fi
16118 done
16119 if test -z "$haveit"; then
16120 rpathdirs="$rpathdirs $dir"
16121 fi
16122 haveit=
16123 for x in $ltrpathdirs; do
16124 if test "X$x" = "X$dir"; then
16125 haveit=yes
16126 break
16127 fi
16128 done
16129 if test -z "$haveit"; then
16130 ltrpathdirs="$ltrpathdirs $dir"
16131 fi
16132 fi
16133 ;;
16134 -l*)
16135 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16136 ;;
16137 *.la)
16138 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16139 ;;
16140 *)
16141 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
16142 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
16143 ;;
16144 esac
16145 done
16146 fi
16147 else
16148 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16149 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
16150 fi
16151 fi
16152 fi
16153 done
16154 done
16155 if test "X$rpathdirs" != "X"; then
16156 if test -n "$hardcode_libdir_separator"; then
16157 alldirs=
16158 for found_dir in $rpathdirs; do
16159 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16160 done
16161 acl_save_libdir="$libdir"
16162 libdir="$alldirs"
16163 eval flag=\"$hardcode_libdir_flag_spec\"
16164 libdir="$acl_save_libdir"
16165 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16166 else
16167 for found_dir in $rpathdirs; do
16168 acl_save_libdir="$libdir"
16169 libdir="$found_dir"
16170 eval flag=\"$hardcode_libdir_flag_spec\"
16171 libdir="$acl_save_libdir"
16172 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16173 done
16174 fi
16175 fi
16176 if test "X$ltrpathdirs" != "X"; then
16177 for found_dir in $ltrpathdirs; do
16178 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
16179 done
16180 fi
16181
16182
16183 ac_save_CPPFLAGS="$CPPFLAGS"
16184
16185 for element in $INCLZMA; do
16186 haveit=
16187 for x in $CPPFLAGS; do
16188
16189 acl_save_prefix="$prefix"
16190 prefix="$acl_final_prefix"
16191 acl_save_exec_prefix="$exec_prefix"
16192 exec_prefix="$acl_final_exec_prefix"
16193 eval x=\"$x\"
16194 exec_prefix="$acl_save_exec_prefix"
16195 prefix="$acl_save_prefix"
16196
16197 if test "X$x" = "X$element"; then
16198 haveit=yes
16199 break
16200 fi
16201 done
16202 if test -z "$haveit"; then
16203 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16204 fi
16205 done
16206
16207
16208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
16209$as_echo_n "checking for liblzma... " >&6; }
d0ac1c44 16210if ${ac_cv_liblzma+:} false; then :
608e2dbb
TT
16211 $as_echo_n "(cached) " >&6
16212else
16213
16214 ac_save_LIBS="$LIBS"
16215 LIBS="$LIBS $LIBLZMA"
16216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16217/* end confdefs.h. */
16218#include "lzma.h"
16219int
16220main ()
16221{
16222lzma_index_iter iter;
16223 lzma_index_iter_init (&iter, 0);
16224 lzma_mf_is_supported (LZMA_MF_HC3);
16225 ;
16226 return 0;
16227}
16228_ACEOF
16229if ac_fn_c_try_link "$LINENO"; then :
16230 ac_cv_liblzma=yes
16231else
16232 ac_cv_liblzma=no
16233fi
16234rm -f core conftest.err conftest.$ac_objext \
16235 conftest$ac_exeext conftest.$ac_ext
16236 LIBS="$ac_save_LIBS"
16237
16238fi
16239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
16240$as_echo "$ac_cv_liblzma" >&6; }
16241 if test "$ac_cv_liblzma" = yes; then
16242 HAVE_LIBLZMA=yes
16243
16244$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
16245
16246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
16247$as_echo_n "checking how to link with liblzma... " >&6; }
16248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
16249$as_echo "$LIBLZMA" >&6; }
16250 else
16251 HAVE_LIBLZMA=no
16252 CPPFLAGS="$ac_save_CPPFLAGS"
16253 LIBLZMA=
16254 LTLIBLZMA=
16255 fi
16256
16257
16258
16259
16260
16261
16262 if test "$HAVE_LIBLZMA" != yes; then
16263 if test "$with_lzma" = yes; then
d0ac1c44 16264 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
608e2dbb
TT
16265 fi
16266 fi
16267 fi
16268fi
16269
3fc11d3e
JM
16270LIBGUI="../libgui/src/libgui.a"
16271GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
16272
16273
7a292a7a 16274
3fc11d3e
JM
16275WIN32LDAPP=
16276
16277
16278
d91670b9 16279case "${host}" in
686a5eed 16280*-*-cygwin* | *-*-mingw* )
d91670b9
CV
16281 configdir="win"
16282 ;;
16283*)
16284 configdir="unix"
16285 ;;
16286esac
3fc11d3e
JM
16287
16288GDBTKLIBS=
16289if test "${enable_gdbtk}" = "yes"; then
16290
d1c3b63a
KS
16291 # Gdbtk must have an absolute path to srcdir in order to run
16292 # properly when not installed.
16293 here=`pwd`
16294 cd ${srcdir}
16295 GDBTK_SRC_DIR=`pwd`
16296 cd $here
16297
bec39cab 16298
5062cc19
KS
16299 #
16300 # Ok, lets find the tcl configuration
16301 # First, look for one uninstalled.
16302 # the alternative search directory is invoked by --with-tcl
16303 #
3fc11d3e 16304
5062cc19
KS
16305 if test x"${no_tcl}" = x ; then
16306 # we reset no_tcl in case something fails here
16307 no_tcl=true
bec39cab 16308
81ecdfbb
RW
16309# Check whether --with-tcl was given.
16310if test "${with_tcl+set}" = set; then :
16311 withval=$with_tcl; with_tclconfig=${withval}
16312fi
16313
16314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
16315$as_echo_n "checking for Tcl configuration... " >&6; }
d0ac1c44 16316 if ${ac_cv_c_tclconfig+:} false; then :
81ecdfbb 16317 $as_echo_n "(cached) " >&6
3fc11d3e 16318else
bec39cab 16319
3fc11d3e 16320
5062cc19
KS
16321 # First check to see if --with-tcl was specified.
16322 case "${host}" in
16323 *-*-cygwin*) platDir="win" ;;
16324 *) platDir="unix" ;;
16325 esac
16326 if test x"${with_tclconfig}" != x ; then
16327 if test -f "${with_tclconfig}/tclConfig.sh" ; then
16328 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
16329 else
d0ac1c44 16330 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
16331 fi
16332 fi
16333
16334 # then check for a private Tcl installation
16335 if test x"${ac_cv_c_tclconfig}" = x ; then
16336 for i in \
16337 ../tcl \
16338 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16339 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
16340 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
16341 ../../tcl \
16342 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16343 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
16344 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
16345 ../../../tcl \
16346 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16347 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
16348 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
16349 if test -f "$i/$platDir/tclConfig.sh" ; then
16350 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16351 break
16352 fi
16353 done
16354 fi
16355
16356 # on Darwin, check in Framework installation locations
16357 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
16358 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16359 `ls -d /Library/Frameworks 2>/dev/null` \
16360 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16361 `ls -d /System/Library/Frameworks 2>/dev/null` \
16362 ; do
16363 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
16364 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
16365 break
16366 fi
16367 done
16368 fi
16369
16370 # check in a few common install locations
16371 if test x"${ac_cv_c_tclconfig}" = x ; then
16372 for i in `ls -d ${libdir} 2>/dev/null` \
16373 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16374 `ls -d ${prefix}/lib 2>/dev/null` \
16375 `ls -d /usr/local/lib 2>/dev/null` \
16376 `ls -d /usr/contrib/lib 2>/dev/null` \
16377 `ls -d /usr/lib 2>/dev/null` \
16378 ; do
16379 if test -f "$i/tclConfig.sh" ; then
16380 ac_cv_c_tclconfig=`(cd $i; pwd)`
16381 break
16382 fi
16383 done
16384 fi
3fc11d3e 16385
5062cc19
KS
16386 # check in a few other private locations
16387 if test x"${ac_cv_c_tclconfig}" = x ; then
16388 for i in \
16389 ${srcdir}/../tcl \
16390 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16391 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
16392 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
16393 if test -f "$i/$platDir/tclConfig.sh" ; then
16394 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16395 break
16396 fi
16397 done
16398 fi
bec39cab 16399
3fc11d3e
JM
16400fi
16401
5062cc19
KS
16402
16403 if test x"${ac_cv_c_tclconfig}" = x ; then
16404 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
16405 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
16406$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
16407 else
16408 no_tcl=
16409 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
16410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
16411$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
16412 fi
16413 fi
3fc11d3e 16414
bec39cab 16415
85541719
DE
16416 # If $no_tk is nonempty, then we can't do Tk, and there is no
16417 # point to doing Tcl.
bec39cab 16418
5062cc19
KS
16419 #
16420 # Ok, lets find the tk configuration
16421 # First, look for one uninstalled.
16422 # the alternative search directory is invoked by --with-tk
16423 #
3fc11d3e 16424
5062cc19
KS
16425 if test x"${no_tk}" = x ; then
16426 # we reset no_tk in case something fails here
16427 no_tk=true
bec39cab 16428
81ecdfbb
RW
16429# Check whether --with-tk was given.
16430if test "${with_tk+set}" = set; then :
16431 withval=$with_tk; with_tkconfig=${withval}
16432fi
16433
16434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
16435$as_echo_n "checking for Tk configuration... " >&6; }
d0ac1c44 16436 if ${ac_cv_c_tkconfig+:} false; then :
81ecdfbb 16437 $as_echo_n "(cached) " >&6
bec39cab 16438else
3fc11d3e
JM
16439
16440
5062cc19
KS
16441 # First check to see if --with-tkconfig was specified.
16442 if test x"${with_tkconfig}" != x ; then
16443 if test -f "${with_tkconfig}/tkConfig.sh" ; then
16444 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
16445 else
d0ac1c44 16446 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
16447 fi
16448 fi
3fc11d3e 16449
5062cc19
KS
16450 # then check for a private Tk library
16451 case "${host}" in
16452 *-*-cygwin*) platDir="win" ;;
16453 *) platDir="unix" ;;
16454 esac
16455 if test x"${ac_cv_c_tkconfig}" = x ; then
16456 for i in \
16457 ../tk \
16458 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16459 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
16460 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
16461 ../../tk \
16462 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16463 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
16464 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
16465 ../../../tk \
16466 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16467 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
16468 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
16469 if test -f "$i/$platDir/tkConfig.sh" ; then
16470 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16471 break
16472 fi
16473 done
16474 fi
16475
16476 # on Darwin, check in Framework installation locations
16477 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
16478 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16479 `ls -d /Library/Frameworks 2>/dev/null` \
16480 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16481 `ls -d /System/Library/Frameworks 2>/dev/null` \
16482 ; do
16483 if test -f "$i/Tk.framework/tkConfig.sh" ; then
16484 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
16485 break
16486 fi
16487 done
16488 fi
16489
16490 # check in a few common install locations
16491 if test x"${ac_cv_c_tkconfig}" = x ; then
16492 for i in `ls -d ${libdir} 2>/dev/null` \
16493 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16494 `ls -d ${prefix}/lib 2>/dev/null` \
16495 `ls -d /usr/local/lib 2>/dev/null` \
16496 `ls -d /usr/contrib/lib 2>/dev/null` \
16497 `ls -d /usr/lib 2>/dev/null` \
16498 ; do
16499 if test -f "$i/tkConfig.sh" ; then
16500 ac_cv_c_tkconfig=`(cd $i; pwd)`
16501 break
16502 fi
16503 done
16504 fi
16505 # check in a few other private locations
16506 if test x"${ac_cv_c_tkconfig}" = x ; then
16507 for i in \
16508 ${srcdir}/../tk \
16509 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16510 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
16511 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
16512 if test -f "$i/$platDir/tkConfig.sh" ; then
16513 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16514 break
16515 fi
16516 done
16517 fi
3fc11d3e 16518
3fc11d3e
JM
16519fi
16520
16521
5062cc19
KS
16522 if test x"${ac_cv_c_tkconfig}" = x ; then
16523 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
16524 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
16525$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
16526 else
16527 no_tk=
16528 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
16529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
16530$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 16531 fi
3fc11d3e 16532 fi
dd2504ab 16533
dd2504ab 16534
85541719
DE
16535 if test -z "${no_tcl}" -a -z "${no_tk}"; then
16536
81ecdfbb
RW
16537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
16538$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
16539
16540 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
16541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16542$as_echo "loading" >&6; }
85541719
DE
16543 . ${TCL_BIN_DIR}/tclConfig.sh
16544 else
81ecdfbb
RW
16545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
16546$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
16547 fi
16548
16549 # eval is required to do the TCL_DBGX substitution
16550 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
16551 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
16552
16553 # If the TCL_BIN_DIR is the build directory (not the install directory),
16554 # then set the common variable name to the value of the build variables.
16555 # For example, the variable TCL_LIB_SPEC will be set to the value
16556 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
16557 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
16558 # installed and uninstalled version of Tcl.
16559 if test -f "${TCL_BIN_DIR}/Makefile" ; then
16560 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
16561 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
16562 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
16563 elif test "`uname -s`" = "Darwin"; then
16564 # If Tcl was built as a framework, attempt to use the libraries
16565 # from the framework at the given location so that linking works
a68ffae9 16566 # against Tcl.framework installed in an arbitrary location.
85541719
DE
16567 case ${TCL_DEFS} in
16568 *TCL_FRAMEWORK*)
16569 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
16570 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
16571 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
16572 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
16573 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
16574 break
16575 fi
16576 done
16577 fi
16578 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
16579 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
16580 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
16581 fi
16582 ;;
16583 esac
16584 fi
16585
16586 # eval is required to do the TCL_DBGX substitution
16587 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
16588 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
16589 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
16590 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
16591
16592
16593
16594
16595
16596
16597
16598
16599
16600
16601
16602
16603
16604
16605
16606 # Check for in-tree tcl
16607 here=`pwd`
16608 cd ${srcdir}/..
16609 topdir=`pwd`
16610 cd ${here}
16611
16612 intree="no"
16613 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
16614 intree="yes"
16615 fi
16616
16617 # Find Tcl private headers
16618 if test x"${intree}" = xno; then
16619
81ecdfbb
RW
16620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
16621$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
16622 private_dir=""
16623 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
16624 if test -f ${dir}/tclInt.h ; then
16625 private_dir=${dir}
16626 fi
16627
16628 if test x"${private_dir}" = x; then
d0ac1c44 16629 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
85541719
DE
16630 else
16631 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16633$as_echo "${private_dir}" >&6; }
85541719
DE
16634 fi
16635
16636 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
16637 TCL_LIBRARY="${TCL_LIB_SPEC}"
16638 TCL_DEPS=""
16639 else
16640 # If building tcl in the same src tree, private headers
16641 # are not needed, but we need to be sure to use the right
16642 # headers library
16643 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
16644 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
16645 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
16646 fi
16647
16648
16649
16650
16651
81ecdfbb
RW
16652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
16653$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 16654
5062cc19 16655 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
16656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16657$as_echo "loading" >&6; }
5062cc19 16658 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 16659 else
81ecdfbb
RW
16660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
16661$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 16662 fi
bec39cab 16663
5062cc19
KS
16664 # eval is required to do the TK_DBGX substitution
16665 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
16666 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
16667
16668 # If the TK_BIN_DIR is the build directory (not the install directory),
16669 # then set the common variable name to the value of the build variables.
16670 # For example, the variable TK_LIB_SPEC will be set to the value
16671 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
16672 # instead of TK_BUILD_LIB_SPEC since it will work with both an
16673 # installed and uninstalled version of Tcl.
85541719 16674 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
16675 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
16676 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
16677 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
16678 elif test "`uname -s`" = "Darwin"; then
16679 # If Tk was built as a framework, attempt to use the libraries
16680 # from the framework at the given location so that linking works
a68ffae9 16681 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
16682 case ${TK_DEFS} in
16683 *TK_FRAMEWORK*)
85541719 16684 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
16685 for i in "`cd ${TK_BIN_DIR}; pwd`" \
16686 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
16687 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
16688 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
16689 break
16690 fi
16691 done
16692 fi
85541719 16693 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
16694 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
16695 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
16696 fi
16697 ;;
16698 esac
3fc11d3e
JM
16699 fi
16700
5062cc19
KS
16701 # eval is required to do the TK_DBGX substitution
16702 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
16703 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
16704 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
16705 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 16706
3fc11d3e
JM
16707
16708
bec39cab
AC
16709
16710
16711
16712
16713
16714
16715
3fc11d3e 16716
3fc11d3e 16717
bec39cab 16718
bec39cab 16719
85541719
DE
16720 # Check for in-tree Tk
16721 intree="no"
16722 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
16723 intree="yes"
16724 fi
3fc11d3e 16725
85541719
DE
16726 # Find Tk private headers
16727 if test x"${intree}" = xno; then
3fc11d3e 16728
81ecdfbb
RW
16729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
16730$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
16731 private_dir=""
16732 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
16733 if test -f ${dir}/tkInt.h; then
16734 private_dir=${dir}
3fc11d3e 16735 fi
bec39cab 16736
5062cc19 16737 if test x"${private_dir}" = x; then
d0ac1c44 16738 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
3fc11d3e 16739 else
5062cc19 16740 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16742$as_echo "${private_dir}" >&6; }
3fc11d3e 16743 fi
3fc11d3e 16744
85541719
DE
16745 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
16746 TK_LIBRARY=${TK_LIB_SPEC}
16747 TK_DEPS=""
16748 else
16749 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
16750 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
16751 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
16752 fi
3fc11d3e
JM
16753
16754
3fc11d3e
JM
16755
16756
3fc11d3e 16757
85541719 16758 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 16759
85541719
DE
16760 # Include some libraries that Tcl and Tk want.
16761 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
16762 # Yes, the ordering seems wrong here. But it isn't.
16763 # TK_LIBS is the list of libraries that need to be linked
16764 # after Tcl/Tk. Note that this isn't put into LIBS. If it
16765 # were in LIBS then any link tests after this point would
16766 # try to include things like `$(LIBGUI)', which wouldn't work.
16767 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 16768
85541719
DE
16769 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
16770 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
16771 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
16772 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
16773 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
16774 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
16775 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 16776
85541719
DE
16777 if test x$gdb_cv_os_cygwin = xyes; then
16778 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
16779 WIN32LDAPP="-Wl,--subsystem,console"
16780 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 16781 fi
ffc6a242 16782
81ecdfbb 16783 subdirs="$subdirs gdbtk"
3ace7edb 16784
85541719 16785 fi
3fc11d3e
JM
16786fi
16787
16788
16789
16790
16791
16792
16793
16794
81ecdfbb
RW
16795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
16796$as_echo_n "checking for X... " >&6; }
bec39cab 16797
c906108c 16798
81ecdfbb
RW
16799# Check whether --with-x was given.
16800if test "${with_x+set}" = set; then :
16801 withval=$with_x;
16802fi
c906108c
SS
16803
16804# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
16805if test "x$with_x" = xno; then
16806 # The user explicitly disabled X.
16807 have_x=disabled
16808else
81ecdfbb 16809 case $x_includes,$x_libraries in #(
d0ac1c44
SM
16810 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
16811 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
81ecdfbb 16812 $as_echo_n "(cached) " >&6
c906108c
SS
16813else
16814 # One or both of the vars are not set, and there is no cached value.
bec39cab 16815ac_x_includes=no ac_x_libraries=no
81ecdfbb 16816rm -f -r conftest.dir
bec39cab
AC
16817if mkdir conftest.dir; then
16818 cd conftest.dir
bec39cab 16819 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
16820incroot:
16821 @echo incroot='${INCROOT}'
16822usrlibdir:
16823 @echo usrlibdir='${USRLIBDIR}'
16824libdir:
16825 @echo libdir='${LIBDIR}'
16826_ACEOF
16827 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
d0ac1c44 16828 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
81ecdfbb
RW
16829 for ac_var in incroot usrlibdir libdir; do
16830 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
16831 done
c906108c 16832 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
16833 for ac_extension in a so sl dylib la dll; do
16834 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
16835 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 16836 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
16837 fi
16838 done
16839 # Screen out bogus values from the imake configuration. They are
16840 # bogus both because they are the default anyway, and because
16841 # using them would break gcc on systems where it needs fixed includes.
bec39cab 16842 case $ac_im_incroot in
81ecdfbb 16843 /usr/include) ac_x_includes= ;;
bec39cab 16844 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 16845 esac
bec39cab 16846 case $ac_im_usrlibdir in
81ecdfbb 16847 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 16848 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
16849 esac
16850 fi
16851 cd ..
81ecdfbb 16852 rm -f -r conftest.dir
c906108c
SS
16853fi
16854
bec39cab
AC
16855# Standard set of common directories for X headers.
16856# Check X11 before X11Rn because it is often a symlink to the current release.
16857ac_x_header_dirs='
16858/usr/X11/include
81ecdfbb 16859/usr/X11R7/include
bec39cab
AC
16860/usr/X11R6/include
16861/usr/X11R5/include
16862/usr/X11R4/include
16863
16864/usr/include/X11
81ecdfbb 16865/usr/include/X11R7
bec39cab
AC
16866/usr/include/X11R6
16867/usr/include/X11R5
16868/usr/include/X11R4
16869
16870/usr/local/X11/include
81ecdfbb 16871/usr/local/X11R7/include
bec39cab
AC
16872/usr/local/X11R6/include
16873/usr/local/X11R5/include
16874/usr/local/X11R4/include
16875
16876/usr/local/include/X11
81ecdfbb 16877/usr/local/include/X11R7
bec39cab
AC
16878/usr/local/include/X11R6
16879/usr/local/include/X11R5
16880/usr/local/include/X11R4
16881
16882/usr/X386/include
16883/usr/x386/include
16884/usr/XFree86/include/X11
16885
16886/usr/include
16887/usr/local/include
16888/usr/unsupported/include
16889/usr/athena/include
16890/usr/local/x11r5/include
16891/usr/lpp/Xamples/include
16892
16893/usr/openwin/include
16894/usr/openwin/share/include'
16895
16896if test "$ac_x_includes" = no; then
81ecdfbb 16897 # Guess where to find include files, by looking for Xlib.h.
c906108c 16898 # First, try using that file with no special directory specified.
81ecdfbb 16899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16900/* end confdefs.h. */
81ecdfbb 16901#include <X11/Xlib.h>
bec39cab 16902_ACEOF
81ecdfbb 16903if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
16904 # We can compile using X headers with no special include directory.
16905ac_x_includes=
16906else
bec39cab 16907 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 16908 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
16909 ac_x_includes=$ac_dir
16910 break
16911 fi
16912done
c906108c 16913fi
d0ac1c44 16914rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 16915fi # $ac_x_includes = no
c906108c 16916
bec39cab 16917if test "$ac_x_libraries" = no; then
c906108c 16918 # Check for the libraries.
c906108c
SS
16919 # See if we find them without any special options.
16920 # Don't add to $LIBS permanently.
bec39cab 16921 ac_save_LIBS=$LIBS
81ecdfbb
RW
16922 LIBS="-lX11 $LIBS"
16923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16924/* end confdefs.h. */
81ecdfbb 16925#include <X11/Xlib.h>
bec39cab
AC
16926int
16927main ()
16928{
81ecdfbb 16929XrmInitialize ()
bec39cab
AC
16930 ;
16931 return 0;
16932}
16933_ACEOF
81ecdfbb 16934if ac_fn_c_try_link "$LINENO"; then :
bec39cab 16935 LIBS=$ac_save_LIBS
c906108c
SS
16936# We can link X programs with no special library path.
16937ac_x_libraries=
16938else
81ecdfbb
RW
16939 LIBS=$ac_save_LIBS
16940for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 16941do
bec39cab 16942 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
16943 for ac_extension in a so sl dylib la dll; do
16944 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
16945 ac_x_libraries=$ac_dir
16946 break 2
16947 fi
16948 done
16949done
16950fi
81ecdfbb
RW
16951rm -f core conftest.err conftest.$ac_objext \
16952 conftest$ac_exeext conftest.$ac_ext
bec39cab 16953fi # $ac_x_libraries = no
c906108c 16954
81ecdfbb
RW
16955case $ac_x_includes,$ac_x_libraries in #(
16956 no,* | *,no | *\'*)
16957 # Didn't find X, or a directory has "'" in its name.
16958 ac_cv_have_x="have_x=no";; #(
16959 *)
16960 # Record where we found X for the cache.
16961 ac_cv_have_x="have_x=yes\
16962 ac_x_includes='$ac_x_includes'\
16963 ac_x_libraries='$ac_x_libraries'"
16964esac
c906108c 16965fi
81ecdfbb
RW
16966;; #(
16967 *) have_x=yes;;
16968 esac
c906108c
SS
16969 eval "$ac_cv_have_x"
16970fi # $with_x != no
16971
16972if test "$have_x" != yes; then
81ecdfbb
RW
16973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
16974$as_echo "$have_x" >&6; }
c906108c
SS
16975 no_x=yes
16976else
16977 # If each of the values was on the command line, it overrides each guess.
16978 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
16979 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
16980 # Update the cache value to reflect the command line values.
81ecdfbb
RW
16981 ac_cv_have_x="have_x=yes\
16982 ac_x_includes='$x_includes'\
16983 ac_x_libraries='$x_libraries'"
16984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
16985$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
16986fi
16987
16988
bec39cab 16989# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 16990# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
16991# This code just checks for a few cases where we'd like to ignore those
16992# definitions, even when they're present in the '.mt' file. These cases
16993# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 16994# not part of the source tree.
7a292a7a 16995#
81ecdfbb
RW
16996# Check whether --enable-sim was given.
16997if test "${enable_sim+set}" = set; then :
16998 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
16999 echo "enableval = ${enableval}";
17000 case "${enableval}" in
17001 yes) ignore_sim=false ;;
17002 no) ignore_sim=true ;;
17003 *) ignore_sim=false ;;
17004 esac
17005else
17006 ignore_sim=false
81ecdfbb
RW
17007fi
17008
7a292a7a
SS
17009
17010if test ! -d "${srcdir}/../sim"; then
17011 ignore_sim=true
17012fi
17013
9b624dbe
UW
17014SIM=
17015SIM_OBS=
17016if test "${ignore_sim}" = "false"; then
17017 if test x"${gdb_sim}" != x ; then
17018 SIM="${gdb_sim}"
17019 SIM_OBS="remote-sim.o"
60ca704f 17020
81ecdfbb 17021$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 17022
976102cd
PA
17023
17024 # Some tdep code should only be compiled in when the ppc sim is
17025 # built. PR sim/13418.
17026 case $target in
17027 powerpc*-*-*)
17028
17029$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
17030
17031 ;;
17032 esac
9b624dbe 17033 fi
7a292a7a
SS
17034fi
17035
17036
17037
c906108c
SS
17038
17039
17040
17041
17042
17043
dfcd3bfb 17044
e56ac5c3
AC
17045
17046
b3a90332
AC
17047
17048
c35f4ffc 17049# List of host floatformats.
bec39cab
AC
17050
17051cat >>confdefs.h <<_ACEOF
c35f4ffc 17052#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 17053_ACEOF
c35f4ffc 17054
bec39cab
AC
17055
17056cat >>confdefs.h <<_ACEOF
c35f4ffc 17057#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
17058_ACEOF
17059
c35f4ffc 17060
bec39cab 17061cat >>confdefs.h <<_ACEOF
c35f4ffc 17062#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 17063_ACEOF
c35f4ffc
AC
17064
17065
c906108c
SS
17066# target_subdir is used by the testsuite to find the target libraries.
17067target_subdir=
17068if test "${host}" != "${target}"; then
17069 target_subdir="${target_alias}/"
17070fi
17071
17072
21ea5acd 17073# Import nat definitions.
2b351b19 17074nat_makefile_frag=/dev/null
771b4502 17075if test "${gdb_native}" = "yes"; then
21ea5acd
SDJ
17076 . ${srcdir}/configure.nat
17077 nativefile=$NAT_FILE
c906108c 17078fi
c906108c 17079
c906108c
SS
17080
17081
17082
21ea5acd
SDJ
17083
17084
17085
17086
17087
c906108c
SS
17088
17089
b00a8037 17090if test x"${gdb_osabi}" != x ; then
bec39cab
AC
17091
17092cat >>confdefs.h <<_ACEOF
b00a8037 17093#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 17094_ACEOF
b00a8037
DJ
17095
17096fi
17097
496c0e1b
JB
17098# Check whether --enable-gdbserver was given.
17099if test "${enable_gdbserver+set}" = set; then :
17100 enableval=$enable_gdbserver; case "${enableval}" in
17101 yes| no|auto) ;;
d0ac1c44 17102 *) as_fn_error $? "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
496c0e1b
JB
17103esac
17104else
17105 enable_gdbserver=auto
17106fi
17107
17108
17109# We only build gdbserver automatically in a native configuration, and
17110# only if the user did not explicitly disable its build.
17111if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
17112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
17113$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 17114 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
17115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17116$as_echo "yes" >&6; }
17117 subdirs="$subdirs gdbserver"
3ace7edb 17118
496c0e1b 17119 gdbserver_build_enabled=yes
8dcde887 17120 else
81ecdfbb
RW
17121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17122$as_echo "no" >&6; }
8dcde887
MK
17123 fi
17124fi
17125
496c0e1b
JB
17126# If the user explicitly request the gdbserver to be built, verify that
17127# we were in fact able to enable it.
17128if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
d0ac1c44 17129 as_fn_error $? "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
496c0e1b
JB
17130fi
17131
393fd4c3
YQ
17132# Check for babeltrace and babeltrace-ctf
17133
17134# Check whether --with-babeltrace was given.
17135if test "${with_babeltrace+set}" = set; then :
17136 withval=$with_babeltrace;
17137else
17138 with_babeltrace=auto
17139fi
17140
17141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
17142$as_echo_n "checking whether to use babeltrace... " >&6; }
17143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
17144$as_echo "$with_babeltrace" >&6; }
17145
17146if test "x$with_babeltrace" = "xno"; then
17147 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
17148$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
17149else
17150 # Append -Werror to CFLAGS so that configure can catch the warning
17151 # "assignment from incompatible pointer type", which is related to
17152 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
17153 # in GDB, while babeltrace 1.0.3 is broken.
17154 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
17155 # safe to save and restore CFLAGS here.
17156 saved_CFLAGS=$CFLAGS
17157 CFLAGS="$CFLAGS -Werror"
17158
17159
17160
17161
17162
17163
17164
17165
17166 use_additional=yes
17167
17168 acl_save_prefix="$prefix"
17169 prefix="$acl_final_prefix"
17170 acl_save_exec_prefix="$exec_prefix"
17171 exec_prefix="$acl_final_exec_prefix"
17172
17173 eval additional_includedir=\"$includedir\"
17174 eval additional_libdir=\"$libdir\"
17175
17176 exec_prefix="$acl_save_exec_prefix"
17177 prefix="$acl_save_prefix"
17178
17179
17180# Check whether --with-libbabeltrace-prefix was given.
17181if test "${with_libbabeltrace_prefix+set}" = set; then :
17182 withval=$with_libbabeltrace_prefix;
17183 if test "X$withval" = "Xno"; then
17184 use_additional=no
17185 else
17186 if test "X$withval" = "X"; then
17187
17188 acl_save_prefix="$prefix"
17189 prefix="$acl_final_prefix"
17190 acl_save_exec_prefix="$exec_prefix"
17191 exec_prefix="$acl_final_exec_prefix"
17192
17193 eval additional_includedir=\"$includedir\"
17194 eval additional_libdir=\"$libdir\"
17195
17196 exec_prefix="$acl_save_exec_prefix"
17197 prefix="$acl_save_prefix"
17198
17199 else
17200 additional_includedir="$withval/include"
17201 additional_libdir="$withval/lib"
17202 fi
17203 fi
17204
17205fi
17206
17207 LIBBABELTRACE=
17208 LTLIBBABELTRACE=
17209 INCBABELTRACE=
17210 rpathdirs=
17211 ltrpathdirs=
17212 names_already_handled=
17213 names_next_round='babeltrace babeltrace-ctf'
17214 while test -n "$names_next_round"; do
17215 names_this_round="$names_next_round"
17216 names_next_round=
17217 for name in $names_this_round; do
17218 already_handled=
17219 for n in $names_already_handled; do
17220 if test "$n" = "$name"; then
17221 already_handled=yes
17222 break
17223 fi
17224 done
17225 if test -z "$already_handled"; then
17226 names_already_handled="$names_already_handled $name"
17227 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17228 eval value=\"\$HAVE_LIB$uppername\"
17229 if test -n "$value"; then
17230 if test "$value" = yes; then
17231 eval value=\"\$LIB$uppername\"
17232 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
17233 eval value=\"\$LTLIB$uppername\"
17234 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
17235 else
17236 :
17237 fi
17238 else
17239 found_dir=
17240 found_la=
17241 found_so=
17242 found_a=
17243 if test $use_additional = yes; then
17244 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
17245 found_dir="$additional_libdir"
17246 found_so="$additional_libdir/lib$name.$shlibext"
17247 if test -f "$additional_libdir/lib$name.la"; then
17248 found_la="$additional_libdir/lib$name.la"
17249 fi
17250 else
17251 if test -f "$additional_libdir/lib$name.$libext"; then
17252 found_dir="$additional_libdir"
17253 found_a="$additional_libdir/lib$name.$libext"
17254 if test -f "$additional_libdir/lib$name.la"; then
17255 found_la="$additional_libdir/lib$name.la"
17256 fi
17257 fi
17258 fi
17259 fi
17260 if test "X$found_dir" = "X"; then
17261 for x in $LDFLAGS $LTLIBBABELTRACE; do
17262
17263 acl_save_prefix="$prefix"
17264 prefix="$acl_final_prefix"
17265 acl_save_exec_prefix="$exec_prefix"
17266 exec_prefix="$acl_final_exec_prefix"
17267 eval x=\"$x\"
17268 exec_prefix="$acl_save_exec_prefix"
17269 prefix="$acl_save_prefix"
17270
17271 case "$x" in
17272 -L*)
17273 dir=`echo "X$x" | sed -e 's/^X-L//'`
17274 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
17275 found_dir="$dir"
17276 found_so="$dir/lib$name.$shlibext"
17277 if test -f "$dir/lib$name.la"; then
17278 found_la="$dir/lib$name.la"
17279 fi
17280 else
17281 if test -f "$dir/lib$name.$libext"; then
17282 found_dir="$dir"
17283 found_a="$dir/lib$name.$libext"
17284 if test -f "$dir/lib$name.la"; then
17285 found_la="$dir/lib$name.la"
17286 fi
17287 fi
17288 fi
17289 ;;
17290 esac
17291 if test "X$found_dir" != "X"; then
17292 break
17293 fi
17294 done
17295 fi
17296 if test "X$found_dir" != "X"; then
17297 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
17298 if test "X$found_so" != "X"; then
17299 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17300 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17301 else
17302 haveit=
17303 for x in $ltrpathdirs; do
17304 if test "X$x" = "X$found_dir"; then
17305 haveit=yes
17306 break
17307 fi
17308 done
17309 if test -z "$haveit"; then
17310 ltrpathdirs="$ltrpathdirs $found_dir"
17311 fi
17312 if test "$hardcode_direct" = yes; then
17313 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17314 else
17315 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17316 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17317 haveit=
17318 for x in $rpathdirs; do
17319 if test "X$x" = "X$found_dir"; then
17320 haveit=yes
17321 break
17322 fi
17323 done
17324 if test -z "$haveit"; then
17325 rpathdirs="$rpathdirs $found_dir"
17326 fi
17327 else
17328 haveit=
17329 for x in $LDFLAGS $LIBBABELTRACE; do
17330
17331 acl_save_prefix="$prefix"
17332 prefix="$acl_final_prefix"
17333 acl_save_exec_prefix="$exec_prefix"
17334 exec_prefix="$acl_final_exec_prefix"
17335 eval x=\"$x\"
17336 exec_prefix="$acl_save_exec_prefix"
17337 prefix="$acl_save_prefix"
17338
17339 if test "X$x" = "X-L$found_dir"; then
17340 haveit=yes
17341 break
17342 fi
17343 done
17344 if test -z "$haveit"; then
17345 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
17346 fi
17347 if test "$hardcode_minus_L" != no; then
17348 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17349 else
17350 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17351 fi
17352 fi
17353 fi
17354 fi
17355 else
17356 if test "X$found_a" != "X"; then
17357 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
17358 else
17359 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
17360 fi
17361 fi
17362 additional_includedir=
17363 case "$found_dir" in
17364 */lib | */lib/)
17365 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17366 additional_includedir="$basedir/include"
17367 ;;
17368 esac
17369 if test "X$additional_includedir" != "X"; then
17370 if test "X$additional_includedir" != "X/usr/include"; then
17371 haveit=
17372 if test "X$additional_includedir" = "X/usr/local/include"; then
17373 if test -n "$GCC"; then
17374 case $host_os in
17375 linux*) haveit=yes;;
17376 esac
17377 fi
17378 fi
17379 if test -z "$haveit"; then
17380 for x in $CPPFLAGS $INCBABELTRACE; do
17381
17382 acl_save_prefix="$prefix"
17383 prefix="$acl_final_prefix"
17384 acl_save_exec_prefix="$exec_prefix"
17385 exec_prefix="$acl_final_exec_prefix"
17386 eval x=\"$x\"
17387 exec_prefix="$acl_save_exec_prefix"
17388 prefix="$acl_save_prefix"
17389
17390 if test "X$x" = "X-I$additional_includedir"; then
17391 haveit=yes
17392 break
17393 fi
17394 done
17395 if test -z "$haveit"; then
17396 if test -d "$additional_includedir"; then
17397 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
17398 fi
17399 fi
17400 fi
17401 fi
17402 fi
17403 if test -n "$found_la"; then
17404 save_libdir="$libdir"
17405 case "$found_la" in
17406 */* | *\\*) . "$found_la" ;;
17407 *) . "./$found_la" ;;
17408 esac
17409 libdir="$save_libdir"
17410 for dep in $dependency_libs; do
17411 case "$dep" in
17412 -L*)
17413 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17414 if test "X$additional_libdir" != "X/usr/lib"; then
17415 haveit=
17416 if test "X$additional_libdir" = "X/usr/local/lib"; then
17417 if test -n "$GCC"; then
17418 case $host_os in
17419 linux*) haveit=yes;;
17420 esac
17421 fi
17422 fi
17423 if test -z "$haveit"; then
17424 haveit=
17425 for x in $LDFLAGS $LIBBABELTRACE; do
17426
17427 acl_save_prefix="$prefix"
17428 prefix="$acl_final_prefix"
17429 acl_save_exec_prefix="$exec_prefix"
17430 exec_prefix="$acl_final_exec_prefix"
17431 eval x=\"$x\"
17432 exec_prefix="$acl_save_exec_prefix"
17433 prefix="$acl_save_prefix"
17434
17435 if test "X$x" = "X-L$additional_libdir"; then
17436 haveit=yes
17437 break
17438 fi
17439 done
17440 if test -z "$haveit"; then
17441 if test -d "$additional_libdir"; then
17442 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
17443 fi
17444 fi
17445 haveit=
17446 for x in $LDFLAGS $LTLIBBABELTRACE; do
17447
17448 acl_save_prefix="$prefix"
17449 prefix="$acl_final_prefix"
17450 acl_save_exec_prefix="$exec_prefix"
17451 exec_prefix="$acl_final_exec_prefix"
17452 eval x=\"$x\"
17453 exec_prefix="$acl_save_exec_prefix"
17454 prefix="$acl_save_prefix"
17455
17456 if test "X$x" = "X-L$additional_libdir"; then
17457 haveit=yes
17458 break
17459 fi
17460 done
17461 if test -z "$haveit"; then
17462 if test -d "$additional_libdir"; then
17463 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
17464 fi
17465 fi
17466 fi
17467 fi
17468 ;;
17469 -R*)
17470 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17471 if test "$enable_rpath" != no; then
17472 haveit=
17473 for x in $rpathdirs; do
17474 if test "X$x" = "X$dir"; then
17475 haveit=yes
17476 break
17477 fi
17478 done
17479 if test -z "$haveit"; then
17480 rpathdirs="$rpathdirs $dir"
17481 fi
17482 haveit=
17483 for x in $ltrpathdirs; do
17484 if test "X$x" = "X$dir"; then
17485 haveit=yes
17486 break
17487 fi
17488 done
17489 if test -z "$haveit"; then
17490 ltrpathdirs="$ltrpathdirs $dir"
17491 fi
17492 fi
17493 ;;
17494 -l*)
17495 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17496 ;;
17497 *.la)
17498 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17499 ;;
17500 *)
17501 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
17502 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
17503 ;;
17504 esac
17505 done
17506 fi
17507 else
17508 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17509 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
17510 fi
17511 fi
17512 fi
17513 done
17514 done
17515 if test "X$rpathdirs" != "X"; then
17516 if test -n "$hardcode_libdir_separator"; then
17517 alldirs=
17518 for found_dir in $rpathdirs; do
17519 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17520 done
17521 acl_save_libdir="$libdir"
17522 libdir="$alldirs"
17523 eval flag=\"$hardcode_libdir_flag_spec\"
17524 libdir="$acl_save_libdir"
17525 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17526 else
17527 for found_dir in $rpathdirs; do
17528 acl_save_libdir="$libdir"
17529 libdir="$found_dir"
17530 eval flag=\"$hardcode_libdir_flag_spec\"
17531 libdir="$acl_save_libdir"
17532 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17533 done
17534 fi
17535 fi
17536 if test "X$ltrpathdirs" != "X"; then
17537 for found_dir in $ltrpathdirs; do
17538 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
17539 done
17540 fi
17541
17542
17543 ac_save_CPPFLAGS="$CPPFLAGS"
17544
17545 for element in $INCBABELTRACE; do
17546 haveit=
17547 for x in $CPPFLAGS; do
17548
17549 acl_save_prefix="$prefix"
17550 prefix="$acl_final_prefix"
17551 acl_save_exec_prefix="$exec_prefix"
17552 exec_prefix="$acl_final_exec_prefix"
17553 eval x=\"$x\"
17554 exec_prefix="$acl_save_exec_prefix"
17555 prefix="$acl_save_prefix"
17556
17557 if test "X$x" = "X$element"; then
17558 haveit=yes
17559 break
17560 fi
17561 done
17562 if test -z "$haveit"; then
17563 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17564 fi
17565 done
17566
17567
17568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
17569$as_echo_n "checking for libbabeltrace... " >&6; }
d0ac1c44 17570if ${ac_cv_libbabeltrace+:} false; then :
393fd4c3
YQ
17571 $as_echo_n "(cached) " >&6
17572else
17573
17574 ac_save_LIBS="$LIBS"
17575 LIBS="$LIBS $LIBBABELTRACE"
17576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17577/* end confdefs.h. */
17578#include <babeltrace/babeltrace.h>
17579 #include <babeltrace/ctf/events.h>
17580 #include <babeltrace/ctf/iterator.h>
17581int
17582main ()
17583{
17584struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
17585 struct bt_ctf_event *event = NULL;
17586 const struct bt_definition *scope;
17587
13cdc2af 17588 pos->type = BT_SEEK_BEGIN;
65c749e7 17589 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
17590 scope = bt_ctf_get_top_level_scope (event,
17591 BT_STREAM_EVENT_HEADER);
17592 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
17593
17594 ;
17595 return 0;
17596}
17597_ACEOF
17598if ac_fn_c_try_link "$LINENO"; then :
17599 ac_cv_libbabeltrace=yes
17600else
17601 ac_cv_libbabeltrace=no
17602fi
17603rm -f core conftest.err conftest.$ac_objext \
17604 conftest$ac_exeext conftest.$ac_ext
17605 LIBS="$ac_save_LIBS"
17606
17607fi
17608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
17609$as_echo "$ac_cv_libbabeltrace" >&6; }
17610 if test "$ac_cv_libbabeltrace" = yes; then
17611 HAVE_LIBBABELTRACE=yes
17612
17613$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
17614
17615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
17616$as_echo_n "checking how to link with libbabeltrace... " >&6; }
17617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
17618$as_echo "$LIBBABELTRACE" >&6; }
17619 else
17620 HAVE_LIBBABELTRACE=no
17621 CPPFLAGS="$ac_save_CPPFLAGS"
17622 LIBBABELTRACE=
17623 LTLIBBABELTRACE=
17624 fi
17625
17626
17627
17628
17629
17630
17631 CFLAGS=$saved_CFLAGS
17632
17633 if test "$HAVE_LIBBABELTRACE" != yes; then
17634 if test "$with_babeltrace" = yes; then
d0ac1c44 17635 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
393fd4c3
YQ
17636 else
17637 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
17638$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
17639 fi
17640 fi
17641fi
17642
21ea5acd
SDJ
17643# If nativefile (NAT_FILE) is not set in configure.nat, we link to an
17644# empty version.
c906108c
SS
17645
17646files=
17647links=
5a2402b8 17648
c906108c
SS
17649rm -f nm.h
17650if test "${nativefile}" != ""; then
0f475e27
AC
17651 case "${nativefile}" in
17652 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
17653 * ) GDB_NM_FILE="${nativefile}"
17654 esac
5a2402b8
AC
17655 files="${files} ${GDB_NM_FILE}"
17656 links="${links} nm.h"
60ca704f
SE
17657
17658cat >>confdefs.h <<_ACEOF
b78960be 17659#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 17660_ACEOF
5a2402b8 17661
c906108c 17662fi
5a2402b8
AC
17663
17664
e3487908
GKB
17665for ac_prog in xsltproc
17666do
17667 # Extract the first word of "$ac_prog", so it can be a program name with args.
17668set dummy $ac_prog; ac_word=$2
17669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17670$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 17671if ${ac_cv_path_XSLTPROC+:} false; then :
e3487908
GKB
17672 $as_echo_n "(cached) " >&6
17673else
17674 case $XSLTPROC in
17675 [\\/]* | ?:[\\/]*)
17676 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
17677 ;;
17678 *)
17679 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17680for as_dir in $PATH
17681do
17682 IFS=$as_save_IFS
17683 test -z "$as_dir" && as_dir=.
17684 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 17685 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e3487908
GKB
17686 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
17687 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17688 break 2
17689 fi
17690done
17691 done
17692IFS=$as_save_IFS
17693
17694 ;;
17695esac
17696fi
17697XSLTPROC=$ac_cv_path_XSLTPROC
17698if test -n "$XSLTPROC"; then
17699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
17700$as_echo "$XSLTPROC" >&6; }
17701else
17702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17703$as_echo "no" >&6; }
17704fi
17705
17706
17707 test -n "$XSLTPROC" && break
17708done
17709test -n "$XSLTPROC" || XSLTPROC="missing"
17710
17711if test "x$USE_MAINTAINER_MODE" = xyes; then
17712 if test "${XSLTPROC}" = missing; then
d0ac1c44 17713 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
e3487908
GKB
17714 fi
17715fi
17716
17717
bec39cab
AC
17718ac_sources="$files"
17719ac_dests="$links"
17720while test -n "$ac_sources"; do
17721 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
17722 set $ac_sources; ac_source=$1; shift; ac_sources=$*
17723 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
17724done
81ecdfbb 17725ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
17726
17727
c906108c
SS
17728
17729
c906108c 17730
81ecdfbb 17731$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 17732
bec39cab 17733
dcd1f979
TT
17734if $development; then
17735
17736$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
17737
b5884fa7 17738 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS) common/selftest.o selftest-arch.o"
1e5ded6c 17739 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS) common/selftest.c selftest-arch.c"
dcd1f979
TT
17740fi
17741
b292c783 17742
f6a88844
JM
17743 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17744 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
17745 if test "x$GDB_TRANSFORM_NAME" = x; then
17746 GDB_TRANSFORM_NAME=gdb
17747 fi
17748
17749
17750
17751 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17752 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
17753 if test "x$GCORE_TRANSFORM_NAME" = x; then
17754 GCORE_TRANSFORM_NAME=gcore
17755 fi
17756
b292c783
JK
17757
17758ac_config_files="$ac_config_files gcore"
17759
141ec9f6 17760ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
81ecdfbb 17761
89a34d1b 17762
bec39cab
AC
17763cat >confcache <<\_ACEOF
17764# This file is a shell script that caches the results of configure
17765# tests run on this system so they can be shared between configure
17766# scripts and configure runs, see configure's option --config-cache.
17767# It is not useful on other systems. If it contains results you don't
17768# want to keep, you may remove or edit it.
17769#
17770# config.status only pays attention to the cache file if you give it
17771# the --recheck option to rerun configure.
17772#
17773# `ac_cv_env_foo' variables (set or unset) will be overridden when
17774# loading this file, other *unset* `ac_cv_foo' will be assigned the
17775# following values.
17776
17777_ACEOF
17778
17779# The following way of writing the cache mishandles newlines in values,
17780# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 17781# So, we kill variables containing newlines.
bec39cab
AC
17782# Ultrix sh set writes to stderr and can't be redirected directly,
17783# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
17784(
17785 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17786 eval ac_val=\$$ac_var
17787 case $ac_val in #(
17788 *${as_nl}*)
17789 case $ac_var in #(
17790 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17791$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
17792 esac
17793 case $ac_var in #(
17794 _ | IFS | as_nl) ;; #(
17795 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17796 *) { eval $ac_var=; unset $ac_var;} ;;
17797 esac ;;
17798 esac
17799 done
17800
bec39cab 17801 (set) 2>&1 |
81ecdfbb
RW
17802 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17803 *${as_nl}ac_space=\ *)
17804 # `set' does not quote correctly, so add quotes: double-quote
17805 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
17806 sed -n \
17807 "s/'/'\\\\''/g;
17808 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 17809 ;; #(
bec39cab
AC
17810 *)
17811 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 17812 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 17813 ;;
81ecdfbb
RW
17814 esac |
17815 sort
17816) |
bec39cab 17817 sed '
81ecdfbb 17818 /^ac_cv_env_/b end
bec39cab 17819 t clear
81ecdfbb 17820 :clear
bec39cab
AC
17821 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17822 t end
81ecdfbb
RW
17823 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17824 :end' >>confcache
17825if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17826 if test -w "$cache_file"; then
d0ac1c44 17827 if test "x$cache_file" != "x/dev/null"; then
81ecdfbb
RW
17828 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17829$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
17830 if test ! -f "$cache_file" || test -h "$cache_file"; then
17831 cat confcache >"$cache_file"
17832 else
17833 case $cache_file in #(
17834 */* | ?:*)
17835 mv -f confcache "$cache_file"$$ &&
17836 mv -f "$cache_file"$$ "$cache_file" ;; #(
17837 *)
17838 mv -f confcache "$cache_file" ;;
17839 esac
17840 fi
17841 fi
bec39cab 17842 else
81ecdfbb
RW
17843 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17844$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
17845 fi
17846fi
17847rm -f confcache
17848
17849test "x$prefix" = xNONE && prefix=$ac_default_prefix
17850# Let make expand exec_prefix.
17851test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17852
bec39cab
AC
17853DEFS=-DHAVE_CONFIG_H
17854
17855ac_libobjs=
17856ac_ltlibobjs=
d0ac1c44 17857U=
bec39cab
AC
17858for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17859 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
17860 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
17861 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
17862 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17863 # will be set to the directory where LIBOBJS objects are built.
17864 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17865 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
17866done
17867LIBOBJS=$ac_libobjs
17868
17869LTLIBOBJS=$ac_ltlibobjs
17870
17871
85981d60 17872if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 17873 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
81ecdfbb 17874Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 17875fi
4df42755 17876if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
d0ac1c44 17877 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
4df42755
DE
17878Usually this means the macro was only invoked conditionally." "$LINENO" 5
17879fi
17880if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
d0ac1c44 17881 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
4df42755
DE
17882Usually this means the macro was only invoked conditionally." "$LINENO" 5
17883fi
81ecdfbb
RW
17884
17885
d0ac1c44 17886: "${CONFIG_STATUS=./config.status}"
81ecdfbb 17887ac_write_fail=0
bec39cab
AC
17888ac_clean_files_save=$ac_clean_files
17889ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
17890{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17891$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17892as_write_fail=0
17893cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
17894#! $SHELL
17895# Generated by $as_me.
17896# Run this file to recreate the current configuration.
17897# Compiler output produced by configure, useful for debugging
17898# configure, is in config.log if it exists.
17899
17900debug=false
17901ac_cs_recheck=false
17902ac_cs_silent=false
bec39cab 17903
81ecdfbb
RW
17904SHELL=\${CONFIG_SHELL-$SHELL}
17905export SHELL
17906_ASEOF
17907cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17908## -------------------- ##
17909## M4sh Initialization. ##
17910## -------------------- ##
17911
17912# Be more Bourne compatible
17913DUALCASE=1; export DUALCASE # for MKS sh
17914if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
17915 emulate sh
17916 NULLCMD=:
81ecdfbb 17917 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
17918 # is contrary to our usage. Disable this feature.
17919 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
17920 setopt NO_GLOB_SUBST
17921else
17922 case `(set -o) 2>/dev/null` in #(
17923 *posix*) :
17924 set -o posix ;; #(
17925 *) :
17926 ;;
17927esac
bec39cab 17928fi
bec39cab 17929
81ecdfbb
RW
17930
17931as_nl='
17932'
17933export as_nl
17934# Printing a long string crashes Solaris 7 /usr/bin/printf.
17935as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17936as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17937as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17938# Prefer a ksh shell builtin over an external printf program on Solaris,
17939# but without wasting forks for bash or zsh.
17940if test -z "$BASH_VERSION$ZSH_VERSION" \
17941 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17942 as_echo='print -r --'
17943 as_echo_n='print -rn --'
17944elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17945 as_echo='printf %s\n'
17946 as_echo_n='printf %s'
17947else
17948 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17949 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17950 as_echo_n='/usr/ucb/echo -n'
17951 else
17952 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17953 as_echo_n_body='eval
17954 arg=$1;
17955 case $arg in #(
17956 *"$as_nl"*)
17957 expr "X$arg" : "X\\(.*\\)$as_nl";
17958 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17959 esac;
17960 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17961 '
17962 export as_echo_n_body
17963 as_echo_n='sh -c $as_echo_n_body as_echo'
17964 fi
17965 export as_echo_body
17966 as_echo='sh -c $as_echo_body as_echo'
17967fi
17968
17969# The user is always right.
17970if test "${PATH_SEPARATOR+set}" != set; then
17971 PATH_SEPARATOR=:
17972 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17973 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17974 PATH_SEPARATOR=';'
17975 }
bec39cab
AC
17976fi
17977
17978
81ecdfbb
RW
17979# IFS
17980# We need space, tab and new line, in precisely that order. Quoting is
17981# there to prevent editors from complaining about space-tab.
17982# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17983# splitting by setting IFS to empty value.)
17984IFS=" "" $as_nl"
17985
17986# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 17987as_myself=
81ecdfbb
RW
17988case $0 in #((
17989 *[\\/]* ) as_myself=$0 ;;
17990 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17991for as_dir in $PATH
17992do
17993 IFS=$as_save_IFS
17994 test -z "$as_dir" && as_dir=.
17995 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17996 done
17997IFS=$as_save_IFS
17998
17999 ;;
18000esac
18001# We did not find ourselves, most probably we were run as `sh COMMAND'
18002# in which case we are not to be found in the path.
18003if test "x$as_myself" = x; then
18004 as_myself=$0
18005fi
18006if test ! -f "$as_myself"; then
18007 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
18008 exit 1
18009fi
18010
18011# Unset variables that we do not need and which cause bugs (e.g. in
18012# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
18013# suppresses any "Segmentation fault" message there. '((' could
18014# trigger a bug in pdksh 5.2.14.
18015for as_var in BASH_ENV ENV MAIL MAILPATH
18016do eval test x\${$as_var+set} = xset \
18017 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
18018done
bec39cab
AC
18019PS1='$ '
18020PS2='> '
18021PS4='+ '
18022
18023# NLS nuisances.
81ecdfbb
RW
18024LC_ALL=C
18025export LC_ALL
18026LANGUAGE=C
18027export LANGUAGE
18028
18029# CDPATH.
18030(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
18031
18032
d0ac1c44
SM
18033# as_fn_error STATUS ERROR [LINENO LOG_FD]
18034# ----------------------------------------
81ecdfbb
RW
18035# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
18036# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 18037# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
18038as_fn_error ()
18039{
d0ac1c44
SM
18040 as_status=$1; test $as_status -eq 0 && as_status=1
18041 if test "$4"; then
18042 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18043 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 18044 fi
d0ac1c44 18045 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
18046 as_fn_exit $as_status
18047} # as_fn_error
18048
18049
18050# as_fn_set_status STATUS
18051# -----------------------
18052# Set $? to STATUS, without forking.
18053as_fn_set_status ()
18054{
18055 return $1
18056} # as_fn_set_status
18057
18058# as_fn_exit STATUS
18059# -----------------
18060# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
18061as_fn_exit ()
18062{
18063 set +e
18064 as_fn_set_status $1
18065 exit $1
18066} # as_fn_exit
18067
18068# as_fn_unset VAR
18069# ---------------
18070# Portably unset VAR.
18071as_fn_unset ()
18072{
18073 { eval $1=; unset $1;}
18074}
18075as_unset=as_fn_unset
18076# as_fn_append VAR VALUE
18077# ----------------------
18078# Append the text in VALUE to the end of the definition contained in VAR. Take
18079# advantage of any shell optimizations that allow amortized linear growth over
18080# repeated appends, instead of the typical quadratic growth present in naive
18081# implementations.
18082if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
18083 eval 'as_fn_append ()
18084 {
18085 eval $1+=\$2
18086 }'
18087else
18088 as_fn_append ()
18089 {
18090 eval $1=\$$1\$2
18091 }
18092fi # as_fn_append
18093
18094# as_fn_arith ARG...
18095# ------------------
18096# Perform arithmetic evaluation on the ARGs, and store the result in the
18097# global $as_val. Take advantage of shells that can avoid forks. The arguments
18098# must be portable across $(()) and expr.
18099if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
18100 eval 'as_fn_arith ()
18101 {
18102 as_val=$(( $* ))
18103 }'
18104else
18105 as_fn_arith ()
18106 {
18107 as_val=`expr "$@" || test $? -eq 1`
18108 }
18109fi # as_fn_arith
bec39cab 18110
81ecdfbb
RW
18111
18112if expr a : '\(a\)' >/dev/null 2>&1 &&
18113 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
18114 as_expr=expr
18115else
18116 as_expr=false
18117fi
18118
81ecdfbb 18119if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
18120 as_basename=basename
18121else
18122 as_basename=false
18123fi
18124
81ecdfbb
RW
18125if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18126 as_dirname=dirname
18127else
18128 as_dirname=false
18129fi
bec39cab 18130
81ecdfbb 18131as_me=`$as_basename -- "$0" ||
bec39cab
AC
18132$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18133 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
18134 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
18135$as_echo X/"$0" |
18136 sed '/^.*\/\([^/][^/]*\)\/*$/{
18137 s//\1/
18138 q
18139 }
18140 /^X\/\(\/\/\)$/{
18141 s//\1/
18142 q
18143 }
18144 /^X\/\(\/\).*/{
18145 s//\1/
18146 q
18147 }
18148 s/.*/./; q'`
b4e70030 18149
b4e70030
JB
18150# Avoid depending upon Character Ranges.
18151as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18152as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18153as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18154as_cr_digits='0123456789'
18155as_cr_alnum=$as_cr_Letters$as_cr_digits
18156
81ecdfbb
RW
18157ECHO_C= ECHO_N= ECHO_T=
18158case `echo -n x` in #(((((
18159-n*)
18160 case `echo 'xy\c'` in
18161 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
18162 xy) ECHO_C='\c';;
18163 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18164 ECHO_T=' ';;
18165 esac;;
18166*)
18167 ECHO_N='-n';;
bec39cab
AC
18168esac
18169
81ecdfbb
RW
18170rm -f conf$$ conf$$.exe conf$$.file
18171if test -d conf$$.dir; then
18172 rm -f conf$$.dir/conf$$.file
bec39cab 18173else
81ecdfbb
RW
18174 rm -f conf$$.dir
18175 mkdir conf$$.dir 2>/dev/null
bec39cab 18176fi
81ecdfbb
RW
18177if (echo >conf$$.file) 2>/dev/null; then
18178 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 18179 as_ln_s='ln -s'
81ecdfbb
RW
18180 # ... but there are two gotchas:
18181 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18182 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 18183 # In both cases, we have to default to `cp -pR'.
81ecdfbb 18184 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 18185 as_ln_s='cp -pR'
81ecdfbb
RW
18186 elif ln conf$$.file conf$$ 2>/dev/null; then
18187 as_ln_s=ln
18188 else
d0ac1c44 18189 as_ln_s='cp -pR'
b4e70030 18190 fi
bec39cab 18191else
d0ac1c44 18192 as_ln_s='cp -pR'
bec39cab 18193fi
81ecdfbb
RW
18194rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18195rmdir conf$$.dir 2>/dev/null
18196
18197
18198# as_fn_mkdir_p
18199# -------------
18200# Create "$as_dir" as a directory, including parents if necessary.
18201as_fn_mkdir_p ()
18202{
18203
18204 case $as_dir in #(
18205 -*) as_dir=./$as_dir;;
18206 esac
18207 test -d "$as_dir" || eval $as_mkdir_p || {
18208 as_dirs=
18209 while :; do
18210 case $as_dir in #(
18211 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18212 *) as_qdir=$as_dir;;
18213 esac
18214 as_dirs="'$as_qdir' $as_dirs"
18215 as_dir=`$as_dirname -- "$as_dir" ||
18216$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18217 X"$as_dir" : 'X\(//\)[^/]' \| \
18218 X"$as_dir" : 'X\(//\)$' \| \
18219 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18220$as_echo X"$as_dir" |
18221 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18222 s//\1/
18223 q
18224 }
18225 /^X\(\/\/\)[^/].*/{
18226 s//\1/
18227 q
18228 }
18229 /^X\(\/\/\)$/{
18230 s//\1/
18231 q
18232 }
18233 /^X\(\/\).*/{
18234 s//\1/
18235 q
18236 }
18237 s/.*/./; q'`
18238 test -d "$as_dir" && break
18239 done
18240 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 18241 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb 18242
bec39cab 18243
81ecdfbb 18244} # as_fn_mkdir_p
bec39cab 18245if mkdir -p . 2>/dev/null; then
81ecdfbb 18246 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
18247else
18248 test -d ./-p && rmdir ./-p
18249 as_mkdir_p=false
18250fi
18251
d0ac1c44
SM
18252
18253# as_fn_executable_p FILE
18254# -----------------------
18255# Test if FILE is an executable regular file.
18256as_fn_executable_p ()
18257{
18258 test -f "$1" && test -x "$1"
18259} # as_fn_executable_p
18260as_test_x='test -x'
18261as_executable_p=as_fn_executable_p
bec39cab
AC
18262
18263# Sed expression to map a string onto a valid CPP name.
18264as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
18265
18266# Sed expression to map a string onto a valid variable name.
18267as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
18268
18269
bec39cab 18270exec 6>&1
81ecdfbb
RW
18271## ----------------------------------- ##
18272## Main body of $CONFIG_STATUS script. ##
18273## ----------------------------------- ##
18274_ASEOF
18275test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
18276
18277cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18278# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 18279# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
18280# values after options handling.
18281ac_log="
bec39cab 18282This file was extended by $as_me, which was
d0ac1c44 18283generated by GNU Autoconf 2.69. Invocation command line was
bec39cab
AC
18284
18285 CONFIG_FILES = $CONFIG_FILES
18286 CONFIG_HEADERS = $CONFIG_HEADERS
18287 CONFIG_LINKS = $CONFIG_LINKS
18288 CONFIG_COMMANDS = $CONFIG_COMMANDS
18289 $ $0 $@
18290
81ecdfbb
RW
18291on `(hostname || uname -n) 2>/dev/null | sed 1q`
18292"
18293
bec39cab
AC
18294_ACEOF
18295
81ecdfbb
RW
18296case $ac_config_files in *"
18297"*) set x $ac_config_files; shift; ac_config_files=$*;;
18298esac
234b45d4 18299
81ecdfbb
RW
18300case $ac_config_headers in *"
18301"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18302esac
b4e70030 18303
b4e70030 18304
81ecdfbb
RW
18305cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18306# Files that config.status was made for.
18307config_files="$ac_config_files"
18308config_headers="$ac_config_headers"
18309config_links="$ac_config_links"
18310config_commands="$ac_config_commands"
234b45d4 18311
81ecdfbb 18312_ACEOF
b4e70030 18313
81ecdfbb 18314cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 18315ac_cs_usage="\
81ecdfbb
RW
18316\`$as_me' instantiates files and other configuration actions
18317from templates according to the current configuration. Unless the files
18318and actions are specified as TAGs, all are instantiated by default.
234b45d4 18319
81ecdfbb 18320Usage: $0 [OPTION]... [TAG]...
234b45d4 18321
bec39cab 18322 -h, --help print this help, then exit
81ecdfbb 18323 -V, --version print version number and configuration settings, then exit
d0ac1c44 18324 --config print configuration, then exit
81ecdfbb
RW
18325 -q, --quiet, --silent
18326 do not print progress messages
bec39cab
AC
18327 -d, --debug don't remove temporary files
18328 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
18329 --file=FILE[:TEMPLATE]
18330 instantiate the configuration file FILE
18331 --header=FILE[:TEMPLATE]
18332 instantiate the configuration header FILE
234b45d4 18333
bec39cab
AC
18334Configuration files:
18335$config_files
234b45d4 18336
bec39cab
AC
18337Configuration headers:
18338$config_headers
234b45d4 18339
bec39cab
AC
18340Configuration links:
18341$config_links
234b45d4 18342
bec39cab
AC
18343Configuration commands:
18344$config_commands
18345
81ecdfbb 18346Report bugs to the package provider."
b4e70030 18347
81ecdfbb
RW
18348_ACEOF
18349cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 18350ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
bec39cab
AC
18351ac_cs_version="\\
18352config.status
d0ac1c44
SM
18353configured by $0, generated by GNU Autoconf 2.69,
18354 with options \\"\$ac_cs_config\\"
bec39cab 18355
d0ac1c44 18356Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
18357This config.status script is free software; the Free Software Foundation
18358gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
18359
18360ac_pwd='$ac_pwd'
18361srcdir='$srcdir'
18362INSTALL='$INSTALL'
81ecdfbb
RW
18363AWK='$AWK'
18364test -n "\$AWK" || AWK=awk
bec39cab
AC
18365_ACEOF
18366
81ecdfbb
RW
18367cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18368# The default lists apply if the user does not specify any file.
bec39cab
AC
18369ac_need_defaults=:
18370while test $# != 0
18371do
18372 case $1 in
d0ac1c44 18373 --*=?*)
81ecdfbb
RW
18374 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18375 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 18376 ac_shift=:
c906108c 18377 ;;
d0ac1c44
SM
18378 --*=)
18379 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18380 ac_optarg=
18381 ac_shift=:
18382 ;;
81ecdfbb 18383 *)
bec39cab
AC
18384 ac_option=$1
18385 ac_optarg=$2
18386 ac_shift=shift
c906108c 18387 ;;
bec39cab 18388 esac
c906108c 18389
bec39cab
AC
18390 case $ac_option in
18391 # Handling of the options.
bec39cab
AC
18392 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18393 ac_cs_recheck=: ;;
81ecdfbb
RW
18394 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
18395 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
18396 --config | --confi | --conf | --con | --co | --c )
18397 $as_echo "$ac_cs_config"; exit ;;
81ecdfbb 18398 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
18399 debug=: ;;
18400 --file | --fil | --fi | --f )
18401 $ac_shift
81ecdfbb
RW
18402 case $ac_optarg in
18403 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 18404 '') as_fn_error $? "missing file argument" ;;
81ecdfbb
RW
18405 esac
18406 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
18407 ac_need_defaults=false;;
18408 --header | --heade | --head | --hea )
18409 $ac_shift
81ecdfbb
RW
18410 case $ac_optarg in
18411 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18412 esac
18413 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 18414 ac_need_defaults=false;;
81ecdfbb
RW
18415 --he | --h)
18416 # Conflict between --help and --header
d0ac1c44 18417 as_fn_error $? "ambiguous option: \`$1'
81ecdfbb
RW
18418Try \`$0 --help' for more information.";;
18419 --help | --hel | -h )
18420 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
18421 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18422 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18423 ac_cs_silent=: ;;
c906108c 18424
bec39cab 18425 # This is an error.
d0ac1c44 18426 -*) as_fn_error $? "unrecognized option: \`$1'
81ecdfbb 18427Try \`$0 --help' for more information." ;;
c906108c 18428
81ecdfbb
RW
18429 *) as_fn_append ac_config_targets " $1"
18430 ac_need_defaults=false ;;
c906108c 18431
bec39cab
AC
18432 esac
18433 shift
18434done
c906108c 18435
bec39cab 18436ac_configure_extra_args=
c906108c 18437
bec39cab
AC
18438if $ac_cs_silent; then
18439 exec 6>/dev/null
18440 ac_configure_extra_args="$ac_configure_extra_args --silent"
18441fi
c906108c 18442
bec39cab 18443_ACEOF
81ecdfbb 18444cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 18445if \$ac_cs_recheck; then
d0ac1c44 18446 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
81ecdfbb
RW
18447 shift
18448 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18449 CONFIG_SHELL='$SHELL'
18450 export CONFIG_SHELL
18451 exec "\$@"
bec39cab
AC
18452fi
18453
18454_ACEOF
81ecdfbb
RW
18455cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18456exec 5>>config.log
18457{
18458 echo
18459 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18460## Running $as_me. ##
18461_ASBOX
18462 $as_echo "$ac_log"
18463} >&5
bec39cab 18464
81ecdfbb
RW
18465_ACEOF
18466cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 18467#
81ecdfbb 18468# INIT-COMMANDS
c906108c 18469#
a417dc56 18470ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 18471
bec39cab
AC
18472_ACEOF
18473
81ecdfbb 18474cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 18475
81ecdfbb 18476# Handling of arguments.
bec39cab 18477for ac_config_target in $ac_config_targets
c906108c 18478do
81ecdfbb
RW
18479 case $ac_config_target in
18480 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
18481 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 18482 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 18483 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 18484 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 18485 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 18486 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
141ec9f6 18487 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
5ae98d25 18488 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 18489 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb 18490
d0ac1c44 18491 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
18492 esac
18493done
18494
81ecdfbb 18495
bec39cab
AC
18496# If the user did not use the arguments to specify the items to instantiate,
18497# then the envvar interface is used. Set only those that are not.
18498# We use the long form for the default assignment because of an extremely
18499# bizarre bug on SunOS 4.1.3.
18500if $ac_need_defaults; then
18501 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18502 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18503 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
18504 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18505fi
18506
b4e70030 18507# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 18508# simply because there is no reason against having it here, and in addition,
b4e70030 18509# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
18510# Hook for its removal unless debugging.
18511# Note that there is a small window in which the directory will not be cleaned:
18512# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
18513$debug ||
18514{
d0ac1c44 18515 tmp= ac_tmp=
81ecdfbb 18516 trap 'exit_status=$?
d0ac1c44
SM
18517 : "${ac_tmp:=$tmp}"
18518 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
81ecdfbb
RW
18519' 0
18520 trap 'as_fn_exit 1' 1 2 13 15
18521}
18522# Create a (secure) tmp directory for tmp files.
18523
18524{
18525 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 18526 test -d "$tmp"
81ecdfbb
RW
18527} ||
18528{
18529 tmp=./conf$$-$RANDOM
18530 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
18531} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
18532ac_tmp=$tmp
81ecdfbb
RW
18533
18534# Set up the scripts for CONFIG_FILES section.
18535# No need to generate them if there are no CONFIG_FILES.
18536# This happens for instance with `./config.status config.h'.
18537if test -n "$CONFIG_FILES"; then
18538
18539if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
18540 ac_cs_awk_getline=:
18541 ac_cs_awk_pipe_init=
18542 ac_cs_awk_read_file='
18543 while ((getline aline < (F[key])) > 0)
18544 print(aline)
18545 close(F[key])'
18546 ac_cs_awk_pipe_fini=
18547else
18548 ac_cs_awk_getline=false
18549 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
18550 ac_cs_awk_read_file='
18551 print "|#_!!_#|"
18552 print "cat " F[key] " &&"
18553 '$ac_cs_awk_pipe_init
18554 # The final `:' finishes the AND list.
18555 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
18556fi
18557ac_cr=`echo X | tr X '\015'`
18558# On cygwin, bash can eat \r inside `` if the user requested igncr.
18559# But we know of no other shell where ac_cr would be empty at this
18560# point, so we can use a bashism as a fallback.
18561if test "x$ac_cr" = x; then
18562 eval ac_cr=\$\'\\r\'
18563fi
18564ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18565if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 18566 ac_cs_awk_cr='\\r'
81ecdfbb
RW
18567else
18568 ac_cs_awk_cr=$ac_cr
18569fi
18570
d0ac1c44 18571echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
81ecdfbb
RW
18572_ACEOF
18573
18574# Create commands to substitute file output variables.
18575{
18576 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
d0ac1c44 18577 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
81ecdfbb
RW
18578 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
18579 echo "_ACAWK" &&
18580 echo "_ACEOF"
18581} >conf$$files.sh &&
18582. ./conf$$files.sh ||
d0ac1c44 18583 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
18584rm -f conf$$files.sh
18585
18586{
18587 echo "cat >conf$$subs.awk <<_ACEOF" &&
18588 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18589 echo "_ACEOF"
18590} >conf$$subs.sh ||
d0ac1c44
SM
18591 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18592ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
81ecdfbb
RW
18593ac_delim='%!_!# '
18594for ac_last_try in false false false false false :; do
18595 . ./conf$$subs.sh ||
d0ac1c44 18596 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
18597
18598 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18599 if test $ac_delim_n = $ac_delim_num; then
18600 break
18601 elif $ac_last_try; then
d0ac1c44 18602 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
18603 else
18604 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18605 fi
18606done
18607rm -f conf$$subs.sh
18608
18609cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 18610cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
81ecdfbb
RW
18611_ACEOF
18612sed -n '
18613h
18614s/^/S["/; s/!.*/"]=/
18615p
18616g
18617s/^[^!]*!//
18618:repl
18619t repl
18620s/'"$ac_delim"'$//
18621t delim
18622:nl
18623h
d0ac1c44 18624s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
18625t more1
18626s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18627p
18628n
18629b repl
18630:more1
18631s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18632p
18633g
18634s/.\{148\}//
18635t nl
18636:delim
18637h
d0ac1c44 18638s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
18639t more2
18640s/["\\]/\\&/g; s/^/"/; s/$/"/
18641p
18642b
18643:more2
18644s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18645p
18646g
18647s/.\{148\}//
18648t delim
18649' <conf$$subs.awk | sed '
18650/^[^""]/{
18651 N
18652 s/\n//
18653}
18654' >>$CONFIG_STATUS || ac_write_fail=1
18655rm -f conf$$subs.awk
18656cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18657_ACAWK
d0ac1c44 18658cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
81ecdfbb
RW
18659 for (key in S) S_is_set[key] = 1
18660 FS = "\a"
18661 \$ac_cs_awk_pipe_init
18662}
18663{
18664 line = $ 0
18665 nfields = split(line, field, "@")
18666 substed = 0
18667 len = length(field[1])
18668 for (i = 2; i < nfields; i++) {
18669 key = field[i]
18670 keylen = length(key)
18671 if (S_is_set[key]) {
18672 value = S[key]
18673 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18674 len += length(value) + length(field[++i])
18675 substed = 1
18676 } else
18677 len += 1 + keylen
18678 }
18679 if (nfields == 3 && !substed) {
18680 key = field[2]
18681 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
18682 \$ac_cs_awk_read_file
18683 next
18684 }
18685 }
18686 print line
b4e70030 18687}
81ecdfbb
RW
18688\$ac_cs_awk_pipe_fini
18689_ACAWK
18690_ACEOF
18691cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18692if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18693 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18694else
18695 cat
d0ac1c44
SM
18696fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
18697 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
81ecdfbb
RW
18698_ACEOF
18699
d0ac1c44
SM
18700# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18701# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
81ecdfbb
RW
18702# trailing colons and then remove the whole line if VPATH becomes empty
18703# (actually we leave an empty line to preserve line numbers).
18704if test "x$srcdir" = x.; then
d0ac1c44
SM
18705 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18706h
18707s///
18708s/^/:/
18709s/[ ]*$/:/
18710s/:\$(srcdir):/:/g
18711s/:\${srcdir}:/:/g
18712s/:@srcdir@:/:/g
18713s/^:*//
81ecdfbb 18714s/:*$//
d0ac1c44
SM
18715x
18716s/\(=[ ]*\).*/\1/
18717G
18718s/\n//
81ecdfbb
RW
18719s/^[^=]*=[ ]*$//
18720}'
18721fi
18722
18723cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18724fi # test -n "$CONFIG_FILES"
18725
18726# Set up the scripts for CONFIG_HEADERS section.
18727# No need to generate them if there are no CONFIG_HEADERS.
18728# This happens for instance with `./config.status Makefile'.
18729if test -n "$CONFIG_HEADERS"; then
d0ac1c44 18730cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
81ecdfbb
RW
18731BEGIN {
18732_ACEOF
18733
18734# Transform confdefs.h into an awk script `defines.awk', embedded as
18735# here-document in config.status, that substitutes the proper values into
18736# config.h.in to produce config.h.
4e8d927d 18737
81ecdfbb
RW
18738# Create a delimiter string that does not exist in confdefs.h, to ease
18739# handling of long lines.
18740ac_delim='%!_!# '
18741for ac_last_try in false false :; do
d0ac1c44
SM
18742 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18743 if test -z "$ac_tt"; then
81ecdfbb
RW
18744 break
18745 elif $ac_last_try; then
d0ac1c44 18746 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
81ecdfbb
RW
18747 else
18748 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18749 fi
18750done
4e8d927d 18751
81ecdfbb
RW
18752# For the awk script, D is an array of macro values keyed by name,
18753# likewise P contains macro parameters if any. Preserve backslash
18754# newline sequences.
18755
18756ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18757sed -n '
18758s/.\{148\}/&'"$ac_delim"'/g
18759t rset
18760:rset
18761s/^[ ]*#[ ]*define[ ][ ]*/ /
18762t def
18763d
18764:def
18765s/\\$//
18766t bsnl
18767s/["\\]/\\&/g
18768s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18769D["\1"]=" \3"/p
18770s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18771d
18772:bsnl
18773s/["\\]/\\&/g
18774s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18775D["\1"]=" \3\\\\\\n"\\/p
18776t cont
18777s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18778t cont
18779d
18780:cont
18781n
18782s/.\{148\}/&'"$ac_delim"'/g
18783t clear
18784:clear
18785s/\\$//
18786t bsnlc
18787s/["\\]/\\&/g; s/^/"/; s/$/"/p
18788d
18789:bsnlc
18790s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18791b cont
18792' <confdefs.h | sed '
18793s/'"$ac_delim"'/"\\\
18794"/g' >>$CONFIG_STATUS || ac_write_fail=1
18795
18796cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18797 for (key in D) D_is_set[key] = 1
18798 FS = "\a"
18799}
18800/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18801 line = \$ 0
18802 split(line, arg, " ")
18803 if (arg[1] == "#") {
18804 defundef = arg[2]
18805 mac1 = arg[3]
18806 } else {
18807 defundef = substr(arg[1], 2)
18808 mac1 = arg[2]
18809 }
18810 split(mac1, mac2, "(") #)
18811 macro = mac2[1]
18812 prefix = substr(line, 1, index(line, defundef) - 1)
18813 if (D_is_set[macro]) {
18814 # Preserve the white space surrounding the "#".
18815 print prefix "define", macro P[macro] D[macro]
18816 next
18817 } else {
18818 # Replace #undef with comments. This is necessary, for example,
18819 # in the case of _POSIX_SOURCE, which is predefined and required
18820 # on some systems where configure will not decide to define it.
18821 if (defundef == "undef") {
18822 print "/*", prefix defundef, macro, "*/"
18823 next
18824 }
18825 }
b4e70030 18826}
81ecdfbb
RW
18827{ print }
18828_ACAWK
b4e70030 18829_ACEOF
81ecdfbb 18830cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 18831 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
81ecdfbb 18832fi # test -n "$CONFIG_HEADERS"
4e8d927d 18833
4e8d927d 18834
81ecdfbb
RW
18835eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
18836shift
18837for ac_tag
18838do
18839 case $ac_tag in
18840 :[FHLC]) ac_mode=$ac_tag; continue;;
18841 esac
18842 case $ac_mode$ac_tag in
18843 :[FHL]*:*);;
d0ac1c44 18844 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
81ecdfbb
RW
18845 :[FH]-) ac_tag=-:-;;
18846 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18847 esac
18848 ac_save_IFS=$IFS
18849 IFS=:
18850 set x $ac_tag
18851 IFS=$ac_save_IFS
18852 shift
18853 ac_file=$1
18854 shift
4e8d927d 18855
81ecdfbb
RW
18856 case $ac_mode in
18857 :L) ac_source=$1;;
18858 :[FH])
18859 ac_file_inputs=
18860 for ac_f
18861 do
18862 case $ac_f in
d0ac1c44 18863 -) ac_f="$ac_tmp/stdin";;
81ecdfbb
RW
18864 *) # Look for the file first in the build tree, then in the source tree
18865 # (if the path is not absolute). The absolute path cannot be DOS-style,
18866 # because $ac_f cannot contain `:'.
18867 test -f "$ac_f" ||
18868 case $ac_f in
18869 [\\/$]*) false;;
18870 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18871 esac ||
d0ac1c44 18872 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
81ecdfbb
RW
18873 esac
18874 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18875 as_fn_append ac_file_inputs " '$ac_f'"
18876 done
18877
18878 # Let's still pretend it is `configure' which instantiates (i.e., don't
18879 # use $as_me), people would be surprised to read:
18880 # /* config.h. Generated by config.status. */
18881 configure_input='Generated from '`
18882 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18883 `' by configure.'
18884 if test x"$ac_file" != x-; then
18885 configure_input="$ac_file. $configure_input"
18886 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18887$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 18888 fi
81ecdfbb
RW
18889 # Neutralize special characters interpreted by sed in replacement strings.
18890 case $configure_input in #(
18891 *\&* | *\|* | *\\* )
18892 ac_sed_conf_input=`$as_echo "$configure_input" |
18893 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18894 *) ac_sed_conf_input=$configure_input;;
18895 esac
4e8d927d 18896
81ecdfbb 18897 case $ac_tag in
d0ac1c44
SM
18898 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18899 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
81ecdfbb
RW
18900 esac
18901 ;;
c906108c
SS
18902 esac
18903
81ecdfbb 18904 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
18905$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18906 X"$ac_file" : 'X\(//\)[^/]' \| \
18907 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
18908 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
18909$as_echo X"$ac_file" |
18910 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18911 s//\1/
18912 q
18913 }
18914 /^X\(\/\/\)[^/].*/{
18915 s//\1/
18916 q
18917 }
18918 /^X\(\/\/\)$/{
18919 s//\1/
18920 q
18921 }
18922 /^X\(\/\).*/{
18923 s//\1/
18924 q
18925 }
18926 s/.*/./; q'`
18927 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
18928 ac_builddir=.
18929
81ecdfbb
RW
18930case "$ac_dir" in
18931.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18932*)
18933 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18934 # A ".." for each directory in $ac_dir_suffix.
18935 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18936 case $ac_top_builddir_sub in
18937 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18938 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18939 esac ;;
18940esac
18941ac_abs_top_builddir=$ac_pwd
18942ac_abs_builddir=$ac_pwd$ac_dir_suffix
18943# for backward compatibility:
18944ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
18945
18946case $srcdir in
81ecdfbb 18947 .) # We are building in place.
bec39cab 18948 ac_srcdir=.
81ecdfbb
RW
18949 ac_top_srcdir=$ac_top_builddir_sub
18950 ac_abs_top_srcdir=$ac_pwd ;;
18951 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 18952 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
18953 ac_top_srcdir=$srcdir
18954 ac_abs_top_srcdir=$srcdir ;;
18955 *) # Relative name.
18956 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18957 ac_top_srcdir=$ac_top_build_prefix$srcdir
18958 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 18959esac
81ecdfbb 18960ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 18961
c906108c 18962
81ecdfbb
RW
18963 case $ac_mode in
18964 :F)
18965 #
18966 # CONFIG_FILE
18967 #
c906108c 18968
bec39cab
AC
18969 case $INSTALL in
18970 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 18971 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 18972 esac
81ecdfbb 18973_ACEOF
121ce6e5 18974
81ecdfbb
RW
18975cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18976# If the template does not know about datarootdir, expand it.
18977# FIXME: This hack should be removed a few years after 2.60.
18978ac_datarootdir_hack=; ac_datarootdir_seen=
18979ac_sed_dataroot='
18980/datarootdir/ {
18981 p
18982 q
18983}
18984/@datadir@/p
18985/@docdir@/p
18986/@infodir@/p
18987/@localedir@/p
18988/@mandir@/p'
18989case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
18990*datarootdir*) ac_datarootdir_seen=yes;;
18991*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
18992 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18993$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
18994_ACEOF
18995cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18996 ac_datarootdir_hack='
18997 s&@datadir@&$datadir&g
18998 s&@docdir@&$docdir&g
18999 s&@infodir@&$infodir&g
19000 s&@localedir@&$localedir&g
19001 s&@mandir@&$mandir&g
19002 s&\\\${datarootdir}&$datarootdir&g' ;;
19003esac
4e8d927d 19004_ACEOF
81ecdfbb
RW
19005
19006# Neutralize VPATH when `$srcdir' = `.'.
19007# Shell code in configure.ac might set extrasub.
19008# FIXME: do we really want to maintain this feature?
19009cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19010ac_sed_extra="$ac_vpsub
bec39cab
AC
19011$extrasub
19012_ACEOF
81ecdfbb 19013cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
19014:t
19015/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
19016s|@configure_input@|$ac_sed_conf_input|;t t
19017s&@top_builddir@&$ac_top_builddir_sub&;t t
19018s&@top_build_prefix@&$ac_top_build_prefix&;t t
19019s&@srcdir@&$ac_srcdir&;t t
19020s&@abs_srcdir@&$ac_abs_srcdir&;t t
19021s&@top_srcdir@&$ac_top_srcdir&;t t
19022s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
19023s&@builddir@&$ac_builddir&;t t
19024s&@abs_builddir@&$ac_abs_builddir&;t t
19025s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
19026s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
19027$ac_datarootdir_hack
19028"
19029eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
19030if $ac_cs_awk_getline; then
d0ac1c44 19031 $AWK -f "$ac_tmp/subs.awk"
81ecdfbb 19032else
d0ac1c44
SM
19033 $AWK -f "$ac_tmp/subs.awk" | $SHELL
19034fi \
19035 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
19036
19037test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
19038 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
19039 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
19040 "$ac_tmp/out"`; test -z "$ac_out"; } &&
81ecdfbb 19041 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 19042which seems to be undefined. Please make sure it is defined" >&5
81ecdfbb 19043$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 19044which seems to be undefined. Please make sure it is defined" >&2;}
81ecdfbb 19045
d0ac1c44 19046 rm -f "$ac_tmp/stdin"
bec39cab 19047 case $ac_file in
d0ac1c44
SM
19048 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
19049 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
81ecdfbb 19050 esac \
d0ac1c44 19051 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
19052 ;;
19053 :H)
19054 #
19055 # CONFIG_HEADER
19056 #
bec39cab 19057 if test x"$ac_file" != x-; then
81ecdfbb
RW
19058 {
19059 $as_echo "/* $configure_input */" \
d0ac1c44
SM
19060 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
19061 } >"$ac_tmp/config.h" \
19062 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19063 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
81ecdfbb
RW
19064 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
19065$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 19066 else
81ecdfbb 19067 rm -f "$ac_file"
d0ac1c44
SM
19068 mv "$ac_tmp/config.h" "$ac_file" \
19069 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
bec39cab
AC
19070 fi
19071 else
81ecdfbb 19072 $as_echo "/* $configure_input */" \
d0ac1c44
SM
19073 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
19074 || as_fn_error $? "could not create -" "$LINENO" 5
bec39cab 19075 fi
81ecdfbb
RW
19076 ;;
19077 :L)
19078 #
19079 # CONFIG_LINK
19080 #
c906108c 19081
81ecdfbb
RW
19082 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
19083 :
b4e70030 19084 else
81ecdfbb
RW
19085 # Prefer the file from the source tree if names are identical.
19086 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
19087 ac_source=$srcdir/$ac_source
19088 fi
b4e70030 19089
81ecdfbb
RW
19090 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
19091$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 19092
81ecdfbb 19093 if test ! -r "$ac_source"; then
d0ac1c44 19094 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
81ecdfbb
RW
19095 fi
19096 rm -f "$ac_file"
bec39cab 19097
81ecdfbb 19098 # Try a relative symlink, then a hard link, then a copy.
d0ac1c44 19099 case $ac_source in
81ecdfbb
RW
19100 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
19101 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
19102 esac
19103 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
19104 ln "$ac_source" "$ac_file" 2>/dev/null ||
19105 cp -p "$ac_source" "$ac_file" ||
d0ac1c44 19106 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
81ecdfbb
RW
19107 fi
19108 ;;
19109 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
19110$as_echo "$as_me: executing $ac_file commands" >&6;}
19111 ;;
c906108c 19112 esac
b4e70030 19113
bec39cab 19114
81ecdfbb
RW
19115 case $ac_file$ac_mode in
19116 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 19117 "gcore":F) chmod +x gcore ;;
1e94266c
SM
19118 "Makefile":F)
19119case x$CONFIG_HEADERS in
19120xconfig.h:config.in)
19121echo > stamp-h ;;
19122esac
19123 ;;
19124 "gdb-gdb.gdb":F)
19125case x$CONFIG_HEADERS in
19126xconfig.h:config.in)
19127echo > stamp-h ;;
141ec9f6
SM
19128esac
19129 ;;
19130 "gdb-gdb.py":F)
19131case x$CONFIG_HEADERS in
19132xconfig.h:config.in)
19133echo > stamp-h ;;
1e94266c
SM
19134esac
19135 ;;
19136 "doc/Makefile":F)
19137case x$CONFIG_HEADERS in
19138xconfig.h:config.in)
19139echo > stamp-h ;;
19140esac
19141 ;;
19142 "data-directory/Makefile":F)
c906108c
SS
19143case x$CONFIG_HEADERS in
19144xconfig.h:config.in)
19145echo > stamp-h ;;
19146esac
bec39cab 19147 ;;
81ecdfbb 19148
bec39cab 19149 esac
81ecdfbb 19150done # for ac_tag
c906108c 19151
bec39cab 19152
81ecdfbb 19153as_fn_exit 0
bec39cab 19154_ACEOF
bec39cab
AC
19155ac_clean_files=$ac_clean_files_save
19156
81ecdfbb 19157test $ac_write_fail = 0 ||
d0ac1c44 19158 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
81ecdfbb 19159
bec39cab
AC
19160
19161# configure is writing to config.log, and then calls config.status.
19162# config.status does its own redirection, appending to config.log.
19163# Unfortunately, on DOS this fails, as config.log is still kept open
19164# by configure, so config.status won't be able to write to it; its
19165# output is simply discarded. So we exec the FD to /dev/null,
19166# effectively closing config.log, so it can be properly (re)opened and
19167# appended to by config.status. When coming back to configure, we
19168# need to make the FD available again.
19169if test "$no_create" != yes; then
19170 ac_cs_success=:
19171 ac_config_status_args=
19172 test "$silent" = yes &&
19173 ac_config_status_args="$ac_config_status_args --quiet"
19174 exec 5>/dev/null
19175 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
19176 exec 5>>config.log
19177 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19178 # would make configure fail if this is the last instruction.
d0ac1c44 19179 $ac_cs_success || as_fn_exit 1
bec39cab 19180fi
c906108c 19181
bec39cab 19182#
81ecdfbb 19183# CONFIG_SUBDIRS section.
bec39cab 19184#
c906108c
SS
19185if test "$no_recursion" != yes; then
19186
81ecdfbb
RW
19187 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
19188 # so they do not pile up.
c906108c
SS
19189 ac_sub_configure_args=
19190 ac_prev=
fdc59709
PB
19191 eval "set x $ac_configure_args"
19192 shift
19193 for ac_arg
19194 do
c906108c
SS
19195 if test -n "$ac_prev"; then
19196 ac_prev=
19197 continue
19198 fi
bec39cab 19199 case $ac_arg in
c906108c
SS
19200 -cache-file | --cache-file | --cache-fil | --cache-fi \
19201 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
19202 ac_prev=cache_file ;;
19203 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
19204 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
19205 | --c=*)
19206 ;;
19207 --config-cache | -C)
c906108c
SS
19208 ;;
19209 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
19210 ac_prev=srcdir ;;
19211 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
19212 ;;
bec39cab
AC
19213 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
19214 ac_prev=prefix ;;
19215 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
19216 ;;
81ecdfbb
RW
19217 --disable-option-checking)
19218 ;;
fdc59709
PB
19219 *)
19220 case $ac_arg in
81ecdfbb 19221 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 19222 esac
81ecdfbb 19223 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
19224 esac
19225 done
19226
bec39cab
AC
19227 # Always prepend --prefix to ensure using the same prefix
19228 # in subdir configurations.
fdc59709
PB
19229 ac_arg="--prefix=$prefix"
19230 case $ac_arg in
81ecdfbb 19231 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 19232 esac
81ecdfbb
RW
19233 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
19234
19235 # Pass --silent
19236 if test "$silent" = yes; then
19237 ac_sub_configure_args="--silent $ac_sub_configure_args"
19238 fi
19239
19240 # Always prepend --disable-option-checking to silence warnings, since
19241 # different subdirs can have different --enable and --with options.
19242 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 19243
b4e70030 19244 ac_popdir=`pwd`
bec39cab 19245 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
19246
19247 # Do not complain, so a configure script can configure whichever
19248 # parts of a large source tree are present.
fdc59709 19249 test -d "$srcdir/$ac_dir" || continue
c906108c 19250
81ecdfbb
RW
19251 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
19252 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
19253 $as_echo "$ac_msg" >&6
19254 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
19255 ac_builddir=.
19256
81ecdfbb
RW
19257case "$ac_dir" in
19258.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19259*)
19260 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19261 # A ".." for each directory in $ac_dir_suffix.
19262 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19263 case $ac_top_builddir_sub in
19264 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19265 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19266 esac ;;
19267esac
19268ac_abs_top_builddir=$ac_pwd
19269ac_abs_builddir=$ac_pwd$ac_dir_suffix
19270# for backward compatibility:
19271ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
19272
19273case $srcdir in
81ecdfbb 19274 .) # We are building in place.
bec39cab 19275 ac_srcdir=.
81ecdfbb
RW
19276 ac_top_srcdir=$ac_top_builddir_sub
19277 ac_abs_top_srcdir=$ac_pwd ;;
19278 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 19279 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
19280 ac_top_srcdir=$srcdir
19281 ac_abs_top_srcdir=$srcdir ;;
19282 *) # Relative name.
19283 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19284 ac_top_srcdir=$ac_top_build_prefix$srcdir
19285 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 19286esac
81ecdfbb 19287ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 19288
c906108c 19289
fdc59709 19290 cd "$ac_dir"
c906108c
SS
19291
19292 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
19293 if test -f "$ac_srcdir/configure.gnu"; then
19294 ac_sub_configure=$ac_srcdir/configure.gnu
19295 elif test -f "$ac_srcdir/configure"; then
19296 ac_sub_configure=$ac_srcdir/configure
19297 elif test -f "$ac_srcdir/configure.in"; then
19298 # This should be Cygnus configure.
19299 ac_sub_configure=$ac_aux_dir/configure
c906108c 19300 else
81ecdfbb
RW
19301 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
19302$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
19303 ac_sub_configure=
19304 fi
19305
19306 # The recursion is here.
19307 if test -n "$ac_sub_configure"; then
c906108c 19308 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
19309 case $cache_file in
19310 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
19311 *) # Relative name.
19312 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 19313 esac
c906108c 19314
81ecdfbb
RW
19315 { $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
19316$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 19317 # The eval makes quoting arguments work.
fdc59709
PB
19318 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
19319 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 19320 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
19321 fi
19322
fdc59709 19323 cd "$ac_popdir"
c906108c
SS
19324 done
19325fi
81ecdfbb
RW
19326if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19327 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19328$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
19329fi
c906108c 19330
This page took 3.150171 seconds and 4 git commands to generate.