]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/configure
Add R_AARCH64_P32_MOVW_PREL_* ELF32 relocs
[thirdparty/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
d0ac1c44
SM
3# Generated by GNU Autoconf 2.69.
4#
5#
6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
81ecdfbb 7#
c906108c
SS
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
81ecdfbb
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
bec39cab 14
81ecdfbb
RW
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18 emulate sh
19 NULLCMD=:
81ecdfbb 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
bec39cab 31fi
bec39cab 32
81ecdfbb
RW
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
bec39cab
AC
79fi
80
81
81ecdfbb
RW
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 90as_myself=
81ecdfbb
RW
91case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94for as_dir in $PATH
95do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100IFS=$as_save_IFS
101
102 ;;
103esac
104# We did not find ourselves, most probably we were run as `sh COMMAND'
105# in which case we are not to be found in the path.
106if test "x$as_myself" = x; then
107 as_myself=$0
108fi
109if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112fi
113
114# Unset variables that we do not need and which cause bugs (e.g. in
115# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116# suppresses any "Segmentation fault" message there. '((' could
117# trigger a bug in pdksh 5.2.14.
118for as_var in BASH_ENV ENV MAIL MAILPATH
119do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121done
bec39cab
AC
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
81ecdfbb
RW
127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export LANGUAGE
131
132# CDPATH.
133(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
d0ac1c44
SM
135# Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140# neutralization value for shells without unset; and this also
141# works around shells that cannot unset nonexistent variables.
142# Preserve -v and -x to the replacement shell.
143BASH_ENV=/dev/null
144ENV=/dev/null
145(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151esac
152exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153# Admittedly, this is quite paranoid, since all the known shells bail
154# out after a failed `exec'.
155$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
81ecdfbb
RW
160if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174esac
175fi
176"
177 as_required="as_fn_return () { (exit \$1); }
178as_fn_success () { as_fn_return 0; }
179as_fn_failure () { as_fn_return 1; }
180as_fn_ret_success () { return 0; }
181as_fn_ret_failure () { return 1; }
182
183exitcode=0
184as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190else
191 exitcode=1; echo positional parameters were not saved.
192fi
d0ac1c44
SM
193test x\$exitcode = x0 || exit 1
194test -x / || exit 1"
81ecdfbb
RW
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202else
203 as_have_required=no
204fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209as_found=false
210for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab 211do
81ecdfbb
RW
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225fi
226fi
227 done;;
228 esac
229 as_found=false
230done
231$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 CONFIG_SHELL=$SHELL as_have_required=yes
234fi; }
235IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
d0ac1c44
SM
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241# neutralization value for shells without unset; and this also
242# works around shells that cannot unset nonexistent variables.
243# Preserve -v and -x to the replacement shell.
244BASH_ENV=/dev/null
245ENV=/dev/null
246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252esac
253exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254# Admittedly, this is quite paranoid, since all the known shells bail
255# out after a failed `exec'.
256$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257exit 255
81ecdfbb
RW
258fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
bec39cab 266 else
81ecdfbb
RW
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268$0: including any error possibly output before this
269$0: message. Then install a modern shell, or manually run
270$0: the script under such a shell if you do have one."
bec39cab 271 fi
81ecdfbb
RW
272 exit 1
273fi
274fi
275fi
276SHELL=${CONFIG_SHELL-/bin/sh}
277export SHELL
278# Unset more variables known to interfere with behavior of common tools.
279CLICOLOR_FORCE= GREP_OPTIONS=
280unset CLICOLOR_FORCE GREP_OPTIONS
281
282## --------------------- ##
283## M4sh Shell Functions. ##
284## --------------------- ##
285# as_fn_unset VAR
286# ---------------
287# Portably unset VAR.
288as_fn_unset ()
289{
290 { eval $1=; unset $1;}
291}
292as_unset=as_fn_unset
293
294# as_fn_set_status STATUS
295# -----------------------
296# Set $? to STATUS, without forking.
297as_fn_set_status ()
298{
299 return $1
300} # as_fn_set_status
bec39cab 301
81ecdfbb
RW
302# as_fn_exit STATUS
303# -----------------
304# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305as_fn_exit ()
306{
307 set +e
308 as_fn_set_status $1
309 exit $1
310} # as_fn_exit
311
312# as_fn_mkdir_p
313# -------------
314# Create "$as_dir" as a directory, including parents if necessary.
315as_fn_mkdir_p ()
316{
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334$as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb
RW
356
357
358} # as_fn_mkdir_p
d0ac1c44
SM
359
360# as_fn_executable_p FILE
361# -----------------------
362# Test if FILE is an executable regular file.
363as_fn_executable_p ()
364{
365 test -f "$1" && test -x "$1"
366} # as_fn_executable_p
81ecdfbb
RW
367# as_fn_append VAR VALUE
368# ----------------------
369# Append the text in VALUE to the end of the definition contained in VAR. Take
370# advantage of any shell optimizations that allow amortized linear growth over
371# repeated appends, instead of the typical quadratic growth present in naive
372# implementations.
373if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383fi # as_fn_append
384
385# as_fn_arith ARG...
386# ------------------
387# Perform arithmetic evaluation on the ARGs, and store the result in the
388# global $as_val. Take advantage of shells that can avoid forks. The arguments
389# must be portable across $(()) and expr.
390if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400fi # as_fn_arith
401
402
d0ac1c44
SM
403# as_fn_error STATUS ERROR [LINENO LOG_FD]
404# ----------------------------------------
81ecdfbb
RW
405# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 407# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
408as_fn_error ()
409{
d0ac1c44
SM
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 414 fi
d0ac1c44 415 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
416 as_fn_exit $as_status
417} # as_fn_error
418
419if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
421 as_expr=expr
422else
423 as_expr=false
424fi
425
81ecdfbb 426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
427 as_basename=basename
428else
429 as_basename=false
430fi
431
81ecdfbb
RW
432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434else
435 as_dirname=false
436fi
bec39cab 437
81ecdfbb 438as_me=`$as_basename -- "$0" ||
bec39cab
AC
439$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442$as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
bec39cab 456
b4e70030
JB
457# Avoid depending upon Character Ranges.
458as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461as_cr_digits='0123456789'
462as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 463
bec39cab 464
81ecdfbb
RW
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
bec39cab 474 sed '
81ecdfbb
RW
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
bec39cab 479 N
81ecdfbb
RW
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 482 t loop
81ecdfbb 483 s/-\n.*//
bec39cab 484 ' >$as_me.lineno &&
81ecdfbb
RW
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
bec39cab 487
d0ac1c44
SM
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
bec39cab
AC
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
81ecdfbb
RW
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
bec39cab
AC
496 # Exit status is that of the last command.
497 exit
498}
499
81ecdfbb
RW
500ECHO_C= ECHO_N= ECHO_T=
501case `echo -n x` in #(((((
502-n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509*)
510 ECHO_N='-n';;
bec39cab
AC
511esac
512
81ecdfbb
RW
513rm -f conf$$ conf$$.exe conf$$.file
514if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
bec39cab 516else
81ecdfbb
RW
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
bec39cab 519fi
81ecdfbb
RW
520if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 522 as_ln_s='ln -s'
81ecdfbb
RW
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 526 # In both cases, we have to default to `cp -pR'.
81ecdfbb 527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 528 as_ln_s='cp -pR'
81ecdfbb
RW
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
d0ac1c44 532 as_ln_s='cp -pR'
b4e70030 533 fi
bec39cab 534else
d0ac1c44 535 as_ln_s='cp -pR'
bec39cab 536fi
81ecdfbb
RW
537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538rmdir conf$$.dir 2>/dev/null
bec39cab
AC
539
540if mkdir -p . 2>/dev/null; then
81ecdfbb 541 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
542else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545fi
546
d0ac1c44
SM
547as_test_x='test -x'
548as_executable_p=as_fn_executable_p
bec39cab
AC
549
550# Sed expression to map a string onto a valid CPP name.
551as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553# Sed expression to map a string onto a valid variable name.
554as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
d0ac1c44
SM
557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 6>&1
c906108c 559
bec39cab 560# Name of the host.
d0ac1c44 561# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
bec39cab
AC
562# so uname gets run too.
563ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
bec39cab
AC
565#
566# Initializations.
567#
c906108c 568ac_default_prefix=/usr/local
81ecdfbb 569ac_clean_files=
bec39cab 570ac_config_libobj_dir=.
81ecdfbb 571LIBOBJS=
bec39cab
AC
572cross_compiling=no
573subdirs=
574MFLAGS=
575MAKEFLAGS=
b4e70030 576
bec39cab
AC
577# Identity of this package.
578PACKAGE_NAME=
579PACKAGE_TARNAME=
580PACKAGE_VERSION=
581PACKAGE_STRING=
582PACKAGE_BUGREPORT=
81ecdfbb 583PACKAGE_URL=
bec39cab
AC
584
585ac_unique_file="main.c"
586# Factoring default headers for most tests.
587ac_includes_default="\
588#include <stdio.h>
81ecdfbb 589#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
590# include <sys/types.h>
591#endif
81ecdfbb 592#ifdef HAVE_SYS_STAT_H
bec39cab
AC
593# include <sys/stat.h>
594#endif
81ecdfbb 595#ifdef STDC_HEADERS
bec39cab
AC
596# include <stdlib.h>
597# include <stddef.h>
598#else
81ecdfbb 599# ifdef HAVE_STDLIB_H
bec39cab
AC
600# include <stdlib.h>
601# endif
602#endif
81ecdfbb
RW
603#ifdef HAVE_STRING_H
604# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
605# include <memory.h>
606# endif
607# include <string.h>
608#endif
81ecdfbb 609#ifdef HAVE_STRINGS_H
bec39cab
AC
610# include <strings.h>
611#endif
81ecdfbb 612#ifdef HAVE_INTTYPES_H
bec39cab 613# include <inttypes.h>
bec39cab 614#endif
81ecdfbb
RW
615#ifdef HAVE_STDINT_H
616# include <stdint.h>
617#endif
618#ifdef HAVE_UNISTD_H
bec39cab
AC
619# include <unistd.h>
620#endif"
621
81ecdfbb 622enable_option_checking=no
d0ac1c44 623ac_header_list=
c971b7fa 624ac_subst_vars='LTLIBOBJS
81ecdfbb 625LIBOBJS
b292c783
JK
626GCORE_TRANSFORM_NAME
627GDB_TRANSFORM_NAME
e3487908 628XSLTPROC
81ecdfbb 629GDB_NM_FILE
393fd4c3
YQ
630LTLIBBABELTRACE
631LIBBABELTRACE
632HAVE_LIBBABELTRACE
21ea5acd
SDJ
633HAVE_NATIVE_GCORE_HOST
634NAT_GENERATED_FILES
635XM_CLIBS
636MH_CFLAGS
637LOADLIBES
638NAT_CDEPS
639NATDEPFILES
640NAT_FILE
81ecdfbb
RW
641target_subdir
642CONFIG_UNINSTALL
643CONFIG_INSTALL
644CONFIG_CLEAN
645CONFIG_ALL
646CONFIG_SRCS
647CONFIG_DEPS
648CONFIG_OBS
649PROFILE_CFLAGS
650ENABLE_CFLAGS
651SIM_OBS
652SIM
653XMKMF
654GDBTK_SRC_DIR
655GDBTK_CFLAGS
656GDBTKLIBS
657X_LIBS
658X_LDFLAGS
659X_CFLAGS
660TK_XINCLUDES
661TK_DEPS
662TK_LIBRARY
663TK_INCLUDE
664TK_STUB_LIB_SPEC
665TK_STUB_LIB_FLAG
666TK_STUB_LIB_FILE
667TK_LIB_SPEC
668TK_LIB_FLAG
669TK_LIB_FILE
670TK_SRC_DIR
671TK_BIN_DIR
672TK_VERSION
673TCL_DEPS
674TCL_LIBRARY
675TCL_INCLUDE
676TCL_STUB_LIB_SPEC
677TCL_STUB_LIB_FLAG
678TCL_STUB_LIB_FILE
679TCL_LIB_SPEC
680TCL_LIB_FLAG
681TCL_LIB_FILE
682TCL_SRC_DIR
683TCL_BIN_DIR
684TCL_PATCH_LEVEL
685TCL_VERSION
686WIN32LDAPP
687GUI_CFLAGS_X
688LIBGUI
608e2dbb
TT
689LTLIBLZMA
690LIBLZMA
691HAVE_LIBLZMA
81ecdfbb
RW
692WIN32LIBS
693SER_HARDWIRE
694WERROR_CFLAGS
695WARN_CFLAGS
696SYSTEM_GDBINIT
81ecdfbb
RW
697TARGET_SYSTEM_ROOT
698CONFIG_LDFLAGS
f6528abd 699RDYNAMIC
81ecdfbb 700ALLOCA
58bfce93
MM
701LTLIBIPT
702LIBIPT
703HAVE_LIBIPT
62f29fda
TT
704SRCHIGH_CFLAGS
705SRCHIGH_LIBS
4df42755
DE
706HAVE_GUILE_FALSE
707HAVE_GUILE_TRUE
ed3ef339
DE
708GUILE_LIBS
709GUILE_CPPFLAGS
e76c5d17
DE
710GUILD_TARGET_FLAG
711GUILD
ed3ef339 712pkg_config_prog_path
4df42755
DE
713HAVE_PYTHON_FALSE
714HAVE_PYTHON_TRUE
ac534cba
JB
715PYTHON_LIBS
716PYTHON_CPPFLAGS
81ecdfbb 717PYTHON_CFLAGS
ec685c5e 718python_prog_path
2400729e
UW
719LTLIBMPFR
720LIBMPFR
721HAVE_LIBMPFR
81ecdfbb
RW
722LTLIBEXPAT
723LIBEXPAT
724HAVE_LIBEXPAT
b8e0a31c 725JIT_READER_DIR
f997c383 726TARGET_PTR
39037522 727READLINE_TEXI_INCFLAG
81ecdfbb
RW
728READLINE_CFLAGS
729READLINE_DEPS
730READLINE
016a3251
DD
731LTLIBICONV
732LIBICONV
711a72d3
L
733zlibinc
734zlibdir
81ecdfbb
RW
735MIG
736WINDRES
737DLLTOOL
c971b7fa 738AR
81ecdfbb
RW
739YFLAGS
740YACC
c971b7fa 741RANLIB
81ecdfbb 742LN_S
c971b7fa
PA
743INSTALL_DATA
744INSTALL_SCRIPT
745INSTALL_PROGRAM
746AWK
81ecdfbb
RW
747REPORT_BUGS_TEXI
748REPORT_BUGS_TO
749PKGVERSION
44cee4fd 750CODESIGN_CERT
b292c783 751HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
752TARGET_OBS
753subdirs
754GDB_DATADIR
755DEBUGDIR
5048e516
JK
756MAKEINFO_EXTRA_FLAGS
757MAKEINFOFLAGS
758MAKEINFO
81ecdfbb
RW
759PACKAGE
760GNULIB_STDINT_H
81ecdfbb
RW
761CATOBJEXT
762GENCAT
763INSTOBJEXT
764DATADIRNAME
765CATALOGS
766POSUB
767GMSGFMT
768XGETTEXT
769INCINTL
770LIBINTL_DEP
771LIBINTL
772USE_NLS
81ecdfbb
RW
773CCDEPMODE
774DEPDIR
775am__leading_dot
0bcda685
PA
776CXX_DIALECT
777HAVE_CXX11
4869db5e
RM
778INSTALL_STRIP_PROGRAM
779STRIP
780install_sh
81ecdfbb
RW
781target_os
782target_vendor
783target_cpu
784target
785host_os
786host_vendor
787host_cpu
788host
789build_os
790build_vendor
791build_cpu
792build
c971b7fa
PA
793EGREP
794GREP
795CPP
3bc3d82a
PA
796ac_ct_CXX
797CXXFLAGS
798CXX
81ecdfbb
RW
799OBJEXT
800EXEEXT
801ac_ct_CC
802CPPFLAGS
803LDFLAGS
804CFLAGS
805CC
806MAINT
807MAINTAINER_MODE_FALSE
808MAINTAINER_MODE_TRUE
809target_alias
810host_alias
811build_alias
812LIBS
813ECHO_T
814ECHO_N
815ECHO_C
816DEFS
817mandir
818localedir
819libdir
820psdir
821pdfdir
822dvidir
823htmldir
824infodir
825docdir
826oldincludedir
827includedir
828localstatedir
829sharedstatedir
830sysconfdir
831datadir
832datarootdir
833libexecdir
834sbindir
835bindir
836program_transform_name
837prefix
838exec_prefix
839PACKAGE_URL
840PACKAGE_BUGREPORT
841PACKAGE_STRING
842PACKAGE_VERSION
843PACKAGE_TARNAME
844PACKAGE_NAME
845PATH_SEPARATOR
846SHELL'
2b351b19 847ac_subst_files='nat_makefile_frag'
81ecdfbb
RW
848ac_user_opts='
849enable_option_checking
850enable_maintainer_mode
da2f07f1
JK
851enable_plugins
852enable_largefile
81ecdfbb
RW
853with_separate_debug_dir
854with_gdb_datadir
855with_relocated_sources
7349ff92 856with_auto_load_dir
bccbefd2 857with_auto_load_safe_path
81ecdfbb
RW
858enable_targets
859enable_64_bit_bfd
81ecdfbb
RW
860enable_gdbmi
861enable_tui
862enable_gdbtk
05e7c244 863with_libunwind_ia64
81ecdfbb
RW
864with_curses
865enable_profiling
44cee4fd 866enable_codesign
81ecdfbb
RW
867with_pkgversion
868with_bugurl
711a72d3 869with_system_zlib
016a3251
DD
870with_gnu_ld
871enable_rpath
81ecdfbb 872with_libiconv_prefix
478aac75 873with_iconv_bin
81ecdfbb 874with_system_readline
b8e0a31c 875with_jit_reader_dir
81ecdfbb 876with_expat
81ecdfbb 877with_libexpat_prefix
2400729e
UW
878with_mpfr
879with_libmpfr_prefix
81ecdfbb 880with_python
ed3ef339 881with_guile
189b8c2e 882enable_source_highlight
a8db4212 883enable_libmcheck
58bfce93
MM
884with_intel_pt
885with_libipt_prefix
81ecdfbb
RW
886with_included_regex
887with_sysroot
888with_system_gdbinit
889enable_werror
890enable_build_warnings
891enable_gdb_build_warnings
f35d5ade 892enable_ubsan
608e2dbb
TT
893with_lzma
894with_liblzma_prefix
81ecdfbb
RW
895with_tcl
896with_tk
897with_x
898enable_sim
496c0e1b 899enable_gdbserver
393fd4c3
YQ
900with_babeltrace
901with_libbabeltrace_prefix
8ecfd7bd 902enable_unit_tests
81ecdfbb
RW
903'
904 ac_precious_vars='build_alias
905host_alias
906target_alias
907CC
908CFLAGS
909LDFLAGS
910LIBS
911CPPFLAGS
3bc3d82a
PA
912CXX
913CXXFLAGS
914CCC
81ecdfbb 915CPP
f06e05e0
JK
916MAKEINFO
917MAKEINFOFLAGS
81ecdfbb
RW
918YACC
919YFLAGS
920XMKMF'
5ae98d25 921ac_subdirs_all='testsuite
81ecdfbb 922gdbtk
81ecdfbb 923gdbserver'
c906108c
SS
924
925# Initialize some variables set by options.
bec39cab
AC
926ac_init_help=
927ac_init_version=false
81ecdfbb
RW
928ac_unrecognized_opts=
929ac_unrecognized_sep=
c906108c
SS
930# The variables have the same names as the options, with
931# dashes changed to underlines.
bec39cab 932cache_file=/dev/null
c906108c 933exec_prefix=NONE
c906108c 934no_create=
c906108c
SS
935no_recursion=
936prefix=NONE
937program_prefix=NONE
938program_suffix=NONE
939program_transform_name=s,x,x,
940silent=
941site=
942srcdir=
c906108c
SS
943verbose=
944x_includes=NONE
945x_libraries=NONE
bec39cab
AC
946
947# Installation directory options.
948# These are left unexpanded so users can "make install exec_prefix=/foo"
949# and all the variables that are supposed to be based on exec_prefix
950# by default will actually change.
951# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 952# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
953bindir='${exec_prefix}/bin'
954sbindir='${exec_prefix}/sbin'
955libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
956datarootdir='${prefix}/share'
957datadir='${datarootdir}'
c906108c
SS
958sysconfdir='${prefix}/etc'
959sharedstatedir='${prefix}/com'
960localstatedir='${prefix}/var'
c906108c
SS
961includedir='${prefix}/include'
962oldincludedir='/usr/include'
81ecdfbb
RW
963docdir='${datarootdir}/doc/${PACKAGE}'
964infodir='${datarootdir}/info'
965htmldir='${docdir}'
966dvidir='${docdir}'
967pdfdir='${docdir}'
968psdir='${docdir}'
969libdir='${exec_prefix}/lib'
970localedir='${datarootdir}/locale'
971mandir='${datarootdir}/man'
c906108c 972
c906108c 973ac_prev=
81ecdfbb 974ac_dashdash=
c906108c
SS
975for ac_option
976do
c906108c
SS
977 # If the previous option needs an argument, assign it.
978 if test -n "$ac_prev"; then
81ecdfbb 979 eval $ac_prev=\$ac_option
c906108c
SS
980 ac_prev=
981 continue
982 fi
983
81ecdfbb 984 case $ac_option in
d0ac1c44
SM
985 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
986 *=) ac_optarg= ;;
987 *) ac_optarg=yes ;;
81ecdfbb 988 esac
c906108c
SS
989
990 # Accept the important Cygnus configure options, so we can diagnose typos.
991
81ecdfbb
RW
992 case $ac_dashdash$ac_option in
993 --)
994 ac_dashdash=yes ;;
c906108c
SS
995
996 -bindir | --bindir | --bindi | --bind | --bin | --bi)
997 ac_prev=bindir ;;
998 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 999 bindir=$ac_optarg ;;
c906108c
SS
1000
1001 -build | --build | --buil | --bui | --bu)
bec39cab 1002 ac_prev=build_alias ;;
c906108c 1003 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1004 build_alias=$ac_optarg ;;
c906108c
SS
1005
1006 -cache-file | --cache-file | --cache-fil | --cache-fi \
1007 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1008 ac_prev=cache_file ;;
1009 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1010 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1011 cache_file=$ac_optarg ;;
1012
1013 --config-cache | -C)
1014 cache_file=config.cache ;;
c906108c 1015
81ecdfbb 1016 -datadir | --datadir | --datadi | --datad)
c906108c 1017 ac_prev=datadir ;;
81ecdfbb 1018 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1019 datadir=$ac_optarg ;;
c906108c 1020
81ecdfbb
RW
1021 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1022 | --dataroo | --dataro | --datar)
1023 ac_prev=datarootdir ;;
1024 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1025 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1026 datarootdir=$ac_optarg ;;
1027
c906108c 1028 -disable-* | --disable-*)
81ecdfbb 1029 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1030 # Reject names that are not valid shell variable names.
81ecdfbb 1031 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1032 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1033 ac_useropt_orig=$ac_useropt
1034 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1035 case $ac_user_opts in
1036 *"
1037"enable_$ac_useropt"
1038"*) ;;
1039 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1040 ac_unrecognized_sep=', ';;
1041 esac
1042 eval enable_$ac_useropt=no ;;
1043
1044 -docdir | --docdir | --docdi | --doc | --do)
1045 ac_prev=docdir ;;
1046 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1047 docdir=$ac_optarg ;;
1048
1049 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1050 ac_prev=dvidir ;;
1051 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1052 dvidir=$ac_optarg ;;
c906108c
SS
1053
1054 -enable-* | --enable-*)
81ecdfbb 1055 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1056 # Reject names that are not valid shell variable names.
81ecdfbb 1057 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1058 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1059 ac_useropt_orig=$ac_useropt
1060 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1061 case $ac_user_opts in
1062 *"
1063"enable_$ac_useropt"
1064"*) ;;
1065 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1066 ac_unrecognized_sep=', ';;
b4e70030 1067 esac
81ecdfbb 1068 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1069
1070 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1071 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1072 | --exec | --exe | --ex)
1073 ac_prev=exec_prefix ;;
1074 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1075 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1076 | --exec=* | --exe=* | --ex=*)
bec39cab 1077 exec_prefix=$ac_optarg ;;
c906108c
SS
1078
1079 -gas | --gas | --ga | --g)
1080 # Obsolete; use --with-gas.
1081 with_gas=yes ;;
1082
bec39cab
AC
1083 -help | --help | --hel | --he | -h)
1084 ac_init_help=long ;;
1085 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1086 ac_init_help=recursive ;;
1087 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1088 ac_init_help=short ;;
c906108c
SS
1089
1090 -host | --host | --hos | --ho)
bec39cab 1091 ac_prev=host_alias ;;
c906108c 1092 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1093 host_alias=$ac_optarg ;;
c906108c 1094
81ecdfbb
RW
1095 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1096 ac_prev=htmldir ;;
1097 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1098 | --ht=*)
1099 htmldir=$ac_optarg ;;
1100
c906108c
SS
1101 -includedir | --includedir | --includedi | --included | --include \
1102 | --includ | --inclu | --incl | --inc)
1103 ac_prev=includedir ;;
1104 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1105 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1106 includedir=$ac_optarg ;;
c906108c
SS
1107
1108 -infodir | --infodir | --infodi | --infod | --info | --inf)
1109 ac_prev=infodir ;;
1110 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1111 infodir=$ac_optarg ;;
c906108c
SS
1112
1113 -libdir | --libdir | --libdi | --libd)
1114 ac_prev=libdir ;;
1115 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1116 libdir=$ac_optarg ;;
c906108c
SS
1117
1118 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1119 | --libexe | --libex | --libe)
1120 ac_prev=libexecdir ;;
1121 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1122 | --libexe=* | --libex=* | --libe=*)
bec39cab 1123 libexecdir=$ac_optarg ;;
c906108c 1124
81ecdfbb
RW
1125 -localedir | --localedir | --localedi | --localed | --locale)
1126 ac_prev=localedir ;;
1127 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1128 localedir=$ac_optarg ;;
1129
c906108c 1130 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1131 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1132 ac_prev=localstatedir ;;
1133 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1134 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1135 localstatedir=$ac_optarg ;;
c906108c
SS
1136
1137 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1138 ac_prev=mandir ;;
1139 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1140 mandir=$ac_optarg ;;
c906108c
SS
1141
1142 -nfp | --nfp | --nf)
1143 # Obsolete; use --without-fp.
1144 with_fp=no ;;
1145
1146 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1147 | --no-cr | --no-c | -n)
c906108c
SS
1148 no_create=yes ;;
1149
1150 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1151 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1152 no_recursion=yes ;;
1153
1154 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1155 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1156 | --oldin | --oldi | --old | --ol | --o)
1157 ac_prev=oldincludedir ;;
1158 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1159 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1160 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1161 oldincludedir=$ac_optarg ;;
c906108c
SS
1162
1163 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1164 ac_prev=prefix ;;
1165 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1166 prefix=$ac_optarg ;;
c906108c
SS
1167
1168 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1169 | --program-pre | --program-pr | --program-p)
1170 ac_prev=program_prefix ;;
1171 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1172 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1173 program_prefix=$ac_optarg ;;
c906108c
SS
1174
1175 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1176 | --program-suf | --program-su | --program-s)
1177 ac_prev=program_suffix ;;
1178 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1179 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1180 program_suffix=$ac_optarg ;;
c906108c
SS
1181
1182 -program-transform-name | --program-transform-name \
1183 | --program-transform-nam | --program-transform-na \
1184 | --program-transform-n | --program-transform- \
1185 | --program-transform | --program-transfor \
1186 | --program-transfo | --program-transf \
1187 | --program-trans | --program-tran \
1188 | --progr-tra | --program-tr | --program-t)
1189 ac_prev=program_transform_name ;;
1190 -program-transform-name=* | --program-transform-name=* \
1191 | --program-transform-nam=* | --program-transform-na=* \
1192 | --program-transform-n=* | --program-transform-=* \
1193 | --program-transform=* | --program-transfor=* \
1194 | --program-transfo=* | --program-transf=* \
1195 | --program-trans=* | --program-tran=* \
1196 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1197 program_transform_name=$ac_optarg ;;
c906108c 1198
81ecdfbb
RW
1199 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1200 ac_prev=pdfdir ;;
1201 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1202 pdfdir=$ac_optarg ;;
1203
1204 -psdir | --psdir | --psdi | --psd | --ps)
1205 ac_prev=psdir ;;
1206 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1207 psdir=$ac_optarg ;;
1208
c906108c
SS
1209 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1210 | -silent | --silent | --silen | --sile | --sil)
1211 silent=yes ;;
1212
1213 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1214 ac_prev=sbindir ;;
1215 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1216 | --sbi=* | --sb=*)
bec39cab 1217 sbindir=$ac_optarg ;;
c906108c
SS
1218
1219 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1220 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1221 | --sharedst | --shareds | --shared | --share | --shar \
1222 | --sha | --sh)
1223 ac_prev=sharedstatedir ;;
1224 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1225 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1226 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1227 | --sha=* | --sh=*)
bec39cab 1228 sharedstatedir=$ac_optarg ;;
c906108c
SS
1229
1230 -site | --site | --sit)
1231 ac_prev=site ;;
1232 -site=* | --site=* | --sit=*)
bec39cab 1233 site=$ac_optarg ;;
3ace7edb 1234
c906108c
SS
1235 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1236 ac_prev=srcdir ;;
1237 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1238 srcdir=$ac_optarg ;;
c906108c
SS
1239
1240 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1241 | --syscon | --sysco | --sysc | --sys | --sy)
1242 ac_prev=sysconfdir ;;
1243 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1244 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1245 sysconfdir=$ac_optarg ;;
c906108c
SS
1246
1247 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1248 ac_prev=target_alias ;;
c906108c 1249 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1250 target_alias=$ac_optarg ;;
c906108c
SS
1251
1252 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1253 verbose=yes ;;
1254
bec39cab
AC
1255 -version | --version | --versio | --versi | --vers | -V)
1256 ac_init_version=: ;;
c906108c
SS
1257
1258 -with-* | --with-*)
81ecdfbb 1259 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1260 # Reject names that are not valid shell variable names.
81ecdfbb 1261 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1262 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1263 ac_useropt_orig=$ac_useropt
1264 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1265 case $ac_user_opts in
1266 *"
1267"with_$ac_useropt"
1268"*) ;;
1269 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1270 ac_unrecognized_sep=', ';;
b4e70030 1271 esac
81ecdfbb 1272 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1273
1274 -without-* | --without-*)
81ecdfbb 1275 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1276 # Reject names that are not valid shell variable names.
81ecdfbb 1277 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1278 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1279 ac_useropt_orig=$ac_useropt
1280 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1281 case $ac_user_opts in
1282 *"
1283"with_$ac_useropt"
1284"*) ;;
1285 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1286 ac_unrecognized_sep=', ';;
1287 esac
1288 eval with_$ac_useropt=no ;;
c906108c
SS
1289
1290 --x)
1291 # Obsolete; use --with-x.
1292 with_x=yes ;;
1293
1294 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1295 | --x-incl | --x-inc | --x-in | --x-i)
1296 ac_prev=x_includes ;;
1297 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1298 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1299 x_includes=$ac_optarg ;;
c906108c
SS
1300
1301 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1302 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1303 ac_prev=x_libraries ;;
1304 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1305 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1306 x_libraries=$ac_optarg ;;
c906108c 1307
d0ac1c44
SM
1308 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1309Try \`$0 --help' for more information"
c906108c
SS
1310 ;;
1311
bec39cab
AC
1312 *=*)
1313 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1314 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1315 case $ac_envvar in #(
1316 '' | [0-9]* | *[!_$as_cr_alnum]* )
d0ac1c44 1317 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
81ecdfbb
RW
1318 esac
1319 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1320 export $ac_envvar ;;
1321
c906108c 1322 *)
bec39cab 1323 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1324 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1325 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1326 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
d0ac1c44 1327 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
c906108c
SS
1328 ;;
1329
1330 esac
1331done
1332
1333if test -n "$ac_prev"; then
bec39cab 1334 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
d0ac1c44 1335 as_fn_error $? "missing argument to $ac_option"
c906108c 1336fi
c906108c 1337
81ecdfbb
RW
1338if test -n "$ac_unrecognized_opts"; then
1339 case $enable_option_checking in
1340 no) ;;
d0ac1c44 1341 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
81ecdfbb 1342 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1343 esac
81ecdfbb 1344fi
b4e70030 1345
81ecdfbb
RW
1346# Check all directory arguments for consistency.
1347for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1348 datadir sysconfdir sharedstatedir localstatedir includedir \
1349 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1350 libdir localedir mandir
b4e70030 1351do
81ecdfbb
RW
1352 eval ac_val=\$$ac_var
1353 # Remove trailing slashes.
1354 case $ac_val in
1355 */ )
1356 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1357 eval $ac_var=\$ac_val;;
1358 esac
1359 # Be sure to have absolute directory names.
b4e70030 1360 case $ac_val in
81ecdfbb
RW
1361 [\\/$]* | ?:[\\/]* ) continue;;
1362 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1363 esac
d0ac1c44 1364 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1365done
1366
bec39cab
AC
1367# There might be people who depend on the old broken behavior: `$host'
1368# used to hold the argument of --host etc.
1369# FIXME: To remove some day.
1370build=$build_alias
1371host=$host_alias
1372target=$target_alias
1373
1374# FIXME: To remove some day.
1375if test "x$host_alias" != x; then
1376 if test "x$build_alias" = x; then
1377 cross_compiling=maybe
bec39cab
AC
1378 elif test "x$build_alias" != "x$host_alias"; then
1379 cross_compiling=yes
1380 fi
1381fi
c906108c 1382
bec39cab
AC
1383ac_tool_prefix=
1384test -n "$host_alias" && ac_tool_prefix=$host_alias-
1385
1386test "$silent" = yes && exec 6>/dev/null
c906108c 1387
c906108c 1388
81ecdfbb
RW
1389ac_pwd=`pwd` && test -n "$ac_pwd" &&
1390ac_ls_di=`ls -di .` &&
1391ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
d0ac1c44 1392 as_fn_error $? "working directory cannot be determined"
81ecdfbb 1393test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
d0ac1c44 1394 as_fn_error $? "pwd does not report name of working directory"
81ecdfbb
RW
1395
1396
c906108c
SS
1397# Find the source files, if location was not specified.
1398if test -z "$srcdir"; then
1399 ac_srcdir_defaulted=yes
81ecdfbb
RW
1400 # Try the directory containing this script, then the parent directory.
1401 ac_confdir=`$as_dirname -- "$as_myself" ||
1402$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1403 X"$as_myself" : 'X\(//\)[^/]' \| \
1404 X"$as_myself" : 'X\(//\)$' \| \
1405 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1406$as_echo X"$as_myself" |
1407 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1408 s//\1/
1409 q
1410 }
1411 /^X\(\/\/\)[^/].*/{
1412 s//\1/
1413 q
1414 }
1415 /^X\(\/\/\)$/{
1416 s//\1/
1417 q
1418 }
1419 /^X\(\/\).*/{
1420 s//\1/
1421 q
1422 }
1423 s/.*/./; q'`
c906108c 1424 srcdir=$ac_confdir
81ecdfbb 1425 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1426 srcdir=..
1427 fi
1428else
1429 ac_srcdir_defaulted=no
1430fi
81ecdfbb
RW
1431if test ! -r "$srcdir/$ac_unique_file"; then
1432 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
d0ac1c44 1433 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
81ecdfbb
RW
1434fi
1435ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1436ac_abs_confdir=`(
d0ac1c44 1437 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
81ecdfbb
RW
1438 pwd)`
1439# When building in place, set srcdir=.
1440if test "$ac_abs_confdir" = "$ac_pwd"; then
1441 srcdir=.
1442fi
1443# Remove unnecessary trailing slashes from srcdir.
1444# Double slashes in file names in object file debugging info
1445# mess up M-x gdb in Emacs.
1446case $srcdir in
1447*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1448esac
1449for ac_var in $ac_precious_vars; do
1450 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1451 eval ac_env_${ac_var}_value=\$${ac_var}
1452 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1453 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1454done
c906108c 1455
bec39cab
AC
1456#
1457# Report the --help message.
1458#
1459if test "$ac_init_help" = "long"; then
1460 # Omit some internal or obsolete options to make the list less imposing.
1461 # This message is too long to be a string in the A/UX 3.1 sh.
1462 cat <<_ACEOF
1463\`configure' configures this package to adapt to many kinds of systems.
1464
1465Usage: $0 [OPTION]... [VAR=VALUE]...
1466
1467To assign environment variables (e.g., CC, CFLAGS...), specify them as
1468VAR=VALUE. See below for descriptions of some of the useful variables.
1469
1470Defaults for the options are specified in brackets.
1471
1472Configuration:
1473 -h, --help display this help and exit
1474 --help=short display options specific to this package
1475 --help=recursive display the short help of all the included packages
1476 -V, --version display version information and exit
d0ac1c44 1477 -q, --quiet, --silent do not print \`checking ...' messages
bec39cab
AC
1478 --cache-file=FILE cache test results in FILE [disabled]
1479 -C, --config-cache alias for \`--cache-file=config.cache'
1480 -n, --no-create do not create output files
1481 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1482
bec39cab
AC
1483Installation directories:
1484 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1485 [$ac_default_prefix]
bec39cab 1486 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1487 [PREFIX]
bec39cab
AC
1488
1489By default, \`make install' will install all the files in
1490\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1491an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1492for instance \`--prefix=\$HOME'.
1493
1494For better control, use the options below.
1495
1496Fine tuning of the installation directories:
81ecdfbb
RW
1497 --bindir=DIR user executables [EPREFIX/bin]
1498 --sbindir=DIR system admin executables [EPREFIX/sbin]
1499 --libexecdir=DIR program executables [EPREFIX/libexec]
1500 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1501 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1502 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1503 --libdir=DIR object code libraries [EPREFIX/lib]
1504 --includedir=DIR C header files [PREFIX/include]
1505 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1506 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1507 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1508 --infodir=DIR info documentation [DATAROOTDIR/info]
1509 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1510 --mandir=DIR man documentation [DATAROOTDIR/man]
1511 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1512 --htmldir=DIR html documentation [DOCDIR]
1513 --dvidir=DIR dvi documentation [DOCDIR]
1514 --pdfdir=DIR pdf documentation [DOCDIR]
1515 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1516_ACEOF
1517
1518 cat <<\_ACEOF
1519
9009e1ae
MR
1520Program names:
1521 --program-prefix=PREFIX prepend PREFIX to installed program names
1522 --program-suffix=SUFFIX append SUFFIX to installed program names
1523 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1524
bec39cab
AC
1525X features:
1526 --x-includes=DIR X include files are in DIR
1527 --x-libraries=DIR X library files are in DIR
1528
1529System types:
1530 --build=BUILD configure for building on BUILD [guessed]
1531 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1532 --target=TARGET configure for building compilers for TARGET [HOST]
1533_ACEOF
1534fi
1535
1536if test -n "$ac_init_help"; then
1537
1538 cat <<\_ACEOF
1539
1540Optional Features:
81ecdfbb 1541 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1542 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1543 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
d0ac1c44
SM
1544 --enable-maintainer-mode
1545 enable make rules and dependencies not useful (and
1546 sometimes confusing) to the casual installer
2974be62 1547 --enable-plugins Enable support for plugins
da2f07f1 1548 --disable-largefile omit support for large files
a1220294
TT
1549 --enable-targets=TARGETS
1550 alternative target configurations
c0993dbe 1551 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1552 --disable-gdbmi disable machine-interface (MI)
1553 --enable-tui enable full-screen terminal user interface (TUI)
1554 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1555 --enable-profiling enable profiling of GDB
44cee4fd 1556 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
3841debe 1557 --disable-rpath do not hardcode runtime library paths
189b8c2e
ST
1558 --enable-source-highlight
1559 enable source-highlight for source listings
17ef446e 1560 --enable-libmcheck Try linking with -lmcheck if available
a1220294 1561 --enable-werror treat compile warnings as errors
32c1c914 1562 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1563 --enable-gdb-build-warnings
32c1c914 1564 enable GDB specific build-time compiler warnings if
a1220294 1565 gcc is used
f35d5ade 1566 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
32c1c914 1567 --enable-sim link gdb with simulator
496c0e1b
JB
1568 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1569 is auto)
8ecfd7bd
SDJ
1570 --enable-unit-tests Enable the inclusion of unit tests when compiling
1571 GDB
bec39cab
AC
1572
1573Optional Packages:
1574 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1575 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1576 --with-separate-debug-dir=PATH
32c1c914 1577 look for global separate debug info in this path
62e4f60c 1578 [LIBDIR/debug]
b14b1491
TT
1579 --with-gdb-datadir=PATH look for global separate data files in this path
1580 [DATADIR/gdb]
29b0e8a2 1581 --with-relocated-sources=PATH
32c1c914 1582 automatically relocate this path for source files
7349ff92 1583 --with-auto-load-dir=PATH
aff139ff 1584 directories from which to load auto-loaded scripts
1564a261 1585 [$debugdir:$datadir/auto-load]
bccbefd2 1586 --with-auto-load-safe-path=PATH
aff139ff 1587 directories safe to hold auto-loaded files
7349ff92 1588 [--with-auto-load-dir]
bccbefd2
JK
1589 --without-auto-load-safe-path
1590 do not restrict auto-loaded files locations
05e7c244 1591 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1592 --with-curses use the curses library instead of the termcap
1593 library
c16158bc
JM
1594 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1595 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1596 --with-system-zlib use installed libz
016a3251
DD
1597 --with-gnu-ld assume the C compiler uses GNU ld default=no
1598 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1599 --without-libiconv-prefix don't search for libiconv in includedir and libdir
478aac75 1600 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1601 --with-system-readline use installed readline library
b8e0a31c
SD
1602 --with-jit-reader-dir=PATH
1603 directory to load the JIT readers from
5c39566f 1604 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1605 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1606 --without-libexpat-prefix don't search for libexpat in includedir and libdir
2400729e
UW
1607 --with-mpfr include MPFR support (auto/yes/no)
1608 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1609 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
0c4a4063
DE
1610 --with-python[=PYTHON] include python support
1611 (auto/yes/no/<python-program>)
ed3ef339
DE
1612 --with-guile[=GUILE] include guile support
1613 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1614 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1615 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1616 --without-libipt-prefix don't search for libipt in includedir and libdir
a1220294
TT
1617 --without-included-regex
1618 don't use included regex; this is the default on
1619 systems with version 2 of the GNU C library (use
1620 with caution on other system)
81ecdfbb 1621 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1622 --with-system-gdbinit=PATH
32c1c914 1623 automatically load a system-wide gdbinit file
608e2dbb
TT
1624 --with-lzma support lzma compression (auto/yes/no)
1625 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1626 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1627 --with-tcl directory containing tcl configuration (tclConfig.sh)
1628 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1629 --with-x use the X Window System
393fd4c3
YQ
1630 --with-babeltrace include babeltrace support (auto/yes/no)
1631 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1632 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1633
1634Some influential environment variables:
1635 CC C compiler command
1636 CFLAGS C compiler flags
1637 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1638 nonstandard directory <lib dir>
81ecdfbb 1639 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 1640 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
81ecdfbb 1641 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1642 CXX C++ compiler command
1643 CXXFLAGS C++ compiler flags
bec39cab 1644 CPP C preprocessor
f06e05e0
JK
1645 MAKEINFO Parent configure detects if it is of sufficient version.
1646 MAKEINFOFLAGS
1647 Parameters for MAKEINFO.
d0ac1c44
SM
1648 YACC The `Yet Another Compiler Compiler' implementation to use.
1649 Defaults to the first program found out of: `bison -y', `byacc',
1650 `yacc'.
81ecdfbb
RW
1651 YFLAGS The list of arguments that will be passed by default to $YACC.
1652 This script will default YFLAGS to the empty string to avoid a
1653 default value of `-d' given by some make applications.
1654 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1655
1656Use these variables to override the choices made by `configure' or to help
1657it to find libraries and programs with nonstandard names/locations.
1658
81ecdfbb 1659Report bugs to the package provider.
bec39cab 1660_ACEOF
81ecdfbb 1661ac_status=$?
bec39cab
AC
1662fi
1663
1664if test "$ac_init_help" = "recursive"; then
1665 # If there are subdirs, report their specific --help.
bec39cab 1666 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1667 test -d "$ac_dir" ||
1668 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1669 continue
bec39cab
AC
1670 ac_builddir=.
1671
81ecdfbb
RW
1672case "$ac_dir" in
1673.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1674*)
1675 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1676 # A ".." for each directory in $ac_dir_suffix.
1677 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1678 case $ac_top_builddir_sub in
1679 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1680 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1681 esac ;;
1682esac
1683ac_abs_top_builddir=$ac_pwd
1684ac_abs_builddir=$ac_pwd$ac_dir_suffix
1685# for backward compatibility:
1686ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1687
1688case $srcdir in
81ecdfbb 1689 .) # We are building in place.
bec39cab 1690 ac_srcdir=.
81ecdfbb
RW
1691 ac_top_srcdir=$ac_top_builddir_sub
1692 ac_abs_top_srcdir=$ac_pwd ;;
1693 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1694 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1695 ac_top_srcdir=$srcdir
1696 ac_abs_top_srcdir=$srcdir ;;
1697 *) # Relative name.
1698 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1699 ac_top_srcdir=$ac_top_build_prefix$srcdir
1700 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1701esac
81ecdfbb 1702ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1703
81ecdfbb
RW
1704 cd "$ac_dir" || { ac_status=$?; continue; }
1705 # Check for guested configure.
1706 if test -f "$ac_srcdir/configure.gnu"; then
1707 echo &&
1708 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1709 elif test -f "$ac_srcdir/configure"; then
1710 echo &&
1711 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1712 else
81ecdfbb
RW
1713 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1714 fi || ac_status=$?
1715 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1716 done
1717fi
1718
81ecdfbb 1719test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1720if $ac_init_version; then
1721 cat <<\_ACEOF
81ecdfbb 1722configure
d0ac1c44 1723generated by GNU Autoconf 2.69
bec39cab 1724
d0ac1c44 1725Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
1726This configure script is free software; the Free Software Foundation
1727gives unlimited permission to copy, distribute and modify it.
1728_ACEOF
81ecdfbb 1729 exit
bec39cab 1730fi
bec39cab 1731
81ecdfbb
RW
1732## ------------------------ ##
1733## Autoconf initialization. ##
1734## ------------------------ ##
bec39cab 1735
81ecdfbb
RW
1736# ac_fn_c_try_compile LINENO
1737# --------------------------
1738# Try to compile conftest.$ac_ext, and return whether this succeeded.
1739ac_fn_c_try_compile ()
1740{
1741 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1742 rm -f conftest.$ac_objext
1743 if { { ac_try="$ac_compile"
1744case "(($ac_try" in
1745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1746 *) ac_try_echo=$ac_try;;
1747esac
1748eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1749$as_echo "$ac_try_echo"; } >&5
1750 (eval "$ac_compile") 2>conftest.err
1751 ac_status=$?
1752 if test -s conftest.err; then
1753 grep -v '^ *+' conftest.err >conftest.er1
1754 cat conftest.er1 >&5
1755 mv -f conftest.er1 conftest.err
1756 fi
1757 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1758 test $ac_status = 0; } && {
1759 test -z "$ac_c_werror_flag" ||
1760 test ! -s conftest.err
1761 } && test -s conftest.$ac_objext; then :
1762 ac_retval=0
1763else
1764 $as_echo "$as_me: failed program was:" >&5
1765sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1766
81ecdfbb
RW
1767 ac_retval=1
1768fi
d0ac1c44
SM
1769 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1770 as_fn_set_status $ac_retval
81ecdfbb
RW
1771
1772} # ac_fn_c_try_compile
1773
3bc3d82a
PA
1774# ac_fn_cxx_try_compile LINENO
1775# ----------------------------
1776# Try to compile conftest.$ac_ext, and return whether this succeeded.
1777ac_fn_cxx_try_compile ()
1778{
1779 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1780 rm -f conftest.$ac_objext
1781 if { { ac_try="$ac_compile"
1782case "(($ac_try" in
1783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1784 *) ac_try_echo=$ac_try;;
1785esac
1786eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1787$as_echo "$ac_try_echo"; } >&5
1788 (eval "$ac_compile") 2>conftest.err
1789 ac_status=$?
1790 if test -s conftest.err; then
1791 grep -v '^ *+' conftest.err >conftest.er1
1792 cat conftest.er1 >&5
1793 mv -f conftest.er1 conftest.err
1794 fi
1795 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1796 test $ac_status = 0; } && {
1797 test -z "$ac_cxx_werror_flag" ||
1798 test ! -s conftest.err
1799 } && test -s conftest.$ac_objext; then :
1800 ac_retval=0
1801else
1802 $as_echo "$as_me: failed program was:" >&5
1803sed 's/^/| /' conftest.$ac_ext >&5
1804
1805 ac_retval=1
1806fi
d0ac1c44
SM
1807 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1808 as_fn_set_status $ac_retval
3bc3d82a
PA
1809
1810} # ac_fn_cxx_try_compile
1811
81ecdfbb
RW
1812# ac_fn_c_try_cpp LINENO
1813# ----------------------
1814# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1815ac_fn_c_try_cpp ()
bec39cab 1816{
81ecdfbb
RW
1817 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1818 if { { ac_try="$ac_cpp conftest.$ac_ext"
1819case "(($ac_try" in
1820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1821 *) ac_try_echo=$ac_try;;
1822esac
1823eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1824$as_echo "$ac_try_echo"; } >&5
1825 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1826 ac_status=$?
1827 if test -s conftest.err; then
1828 grep -v '^ *+' conftest.err >conftest.er1
1829 cat conftest.er1 >&5
1830 mv -f conftest.er1 conftest.err
1831 fi
1832 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 1833 test $ac_status = 0; } > conftest.i && {
81ecdfbb
RW
1834 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1835 test ! -s conftest.err
1836 }; then :
1837 ac_retval=0
1838else
1839 $as_echo "$as_me: failed program was:" >&5
1840sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1841
81ecdfbb
RW
1842 ac_retval=1
1843fi
d0ac1c44
SM
1844 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1845 as_fn_set_status $ac_retval
bec39cab 1846
81ecdfbb 1847} # ac_fn_c_try_cpp
bec39cab 1848
81ecdfbb
RW
1849# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1850# -------------------------------------------------------
1851# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1852# the include files in INCLUDES and setting the cache variable VAR
1853# accordingly.
1854ac_fn_c_check_header_mongrel ()
1855{
1856 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 1857 if eval \${$3+:} false; then :
81ecdfbb
RW
1858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1859$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1860if eval \${$3+:} false; then :
81ecdfbb
RW
1861 $as_echo_n "(cached) " >&6
1862fi
1863eval ac_res=\$$3
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1865$as_echo "$ac_res" >&6; }
1866else
1867 # Is the header compilable?
1868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1869$as_echo_n "checking $2 usability... " >&6; }
1870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1871/* end confdefs.h. */
1872$4
1873#include <$2>
1874_ACEOF
1875if ac_fn_c_try_compile "$LINENO"; then :
1876 ac_header_compiler=yes
1877else
1878 ac_header_compiler=no
1879fi
1880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1882$as_echo "$ac_header_compiler" >&6; }
bec39cab 1883
81ecdfbb
RW
1884# Is the header present?
1885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1886$as_echo_n "checking $2 presence... " >&6; }
1887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1888/* end confdefs.h. */
1889#include <$2>
1890_ACEOF
1891if ac_fn_c_try_cpp "$LINENO"; then :
1892 ac_header_preproc=yes
1893else
1894 ac_header_preproc=no
1895fi
d0ac1c44 1896rm -f conftest.err conftest.i conftest.$ac_ext
81ecdfbb
RW
1897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1898$as_echo "$ac_header_preproc" >&6; }
bec39cab 1899
81ecdfbb
RW
1900# So? What about this header?
1901case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1902 yes:no: )
1903 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1904$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1905 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1906$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1907 ;;
1908 no:yes:* )
1909 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1910$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1911 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1912$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1913 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1914$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1915 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1916$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1918$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1919 ;;
1920esac
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1922$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1923if eval \${$3+:} false; then :
81ecdfbb
RW
1924 $as_echo_n "(cached) " >&6
1925else
1926 eval "$3=\$ac_header_compiler"
1927fi
1928eval ac_res=\$$3
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1930$as_echo "$ac_res" >&6; }
1931fi
d0ac1c44 1932 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 1933
81ecdfbb 1934} # ac_fn_c_check_header_mongrel
bec39cab 1935
81ecdfbb
RW
1936# ac_fn_c_try_run LINENO
1937# ----------------------
1938# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1939# that executables *can* be run.
1940ac_fn_c_try_run ()
1941{
1942 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1943 if { { ac_try="$ac_link"
1944case "(($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_link") 2>&5
1951 ac_status=$?
1952 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1953 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1954 { { case "(($ac_try" in
1955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1956 *) ac_try_echo=$ac_try;;
1957esac
1958eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1959$as_echo "$ac_try_echo"; } >&5
1960 (eval "$ac_try") 2>&5
1961 ac_status=$?
1962 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1963 test $ac_status = 0; }; }; then :
1964 ac_retval=0
1965else
1966 $as_echo "$as_me: program exited with status $ac_status" >&5
1967 $as_echo "$as_me: failed program was:" >&5
1968sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1969
81ecdfbb
RW
1970 ac_retval=$ac_status
1971fi
1972 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
1973 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1974 as_fn_set_status $ac_retval
bec39cab 1975
81ecdfbb 1976} # ac_fn_c_try_run
bec39cab 1977
81ecdfbb
RW
1978# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1979# -------------------------------------------------------
1980# Tests whether HEADER exists and can be compiled using the include files in
1981# INCLUDES, setting the cache variable VAR accordingly.
1982ac_fn_c_check_header_compile ()
1983{
1984 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1986$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1987if eval \${$3+:} false; then :
81ecdfbb
RW
1988 $as_echo_n "(cached) " >&6
1989else
1990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1991/* end confdefs.h. */
1992$4
1993#include <$2>
bec39cab 1994_ACEOF
81ecdfbb
RW
1995if ac_fn_c_try_compile "$LINENO"; then :
1996 eval "$3=yes"
1997else
1998 eval "$3=no"
1999fi
2000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2001fi
2002eval ac_res=\$$3
2003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2004$as_echo "$ac_res" >&6; }
d0ac1c44 2005 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 2006
81ecdfbb 2007} # ac_fn_c_check_header_compile
bec39cab 2008
2974be62
AM
2009# ac_fn_c_try_link LINENO
2010# -----------------------
2011# Try to link conftest.$ac_ext, and return whether this succeeded.
2012ac_fn_c_try_link ()
2013{
2014 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2015 rm -f conftest.$ac_objext conftest$ac_exeext
2016 if { { ac_try="$ac_link"
2017case "(($ac_try" in
2018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2019 *) ac_try_echo=$ac_try;;
2020esac
2021eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2022$as_echo "$ac_try_echo"; } >&5
2023 (eval "$ac_link") 2>conftest.err
2024 ac_status=$?
2025 if test -s conftest.err; then
2026 grep -v '^ *+' conftest.err >conftest.er1
2027 cat conftest.er1 >&5
2028 mv -f conftest.er1 conftest.err
2029 fi
2030 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2031 test $ac_status = 0; } && {
2032 test -z "$ac_c_werror_flag" ||
2033 test ! -s conftest.err
2034 } && test -s conftest$ac_exeext && {
2035 test "$cross_compiling" = yes ||
d0ac1c44 2036 test -x conftest$ac_exeext
2974be62
AM
2037 }; then :
2038 ac_retval=0
2039else
2040 $as_echo "$as_me: failed program was:" >&5
2041sed 's/^/| /' conftest.$ac_ext >&5
2042
2043 ac_retval=1
2044fi
2045 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2046 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2047 # interfere with the next link command; also delete a directory that is
2048 # left behind by Apple's compiler. We do this before executing the actions.
2049 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2050 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2051 as_fn_set_status $ac_retval
2974be62
AM
2052
2053} # ac_fn_c_try_link
2054
81ecdfbb
RW
2055# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2056# --------------------------------------------
2057# Tries to find the compile-time value of EXPR in a program that includes
2058# INCLUDES, setting VAR accordingly. Returns whether the value could be
2059# computed
2060ac_fn_c_compute_int ()
2061{
2062 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2063 if test "$cross_compiling" = yes; then
2064 # Depending upon the size, compute the lo and hi bounds.
2065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2066/* end confdefs.h. */
2067$4
2068int
2069main ()
2070{
2071static int test_array [1 - 2 * !(($2) >= 0)];
d0ac1c44
SM
2072test_array [0] = 0;
2073return test_array [0];
bec39cab 2074
81ecdfbb
RW
2075 ;
2076 return 0;
2077}
2078_ACEOF
2079if ac_fn_c_try_compile "$LINENO"; then :
2080 ac_lo=0 ac_mid=0
2081 while :; do
2082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2083/* end confdefs.h. */
2084$4
2085int
2086main ()
2087{
2088static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2089test_array [0] = 0;
2090return test_array [0];
bec39cab 2091
81ecdfbb
RW
2092 ;
2093 return 0;
2094}
2095_ACEOF
2096if ac_fn_c_try_compile "$LINENO"; then :
2097 ac_hi=$ac_mid; break
2098else
2099 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2100 if test $ac_lo -le $ac_mid; then
2101 ac_lo= ac_hi=
2102 break
2103 fi
2104 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2105fi
81ecdfbb
RW
2106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2107 done
c906108c 2108else
81ecdfbb
RW
2109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2110/* end confdefs.h. */
2111$4
2112int
2113main ()
2114{
2115static int test_array [1 - 2 * !(($2) < 0)];
d0ac1c44
SM
2116test_array [0] = 0;
2117return test_array [0];
bec39cab 2118
81ecdfbb
RW
2119 ;
2120 return 0;
2121}
2122_ACEOF
2123if ac_fn_c_try_compile "$LINENO"; then :
2124 ac_hi=-1 ac_mid=-1
2125 while :; do
2126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2127/* end confdefs.h. */
2128$4
2129int
2130main ()
2131{
2132static int test_array [1 - 2 * !(($2) >= $ac_mid)];
d0ac1c44
SM
2133test_array [0] = 0;
2134return test_array [0];
bec39cab 2135
81ecdfbb
RW
2136 ;
2137 return 0;
2138}
2139_ACEOF
2140if ac_fn_c_try_compile "$LINENO"; then :
2141 ac_lo=$ac_mid; break
2142else
2143 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2144 if test $ac_mid -le $ac_hi; then
2145 ac_lo= ac_hi=
2146 break
2147 fi
2148 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2149fi
2150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2151 done
2152else
2153 ac_lo= ac_hi=
2154fi
2155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2156fi
2157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2158# Binary search between lo and hi bounds.
2159while test "x$ac_lo" != "x$ac_hi"; do
2160 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2162/* end confdefs.h. */
2163$4
2164int
2165main ()
2166{
2167static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2168test_array [0] = 0;
2169return test_array [0];
bec39cab 2170
81ecdfbb
RW
2171 ;
2172 return 0;
2173}
2174_ACEOF
2175if ac_fn_c_try_compile "$LINENO"; then :
2176 ac_hi=$ac_mid
2177else
2178 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2179fi
2180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2181done
2182case $ac_lo in #((
2183?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2184'') ac_retval=1 ;;
2185esac
2186 else
2187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2188/* end confdefs.h. */
2189$4
2190static long int longval () { return $2; }
2191static unsigned long int ulongval () { return $2; }
2192#include <stdio.h>
2193#include <stdlib.h>
2194int
2195main ()
2196{
bec39cab 2197
81ecdfbb
RW
2198 FILE *f = fopen ("conftest.val", "w");
2199 if (! f)
2200 return 1;
2201 if (($2) < 0)
2202 {
2203 long int i = longval ();
2204 if (i != ($2))
2205 return 1;
2206 fprintf (f, "%ld", i);
2207 }
2208 else
2209 {
2210 unsigned long int i = ulongval ();
2211 if (i != ($2))
2212 return 1;
2213 fprintf (f, "%lu", i);
2214 }
2215 /* Do not output a trailing newline, as this causes \r\n confusion
2216 on some platforms. */
2217 return ferror (f) || fclose (f) != 0;
bec39cab 2218
81ecdfbb
RW
2219 ;
2220 return 0;
2221}
2222_ACEOF
2223if ac_fn_c_try_run "$LINENO"; then :
2224 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2225else
2226 ac_retval=1
2227fi
2228rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2229 conftest.$ac_objext conftest.beam conftest.$ac_ext
2230rm -f conftest.val
bec39cab 2231
81ecdfbb 2232 fi
d0ac1c44
SM
2233 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2234 as_fn_set_status $ac_retval
bec39cab 2235
81ecdfbb 2236} # ac_fn_c_compute_int
bec39cab 2237
55a8c076
YQ
2238# ac_fn_c_check_func LINENO FUNC VAR
2239# ----------------------------------
2240# Tests whether FUNC exists, setting the cache variable VAR accordingly
2241ac_fn_c_check_func ()
81ecdfbb
RW
2242{
2243 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2245$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2246if eval \${$3+:} false; then :
81ecdfbb
RW
2247 $as_echo_n "(cached) " >&6
2248else
81ecdfbb
RW
2249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2250/* end confdefs.h. */
55a8c076
YQ
2251/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2252 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2253#define $2 innocuous_$2
2254
2255/* System header to define __stub macros and hopefully few prototypes,
2256 which can conflict with char $2 (); below.
2257 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2258 <limits.h> exists even on freestanding compilers. */
2259
2260#ifdef __STDC__
2261# include <limits.h>
2262#else
2263# include <assert.h>
2264#endif
2265
2266#undef $2
2267
2268/* Override any GCC internal prototype to avoid an error.
2269 Use char because int might match the return type of a GCC
2270 builtin and then its argument prototype would still apply. */
2271#ifdef __cplusplus
2272extern "C"
2273#endif
2274char $2 ();
2275/* The GNU C library defines this for functions which it implements
2276 to always fail with ENOSYS. Some functions are actually named
2277 something starting with __ and the normal name is an alias. */
2278#if defined __stub_$2 || defined __stub___$2
2279choke me
2280#endif
2281
2282int
2283main ()
2284{
2285return $2 ();
2286 ;
2287 return 0;
2288}
2289_ACEOF
2290if ac_fn_c_try_link "$LINENO"; then :
2291 eval "$3=yes"
2292else
2293 eval "$3=no"
2294fi
2295rm -f core conftest.err conftest.$ac_objext \
2296 conftest$ac_exeext conftest.$ac_ext
2297fi
2298eval ac_res=\$$3
2299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2300$as_echo "$ac_res" >&6; }
d0ac1c44 2301 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
55a8c076
YQ
2302
2303} # ac_fn_c_check_func
2304
c56ccc05
MM
2305# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2306# ----------------------------------------------------
2307# Tries to find if the field MEMBER exists in type AGGR, after including
2308# INCLUDES, setting cache variable VAR accordingly.
2309ac_fn_c_check_member ()
2310{
2311 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2313$as_echo_n "checking for $2.$3... " >&6; }
d0ac1c44 2314if eval \${$4+:} false; then :
c56ccc05
MM
2315 $as_echo_n "(cached) " >&6
2316else
2317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2318/* end confdefs.h. */
2319$5
2320int
2321main ()
2322{
2323static $2 ac_aggr;
2324if (ac_aggr.$3)
2325return 0;
2326 ;
2327 return 0;
2328}
2329_ACEOF
2330if ac_fn_c_try_compile "$LINENO"; then :
2331 eval "$4=yes"
2332else
2333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2334/* end confdefs.h. */
2335$5
2336int
2337main ()
2338{
2339static $2 ac_aggr;
2340if (sizeof ac_aggr.$3)
2341return 0;
2342 ;
2343 return 0;
2344}
2345_ACEOF
2346if ac_fn_c_try_compile "$LINENO"; then :
2347 eval "$4=yes"
2348else
2349 eval "$4=no"
2350fi
2351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2352fi
2353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2354fi
2355eval ac_res=\$$4
2356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2357$as_echo "$ac_res" >&6; }
d0ac1c44 2358 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
c56ccc05
MM
2359
2360} # ac_fn_c_check_member
2361
07697489
PA
2362# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2363# -------------------------------------------
2364# Tests whether TYPE exists after having included INCLUDES, setting cache
2365# variable VAR accordingly.
2366ac_fn_c_check_type ()
2367{
2368 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2370$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2371if eval \${$3+:} false; then :
07697489
PA
2372 $as_echo_n "(cached) " >&6
2373else
2374 eval "$3=no"
2375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2376/* end confdefs.h. */
2377$4
2378int
2379main ()
2380{
2381if (sizeof ($2))
2382 return 0;
2383 ;
2384 return 0;
2385}
2386_ACEOF
2387if ac_fn_c_try_compile "$LINENO"; then :
2388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2389/* end confdefs.h. */
2390$4
2391int
2392main ()
2393{
2394if (sizeof (($2)))
2395 return 0;
2396 ;
2397 return 0;
2398}
2399_ACEOF
2400if ac_fn_c_try_compile "$LINENO"; then :
2401
2402else
2403 eval "$3=yes"
2404fi
2405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2406fi
2407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2408fi
2409eval ac_res=\$$3
2410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2411$as_echo "$ac_res" >&6; }
d0ac1c44 2412 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
07697489
PA
2413
2414} # ac_fn_c_check_type
2415
d0ac1c44
SM
2416# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2417# ---------------------------------------------
2418# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2419# accordingly.
770d76d7
PA
2420ac_fn_c_check_decl ()
2421{
2422 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2423 as_decl_name=`echo $2|sed 's/ *(.*//'`
2424 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2426$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
d0ac1c44 2427if eval \${$3+:} false; then :
770d76d7
PA
2428 $as_echo_n "(cached) " >&6
2429else
2430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2431/* end confdefs.h. */
2432$4
2433int
2434main ()
2435{
2436#ifndef $as_decl_name
2437#ifdef __cplusplus
2438 (void) $as_decl_use;
2439#else
2440 (void) $as_decl_name;
2441#endif
2442#endif
2443
2444 ;
2445 return 0;
2446}
2447_ACEOF
2448if ac_fn_c_try_compile "$LINENO"; then :
2449 eval "$3=yes"
2450else
2451 eval "$3=no"
2452fi
2453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2454fi
2455eval ac_res=\$$3
2456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2457$as_echo "$ac_res" >&6; }
d0ac1c44 2458 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
770d76d7
PA
2459
2460} # ac_fn_c_check_decl
f35d5ade
TT
2461
2462# ac_fn_cxx_try_link LINENO
2463# -------------------------
2464# Try to link conftest.$ac_ext, and return whether this succeeded.
2465ac_fn_cxx_try_link ()
2466{
2467 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2468 rm -f conftest.$ac_objext conftest$ac_exeext
2469 if { { ac_try="$ac_link"
2470case "(($ac_try" in
2471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2472 *) ac_try_echo=$ac_try;;
2473esac
2474eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2475$as_echo "$ac_try_echo"; } >&5
2476 (eval "$ac_link") 2>conftest.err
2477 ac_status=$?
2478 if test -s conftest.err; then
2479 grep -v '^ *+' conftest.err >conftest.er1
2480 cat conftest.er1 >&5
2481 mv -f conftest.er1 conftest.err
2482 fi
2483 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2484 test $ac_status = 0; } && {
2485 test -z "$ac_cxx_werror_flag" ||
2486 test ! -s conftest.err
2487 } && test -s conftest$ac_exeext && {
2488 test "$cross_compiling" = yes ||
2489 test -x conftest$ac_exeext
2490 }; then :
2491 ac_retval=0
2492else
2493 $as_echo "$as_me: failed program was:" >&5
2494sed 's/^/| /' conftest.$ac_ext >&5
2495
2496 ac_retval=1
2497fi
2498 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2499 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2500 # interfere with the next link command; also delete a directory that is
2501 # left behind by Apple's compiler. We do this before executing the actions.
2502 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2503 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2504 as_fn_set_status $ac_retval
2505
2506} # ac_fn_cxx_try_link
81ecdfbb
RW
2507cat >config.log <<_ACEOF
2508This file contains any messages produced by compilers while
2509running configure, to aid debugging if configure makes a mistake.
d5af19ba 2510
81ecdfbb 2511It was created by $as_me, which was
d0ac1c44 2512generated by GNU Autoconf 2.69. Invocation command line was
b4e70030 2513
81ecdfbb 2514 $ $0 $@
413ccac7 2515
81ecdfbb
RW
2516_ACEOF
2517exec 5>>config.log
2518{
2519cat <<_ASUNAME
2520## --------- ##
2521## Platform. ##
2522## --------- ##
413ccac7 2523
81ecdfbb
RW
2524hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2525uname -m = `(uname -m) 2>/dev/null || echo unknown`
2526uname -r = `(uname -r) 2>/dev/null || echo unknown`
2527uname -s = `(uname -s) 2>/dev/null || echo unknown`
2528uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2529
81ecdfbb
RW
2530/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2531/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2532
81ecdfbb
RW
2533/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2534/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2535/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2536/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2537/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2538/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2539/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2540
81ecdfbb 2541_ASUNAME
bec39cab 2542
bec39cab
AC
2543as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2544for as_dir in $PATH
2545do
2546 IFS=$as_save_IFS
2547 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2548 $as_echo "PATH: $as_dir"
2549 done
2550IFS=$as_save_IFS
bec39cab 2551
81ecdfbb 2552} >&5
bec39cab 2553
81ecdfbb 2554cat >&5 <<_ACEOF
bec39cab 2555
bec39cab 2556
81ecdfbb
RW
2557## ----------- ##
2558## Core tests. ##
2559## ----------- ##
2560
2561_ACEOF
2562
2563
2564# Keep a trace of the command line.
2565# Strip out --no-create and --no-recursion so they do not pile up.
2566# Strip out --silent because we don't want to record it for future runs.
2567# Also quote any args containing shell meta-characters.
2568# Make two passes to allow for proper duplicate-argument suppression.
2569ac_configure_args=
2570ac_configure_args0=
2571ac_configure_args1=
2572ac_must_keep_next=false
2573for ac_pass in 1 2
2574do
2575 for ac_arg
2576 do
2577 case $ac_arg in
2578 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2579 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2580 | -silent | --silent | --silen | --sile | --sil)
2581 continue ;;
2582 *\'*)
2583 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2584 esac
2585 case $ac_pass in
2586 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2587 2)
2588 as_fn_append ac_configure_args1 " '$ac_arg'"
2589 if test $ac_must_keep_next = true; then
2590 ac_must_keep_next=false # Got value, back to normal.
2591 else
2592 case $ac_arg in
2593 *=* | --config-cache | -C | -disable-* | --disable-* \
2594 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2595 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2596 | -with-* | --with-* | -without-* | --without-* | --x)
2597 case "$ac_configure_args0 " in
2598 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2599 esac
2600 ;;
2601 -* ) ac_must_keep_next=true ;;
2602 esac
2603 fi
2604 as_fn_append ac_configure_args " '$ac_arg'"
2605 ;;
2606 esac
2607 done
2608done
2609{ ac_configure_args0=; unset ac_configure_args0;}
2610{ ac_configure_args1=; unset ac_configure_args1;}
2611
2612# When interrupted or exit'd, cleanup temporary files, and complete
2613# config.log. We remove comments because anyway the quotes in there
2614# would cause problems or look ugly.
2615# WARNING: Use '\'' to represent an apostrophe within the trap.
2616# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2617trap 'exit_status=$?
2618 # Save into config.log some information that might help in debugging.
2619 {
2620 echo
2621
d0ac1c44 2622 $as_echo "## ---------------- ##
81ecdfbb 2623## Cache variables. ##
d0ac1c44 2624## ---------------- ##"
81ecdfbb
RW
2625 echo
2626 # The following way of writing the cache mishandles newlines in values,
2627(
2628 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2629 eval ac_val=\$$ac_var
2630 case $ac_val in #(
2631 *${as_nl}*)
2632 case $ac_var in #(
2633 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2634$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2635 esac
2636 case $ac_var in #(
2637 _ | IFS | as_nl) ;; #(
2638 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2639 *) { eval $ac_var=; unset $ac_var;} ;;
2640 esac ;;
2641 esac
2642 done
2643 (set) 2>&1 |
2644 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2645 *${as_nl}ac_space=\ *)
2646 sed -n \
2647 "s/'\''/'\''\\\\'\'''\''/g;
2648 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2649 ;; #(
2650 *)
2651 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2652 ;;
2653 esac |
2654 sort
2655)
2656 echo
2657
d0ac1c44 2658 $as_echo "## ----------------- ##
81ecdfbb 2659## Output variables. ##
d0ac1c44 2660## ----------------- ##"
81ecdfbb
RW
2661 echo
2662 for ac_var in $ac_subst_vars
2663 do
2664 eval ac_val=\$$ac_var
2665 case $ac_val in
2666 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2667 esac
2668 $as_echo "$ac_var='\''$ac_val'\''"
2669 done | sort
2670 echo
2671
2672 if test -n "$ac_subst_files"; then
d0ac1c44 2673 $as_echo "## ------------------- ##
81ecdfbb 2674## File substitutions. ##
d0ac1c44 2675## ------------------- ##"
81ecdfbb
RW
2676 echo
2677 for ac_var in $ac_subst_files
2678 do
2679 eval ac_val=\$$ac_var
2680 case $ac_val in
2681 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2682 esac
2683 $as_echo "$ac_var='\''$ac_val'\''"
2684 done | sort
2685 echo
2686 fi
2687
2688 if test -s confdefs.h; then
d0ac1c44 2689 $as_echo "## ----------- ##
81ecdfbb 2690## confdefs.h. ##
d0ac1c44 2691## ----------- ##"
81ecdfbb
RW
2692 echo
2693 cat confdefs.h
2694 echo
2695 fi
2696 test "$ac_signal" != 0 &&
2697 $as_echo "$as_me: caught signal $ac_signal"
2698 $as_echo "$as_me: exit $exit_status"
2699 } >&5
2700 rm -f core *.core core.conftest.* &&
2701 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2702 exit $exit_status
2703' 0
2704for ac_signal in 1 2 13 15; do
2705 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2706done
2707ac_signal=0
2708
2709# confdefs.h avoids OS command line length limits that DEFS can exceed.
2710rm -f -r conftest* confdefs.h
2711
2712$as_echo "/* confdefs.h */" > confdefs.h
2713
2714# Predefined preprocessor variables.
2715
2716cat >>confdefs.h <<_ACEOF
2717#define PACKAGE_NAME "$PACKAGE_NAME"
2718_ACEOF
2719
2720cat >>confdefs.h <<_ACEOF
2721#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2722_ACEOF
2723
2724cat >>confdefs.h <<_ACEOF
2725#define PACKAGE_VERSION "$PACKAGE_VERSION"
2726_ACEOF
2727
2728cat >>confdefs.h <<_ACEOF
2729#define PACKAGE_STRING "$PACKAGE_STRING"
2730_ACEOF
2731
2732cat >>confdefs.h <<_ACEOF
2733#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2734_ACEOF
2735
2736cat >>confdefs.h <<_ACEOF
2737#define PACKAGE_URL "$PACKAGE_URL"
2738_ACEOF
2739
2740
2741# Let the site file select an alternate cache file if it wants to.
2742# Prefer an explicitly selected file to automatically selected ones.
2743ac_site_file1=NONE
2744ac_site_file2=NONE
2745if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
2746 # We do not want a PATH search for config.site.
2747 case $CONFIG_SITE in #((
2748 -*) ac_site_file1=./$CONFIG_SITE;;
2749 */*) ac_site_file1=$CONFIG_SITE;;
2750 *) ac_site_file1=./$CONFIG_SITE;;
2751 esac
81ecdfbb
RW
2752elif test "x$prefix" != xNONE; then
2753 ac_site_file1=$prefix/share/config.site
2754 ac_site_file2=$prefix/etc/config.site
2755else
2756 ac_site_file1=$ac_default_prefix/share/config.site
2757 ac_site_file2=$ac_default_prefix/etc/config.site
2758fi
2759for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2760do
2761 test "x$ac_site_file" = xNONE && continue
d0ac1c44 2762 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
81ecdfbb
RW
2763 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2764$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2765 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
2766 . "$ac_site_file" \
2767 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2768$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2769as_fn_error $? "failed to load site script $ac_site_file
2770See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
2771 fi
2772done
2773
2774if test -r "$cache_file"; then
d0ac1c44
SM
2775 # Some versions of bash will fail to source /dev/null (special files
2776 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2777 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
81ecdfbb
RW
2778 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2779$as_echo "$as_me: loading cache $cache_file" >&6;}
2780 case $cache_file in
2781 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2782 *) . "./$cache_file";;
2783 esac
2784 fi
2785else
2786 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2787$as_echo "$as_me: creating cache $cache_file" >&6;}
2788 >$cache_file
bec39cab
AC
2789fi
2790
d0ac1c44
SM
2791as_fn_append ac_header_list " stdlib.h"
2792as_fn_append ac_header_list " unistd.h"
2793as_fn_append ac_header_list " sys/param.h"
81ecdfbb
RW
2794# Check that the precious variables saved in the cache have kept the same
2795# value.
2796ac_cache_corrupted=false
2797for ac_var in $ac_precious_vars; do
2798 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2799 eval ac_new_set=\$ac_env_${ac_var}_set
2800 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2801 eval ac_new_val=\$ac_env_${ac_var}_value
2802 case $ac_old_set,$ac_new_set in
2803 set,)
2804 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2805$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2806 ac_cache_corrupted=: ;;
2807 ,set)
2808 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2809$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2810 ac_cache_corrupted=: ;;
2811 ,);;
2812 *)
2813 if test "x$ac_old_val" != "x$ac_new_val"; then
2814 # differences in whitespace do not lead to failure.
2815 ac_old_val_w=`echo x $ac_old_val`
2816 ac_new_val_w=`echo x $ac_new_val`
2817 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2818 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2819$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2820 ac_cache_corrupted=:
2821 else
2822 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2823$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2824 eval $ac_var=\$ac_old_val
2825 fi
2826 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2827$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2828 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2829$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2830 fi;;
2831 esac
2832 # Pass precious variables to config.status.
2833 if test "$ac_new_set" = set; then
2834 case $ac_new_val in
2835 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2836 *) ac_arg=$ac_var=$ac_new_val ;;
2837 esac
2838 case " $ac_configure_args " in
2839 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2840 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2841 esac
2842 fi
2843done
2844if $ac_cache_corrupted; then
2845 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2846$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2847 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2848$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 2849 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
81ecdfbb
RW
2850fi
2851## -------------------- ##
2852## Main body of script. ##
2853## -------------------- ##
2854
2855ac_ext=c
2856ac_cpp='$CPP $CPPFLAGS'
2857ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2858ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2859ac_compiler_gnu=$ac_cv_c_compiler_gnu
2860
2861
2862
2863
2864
2865ac_config_headers="$ac_config_headers config.h:config.in"
2866
2867
2868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2869$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2870 # Check whether --enable-maintainer-mode was given.
2871if test "${enable_maintainer_mode+set}" = set; then :
2872 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2873else
2874 USE_MAINTAINER_MODE=no
2875fi
2876
2877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2878$as_echo "$USE_MAINTAINER_MODE" >&6; }
2879 if test $USE_MAINTAINER_MODE = yes; then
2880 MAINTAINER_MODE_TRUE=
2881 MAINTAINER_MODE_FALSE='#'
2882else
2883 MAINTAINER_MODE_TRUE='#'
2884 MAINTAINER_MODE_FALSE=
2885fi
2886
2887 MAINT=$MAINTAINER_MODE_TRUE
2888
2889
2890
17ef446e 2891# Set the 'development' global.
270c9937 2892. $srcdir/../bfd/development.sh
f5f1cdb6 2893
81ecdfbb
RW
2894ac_ext=c
2895ac_cpp='$CPP $CPPFLAGS'
2896ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2897ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2898ac_compiler_gnu=$ac_cv_c_compiler_gnu
2899if test -n "$ac_tool_prefix"; then
2900 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2901set dummy ${ac_tool_prefix}gcc; ac_word=$2
2902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2903$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2904if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2905 $as_echo_n "(cached) " >&6
c906108c
SS
2906else
2907 if test -n "$CC"; then
2908 ac_cv_prog_CC="$CC" # Let the user override the test.
2909else
bec39cab
AC
2910as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2911for as_dir in $PATH
2912do
2913 IFS=$as_save_IFS
2914 test -z "$as_dir" && as_dir=.
81ecdfbb 2915 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2916 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2917 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2918 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2919 break 2
2920 fi
2921done
81ecdfbb
RW
2922 done
2923IFS=$as_save_IFS
bec39cab 2924
c906108c
SS
2925fi
2926fi
bec39cab 2927CC=$ac_cv_prog_CC
c906108c 2928if test -n "$CC"; then
81ecdfbb
RW
2929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2930$as_echo "$CC" >&6; }
c906108c 2931else
81ecdfbb
RW
2932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2933$as_echo "no" >&6; }
c906108c
SS
2934fi
2935
81ecdfbb 2936
b4e70030
JB
2937fi
2938if test -z "$ac_cv_prog_CC"; then
2939 ac_ct_CC=$CC
81ecdfbb
RW
2940 # Extract the first word of "gcc", so it can be a program name with args.
2941set dummy gcc; ac_word=$2
2942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2943$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2944if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 2945 $as_echo_n "(cached) " >&6
b4e70030
JB
2946else
2947 if test -n "$ac_ct_CC"; then
2948 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2949else
2950as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2951for as_dir in $PATH
2952do
2953 IFS=$as_save_IFS
2954 test -z "$as_dir" && as_dir=.
81ecdfbb 2955 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2956 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2957 ac_cv_prog_ac_ct_CC="gcc"
2958 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2959 break 2
4e8d927d 2960 fi
b4e70030 2961done
81ecdfbb
RW
2962 done
2963IFS=$as_save_IFS
b4e70030
JB
2964
2965fi
2966fi
2967ac_ct_CC=$ac_cv_prog_ac_ct_CC
2968if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2970$as_echo "$ac_ct_CC" >&6; }
b4e70030 2971else
81ecdfbb
RW
2972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2973$as_echo "no" >&6; }
b4e70030
JB
2974fi
2975
81ecdfbb
RW
2976 if test "x$ac_ct_CC" = x; then
2977 CC=""
2978 else
2979 case $cross_compiling:$ac_tool_warned in
2980yes:)
2981{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2982$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2983ac_tool_warned=yes ;;
2984esac
2985 CC=$ac_ct_CC
2986 fi
b4e70030
JB
2987else
2988 CC="$ac_cv_prog_CC"
2989fi
2990
c906108c 2991if test -z "$CC"; then
81ecdfbb
RW
2992 if test -n "$ac_tool_prefix"; then
2993 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2994set dummy ${ac_tool_prefix}cc; ac_word=$2
2995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2996$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2997if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2998 $as_echo_n "(cached) " >&6
c906108c
SS
2999else
3000 if test -n "$CC"; then
3001 ac_cv_prog_CC="$CC" # Let the user override the test.
3002else
bec39cab
AC
3003as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3004for as_dir in $PATH
3005do
3006 IFS=$as_save_IFS
3007 test -z "$as_dir" && as_dir=.
81ecdfbb 3008 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3009 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3010 ac_cv_prog_CC="${ac_tool_prefix}cc"
3011 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3012 break 2
3013 fi
3014done
81ecdfbb
RW
3015 done
3016IFS=$as_save_IFS
3017
3018fi
3019fi
3020CC=$ac_cv_prog_CC
3021if test -n "$CC"; then
3022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3023$as_echo "$CC" >&6; }
3024else
3025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3026$as_echo "no" >&6; }
3027fi
3028
3029
3030 fi
3031fi
3032if test -z "$CC"; then
3033 # Extract the first word of "cc", so it can be a program name with args.
3034set dummy cc; ac_word=$2
3035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3036$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3037if ${ac_cv_prog_CC+:} false; then :
81ecdfbb
RW
3038 $as_echo_n "(cached) " >&6
3039else
3040 if test -n "$CC"; then
3041 ac_cv_prog_CC="$CC" # Let the user override the test.
3042else
3043 ac_prog_rejected=no
3044as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3045for as_dir in $PATH
3046do
3047 IFS=$as_save_IFS
3048 test -z "$as_dir" && as_dir=.
3049 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3050 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3051 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3052 ac_prog_rejected=yes
3053 continue
3054 fi
3055 ac_cv_prog_CC="cc"
3056 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3057 break 2
3058 fi
3059done
3060 done
3061IFS=$as_save_IFS
bec39cab 3062
c906108c
SS
3063if test $ac_prog_rejected = yes; then
3064 # We found a bogon in the path, so make sure we never use it.
3065 set dummy $ac_cv_prog_CC
3066 shift
bec39cab 3067 if test $# != 0; then
c906108c
SS
3068 # We chose a different compiler from the bogus one.
3069 # However, it has the same basename, so the bogon will be chosen
3070 # first if we set CC to just the basename; use the full file name.
3071 shift
bec39cab 3072 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3073 fi
3074fi
3075fi
3076fi
bec39cab 3077CC=$ac_cv_prog_CC
c906108c 3078if test -n "$CC"; then
81ecdfbb
RW
3079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3080$as_echo "$CC" >&6; }
c906108c 3081else
81ecdfbb
RW
3082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3083$as_echo "no" >&6; }
c906108c
SS
3084fi
3085
81ecdfbb 3086
bec39cab
AC
3087fi
3088if test -z "$CC"; then
3089 if test -n "$ac_tool_prefix"; then
81ecdfbb 3090 for ac_prog in cl.exe
bec39cab
AC
3091 do
3092 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3093set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3095$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3096if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3097 $as_echo_n "(cached) " >&6
c906108c
SS
3098else
3099 if test -n "$CC"; then
3100 ac_cv_prog_CC="$CC" # Let the user override the test.
3101else
bec39cab
AC
3102as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3103for as_dir in $PATH
3104do
3105 IFS=$as_save_IFS
3106 test -z "$as_dir" && as_dir=.
81ecdfbb 3107 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3108 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3109 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3110 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3111 break 2
3112 fi
3113done
81ecdfbb
RW
3114 done
3115IFS=$as_save_IFS
bec39cab 3116
c906108c
SS
3117fi
3118fi
bec39cab 3119CC=$ac_cv_prog_CC
c906108c 3120if test -n "$CC"; then
81ecdfbb
RW
3121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3122$as_echo "$CC" >&6; }
c906108c 3123else
81ecdfbb
RW
3124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3125$as_echo "no" >&6; }
c906108c 3126fi
bec39cab 3127
81ecdfbb 3128
bec39cab
AC
3129 test -n "$CC" && break
3130 done
3131fi
3132if test -z "$CC"; then
3133 ac_ct_CC=$CC
81ecdfbb 3134 for ac_prog in cl.exe
bec39cab
AC
3135do
3136 # Extract the first word of "$ac_prog", so it can be a program name with args.
3137set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3139$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3140if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3141 $as_echo_n "(cached) " >&6
bec39cab
AC
3142else
3143 if test -n "$ac_ct_CC"; then
3144 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3145else
3146as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3147for as_dir in $PATH
3148do
3149 IFS=$as_save_IFS
3150 test -z "$as_dir" && as_dir=.
81ecdfbb 3151 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3152 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3153 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3154 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3155 break 2
c906108c 3156 fi
bec39cab 3157done
81ecdfbb
RW
3158 done
3159IFS=$as_save_IFS
bec39cab
AC
3160
3161fi
3162fi
3163ac_ct_CC=$ac_cv_prog_ac_ct_CC
3164if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3166$as_echo "$ac_ct_CC" >&6; }
bec39cab 3167else
81ecdfbb
RW
3168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3169$as_echo "no" >&6; }
c906108c
SS
3170fi
3171
81ecdfbb 3172
bec39cab
AC
3173 test -n "$ac_ct_CC" && break
3174done
c906108c 3175
81ecdfbb
RW
3176 if test "x$ac_ct_CC" = x; then
3177 CC=""
3178 else
3179 case $cross_compiling:$ac_tool_warned in
3180yes:)
3181{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3182$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3183ac_tool_warned=yes ;;
3184esac
3185 CC=$ac_ct_CC
3186 fi
bec39cab
AC
3187fi
3188
3189fi
3190
3191
81ecdfbb
RW
3192test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3193$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3194as_fn_error $? "no acceptable C compiler found in \$PATH
3195See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3196
3197# Provide some information about the compiler.
81ecdfbb
RW
3198$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3199set X $ac_compile
3200ac_compiler=$2
3201for ac_option in --version -v -V -qversion; do
3202 { { ac_try="$ac_compiler $ac_option >&5"
3203case "(($ac_try" in
3204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3205 *) ac_try_echo=$ac_try;;
3206esac
3207eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3208$as_echo "$ac_try_echo"; } >&5
3209 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3210 ac_status=$?
81ecdfbb
RW
3211 if test -s conftest.err; then
3212 sed '10a\
3213... rest of stderr output deleted ...
3214 10q' conftest.err >conftest.er1
3215 cat conftest.er1 >&5
81ecdfbb 3216 fi
d0ac1c44 3217 rm -f conftest.er1 conftest.err
81ecdfbb
RW
3218 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3219 test $ac_status = 0; }
3220done
bec39cab 3221
81ecdfbb 3222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3223/* end confdefs.h. */
3224
3225int
3226main ()
3227{
3228
3229 ;
3230 return 0;
3231}
3232_ACEOF
3233ac_clean_files_save=$ac_clean_files
d0ac1c44 3234ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
bec39cab
AC
3235# Try to create an executable without -o first, disregard a.out.
3236# It will help us diagnose broken compilers, and finding out an intuition
3237# of exeext.
d0ac1c44
SM
3238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3239$as_echo_n "checking whether the C compiler works... " >&6; }
81ecdfbb
RW
3240ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3241
3242# The possible output files:
3243ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3244
3245ac_rmfiles=
3246for ac_file in $ac_files
3247do
3248 case $ac_file in
3249 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3250 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3251 esac
3252done
3253rm -f $ac_rmfiles
3254
3255if { { ac_try="$ac_link_default"
3256case "(($ac_try" in
3257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3258 *) ac_try_echo=$ac_try;;
3259esac
3260eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3261$as_echo "$ac_try_echo"; } >&5
3262 (eval "$ac_link_default") 2>&5
3263 ac_status=$?
3264 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3265 test $ac_status = 0; }; then :
3266 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3267# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3268# in a Makefile. We should not override ac_cv_exeext if it was cached,
3269# so that the user can short-circuit this test for compilers unknown to
3270# Autoconf.
3271for ac_file in $ac_files ''
bec39cab
AC
3272do
3273 test -f "$ac_file" || continue
3274 case $ac_file in
81ecdfbb 3275 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3276 ;;
3277 [ab].out )
3278 # We found the default executable, but exeext='' is most
3279 # certainly right.
3280 break;;
3281 *.* )
81ecdfbb
RW
3282 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3283 then :; else
3284 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3285 fi
3286 # We set ac_cv_exeext here because the later test for it is not
3287 # safe: cross compilers may not add the suffix if given an `-o'
3288 # argument, so we may need to know it at that point already.
3289 # Even if this section looks crufty: it has the advantage of
3290 # actually working.
b4e70030
JB
3291 break;;
3292 * )
3293 break;;
bec39cab
AC
3294 esac
3295done
81ecdfbb
RW
3296test "$ac_cv_exeext" = no && ac_cv_exeext=
3297
bec39cab 3298else
81ecdfbb
RW
3299 ac_file=''
3300fi
81ecdfbb 3301if test -z "$ac_file"; then :
d0ac1c44
SM
3302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3303$as_echo "no" >&6; }
3304$as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3305sed 's/^/| /' conftest.$ac_ext >&5
3306
81ecdfbb
RW
3307{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3308$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3309as_fn_error 77 "C compiler cannot create executables
3310See \`config.log' for more details" "$LINENO" 5; }
3311else
3312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3313$as_echo "yes" >&6; }
bec39cab 3314fi
d0ac1c44
SM
3315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3316$as_echo_n "checking for C compiler default output file name... " >&6; }
3317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3318$as_echo "$ac_file" >&6; }
b4e70030 3319ac_exeext=$ac_cv_exeext
b4e70030 3320
d0ac1c44 3321rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
b4e70030 3322ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3324$as_echo_n "checking for suffix of executables... " >&6; }
3325if { { 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
bec39cab 3333 ac_status=$?
81ecdfbb
RW
3334 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3335 test $ac_status = 0; }; then :
b4e70030
JB
3336 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3337# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3338# work properly (i.e., refer to `conftest.exe'), while it won't with
3339# `rm'.
3340for ac_file in conftest.exe conftest conftest.*; do
3341 test -f "$ac_file" || continue
3342 case $ac_file in
81ecdfbb 3343 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3344 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3345 break;;
3346 * ) break;;
3347 esac
3348done
c906108c 3349else
81ecdfbb
RW
3350 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3351$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3352as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3353See \`config.log' for more details" "$LINENO" 5; }
c906108c 3354fi
d0ac1c44 3355rm -f conftest conftest$ac_cv_exeext
81ecdfbb
RW
3356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3357$as_echo "$ac_cv_exeext" >&6; }
c906108c 3358
b4e70030 3359rm -f conftest.$ac_ext
bec39cab
AC
3360EXEEXT=$ac_cv_exeext
3361ac_exeext=$EXEEXT
d0ac1c44
SM
3362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3363/* end confdefs.h. */
3364#include <stdio.h>
3365int
3366main ()
3367{
3368FILE *f = fopen ("conftest.out", "w");
3369 return ferror (f) || fclose (f) != 0;
3370
3371 ;
3372 return 0;
3373}
3374_ACEOF
3375ac_clean_files="$ac_clean_files conftest.out"
3376# Check that the compiler produces executables we can run. If not, either
3377# the compiler is broken, or we cross compile.
3378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3379$as_echo_n "checking whether we are cross compiling... " >&6; }
3380if test "$cross_compiling" != yes; then
3381 { { ac_try="$ac_link"
3382case "(($ac_try" in
3383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3384 *) ac_try_echo=$ac_try;;
3385esac
3386eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3387$as_echo "$ac_try_echo"; } >&5
3388 (eval "$ac_link") 2>&5
3389 ac_status=$?
3390 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3391 test $ac_status = 0; }
3392 if { ac_try='./conftest$ac_cv_exeext'
3393 { { case "(($ac_try" in
3394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3395 *) ac_try_echo=$ac_try;;
3396esac
3397eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3398$as_echo "$ac_try_echo"; } >&5
3399 (eval "$ac_try") 2>&5
3400 ac_status=$?
3401 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3402 test $ac_status = 0; }; }; then
3403 cross_compiling=no
3404 else
3405 if test "$cross_compiling" = maybe; then
3406 cross_compiling=yes
3407 else
3408 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3409$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3410as_fn_error $? "cannot run C compiled programs.
3411If you meant to cross compile, use \`--host'.
3412See \`config.log' for more details" "$LINENO" 5; }
3413 fi
3414 fi
3415fi
3416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3417$as_echo "$cross_compiling" >&6; }
3418
3419rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3420ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3422$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 3423if ${ac_cv_objext+:} false; then :
81ecdfbb 3424 $as_echo_n "(cached) " >&6
bec39cab 3425else
81ecdfbb 3426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3427/* end confdefs.h. */
3428
3429int
3430main ()
3431{
3432
3433 ;
3434 return 0;
3435}
3436_ACEOF
3437rm -f conftest.o conftest.obj
81ecdfbb
RW
3438if { { ac_try="$ac_compile"
3439case "(($ac_try" in
3440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3441 *) ac_try_echo=$ac_try;;
3442esac
3443eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3444$as_echo "$ac_try_echo"; } >&5
3445 (eval "$ac_compile") 2>&5
3446 ac_status=$?
3447 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3448 test $ac_status = 0; }; then :
3449 for ac_file in conftest.o conftest.obj conftest.*; do
3450 test -f "$ac_file" || continue;
bec39cab 3451 case $ac_file in
81ecdfbb 3452 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3453 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3454 break;;
3455 esac
3456done
c906108c 3457else
81ecdfbb 3458 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3459sed 's/^/| /' conftest.$ac_ext >&5
3460
81ecdfbb
RW
3461{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3462$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3463as_fn_error $? "cannot compute suffix of object files: cannot compile
3464See \`config.log' for more details" "$LINENO" 5; }
c906108c 3465fi
b4e70030 3466rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3467fi
81ecdfbb
RW
3468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3469$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3470OBJEXT=$ac_cv_objext
3471ac_objext=$OBJEXT
81ecdfbb
RW
3472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3473$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 3474if ${ac_cv_c_compiler_gnu+:} false; then :
81ecdfbb 3475 $as_echo_n "(cached) " >&6
c906108c 3476else
81ecdfbb 3477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3478/* end confdefs.h. */
3479
3480int
3481main ()
3482{
3483#ifndef __GNUC__
3484 choke me
3485#endif
3486
3487 ;
3488 return 0;
3489}
3490_ACEOF
81ecdfbb 3491if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3492 ac_compiler_gnu=yes
3493else
81ecdfbb 3494 ac_compiler_gnu=no
bec39cab 3495fi
81ecdfbb 3496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3497ac_cv_c_compiler_gnu=$ac_compiler_gnu
3498
3499fi
81ecdfbb
RW
3500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3501$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3502if test $ac_compiler_gnu = yes; then
3503 GCC=yes
3504else
3505 GCC=
3506fi
bec39cab
AC
3507ac_test_CFLAGS=${CFLAGS+set}
3508ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3510$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 3511if ${ac_cv_prog_cc_g+:} false; then :
81ecdfbb 3512 $as_echo_n "(cached) " >&6
bec39cab 3513else
81ecdfbb
RW
3514 ac_save_c_werror_flag=$ac_c_werror_flag
3515 ac_c_werror_flag=yes
3516 ac_cv_prog_cc_g=no
3517 CFLAGS="-g"
3518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3519/* end confdefs.h. */
3520
3521int
3522main ()
3523{
3524
3525 ;
3526 return 0;
3527}
3528_ACEOF
81ecdfbb 3529if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3530 ac_cv_prog_cc_g=yes
3531else
81ecdfbb
RW
3532 CFLAGS=""
3533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3534/* end confdefs.h. */
3535
3536int
3537main ()
3538{
3539
3540 ;
3541 return 0;
3542}
3543_ACEOF
3544if ac_fn_c_try_compile "$LINENO"; then :
3545
3546else
3547 ac_c_werror_flag=$ac_save_c_werror_flag
3548 CFLAGS="-g"
3549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3550/* end confdefs.h. */
3551
3552int
3553main ()
3554{
c906108c 3555
81ecdfbb
RW
3556 ;
3557 return 0;
3558}
3559_ACEOF
3560if ac_fn_c_try_compile "$LINENO"; then :
3561 ac_cv_prog_cc_g=yes
3562fi
3563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3564fi
3565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3566fi
81ecdfbb
RW
3567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3568 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3569fi
81ecdfbb
RW
3570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3571$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3572if test "$ac_test_CFLAGS" = set; then
bec39cab 3573 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3574elif test $ac_cv_prog_cc_g = yes; then
3575 if test "$GCC" = yes; then
3576 CFLAGS="-g -O2"
3577 else
3578 CFLAGS="-g"
3579 fi
3580else
3581 if test "$GCC" = yes; then
3582 CFLAGS="-O2"
3583 else
3584 CFLAGS=
3585 fi
3586fi
81ecdfbb
RW
3587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3588$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
d0ac1c44 3589if ${ac_cv_prog_cc_c89+:} false; then :
81ecdfbb 3590 $as_echo_n "(cached) " >&6
bec39cab 3591else
81ecdfbb 3592 ac_cv_prog_cc_c89=no
bec39cab 3593ac_save_CC=$CC
81ecdfbb 3594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3595/* end confdefs.h. */
c906108c
SS
3596#include <stdarg.h>
3597#include <stdio.h>
d0ac1c44 3598struct stat;
c906108c
SS
3599/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3600struct buf { int x; };
3601FILE * (*rcsopen) (struct buf *, struct stat *, int);
3602static char *e (p, i)
3603 char **p;
3604 int i;
3605{
3606 return p[i];
3607}
3608static char *f (char * (*g) (char **, int), char **p, ...)
3609{
3610 char *s;
3611 va_list v;
3612 va_start (v,p);
3613 s = g (p, va_arg (v,int));
3614 va_end (v);
3615 return s;
3616}
bec39cab
AC
3617
3618/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3619 function prototypes and stuff, but not '\xHH' hex character constants.
3620 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3621 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3622 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3623 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3624 that's true only with -std. */
bec39cab
AC
3625int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3626
81ecdfbb
RW
3627/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3628 inside strings and character constants. */
3629#define FOO(x) 'x'
3630int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3631
c906108c
SS
3632int test (int i, double x);
3633struct s1 {int (*f) (int a);};
3634struct s2 {int (*f) (double a);};
3635int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3636int argc;
3637char **argv;
bec39cab
AC
3638int
3639main ()
3640{
c906108c 3641return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3642 ;
3643 return 0;
3644}
3645_ACEOF
81ecdfbb
RW
3646for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3647 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3648do
3649 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3650 if ac_fn_c_try_compile "$LINENO"; then :
3651 ac_cv_prog_cc_c89=$ac_arg
c906108c 3652fi
81ecdfbb
RW
3653rm -f core conftest.err conftest.$ac_objext
3654 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3655done
81ecdfbb 3656rm -f conftest.$ac_ext
bec39cab 3657CC=$ac_save_CC
c906108c
SS
3658
3659fi
81ecdfbb
RW
3660# AC_CACHE_VAL
3661case "x$ac_cv_prog_cc_c89" in
3662 x)
3663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3664$as_echo "none needed" >&6; } ;;
3665 xno)
3666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3667$as_echo "unsupported" >&6; } ;;
bec39cab 3668 *)
81ecdfbb
RW
3669 CC="$CC $ac_cv_prog_cc_c89"
3670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3671$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3672esac
81ecdfbb 3673if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3674
b4e70030
JB
3675fi
3676
bec39cab
AC
3677ac_ext=c
3678ac_cpp='$CPP $CPPFLAGS'
3679ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3680ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3681ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3682
3bc3d82a
PA
3683ac_ext=cpp
3684ac_cpp='$CXXCPP $CPPFLAGS'
3685ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3686ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3687ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3688if test -z "$CXX"; then
3689 if test -n "$CCC"; then
3690 CXX=$CCC
3691 else
3692 if test -n "$ac_tool_prefix"; then
3693 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3694 do
3695 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3696set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3698$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3699if ${ac_cv_prog_CXX+:} false; then :
3bc3d82a
PA
3700 $as_echo_n "(cached) " >&6
3701else
3702 if test -n "$CXX"; then
3703 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3704else
3705as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3706for as_dir in $PATH
3707do
3708 IFS=$as_save_IFS
3709 test -z "$as_dir" && as_dir=.
3710 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3711 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3712 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3713 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3714 break 2
3715 fi
3716done
3717 done
3718IFS=$as_save_IFS
3719
3720fi
3721fi
3722CXX=$ac_cv_prog_CXX
3723if test -n "$CXX"; then
3724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3725$as_echo "$CXX" >&6; }
3726else
3727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3728$as_echo "no" >&6; }
3729fi
3730
3731
3732 test -n "$CXX" && break
3733 done
3734fi
3735if test -z "$CXX"; then
3736 ac_ct_CXX=$CXX
3737 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3738do
3739 # Extract the first word of "$ac_prog", so it can be a program name with args.
3740set dummy $ac_prog; ac_word=$2
3741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3742$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3743if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3bc3d82a
PA
3744 $as_echo_n "(cached) " >&6
3745else
3746 if test -n "$ac_ct_CXX"; then
3747 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3748else
3749as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3750for as_dir in $PATH
3751do
3752 IFS=$as_save_IFS
3753 test -z "$as_dir" && as_dir=.
3754 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3755 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3756 ac_cv_prog_ac_ct_CXX="$ac_prog"
3757 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3758 break 2
3759 fi
3760done
3761 done
3762IFS=$as_save_IFS
3763
3764fi
3765fi
3766ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3767if test -n "$ac_ct_CXX"; then
3768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3769$as_echo "$ac_ct_CXX" >&6; }
3770else
3771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3772$as_echo "no" >&6; }
3773fi
3774
3775
3776 test -n "$ac_ct_CXX" && break
3777done
3778
3779 if test "x$ac_ct_CXX" = x; then
3780 CXX="g++"
3781 else
3782 case $cross_compiling:$ac_tool_warned in
3783yes:)
3784{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3785$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3786ac_tool_warned=yes ;;
3787esac
3788 CXX=$ac_ct_CXX
3789 fi
3790fi
3791
3792 fi
3793fi
3794# Provide some information about the compiler.
3795$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3796set X $ac_compile
3797ac_compiler=$2
3798for ac_option in --version -v -V -qversion; do
3799 { { ac_try="$ac_compiler $ac_option >&5"
3800case "(($ac_try" in
3801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3802 *) ac_try_echo=$ac_try;;
3803esac
3804eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3805$as_echo "$ac_try_echo"; } >&5
3806 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3807 ac_status=$?
3808 if test -s conftest.err; then
3809 sed '10a\
3810... rest of stderr output deleted ...
3811 10q' conftest.err >conftest.er1
3812 cat conftest.er1 >&5
3bc3d82a 3813 fi
d0ac1c44 3814 rm -f conftest.er1 conftest.err
3bc3d82a
PA
3815 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3816 test $ac_status = 0; }
3817done
3818
3819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3820$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
d0ac1c44 3821if ${ac_cv_cxx_compiler_gnu+:} false; then :
3bc3d82a
PA
3822 $as_echo_n "(cached) " >&6
3823else
3824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3825/* end confdefs.h. */
3826
3827int
3828main ()
3829{
3830#ifndef __GNUC__
3831 choke me
3832#endif
3833
3834 ;
3835 return 0;
3836}
3837_ACEOF
3838if ac_fn_cxx_try_compile "$LINENO"; then :
3839 ac_compiler_gnu=yes
3840else
3841 ac_compiler_gnu=no
3842fi
3843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3844ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3845
3846fi
3847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3848$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3849if test $ac_compiler_gnu = yes; then
3850 GXX=yes
3851else
3852 GXX=
3853fi
3854ac_test_CXXFLAGS=${CXXFLAGS+set}
3855ac_save_CXXFLAGS=$CXXFLAGS
3856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3857$as_echo_n "checking whether $CXX accepts -g... " >&6; }
d0ac1c44 3858if ${ac_cv_prog_cxx_g+:} false; then :
3bc3d82a
PA
3859 $as_echo_n "(cached) " >&6
3860else
3861 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3862 ac_cxx_werror_flag=yes
3863 ac_cv_prog_cxx_g=no
3864 CXXFLAGS="-g"
3865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3866/* end confdefs.h. */
3867
3868int
3869main ()
3870{
3871
3872 ;
3873 return 0;
3874}
3875_ACEOF
3876if ac_fn_cxx_try_compile "$LINENO"; then :
3877 ac_cv_prog_cxx_g=yes
3878else
3879 CXXFLAGS=""
3880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3881/* end confdefs.h. */
3882
3883int
3884main ()
3885{
3886
3887 ;
3888 return 0;
3889}
3890_ACEOF
3891if ac_fn_cxx_try_compile "$LINENO"; then :
3892
3893else
3894 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3895 CXXFLAGS="-g"
3896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3897/* end confdefs.h. */
3898
3899int
3900main ()
3901{
3902
3903 ;
3904 return 0;
3905}
3906_ACEOF
3907if ac_fn_cxx_try_compile "$LINENO"; then :
3908 ac_cv_prog_cxx_g=yes
3909fi
3910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3911fi
3912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3913fi
3914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3915 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3916fi
3917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3918$as_echo "$ac_cv_prog_cxx_g" >&6; }
3919if test "$ac_test_CXXFLAGS" = set; then
3920 CXXFLAGS=$ac_save_CXXFLAGS
3921elif test $ac_cv_prog_cxx_g = yes; then
3922 if test "$GXX" = yes; then
3923 CXXFLAGS="-g -O2"
3924 else
3925 CXXFLAGS="-g"
3926 fi
3927else
3928 if test "$GXX" = yes; then
3929 CXXFLAGS="-O2"
3930 else
3931 CXXFLAGS=
3932 fi
3933fi
3934ac_ext=c
3935ac_cpp='$CPP $CPPFLAGS'
3936ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3937ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3938ac_compiler_gnu=$ac_cv_c_compiler_gnu
3939
3940
60ca704f 3941
bec39cab
AC
3942ac_ext=c
3943ac_cpp='$CPP $CPPFLAGS'
3944ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3945ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3946ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3948$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3949# On Suns, sometimes $CPP names a directory.
3950if test -n "$CPP" && test -d "$CPP"; then
3951 CPP=
8bb2c122 3952fi
bec39cab 3953if test -z "$CPP"; then
d0ac1c44 3954 if ${ac_cv_prog_CPP+:} false; then :
81ecdfbb 3955 $as_echo_n "(cached) " >&6
bec39cab
AC
3956else
3957 # Double quotes because CPP needs to be expanded
3958 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3959 do
3960 ac_preproc_ok=false
3961for ac_c_preproc_warn_flag in '' yes
3962do
3963 # Use a header file that comes with gcc, so configuring glibc
3964 # with a fresh cross-compiler works.
3965 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3966 # <limits.h> exists even on freestanding compilers.
3967 # On the NeXT, cc -E runs the code through the compiler's parser,
3968 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3970/* end confdefs.h. */
3971#ifdef __STDC__
3972# include <limits.h>
3973#else
3974# include <assert.h>
3975#endif
3976 Syntax error
3977_ACEOF
81ecdfbb 3978if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3979
81ecdfbb 3980else
bec39cab
AC
3981 # Broken: fails on valid input.
3982continue
3983fi
d0ac1c44 3984rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 3985
81ecdfbb 3986 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3987 # can be detected and how.
81ecdfbb 3988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3989/* end confdefs.h. */
3990#include <ac_nonexistent.h>
3991_ACEOF
81ecdfbb 3992if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3993 # Broken: success on invalid input.
3994continue
8bb2c122 3995else
bec39cab
AC
3996 # Passes both tests.
3997ac_preproc_ok=:
3998break
8bb2c122 3999fi
d0ac1c44 4000rm -f conftest.err conftest.i conftest.$ac_ext
8bb2c122 4001
bec39cab
AC
4002done
4003# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4004rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb 4005if $ac_preproc_ok; then :
bec39cab
AC
4006 break
4007fi
8bb2c122 4008
bec39cab
AC
4009 done
4010 ac_cv_prog_CPP=$CPP
ddc9cd0f 4011
c906108c 4012fi
bec39cab
AC
4013 CPP=$ac_cv_prog_CPP
4014else
4015 ac_cv_prog_CPP=$CPP
c906108c 4016fi
81ecdfbb
RW
4017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4018$as_echo "$CPP" >&6; }
bec39cab
AC
4019ac_preproc_ok=false
4020for ac_c_preproc_warn_flag in '' yes
4021do
4022 # Use a header file that comes with gcc, so configuring glibc
4023 # with a fresh cross-compiler works.
4024 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4025 # <limits.h> exists even on freestanding compilers.
4026 # On the NeXT, cc -E runs the code through the compiler's parser,
4027 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4029/* end confdefs.h. */
4030#ifdef __STDC__
4031# include <limits.h>
4032#else
4033# include <assert.h>
4034#endif
4035 Syntax error
4036_ACEOF
81ecdfbb 4037if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4038
81ecdfbb 4039else
bec39cab
AC
4040 # Broken: fails on valid input.
4041continue
4042fi
d0ac1c44 4043rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4044
81ecdfbb 4045 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4046 # can be detected and how.
81ecdfbb 4047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4048/* end confdefs.h. */
4049#include <ac_nonexistent.h>
4050_ACEOF
81ecdfbb 4051if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4052 # Broken: success on invalid input.
4053continue
c906108c 4054else
bec39cab
AC
4055 # Passes both tests.
4056ac_preproc_ok=:
4057break
c906108c 4058fi
d0ac1c44 4059rm -f conftest.err conftest.i conftest.$ac_ext
c906108c 4060
bec39cab
AC
4061done
4062# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4063rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb
RW
4064if $ac_preproc_ok; then :
4065
c906108c 4066else
81ecdfbb
RW
4067 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4068$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4069as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4070See \`config.log' for more details" "$LINENO" 5; }
c906108c 4071fi
c906108c 4072
bec39cab
AC
4073ac_ext=c
4074ac_cpp='$CPP $CPPFLAGS'
4075ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4076ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4077ac_compiler_gnu=$ac_cv_c_compiler_gnu
4078
4079
81ecdfbb
RW
4080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4081$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 4082if ${ac_cv_path_GREP+:} false; then :
81ecdfbb 4083 $as_echo_n "(cached) " >&6
4e8d927d 4084else
81ecdfbb
RW
4085 if test -z "$GREP"; then
4086 ac_path_GREP_found=false
4087 # Loop through the user's path and test for each of PROGNAME-LIST
4088 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4089for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4090do
4091 IFS=$as_save_IFS
4092 test -z "$as_dir" && as_dir=.
4093 for ac_prog in grep ggrep; do
4094 for ac_exec_ext in '' $ac_executable_extensions; do
4095 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4096 as_fn_executable_p "$ac_path_GREP" || continue
81ecdfbb
RW
4097# Check for GNU ac_path_GREP and select it if it is found.
4098 # Check for GNU $ac_path_GREP
4099case `"$ac_path_GREP" --version 2>&1` in
4100*GNU*)
4101 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4102*)
4103 ac_count=0
4104 $as_echo_n 0123456789 >"conftest.in"
4105 while :
4106 do
4107 cat "conftest.in" "conftest.in" >"conftest.tmp"
4108 mv "conftest.tmp" "conftest.in"
4109 cp "conftest.in" "conftest.nl"
4110 $as_echo 'GREP' >> "conftest.nl"
4111 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4112 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4113 as_fn_arith $ac_count + 1 && ac_count=$as_val
4114 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4115 # Best one so far, save it but keep looking for a better one
4116 ac_cv_path_GREP="$ac_path_GREP"
4117 ac_path_GREP_max=$ac_count
bec39cab 4118 fi
81ecdfbb
RW
4119 # 10*(2^10) chars as input seems more than enough
4120 test $ac_count -gt 10 && break
4121 done
4122 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4123esac
bec39cab 4124
81ecdfbb
RW
4125 $ac_path_GREP_found && break 3
4126 done
4127 done
4128 done
4129IFS=$as_save_IFS
4130 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 4131 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
81ecdfbb 4132 fi
c906108c 4133else
81ecdfbb 4134 ac_cv_path_GREP=$GREP
c906108c 4135fi
c906108c 4136
81ecdfbb
RW
4137fi
4138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4139$as_echo "$ac_cv_path_GREP" >&6; }
4140 GREP="$ac_cv_path_GREP"
c906108c 4141
c906108c 4142
81ecdfbb
RW
4143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4144$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 4145if ${ac_cv_path_EGREP+:} false; then :
81ecdfbb 4146 $as_echo_n "(cached) " >&6
783e057b 4147else
81ecdfbb
RW
4148 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4149 then ac_cv_path_EGREP="$GREP -E"
4150 else
4151 if test -z "$EGREP"; then
4152 ac_path_EGREP_found=false
4153 # Loop through the user's path and test for each of PROGNAME-LIST
4154 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4155for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4156do
4157 IFS=$as_save_IFS
4158 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4159 for ac_prog in egrep; do
4160 for ac_exec_ext in '' $ac_executable_extensions; do
4161 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4162 as_fn_executable_p "$ac_path_EGREP" || continue
81ecdfbb
RW
4163# Check for GNU ac_path_EGREP and select it if it is found.
4164 # Check for GNU $ac_path_EGREP
4165case `"$ac_path_EGREP" --version 2>&1` in
4166*GNU*)
4167 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4168*)
4169 ac_count=0
4170 $as_echo_n 0123456789 >"conftest.in"
4171 while :
4172 do
4173 cat "conftest.in" "conftest.in" >"conftest.tmp"
4174 mv "conftest.tmp" "conftest.in"
4175 cp "conftest.in" "conftest.nl"
4176 $as_echo 'EGREP' >> "conftest.nl"
4177 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4178 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4179 as_fn_arith $ac_count + 1 && ac_count=$as_val
4180 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4181 # Best one so far, save it but keep looking for a better one
4182 ac_cv_path_EGREP="$ac_path_EGREP"
4183 ac_path_EGREP_max=$ac_count
4184 fi
4185 # 10*(2^10) chars as input seems more than enough
4186 test $ac_count -gt 10 && break
4187 done
4188 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4189esac
bec39cab 4190
81ecdfbb
RW
4191 $ac_path_EGREP_found && break 3
4192 done
4193 done
4194 done
4195IFS=$as_save_IFS
4196 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4197 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4198 fi
783e057b 4199else
81ecdfbb 4200 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4201fi
4202
81ecdfbb 4203 fi
783e057b 4204fi
81ecdfbb
RW
4205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4206$as_echo "$ac_cv_path_EGREP" >&6; }
4207 EGREP="$ac_cv_path_EGREP"
4208
783e057b 4209
81ecdfbb
RW
4210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4211$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4212if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 4213 $as_echo_n "(cached) " >&6
783e057b 4214else
81ecdfbb 4215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4216/* end confdefs.h. */
783e057b 4217#include <stdlib.h>
bec39cab 4218#include <stdarg.h>
783e057b
DJ
4219#include <string.h>
4220#include <float.h>
c906108c 4221
bec39cab
AC
4222int
4223main ()
4224{
c906108c 4225
bec39cab
AC
4226 ;
4227 return 0;
4228}
4229_ACEOF
81ecdfbb 4230if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4231 ac_cv_header_stdc=yes
c906108c 4232else
81ecdfbb 4233 ac_cv_header_stdc=no
c906108c 4234fi
81ecdfbb 4235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4236
783e057b
DJ
4237if test $ac_cv_header_stdc = yes; then
4238 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4240/* end confdefs.h. */
4241#include <string.h>
c906108c 4242
783e057b
DJ
4243_ACEOF
4244if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4245 $EGREP "memchr" >/dev/null 2>&1; then :
4246
c906108c 4247else
783e057b 4248 ac_cv_header_stdc=no
c906108c 4249fi
783e057b 4250rm -f conftest*
c906108c
SS
4251
4252fi
4253
783e057b
DJ
4254if test $ac_cv_header_stdc = yes; then
4255 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4257/* end confdefs.h. */
4258#include <stdlib.h>
bec39cab 4259
783e057b
DJ
4260_ACEOF
4261if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4262 $EGREP "free" >/dev/null 2>&1; then :
4263
bec39cab 4264else
783e057b 4265 ac_cv_header_stdc=no
bec39cab 4266fi
783e057b 4267rm -f conftest*
bec39cab
AC
4268
4269fi
bec39cab 4270
783e057b
DJ
4271if test $ac_cv_header_stdc = yes; then
4272 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4273 if test "$cross_compiling" = yes; then :
783e057b 4274 :
bec39cab 4275else
81ecdfbb 4276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4277/* end confdefs.h. */
4278#include <ctype.h>
81ecdfbb 4279#include <stdlib.h>
783e057b
DJ
4280#if ((' ' & 0x0FF) == 0x020)
4281# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4282# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4283#else
4284# define ISLOWER(c) \
4285 (('a' <= (c) && (c) <= 'i') \
4286 || ('j' <= (c) && (c) <= 'r') \
4287 || ('s' <= (c) && (c) <= 'z'))
4288# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4289#endif
4290
4291#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4292int
4293main ()
4294{
4295 int i;
4296 for (i = 0; i < 256; i++)
4297 if (XOR (islower (i), ISLOWER (i))
4298 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4299 return 2;
4300 return 0;
783e057b
DJ
4301}
4302_ACEOF
81ecdfbb 4303if ac_fn_c_try_run "$LINENO"; then :
783e057b 4304
81ecdfbb
RW
4305else
4306 ac_cv_header_stdc=no
783e057b 4307fi
81ecdfbb
RW
4308rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4309 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4310fi
81ecdfbb 4311
783e057b
DJ
4312fi
4313fi
81ecdfbb
RW
4314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4315$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4316if test $ac_cv_header_stdc = yes; then
4317
81ecdfbb 4318$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4319
4320fi
4321
4322# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4323for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4324 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4325do :
4326 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4327ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4328"
d0ac1c44 4329if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
783e057b 4330 cat >>confdefs.h <<_ACEOF
81ecdfbb 4331#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4332_ACEOF
4333
4334fi
4335
4336done
4337
4338
4339
81ecdfbb 4340 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4341if test "x$ac_cv_header_minix_config_h" = xyes; then :
783e057b
DJ
4342 MINIX=yes
4343else
4344 MINIX=
4345fi
4346
4347
4348 if test "$MINIX" = yes; then
4349
81ecdfbb 4350$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4351
4352
81ecdfbb 4353$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4354
4355
81ecdfbb 4356$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4357
4358 fi
4359
4360
81ecdfbb
RW
4361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4362$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4363if ${ac_cv_safe_to_define___extensions__+:} false; then :
81ecdfbb 4364 $as_echo_n "(cached) " >&6
783e057b 4365else
81ecdfbb 4366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4367/* end confdefs.h. */
4368
d0ac1c44
SM
4369# define __EXTENSIONS__ 1
4370 $ac_includes_default
783e057b
DJ
4371int
4372main ()
4373{
4374
4375 ;
4376 return 0;
4377}
4378_ACEOF
81ecdfbb 4379if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4380 ac_cv_safe_to_define___extensions__=yes
4381else
81ecdfbb 4382 ac_cv_safe_to_define___extensions__=no
783e057b 4383fi
81ecdfbb 4384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4385fi
81ecdfbb
RW
4386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4387$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4388 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4389 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4390
81ecdfbb 4391 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4392
81ecdfbb 4393 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4394
81ecdfbb 4395 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4396
81ecdfbb 4397 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4398
4399
c971b7fa
PA
4400ac_aux_dir=
4401for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
d0ac1c44
SM
4402 if test -f "$ac_dir/install-sh"; then
4403 ac_aux_dir=$ac_dir
4404 ac_install_sh="$ac_aux_dir/install-sh -c"
4405 break
4406 elif test -f "$ac_dir/install.sh"; then
4407 ac_aux_dir=$ac_dir
4408 ac_install_sh="$ac_aux_dir/install.sh -c"
4409 break
4410 elif test -f "$ac_dir/shtool"; then
4411 ac_aux_dir=$ac_dir
4412 ac_install_sh="$ac_aux_dir/shtool install -c"
4413 break
4414 fi
c971b7fa
PA
4415done
4416if test -z "$ac_aux_dir"; then
d0ac1c44 4417 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
c971b7fa 4418fi
770d76d7 4419
c971b7fa
PA
4420# These three variables are undocumented and unsupported,
4421# and are intended to be withdrawn in a future Autoconf release.
4422# They can cause serious problems if a builder's source tree is in a directory
4423# whose full name contains unusual characters.
4424ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4425ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4426ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4427
770d76d7 4428
c971b7fa
PA
4429# Make sure we can run config.sub.
4430$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 4431 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4432
c971b7fa
PA
4433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4434$as_echo_n "checking build system type... " >&6; }
d0ac1c44 4435if ${ac_cv_build+:} false; then :
c971b7fa 4436 $as_echo_n "(cached) " >&6
770d76d7 4437else
c971b7fa
PA
4438 ac_build_alias=$build_alias
4439test "x$ac_build_alias" = x &&
4440 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4441test "x$ac_build_alias" = x &&
d0ac1c44 4442 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
c971b7fa 4443ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 4444 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
c971b7fa 4445
770d76d7 4446fi
c971b7fa
PA
4447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4448$as_echo "$ac_cv_build" >&6; }
4449case $ac_cv_build in
4450*-*-*) ;;
d0ac1c44 4451*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4452esac
c971b7fa
PA
4453build=$ac_cv_build
4454ac_save_IFS=$IFS; IFS='-'
4455set x $ac_cv_build
4456shift
4457build_cpu=$1
4458build_vendor=$2
4459shift; shift
4460# Remember, the first character of IFS is used to create $*,
4461# except with old shells:
4462build_os=$*
4463IFS=$ac_save_IFS
4464case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4465
4466
c971b7fa
PA
4467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4468$as_echo_n "checking host system type... " >&6; }
d0ac1c44 4469if ${ac_cv_host+:} false; then :
81ecdfbb
RW
4470 $as_echo_n "(cached) " >&6
4471else
c971b7fa
PA
4472 if test "x$host_alias" = x; then
4473 ac_cv_host=$ac_cv_build
81ecdfbb 4474else
c971b7fa 4475 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 4476 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4477fi
81ecdfbb
RW
4478
4479fi
c971b7fa
PA
4480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4481$as_echo "$ac_cv_host" >&6; }
4482case $ac_cv_host in
4483*-*-*) ;;
d0ac1c44 4484*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4485esac
c971b7fa
PA
4486host=$ac_cv_host
4487ac_save_IFS=$IFS; IFS='-'
4488set x $ac_cv_host
4489shift
4490host_cpu=$1
4491host_vendor=$2
4492shift; shift
4493# Remember, the first character of IFS is used to create $*,
4494# except with old shells:
4495host_os=$*
4496IFS=$ac_save_IFS
4497case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4498
4499
4500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4501$as_echo_n "checking target system type... " >&6; }
d0ac1c44 4502if ${ac_cv_target+:} false; then :
3388710e
JM
4503 $as_echo_n "(cached) " >&6
4504else
4505 if test "x$target_alias" = x; then
4506 ac_cv_target=$ac_cv_host
4507else
4508 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
d0ac1c44 4509 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
3388710e
JM
4510fi
4511
4512fi
4513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4514$as_echo "$ac_cv_target" >&6; }
4515case $ac_cv_target in
4516*-*-*) ;;
d0ac1c44 4517*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
3388710e
JM
4518esac
4519target=$ac_cv_target
4520ac_save_IFS=$IFS; IFS='-'
4521set x $ac_cv_target
4522shift
4523target_cpu=$1
4524target_vendor=$2
4525shift; shift
4526# Remember, the first character of IFS is used to create $*,
4527# except with old shells:
4528target_os=$*
4529IFS=$ac_save_IFS
4530case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4531
4532
4533# The aliases save the names the user supplied, while $host etc.
4534# will get canonicalized.
4535test -n "$target_alias" &&
4536 test "$program_prefix$program_suffix$program_transform_name" = \
4537 NONENONEs,x,x, &&
4538 program_prefix=${target_alias}-
4539
4540# The tests for host and target for $enable_largefile require
4541# canonical names.
4542
4543
81ecdfbb 4544
da2f07f1
JK
4545# As the $enable_largefile decision depends on --enable-plugins we must set it
4546# even in directories otherwise not depending on the $plugins option.
4547
4548
2974be62
AM
4549 maybe_plugins=no
4550 for ac_header in dlfcn.h
4551do :
4552 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4553"
d0ac1c44 4554if test "x$ac_cv_header_dlfcn_h" = xyes; then :
2974be62
AM
4555 cat >>confdefs.h <<_ACEOF
4556#define HAVE_DLFCN_H 1
4557_ACEOF
4558 maybe_plugins=yes
4559fi
4560
4561done
4562
4563 for ac_header in windows.h
4564do :
4565 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4566"
d0ac1c44 4567if test "x$ac_cv_header_windows_h" = xyes; then :
2974be62
AM
4568 cat >>confdefs.h <<_ACEOF
4569#define HAVE_WINDOWS_H 1
4570_ACEOF
4571 maybe_plugins=yes
4572fi
4573
4574done
4575
4576
4577 # Check whether --enable-plugins was given.
da2f07f1
JK
4578if test "${enable_plugins+set}" = set; then :
4579 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4580 no) plugins=no ;;
4581 *) plugins=yes
4582 if test "$maybe_plugins" != "yes" ; then
d0ac1c44 4583 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
2974be62
AM
4584 fi ;;
4585 esac
da2f07f1 4586else
2974be62
AM
4587 plugins=$maybe_plugins
4588
da2f07f1
JK
4589fi
4590
2974be62 4591 if test "$plugins" = "yes"; then
458412c3
TT
4592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4593$as_echo_n "checking for library containing dlsym... " >&6; }
d0ac1c44 4594if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4595 $as_echo_n "(cached) " >&6
4596else
4597 ac_func_search_save_LIBS=$LIBS
4598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4599/* end confdefs.h. */
4600
4601/* Override any GCC internal prototype to avoid an error.
4602 Use char because int might match the return type of a GCC
4603 builtin and then its argument prototype would still apply. */
4604#ifdef __cplusplus
4605extern "C"
4606#endif
458412c3 4607char dlsym ();
2974be62
AM
4608int
4609main ()
4610{
458412c3 4611return dlsym ();
2974be62
AM
4612 ;
4613 return 0;
4614}
4615_ACEOF
4616for ac_lib in '' dl; do
4617 if test -z "$ac_lib"; then
4618 ac_res="none required"
4619 else
4620 ac_res=-l$ac_lib
4621 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4622 fi
4623 if ac_fn_c_try_link "$LINENO"; then :
458412c3 4624 ac_cv_search_dlsym=$ac_res
2974be62
AM
4625fi
4626rm -f core conftest.err conftest.$ac_objext \
4627 conftest$ac_exeext
d0ac1c44 4628 if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4629 break
4630fi
4631done
d0ac1c44 4632if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4633
4634else
458412c3 4635 ac_cv_search_dlsym=no
2974be62
AM
4636fi
4637rm conftest.$ac_ext
4638LIBS=$ac_func_search_save_LIBS
4639fi
458412c3
TT
4640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4641$as_echo "$ac_cv_search_dlsym" >&6; }
4642ac_res=$ac_cv_search_dlsym
2974be62
AM
4643if test "$ac_res" != no; then :
4644 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4645
4646fi
4647
4648 fi
da2f07f1
JK
4649
4650
4651case "${host}" in
4652 sparc-*-solaris*|i[3-7]86-*-solaris*)
4653 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4654 # are mutually exclusive; and without procfs support, the bfd/ elf module
4655 # cannot provide certain routines such as elfcore_write_prpsinfo
4656 # or elfcore_write_prstatus. So unless the user explicitly requested
4657 # large-file support through the --enable-largefile switch, disable
4658 # large-file support in favor of procfs support.
4659 test "${target}" = "${host}" -a "x$plugins" = xno \
4660 && : ${enable_largefile="no"}
4661 ;;
4662esac
4663
4664# Check whether --enable-largefile was given.
4665if test "${enable_largefile+set}" = set; then :
4666 enableval=$enable_largefile;
4667fi
4668
4669if test "$enable_largefile" != no; then
4670
4671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4672$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 4673if ${ac_cv_sys_largefile_CC+:} false; then :
da2f07f1
JK
4674 $as_echo_n "(cached) " >&6
4675else
4676 ac_cv_sys_largefile_CC=no
4677 if test "$GCC" != yes; then
4678 ac_save_CC=$CC
4679 while :; do
4680 # IRIX 6.2 and later do not support large files by default,
4681 # so use the C compiler's -n32 option if that helps.
4682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4683/* end confdefs.h. */
4684#include <sys/types.h>
4685 /* Check that off_t can represent 2**63 - 1 correctly.
4686 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4687 since some C++ compilers masquerading as C compilers
4688 incorrectly reject 9223372036854775807. */
4689#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4690 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4691 && LARGE_OFF_T % 2147483647 == 1)
4692 ? 1 : -1];
4693int
4694main ()
4695{
4696
4697 ;
4698 return 0;
4699}
4700_ACEOF
4701 if ac_fn_c_try_compile "$LINENO"; then :
4702 break
4703fi
4704rm -f core conftest.err conftest.$ac_objext
4705 CC="$CC -n32"
4706 if ac_fn_c_try_compile "$LINENO"; then :
4707 ac_cv_sys_largefile_CC=' -n32'; break
4708fi
4709rm -f core conftest.err conftest.$ac_objext
4710 break
4711 done
4712 CC=$ac_save_CC
4713 rm -f conftest.$ac_ext
4714 fi
4715fi
4716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4717$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4718 if test "$ac_cv_sys_largefile_CC" != no; then
4719 CC=$CC$ac_cv_sys_largefile_CC
4720 fi
4721
4722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4723$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 4724if ${ac_cv_sys_file_offset_bits+:} false; then :
da2f07f1
JK
4725 $as_echo_n "(cached) " >&6
4726else
4727 while :; do
4728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4729/* end confdefs.h. */
4730#include <sys/types.h>
4731 /* Check that off_t can represent 2**63 - 1 correctly.
4732 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4733 since some C++ compilers masquerading as C compilers
4734 incorrectly reject 9223372036854775807. */
4735#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4736 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4737 && LARGE_OFF_T % 2147483647 == 1)
4738 ? 1 : -1];
4739int
4740main ()
4741{
4742
4743 ;
4744 return 0;
4745}
4746_ACEOF
4747if ac_fn_c_try_compile "$LINENO"; then :
4748 ac_cv_sys_file_offset_bits=no; break
4749fi
4750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4752/* end confdefs.h. */
4753#define _FILE_OFFSET_BITS 64
4754#include <sys/types.h>
4755 /* Check that off_t can represent 2**63 - 1 correctly.
4756 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4757 since some C++ compilers masquerading as C compilers
4758 incorrectly reject 9223372036854775807. */
4759#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4760 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4761 && LARGE_OFF_T % 2147483647 == 1)
4762 ? 1 : -1];
4763int
4764main ()
4765{
4766
4767 ;
4768 return 0;
4769}
4770_ACEOF
4771if ac_fn_c_try_compile "$LINENO"; then :
4772 ac_cv_sys_file_offset_bits=64; break
4773fi
4774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4775 ac_cv_sys_file_offset_bits=unknown
4776 break
4777done
4778fi
4779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4780$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4781case $ac_cv_sys_file_offset_bits in #(
4782 no | unknown) ;;
4783 *)
4784cat >>confdefs.h <<_ACEOF
4785#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4786_ACEOF
4787;;
4788esac
4789rm -rf conftest*
4790 if test $ac_cv_sys_file_offset_bits = unknown; then
4791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4792$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 4793if ${ac_cv_sys_large_files+:} false; then :
da2f07f1
JK
4794 $as_echo_n "(cached) " >&6
4795else
4796 while :; do
4797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4798/* end confdefs.h. */
4799#include <sys/types.h>
4800 /* Check that off_t can represent 2**63 - 1 correctly.
4801 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4802 since some C++ compilers masquerading as C compilers
4803 incorrectly reject 9223372036854775807. */
4804#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4805 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4806 && LARGE_OFF_T % 2147483647 == 1)
4807 ? 1 : -1];
4808int
4809main ()
4810{
4811
4812 ;
4813 return 0;
4814}
4815_ACEOF
4816if ac_fn_c_try_compile "$LINENO"; then :
4817 ac_cv_sys_large_files=no; break
4818fi
4819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4821/* end confdefs.h. */
4822#define _LARGE_FILES 1
4823#include <sys/types.h>
4824 /* Check that off_t can represent 2**63 - 1 correctly.
4825 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4826 since some C++ compilers masquerading as C compilers
4827 incorrectly reject 9223372036854775807. */
4828#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4829 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4830 && LARGE_OFF_T % 2147483647 == 1)
4831 ? 1 : -1];
4832int
4833main ()
4834{
4835
4836 ;
4837 return 0;
4838}
4839_ACEOF
4840if ac_fn_c_try_compile "$LINENO"; then :
4841 ac_cv_sys_large_files=1; break
4842fi
4843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4844 ac_cv_sys_large_files=unknown
4845 break
4846done
4847fi
4848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4849$as_echo "$ac_cv_sys_large_files" >&6; }
4850case $ac_cv_sys_large_files in #(
4851 no | unknown) ;;
4852 *)
4853cat >>confdefs.h <<_ACEOF
4854#define _LARGE_FILES $ac_cv_sys_large_files
4855_ACEOF
4856;;
4857esac
4858rm -rf conftest*
4859 fi
d0ac1c44
SM
4860
4861
da2f07f1
JK
4862fi
4863
4864
4865
81ecdfbb
RW
4866
4867
4868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4869$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
d0ac1c44 4870if ${am_cv_prog_cc_stdc+:} false; then :
81ecdfbb
RW
4871 $as_echo_n "(cached) " >&6
4872else
4873 am_cv_prog_cc_stdc=no
4874ac_save_CC="$CC"
4875# Don't try gcc -ansi; that turns off useful extensions and
4876# breaks some systems' header files.
4877# AIX -qlanglvl=ansi
4878# Ultrix and OSF/1 -std1
4879# HP-UX 10.20 and later -Ae
4880# HP-UX older versions -Aa -D_HPUX_SOURCE
4881# SVR4 -Xc -D__EXTENSIONS__
4882for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4883do
783e057b 4884 CC="$ac_save_CC $ac_arg"
81ecdfbb 4885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4886/* end confdefs.h. */
4887#include <stdarg.h>
4888#include <stdio.h>
4889#include <sys/types.h>
4890#include <sys/stat.h>
4891/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4892struct buf { int x; };
4893FILE * (*rcsopen) (struct buf *, struct stat *, int);
4894static char *e (p, i)
4895 char **p;
4896 int i;
4897{
4898 return p[i];
4899}
4900static char *f (char * (*g) (char **, int), char **p, ...)
4901{
4902 char *s;
4903 va_list v;
4904 va_start (v,p);
4905 s = g (p, va_arg (v,int));
4906 va_end (v);
4907 return s;
4908}
4909int test (int i, double x);
4910struct s1 {int (*f) (int a);};
4911struct s2 {int (*f) (double a);};
4912int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4913int argc;
4914char **argv;
4915
4916int
4917main ()
4918{
4919
4920return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4921
4922 ;
4923 return 0;
4924}
4925_ACEOF
81ecdfbb 4926if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4927 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4928fi
81ecdfbb 4929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4930done
4931CC="$ac_save_CC"
4932
4933fi
4934
4935if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4937$as_echo "none needed" >&6; }
783e057b 4938else
81ecdfbb
RW
4939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4940$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4941fi
4942case "x$am_cv_prog_cc_stdc" in
4943 x|xno) ;;
4944 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4945esac
4946
d0ac1c44
SM
4947# Expand $ac_aux_dir to an absolute path.
4948am_aux_dir=`cd "$ac_aux_dir" && pwd`
4869db5e 4949
d0ac1c44 4950if test x"${install_sh+set}" != xset; then
4869db5e
RM
4951 case $am_aux_dir in
4952 *\ * | *\ *)
4953 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4954 *)
4955 install_sh="\${SHELL} $am_aux_dir/install-sh"
4956 esac
4957fi
4958
d0ac1c44
SM
4959# Installed binaries are usually stripped using 'strip' when the user
4960# run "make install-strip". However 'strip' might not be the right
4869db5e 4961# tool to use in cross-compilation environments, therefore Automake
d0ac1c44 4962# will honor the 'STRIP' environment variable to overrule this program.
4869db5e
RM
4963if test "$cross_compiling" != no; then
4964 if test -n "$ac_tool_prefix"; then
4965 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4966set dummy ${ac_tool_prefix}strip; ac_word=$2
4967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4968$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4969if ${ac_cv_prog_STRIP+:} false; then :
4869db5e
RM
4970 $as_echo_n "(cached) " >&6
4971else
4972 if test -n "$STRIP"; then
4973 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4974else
4975as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4976for as_dir in $PATH
4977do
4978 IFS=$as_save_IFS
4979 test -z "$as_dir" && as_dir=.
4980 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4981 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
4982 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4983 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4984 break 2
4985 fi
4986done
4987 done
4988IFS=$as_save_IFS
4989
4990fi
4991fi
4992STRIP=$ac_cv_prog_STRIP
4993if test -n "$STRIP"; then
4994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4995$as_echo "$STRIP" >&6; }
4996else
4997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4998$as_echo "no" >&6; }
4999fi
5000
5001
5002fi
5003if test -z "$ac_cv_prog_STRIP"; then
5004 ac_ct_STRIP=$STRIP
5005 # Extract the first word of "strip", so it can be a program name with args.
5006set dummy strip; ac_word=$2
5007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5008$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5009if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4869db5e
RM
5010 $as_echo_n "(cached) " >&6
5011else
5012 if test -n "$ac_ct_STRIP"; then
5013 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5014else
5015as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5016for as_dir in $PATH
5017do
5018 IFS=$as_save_IFS
5019 test -z "$as_dir" && as_dir=.
5020 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5021 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5022 ac_cv_prog_ac_ct_STRIP="strip"
5023 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5024 break 2
5025 fi
5026done
5027 done
5028IFS=$as_save_IFS
5029
5030fi
5031fi
5032ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5033if test -n "$ac_ct_STRIP"; then
5034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5035$as_echo "$ac_ct_STRIP" >&6; }
5036else
5037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5038$as_echo "no" >&6; }
5039fi
5040
5041 if test "x$ac_ct_STRIP" = x; then
5042 STRIP=":"
5043 else
5044 case $cross_compiling:$ac_tool_warned in
5045yes:)
5046{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5047$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5048ac_tool_warned=yes ;;
5049esac
5050 STRIP=$ac_ct_STRIP
5051 fi
5052else
5053 STRIP="$ac_cv_prog_STRIP"
5054fi
5055
5056fi
5057INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5058
783e057b
DJ
5059
5060ac_aux_dir=
81ecdfbb 5061for ac_dir in .. "$srcdir"/..; do
d0ac1c44
SM
5062 if test -f "$ac_dir/install-sh"; then
5063 ac_aux_dir=$ac_dir
5064 ac_install_sh="$ac_aux_dir/install-sh -c"
5065 break
5066 elif test -f "$ac_dir/install.sh"; then
5067 ac_aux_dir=$ac_dir
5068 ac_install_sh="$ac_aux_dir/install.sh -c"
5069 break
5070 elif test -f "$ac_dir/shtool"; then
5071 ac_aux_dir=$ac_dir
5072 ac_install_sh="$ac_aux_dir/shtool install -c"
5073 break
5074 fi
783e057b
DJ
5075done
5076if test -z "$ac_aux_dir"; then
d0ac1c44 5077 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 5078fi
81ecdfbb
RW
5079
5080# These three variables are undocumented and unsupported,
5081# and are intended to be withdrawn in a future Autoconf release.
5082# They can cause serious problems if a builder's source tree is in a directory
5083# whose full name contains unusual characters.
5084ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5085ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5086ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5087
783e057b 5088
783e057b 5089
9009e1ae
MR
5090test "$program_prefix" != NONE &&
5091 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5092# Use a double $ so make ignores it.
5093test "$program_suffix" != NONE &&
5094 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5095# Double any \ or $.
5096# By default was `s,x,x', remove it if useless.
5097ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5098program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5099
81ecdfbb 5100
0bcda685
PA
5101# We require a C++11 compiler. Check if one is available, and if
5102# necessary, set CXX_DIALECT to some -std=xxx switch.
5103
41260ac2 5104 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
0bcda685
PA
5105 ac_ext=cpp
5106ac_cpp='$CXXCPP $CPPFLAGS'
5107ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5108ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5109ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5110 CXX_DIALECT=""
5111 ac_success=no
5112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5113$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
d0ac1c44 5114if ${ax_cv_cxx_compile_cxx11+:} false; then :
0bcda685
PA
5115 $as_echo_n "(cached) " >&6
5116else
5117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5118/* end confdefs.h. */
5119
5120
5121// If the compiler admits that it is not ready for C++11, why torture it?
5122// Hopefully, this will speed up the test.
5123
5124#ifndef __cplusplus
5125
5126#error "This is not a C++ compiler"
5127
5128#elif __cplusplus < 201103L
5129
5130#error "This is not a C++11 compiler"
5131
5132#else
5133
5134namespace cxx11
5135{
5136
5137 namespace test_static_assert
5138 {
5139
5140 template <typename T>
5141 struct check
5142 {
5143 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5144 };
5145
5146 }
5147
5148 namespace test_final_override
5149 {
5150
5151 struct Base
5152 {
5153 virtual void f() {}
5154 };
5155
5156 struct Derived : public Base
5157 {
5158 virtual void f() override {}
5159 };
5160
5161 }
5162
5163 namespace test_double_right_angle_brackets
5164 {
5165
5166 template < typename T >
5167 struct check {};
5168
5169 typedef check<void> single_type;
5170 typedef check<check<void>> double_type;
5171 typedef check<check<check<void>>> triple_type;
5172 typedef check<check<check<check<void>>>> quadruple_type;
5173
5174 }
5175
5176 namespace test_decltype
5177 {
5178
5179 int
5180 f()
5181 {
5182 int a = 1;
5183 decltype(a) b = 2;
5184 return a + b;
5185 }
5186
5187 }
5188
5189 namespace test_type_deduction
5190 {
5191
5192 template < typename T1, typename T2 >
5193 struct is_same
5194 {
5195 static const bool value = false;
5196 };
5197
5198 template < typename T >
5199 struct is_same<T, T>
5200 {
5201 static const bool value = true;
5202 };
5203
5204 template < typename T1, typename T2 >
5205 auto
5206 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5207 {
5208 return a1 + a2;
5209 }
5210
5211 int
5212 test(const int c, volatile int v)
5213 {
5214 static_assert(is_same<int, decltype(0)>::value == true, "");
5215 static_assert(is_same<int, decltype(c)>::value == false, "");
5216 static_assert(is_same<int, decltype(v)>::value == false, "");
5217 auto ac = c;
5218 auto av = v;
5219 auto sumi = ac + av + 'x';
5220 auto sumf = ac + av + 1.0;
5221 static_assert(is_same<int, decltype(ac)>::value == true, "");
5222 static_assert(is_same<int, decltype(av)>::value == true, "");
5223 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5224 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5225 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5226 return (sumf > 0.0) ? sumi : add(c, v);
5227 }
5228
5229 }
5230
5231 namespace test_noexcept
5232 {
5233
5234 int f() { return 0; }
5235 int g() noexcept { return 0; }
5236
5237 static_assert(noexcept(f()) == false, "");
5238 static_assert(noexcept(g()) == true, "");
5239
5240 }
5241
5242 namespace test_constexpr
5243 {
5244
5245 template < typename CharT >
5246 unsigned long constexpr
5247 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5248 {
5249 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5250 }
5251
5252 template < typename CharT >
5253 unsigned long constexpr
5254 strlen_c(const CharT *const s) noexcept
5255 {
5256 return strlen_c_r(s, 0UL);
5257 }
5258
5259 static_assert(strlen_c("") == 0UL, "");
5260 static_assert(strlen_c("1") == 1UL, "");
5261 static_assert(strlen_c("example") == 7UL, "");
5262 static_assert(strlen_c("another\0example") == 7UL, "");
5263
5264 }
5265
5266 namespace test_rvalue_references
5267 {
5268
5269 template < int N >
5270 struct answer
5271 {
5272 static constexpr int value = N;
5273 };
5274
5275 answer<1> f(int&) { return answer<1>(); }
5276 answer<2> f(const int&) { return answer<2>(); }
5277 answer<3> f(int&&) { return answer<3>(); }
5278
5279 void
5280 test()
5281 {
5282 int i = 0;
5283 const int c = 0;
5284 static_assert(decltype(f(i))::value == 1, "");
5285 static_assert(decltype(f(c))::value == 2, "");
5286 static_assert(decltype(f(0))::value == 3, "");
5287 }
5288
5289 }
5290
5291 namespace test_uniform_initialization
5292 {
5293
5294 struct test
5295 {
5296 static const int zero {};
5297 static const int one {1};
5298 };
5299
5300 static_assert(test::zero == 0, "");
5301 static_assert(test::one == 1, "");
5302
5303 }
5304
5305 namespace test_lambdas
5306 {
5307
5308 void
5309 test1()
5310 {
5311 auto lambda1 = [](){};
5312 auto lambda2 = lambda1;
5313 lambda1();
5314 lambda2();
5315 }
5316
5317 int
5318 test2()
5319 {
5320 auto a = [](int i, int j){ return i + j; }(1, 2);
5321 auto b = []() -> int { return '0'; }();
5322 auto c = [=](){ return a + b; }();
5323 auto d = [&](){ return c; }();
5324 auto e = [a, &b](int x) mutable {
5325 const auto identity = [](int y){ return y; };
5326 for (auto i = 0; i < a; ++i)
5327 a += b--;
5328 return x + identity(a + b);
5329 }(0);
5330 return a + b + c + d + e;
5331 }
5332
5333 int
5334 test3()
5335 {
5336 const auto nullary = [](){ return 0; };
5337 const auto unary = [](int x){ return x; };
5338 using nullary_t = decltype(nullary);
5339 using unary_t = decltype(unary);
5340 const auto higher1st = [](nullary_t f){ return f(); };
5341 const auto higher2nd = [unary](nullary_t f1){
5342 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5343 };
5344 return higher1st(nullary) + higher2nd(nullary)(unary);
5345 }
5346
5347 }
5348
5349 namespace test_variadic_templates
5350 {
5351
5352 template <int...>
5353 struct sum;
5354
5355 template <int N0, int... N1toN>
5356 struct sum<N0, N1toN...>
5357 {
5358 static constexpr auto value = N0 + sum<N1toN...>::value;
5359 };
5360
5361 template <>
5362 struct sum<>
5363 {
5364 static constexpr auto value = 0;
5365 };
5366
5367 static_assert(sum<>::value == 0, "");
5368 static_assert(sum<1>::value == 1, "");
5369 static_assert(sum<23>::value == 23, "");
5370 static_assert(sum<1, 2>::value == 3, "");
5371 static_assert(sum<5, 5, 11>::value == 21, "");
5372 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5373
5374 }
5375
5376 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5377 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5378 // because of this.
5379 namespace test_template_alias_sfinae
5380 {
5381
5382 struct foo {};
5383
5384 template<typename T>
5385 using member = typename T::member_type;
5386
5387 template<typename T>
5388 void func(...) {}
5389
5390 template<typename T>
5391 void func(member<T>*) {}
5392
5393 void test();
5394
5395 void test() { func<foo>(0); }
5396
5397 }
5398
5399} // namespace cxx11
5400
5401#endif // __cplusplus >= 201103L
5402
5403
5404
5405_ACEOF
5406if ac_fn_cxx_try_compile "$LINENO"; then :
5407 ax_cv_cxx_compile_cxx11=yes
5408else
5409 ax_cv_cxx_compile_cxx11=no
5410fi
5411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5412fi
5413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5414$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5415 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5416 ac_success=yes
5417 fi
5418
5419 if test x$ac_success = xno; then
41260ac2
SM
5420 for alternative in ${ax_cxx_compile_alternatives}; do
5421 switch="-std=gnu++${alternative}"
0bcda685
PA
5422 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5424$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5425if eval \${$cachevar+:} false; then :
0bcda685
PA
5426 $as_echo_n "(cached) " >&6
5427else
5428 ac_save_CXX="$CXX"
5429 CXX="$CXX $switch"
5430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5431/* end confdefs.h. */
5432
5433
5434// If the compiler admits that it is not ready for C++11, why torture it?
5435// Hopefully, this will speed up the test.
5436
5437#ifndef __cplusplus
5438
5439#error "This is not a C++ compiler"
5440
5441#elif __cplusplus < 201103L
5442
5443#error "This is not a C++11 compiler"
5444
5445#else
5446
5447namespace cxx11
5448{
5449
5450 namespace test_static_assert
5451 {
5452
5453 template <typename T>
5454 struct check
5455 {
5456 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5457 };
5458
5459 }
5460
5461 namespace test_final_override
5462 {
5463
5464 struct Base
5465 {
5466 virtual void f() {}
5467 };
5468
5469 struct Derived : public Base
5470 {
5471 virtual void f() override {}
5472 };
5473
5474 }
5475
5476 namespace test_double_right_angle_brackets
5477 {
5478
5479 template < typename T >
5480 struct check {};
5481
5482 typedef check<void> single_type;
5483 typedef check<check<void>> double_type;
5484 typedef check<check<check<void>>> triple_type;
5485 typedef check<check<check<check<void>>>> quadruple_type;
5486
5487 }
5488
5489 namespace test_decltype
5490 {
5491
5492 int
5493 f()
5494 {
5495 int a = 1;
5496 decltype(a) b = 2;
5497 return a + b;
5498 }
5499
5500 }
5501
5502 namespace test_type_deduction
5503 {
5504
5505 template < typename T1, typename T2 >
5506 struct is_same
5507 {
5508 static const bool value = false;
5509 };
5510
5511 template < typename T >
5512 struct is_same<T, T>
5513 {
5514 static const bool value = true;
5515 };
5516
5517 template < typename T1, typename T2 >
5518 auto
5519 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5520 {
5521 return a1 + a2;
5522 }
5523
5524 int
5525 test(const int c, volatile int v)
5526 {
5527 static_assert(is_same<int, decltype(0)>::value == true, "");
5528 static_assert(is_same<int, decltype(c)>::value == false, "");
5529 static_assert(is_same<int, decltype(v)>::value == false, "");
5530 auto ac = c;
5531 auto av = v;
5532 auto sumi = ac + av + 'x';
5533 auto sumf = ac + av + 1.0;
5534 static_assert(is_same<int, decltype(ac)>::value == true, "");
5535 static_assert(is_same<int, decltype(av)>::value == true, "");
5536 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5537 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5538 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5539 return (sumf > 0.0) ? sumi : add(c, v);
5540 }
5541
5542 }
5543
5544 namespace test_noexcept
5545 {
5546
5547 int f() { return 0; }
5548 int g() noexcept { return 0; }
5549
5550 static_assert(noexcept(f()) == false, "");
5551 static_assert(noexcept(g()) == true, "");
5552
5553 }
5554
5555 namespace test_constexpr
5556 {
5557
5558 template < typename CharT >
5559 unsigned long constexpr
5560 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5561 {
5562 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5563 }
5564
5565 template < typename CharT >
5566 unsigned long constexpr
5567 strlen_c(const CharT *const s) noexcept
5568 {
5569 return strlen_c_r(s, 0UL);
5570 }
5571
5572 static_assert(strlen_c("") == 0UL, "");
5573 static_assert(strlen_c("1") == 1UL, "");
5574 static_assert(strlen_c("example") == 7UL, "");
5575 static_assert(strlen_c("another\0example") == 7UL, "");
5576
5577 }
5578
5579 namespace test_rvalue_references
5580 {
5581
5582 template < int N >
5583 struct answer
5584 {
5585 static constexpr int value = N;
5586 };
5587
5588 answer<1> f(int&) { return answer<1>(); }
5589 answer<2> f(const int&) { return answer<2>(); }
5590 answer<3> f(int&&) { return answer<3>(); }
5591
5592 void
5593 test()
5594 {
5595 int i = 0;
5596 const int c = 0;
5597 static_assert(decltype(f(i))::value == 1, "");
5598 static_assert(decltype(f(c))::value == 2, "");
5599 static_assert(decltype(f(0))::value == 3, "");
5600 }
5601
5602 }
5603
5604 namespace test_uniform_initialization
5605 {
5606
5607 struct test
5608 {
5609 static const int zero {};
5610 static const int one {1};
5611 };
5612
5613 static_assert(test::zero == 0, "");
5614 static_assert(test::one == 1, "");
5615
5616 }
5617
5618 namespace test_lambdas
5619 {
5620
5621 void
5622 test1()
5623 {
5624 auto lambda1 = [](){};
5625 auto lambda2 = lambda1;
5626 lambda1();
5627 lambda2();
5628 }
5629
5630 int
5631 test2()
5632 {
5633 auto a = [](int i, int j){ return i + j; }(1, 2);
5634 auto b = []() -> int { return '0'; }();
5635 auto c = [=](){ return a + b; }();
5636 auto d = [&](){ return c; }();
5637 auto e = [a, &b](int x) mutable {
5638 const auto identity = [](int y){ return y; };
5639 for (auto i = 0; i < a; ++i)
5640 a += b--;
5641 return x + identity(a + b);
5642 }(0);
5643 return a + b + c + d + e;
5644 }
5645
5646 int
5647 test3()
5648 {
5649 const auto nullary = [](){ return 0; };
5650 const auto unary = [](int x){ return x; };
5651 using nullary_t = decltype(nullary);
5652 using unary_t = decltype(unary);
5653 const auto higher1st = [](nullary_t f){ return f(); };
5654 const auto higher2nd = [unary](nullary_t f1){
5655 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5656 };
5657 return higher1st(nullary) + higher2nd(nullary)(unary);
5658 }
5659
5660 }
5661
5662 namespace test_variadic_templates
5663 {
5664
5665 template <int...>
5666 struct sum;
5667
5668 template <int N0, int... N1toN>
5669 struct sum<N0, N1toN...>
5670 {
5671 static constexpr auto value = N0 + sum<N1toN...>::value;
5672 };
5673
5674 template <>
5675 struct sum<>
5676 {
5677 static constexpr auto value = 0;
5678 };
5679
5680 static_assert(sum<>::value == 0, "");
5681 static_assert(sum<1>::value == 1, "");
5682 static_assert(sum<23>::value == 23, "");
5683 static_assert(sum<1, 2>::value == 3, "");
5684 static_assert(sum<5, 5, 11>::value == 21, "");
5685 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5686
5687 }
5688
5689 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5690 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5691 // because of this.
5692 namespace test_template_alias_sfinae
5693 {
5694
5695 struct foo {};
5696
5697 template<typename T>
5698 using member = typename T::member_type;
5699
5700 template<typename T>
5701 void func(...) {}
5702
5703 template<typename T>
5704 void func(member<T>*) {}
5705
5706 void test();
5707
5708 void test() { func<foo>(0); }
5709
5710 }
5711
5712} // namespace cxx11
5713
5714#endif // __cplusplus >= 201103L
5715
5716
5717
5718_ACEOF
5719if ac_fn_cxx_try_compile "$LINENO"; then :
5720 eval $cachevar=yes
5721else
5722 eval $cachevar=no
5723fi
5724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5725 CXX="$ac_save_CXX"
5726fi
5727eval ac_res=\$$cachevar
5728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5729$as_echo "$ac_res" >&6; }
5730 if eval test x\$$cachevar = xyes; then
5731 CXX_DIALECT="$switch"
5732 ac_success=yes
5733 break
5734 fi
5735 done
5736 fi
5737
5738 if test x$ac_success = xno; then
41260ac2
SM
5739 for alternative in ${ax_cxx_compile_alternatives}; do
5740 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5741 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
0bcda685 5743$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5744if eval \${$cachevar+:} false; then :
0bcda685
PA
5745 $as_echo_n "(cached) " >&6
5746else
5747 ac_save_CXX="$CXX"
41260ac2
SM
5748 CXX="$CXX $switch"
5749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0bcda685
PA
5750/* end confdefs.h. */
5751
5752
5753// If the compiler admits that it is not ready for C++11, why torture it?
5754// Hopefully, this will speed up the test.
5755
5756#ifndef __cplusplus
5757
5758#error "This is not a C++ compiler"
5759
5760#elif __cplusplus < 201103L
5761
5762#error "This is not a C++11 compiler"
5763
5764#else
5765
5766namespace cxx11
5767{
5768
5769 namespace test_static_assert
5770 {
5771
5772 template <typename T>
5773 struct check
5774 {
5775 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5776 };
5777
5778 }
5779
5780 namespace test_final_override
5781 {
5782
5783 struct Base
5784 {
5785 virtual void f() {}
5786 };
5787
5788 struct Derived : public Base
5789 {
5790 virtual void f() override {}
5791 };
5792
5793 }
5794
5795 namespace test_double_right_angle_brackets
5796 {
5797
5798 template < typename T >
5799 struct check {};
5800
5801 typedef check<void> single_type;
5802 typedef check<check<void>> double_type;
5803 typedef check<check<check<void>>> triple_type;
5804 typedef check<check<check<check<void>>>> quadruple_type;
5805
5806 }
5807
5808 namespace test_decltype
5809 {
5810
5811 int
5812 f()
5813 {
5814 int a = 1;
5815 decltype(a) b = 2;
5816 return a + b;
5817 }
5818
5819 }
5820
5821 namespace test_type_deduction
5822 {
5823
5824 template < typename T1, typename T2 >
5825 struct is_same
5826 {
5827 static const bool value = false;
5828 };
5829
5830 template < typename T >
5831 struct is_same<T, T>
5832 {
5833 static const bool value = true;
5834 };
5835
5836 template < typename T1, typename T2 >
5837 auto
5838 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5839 {
5840 return a1 + a2;
5841 }
5842
5843 int
5844 test(const int c, volatile int v)
5845 {
5846 static_assert(is_same<int, decltype(0)>::value == true, "");
5847 static_assert(is_same<int, decltype(c)>::value == false, "");
5848 static_assert(is_same<int, decltype(v)>::value == false, "");
5849 auto ac = c;
5850 auto av = v;
5851 auto sumi = ac + av + 'x';
5852 auto sumf = ac + av + 1.0;
5853 static_assert(is_same<int, decltype(ac)>::value == true, "");
5854 static_assert(is_same<int, decltype(av)>::value == true, "");
5855 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5856 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5857 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5858 return (sumf > 0.0) ? sumi : add(c, v);
5859 }
5860
5861 }
5862
5863 namespace test_noexcept
5864 {
5865
5866 int f() { return 0; }
5867 int g() noexcept { return 0; }
5868
5869 static_assert(noexcept(f()) == false, "");
5870 static_assert(noexcept(g()) == true, "");
5871
5872 }
5873
5874 namespace test_constexpr
5875 {
5876
5877 template < typename CharT >
5878 unsigned long constexpr
5879 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5880 {
5881 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5882 }
5883
5884 template < typename CharT >
5885 unsigned long constexpr
5886 strlen_c(const CharT *const s) noexcept
5887 {
5888 return strlen_c_r(s, 0UL);
5889 }
5890
5891 static_assert(strlen_c("") == 0UL, "");
5892 static_assert(strlen_c("1") == 1UL, "");
5893 static_assert(strlen_c("example") == 7UL, "");
5894 static_assert(strlen_c("another\0example") == 7UL, "");
5895
5896 }
5897
5898 namespace test_rvalue_references
5899 {
5900
5901 template < int N >
5902 struct answer
5903 {
5904 static constexpr int value = N;
5905 };
5906
5907 answer<1> f(int&) { return answer<1>(); }
5908 answer<2> f(const int&) { return answer<2>(); }
5909 answer<3> f(int&&) { return answer<3>(); }
5910
5911 void
5912 test()
5913 {
5914 int i = 0;
5915 const int c = 0;
5916 static_assert(decltype(f(i))::value == 1, "");
5917 static_assert(decltype(f(c))::value == 2, "");
5918 static_assert(decltype(f(0))::value == 3, "");
5919 }
5920
5921 }
5922
5923 namespace test_uniform_initialization
5924 {
5925
5926 struct test
5927 {
5928 static const int zero {};
5929 static const int one {1};
5930 };
5931
5932 static_assert(test::zero == 0, "");
5933 static_assert(test::one == 1, "");
5934
5935 }
5936
5937 namespace test_lambdas
5938 {
5939
5940 void
5941 test1()
5942 {
5943 auto lambda1 = [](){};
5944 auto lambda2 = lambda1;
5945 lambda1();
5946 lambda2();
5947 }
5948
5949 int
5950 test2()
5951 {
5952 auto a = [](int i, int j){ return i + j; }(1, 2);
5953 auto b = []() -> int { return '0'; }();
5954 auto c = [=](){ return a + b; }();
5955 auto d = [&](){ return c; }();
5956 auto e = [a, &b](int x) mutable {
5957 const auto identity = [](int y){ return y; };
5958 for (auto i = 0; i < a; ++i)
5959 a += b--;
5960 return x + identity(a + b);
5961 }(0);
5962 return a + b + c + d + e;
5963 }
5964
5965 int
5966 test3()
5967 {
5968 const auto nullary = [](){ return 0; };
5969 const auto unary = [](int x){ return x; };
5970 using nullary_t = decltype(nullary);
5971 using unary_t = decltype(unary);
5972 const auto higher1st = [](nullary_t f){ return f(); };
5973 const auto higher2nd = [unary](nullary_t f1){
5974 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5975 };
5976 return higher1st(nullary) + higher2nd(nullary)(unary);
5977 }
5978
5979 }
5980
5981 namespace test_variadic_templates
5982 {
5983
5984 template <int...>
5985 struct sum;
5986
5987 template <int N0, int... N1toN>
5988 struct sum<N0, N1toN...>
5989 {
5990 static constexpr auto value = N0 + sum<N1toN...>::value;
5991 };
5992
5993 template <>
5994 struct sum<>
5995 {
5996 static constexpr auto value = 0;
5997 };
5998
5999 static_assert(sum<>::value == 0, "");
6000 static_assert(sum<1>::value == 1, "");
6001 static_assert(sum<23>::value == 23, "");
6002 static_assert(sum<1, 2>::value == 3, "");
6003 static_assert(sum<5, 5, 11>::value == 21, "");
6004 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6005
6006 }
6007
6008 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6009 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6010 // because of this.
6011 namespace test_template_alias_sfinae
6012 {
6013
6014 struct foo {};
6015
6016 template<typename T>
6017 using member = typename T::member_type;
6018
6019 template<typename T>
6020 void func(...) {}
6021
6022 template<typename T>
6023 void func(member<T>*) {}
6024
6025 void test();
6026
6027 void test() { func<foo>(0); }
6028
6029 }
6030
6031} // namespace cxx11
6032
6033#endif // __cplusplus >= 201103L
6034
6035
6036
6037_ACEOF
6038if ac_fn_cxx_try_compile "$LINENO"; then :
6039 eval $cachevar=yes
6040else
6041 eval $cachevar=no
6042fi
6043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41260ac2 6044 CXX="$ac_save_CXX"
0bcda685
PA
6045fi
6046eval ac_res=\$$cachevar
6047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6048$as_echo "$ac_res" >&6; }
41260ac2
SM
6049 if eval test x\$$cachevar = xyes; then
6050 CXX_DIALECT="$switch"
6051 ac_success=yes
6052 break
6053 fi
6054 done
6055 if test x$ac_success = xyes; then
0bcda685
PA
6056 break
6057 fi
6058 done
6059 fi
6060 ac_ext=c
6061ac_cpp='$CPP $CPPFLAGS'
6062ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6063ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6064ac_compiler_gnu=$ac_cv_c_compiler_gnu
6065
6066 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6067 if test x$ac_success = xno; then
d0ac1c44 6068 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
0bcda685
PA
6069 fi
6070 fi
6071 if test x$ac_success = xno; then
6072 HAVE_CXX11=0
6073 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6074$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6075 else
6076 HAVE_CXX11=1
6077
6078$as_echo "#define HAVE_CXX11 1" >>confdefs.h
6079
6080 fi
6081
6082
6083
6084
a417dc56
RW
6085# Dependency checking.
6086rm -rf .tst 2>/dev/null
6087mkdir .tst 2>/dev/null
6088if test -d .tst; then
6089 am__leading_dot=.
6090else
6091 am__leading_dot=_
6092fi
6093rmdir .tst 2>/dev/null
6094
6095DEPDIR="${am__leading_dot}deps"
6096
81ecdfbb 6097ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
6098
6099
6100depcc="$CC" am_compiler_list=
6101
6102am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
6103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6104$as_echo_n "checking dependency style of $depcc... " >&6; }
d0ac1c44 6105if ${am_cv_CC_dependencies_compiler_type+:} false; then :
81ecdfbb 6106 $as_echo_n "(cached) " >&6
a417dc56
RW
6107else
6108 if test -f "$am_depcomp"; then
6109 # We make a subdir and do the tests there. Otherwise we can end up
6110 # making bogus files that we don't know about and never remove. For
6111 # instance it was reported that on HP-UX the gcc test will end up
6112 # making a dummy file named `D' -- because `-MD' means `put the output
6113 # in D'.
6114 mkdir conftest.dir
6115 # Copy depcomp to subdir because otherwise we won't find it if we're
6116 # using a relative directory.
6117 cp "$am_depcomp" conftest.dir
6118 cd conftest.dir
6119 # We will build objects and dependencies in a subdirectory because
6120 # it helps to detect inapplicable dependency modes. For instance
6121 # both Tru64's cc and ICC support -MD to output dependencies as a
6122 # side effect of compilation, but ICC will put the dependencies in
6123 # the current directory while Tru64 will put them in the object
6124 # directory.
6125 mkdir sub
6126
6127 am_cv_CC_dependencies_compiler_type=none
6128 if test "$am_compiler_list" = ""; then
6129 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6130 fi
6131 for depmode in $am_compiler_list; do
6132 if test $depmode = none; then break; fi
6133
81ecdfbb 6134 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
6135 # Setup a source with many dependencies, because some compilers
6136 # like to wrap large dependency lists on column 80 (with \), and
6137 # we should not choose a depcomp mode which is confused by this.
6138 #
6139 # We need to recreate these files for each test, as the compiler may
6140 # overwrite some of them when testing with obscure command lines.
6141 # This happens at least with the AIX C compiler.
6142 : > sub/conftest.c
6143 for i in 1 2 3 4 5 6; do
6144 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6145 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6146 # Solaris 8's {/usr,}/bin/sh.
6147 touch sub/conftst$i.h
6148 done
6149 echo "include sub/conftest.Po" > confmf
6150
6151 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6152 # mode. It turns out that the SunPro C++ compiler does not properly
6153 # handle `-M -o', and we need to detect this.
6154 depcmd="depmode=$depmode \
6155 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6156 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6157 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6158 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6159 if env $depcmd > conftest.err 2>&1 &&
6160 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6161 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6162 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6163 # icc doesn't choke on unknown options, it will just issue warnings
6164 # or remarks (even with -Werror). So we grep stderr for any message
6165 # that says an option was ignored or not supported.
6166 # When given -MP, icc 7.0 and 7.1 complain thusly:
6167 # icc: Command line warning: ignoring option '-M'; no argument required
6168 # The diagnosis changed in icc 8.0:
6169 # icc: Command line remark: option '-MP' not supported
6170 if (grep 'ignoring option' conftest.err ||
6171 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6172 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 6173 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
6174 break
6175 fi
6176 fi
81ecdfbb 6177 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
6178 sed -e 's/^/| /' < conftest.err >&5
6179 done
6180
6181 cd ..
6182 rm -rf conftest.dir
6183else
6184 am_cv_CC_dependencies_compiler_type=none
6185fi
6186
6187fi
81ecdfbb
RW
6188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6189$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 6190if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
d0ac1c44 6191then as_fn_error $? "no usable dependency style found" "$LINENO" 5
a417dc56
RW
6192else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6193
6194fi
6195
6196
648d586d
JB
6197gnulib_extra_configure_args=
6198# If large-file support is disabled, make sure gnulib does the same.
6199if test "$enable_largefile" = no; then
6200gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
6201fi
6202
c971b7fa
PA
6203# Configure gnulib. We need to build gnulib under some other
6204# directory not "gnulib", to avoid the problem of both GDB and
6205# GDBserver wanting to build it in the same directory, when building
6206# in the source dir.
783e057b 6207
c971b7fa
PA
6208 in_src="gnulib"
6209 in_build="build-gnulib"
648d586d 6210 in_extra_args="$gnulib_extra_configure_args"
c971b7fa
PA
6211
6212 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
6213 # so they do not pile up.
6214 ac_sub_configure_args=
6215 ac_prev=
6216 eval "set x $ac_configure_args"
6217 shift
6218 for ac_arg
6219 do
6220 if test -n "$ac_prev"; then
6221 ac_prev=
6222 continue
6223 fi
6224 case $ac_arg in
6225 -cache-file | --cache-file | --cache-fil | --cache-fi \
6226 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6227 ac_prev=cache_file ;;
6228 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6229 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
6230 | --c=*)
6231 ;;
6232 --config-cache | -C)
6233 ;;
6234 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6235 ac_prev=srcdir ;;
6236 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6237 ;;
6238 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
6239 ac_prev=prefix ;;
6240 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
6241 ;;
6242 --disable-option-checking)
6243 ;;
6244 *)
6245 case $ac_arg in
6246 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6247 esac
6248 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
6249 esac
6250 done
6251
6252 # Always prepend --prefix to ensure using the same prefix
6253 # in subdir configurations.
6254 ac_arg="--prefix=$prefix"
6255 case $ac_arg in
6256 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6257 esac
6258 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
6259
6260 # Pass --silent
6261 if test "$silent" = yes; then
6262 ac_sub_configure_args="--silent $ac_sub_configure_args"
6263 fi
6264
6265 # Always prepend --disable-option-checking to silence warnings, since
6266 # different subdirs can have different --enable and --with options.
6267 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
6268
6269 ac_popdir=`pwd`
6270 ac_dir=$in_build
6271
6272 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
6273 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
6274 $as_echo "$ac_msg" >&6
6275 as_dir="$ac_dir"; as_fn_mkdir_p
6276
38ea300a
PA
6277 case $srcdir in
6278 [\\/]* | ?:[\\/]* )
6279 ac_srcdir=$srcdir/$in_src ;;
6280 *) # Relative name.
6281 ac_srcdir=../$srcdir/$in_src ;;
6282 esac
c971b7fa
PA
6283
6284 cd "$ac_dir"
6285
6286 ac_sub_configure=$ac_srcdir/configure
6287
6288 # Make the cache file name correct relative to the subdirectory.
6289 case $cache_file in
6290 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
6291 *) # Relative name.
6292 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
6293 esac
6294
648d586d
JB
6295 if test -n "$in_extra_args"; then
6296 # Add the extra args at the end.
6297 ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
6298 fi
6299
c971b7fa
PA
6300 { $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
6301$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
6302 # The eval makes quoting arguments work.
6303 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
6304 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 6305 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c971b7fa
PA
6306
6307 cd "$ac_popdir"
783e057b 6308
c971b7fa
PA
6309
6310
6311CONFIG_OBS=
6312CONFIG_DEPS=
6313CONFIG_SRCS=
6314ENABLE_CFLAGS=
6315
6316CONFIG_ALL=
6317CONFIG_CLEAN=
6318CONFIG_INSTALL=
6319CONFIG_UNINSTALL=
6320
6321# If we haven't got the data from the intl directory,
6322# assume NLS is disabled.
6323USE_NLS=no
6324LIBINTL=
6325LIBINTL_DEP=
6326INCINTL=
6327XGETTEXT=
6328GMSGFMT=
6329POSUB=
783e057b
DJ
6330
6331if test -f ../intl/config.intl; then
6332 . ../intl/config.intl
6333fi
81ecdfbb
RW
6334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6335$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 6336if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
6337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6338$as_echo "no" >&6; }
783e057b 6339else
81ecdfbb
RW
6340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6341$as_echo "yes" >&6; }
783e057b 6342
81ecdfbb 6343$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
6344
6345
81ecdfbb
RW
6346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6347$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
6348 # Look for .po and .gmo files in the source directory.
6349 CATALOGS=
6350 XLINGUAS=
6351 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6352 # If there aren't any .gmo files the shell will give us the
6353 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6354 # weeded out.
6355 case "$cat" in *\**)
6356 continue;;
6357 esac
6358 # The quadruple backslash is collapsed to a double backslash
6359 # by the backticks, then collapsed again by the double quotes,
6360 # leaving us with one backslash in the sed expression (right
6361 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
6362 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6363 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6364 # The user is allowed to set LINGUAS to a list of languages to
6365 # install catalogs for. If it's empty that means "all of them."
6366 if test "x$LINGUAS" = x; then
6367 CATALOGS="$CATALOGS $cat"
6368 XLINGUAS="$XLINGUAS $lang"
6369 else
6370 case "$LINGUAS" in *$lang*)
6371 CATALOGS="$CATALOGS $cat"
6372 XLINGUAS="$XLINGUAS $lang"
6373 ;;
6374 esac
e28b3332
DJ
6375 fi
6376 done
c971b7fa
PA
6377 LINGUAS="$XLINGUAS"
6378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6379$as_echo "$LINGUAS" >&6; }
6380
6381
6382 DATADIRNAME=share
6383
6384 INSTOBJEXT=.mo
6385
6386 GENCAT=gencat
6387
6388 CATOBJEXT=.gmo
e28b3332 6389
e28b3332
DJ
6390fi
6391
c971b7fa
PA
6392localedir='${datadir}/locale'
6393
6394
6395if test x"$USE_NLS" = xyes; then
6396 CONFIG_ALL="$CONFIG_ALL all-po"
6397 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6398 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6399 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 6400fi
e28b3332 6401
c971b7fa
PA
6402GNULIB=build-gnulib/import
6403
6404# For Makefile dependencies.
6405GNULIB_STDINT_H=
6406if test x"$STDINT_H" != x; then
6407 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
6408fi
6409
6410
c971b7fa
PA
6411PACKAGE=gdb
6412
6413cat >>confdefs.h <<_ACEOF
6414#define PACKAGE "$PACKAGE"
6415_ACEOF
6416
6417
6418
6419# We never need to detect it in this sub-configure.
6420# But preserve it for config.status --recheck.
6421
6422
6423
6424MAKEINFO_EXTRA_FLAGS=""
6425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6426$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
d0ac1c44 6427if ${gdb_cv_have_makeinfo_click+:} false; then :
c971b7fa
PA
6428 $as_echo_n "(cached) " >&6
6429else
6430 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6431 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6432 gdb_cv_have_makeinfo_click=yes
6433 else
6434 gdb_cv_have_makeinfo_click=no
6435 fi
6436fi
6437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6438$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6439if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6440 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6441fi
e28b3332
DJ
6442
6443
bec39cab
AC
6444
6445
81ecdfbb
RW
6446# Check whether --with-separate-debug-dir was given.
6447if test "${with_separate_debug_dir+set}" = set; then :
6448 withval=$with_separate_debug_dir;
b14b1491
TT
6449 DEBUGDIR=$withval
6450else
6451 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
6452fi
6453
20e95c23 6454
783e057b
DJ
6455 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6456 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 6457 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 6458 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 6459
783e057b
DJ
6460cat >>confdefs.h <<_ACEOF
6461#define DEBUGDIR "$ac_define_dir"
20e95c23 6462_ACEOF
20e95c23 6463
20e95c23 6464
20e95c23 6465
0c4a4063 6466
b14b1491
TT
6467 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6468 if test "x$prefix" = xNONE; then
6469 test_prefix=/usr/local
6470 else
6471 test_prefix=$prefix
6472 fi
783e057b 6473 else
b14b1491 6474 test_prefix=$exec_prefix
783e057b 6475 fi
b14b1491
TT
6476 value=0
6477 case ${ac_define_dir} in
6478 "${test_prefix}"|"${test_prefix}/"*|\
6479 '${exec_prefix}'|'${exec_prefix}/'*)
6480 value=1
6481 ;;
6482 esac
6483
6484cat >>confdefs.h <<_ACEOF
6485#define DEBUGDIR_RELOCATABLE $value
6486_ACEOF
6487
6488
6489
0c4a4063 6490
f83d8a90
DE
6491# We can't pass paths as command line arguments.
6492# Mingw32 tries to be clever and will convert the paths for us.
6493# For example -DBINDIR="/usr/local/bin" passed on the command line may get
6494# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6495# This breaks GDB's relocatable path conversions since paths passed in
6496# config.h would not get so translated, the path prefixes no longer match.
6497
6498 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6499 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6500 ac_define_dir=`eval echo $bindir`
6501 ac_define_dir=`eval echo $ac_define_dir`
6502
6503cat >>confdefs.h <<_ACEOF
6504#define BINDIR "$ac_define_dir"
6505_ACEOF
6506
6507
6508
b14b1491
TT
6509# GDB's datadir relocation
6510
6511
6512
81ecdfbb
RW
6513# Check whether --with-gdb-datadir was given.
6514if test "${with_gdb_datadir+set}" = set; then :
6515 withval=$with_gdb_datadir;
b14b1491 6516 GDB_DATADIR=$withval
20e95c23 6517else
b14b1491 6518 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
6519fi
6520
20e95c23 6521
b14b1491
TT
6522 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6523 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6524 ac_define_dir=`eval echo $GDB_DATADIR`
6525 ac_define_dir=`eval echo $ac_define_dir`
6526
6527cat >>confdefs.h <<_ACEOF
6528#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
6529_ACEOF
6530
b14b1491
TT
6531
6532
0c4a4063 6533
b14b1491
TT
6534 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6535 if test "x$prefix" = xNONE; then
6536 test_prefix=/usr/local
6537 else
6538 test_prefix=$prefix
6539 fi
6540 else
6541 test_prefix=$exec_prefix
6542 fi
6543 value=0
6544 case ${ac_define_dir} in
6545 "${test_prefix}"|"${test_prefix}/"*|\
6546 '${exec_prefix}'|'${exec_prefix}/'*)
6547 value=1
6548 ;;
6549 esac
6550
6551cat >>confdefs.h <<_ACEOF
6552#define GDB_DATADIR_RELOCATABLE $value
6553_ACEOF
6554
6555
783e057b 6556
20e95c23 6557
0c4a4063 6558
81ecdfbb
RW
6559# Check whether --with-relocated-sources was given.
6560if test "${with_relocated_sources+set}" = set; then :
6561 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
6562
6563 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6564 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6565 ac_define_dir=`eval echo $reloc_srcdir`
6566 ac_define_dir=`eval echo $ac_define_dir`
6567
6568cat >>confdefs.h <<_ACEOF
6569#define RELOC_SRCDIR "$ac_define_dir"
6570_ACEOF
6571
6572
6573
81ecdfbb
RW
6574fi
6575
29b0e8a2 6576
7349ff92
JK
6577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6578$as_echo_n "checking for default auto-load directory... " >&6; }
6579
6580# Check whether --with-auto-load-dir was given.
6581if test "${with_auto_load_dir+set}" = set; then :
6582 withval=$with_auto_load_dir;
6583else
1564a261 6584 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
6585fi
6586
2861ee4f 6587escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
6588
6589 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6590 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6591 ac_define_dir=`eval echo $escape_dir`
6592 ac_define_dir=`eval echo $ac_define_dir`
6593
6594cat >>confdefs.h <<_ACEOF
6595#define AUTO_LOAD_DIR "$ac_define_dir"
6596_ACEOF
6597
6598
6599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6600$as_echo "$with_auto_load_dir" >&6; }
6601
bccbefd2
JK
6602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6603$as_echo_n "checking for default auto-load safe-path... " >&6; }
6604
6605# Check whether --with-auto-load-safe-path was given.
6606if test "${with_auto_load_safe_path+set}" = set; then :
6607 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
6608 with_auto_load_safe_path="/"
6609 fi
bccbefd2 6610else
7349ff92 6611 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
6612fi
6613
2861ee4f 6614escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
6615
6616 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6617 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 6618 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
6619 ac_define_dir=`eval echo $ac_define_dir`
6620
6621cat >>confdefs.h <<_ACEOF
6dea1fbd 6622#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
6623_ACEOF
6624
6625
6626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6627$as_echo "$with_auto_load_safe_path" >&6; }
6628
29b0e8a2 6629
20e95c23 6630
5ae98d25 6631subdirs="$subdirs testsuite"
20e95c23
DJ
6632
6633
783e057b 6634# Check whether to support alternative target configurations
81ecdfbb
RW
6635# Check whether --enable-targets was given.
6636if test "${enable_targets+set}" = set; then :
6637 enableval=$enable_targets; case "${enableval}" in
d0ac1c44 6638 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
6639 ;;
6640 no) enable_targets= ;;
6641 *) enable_targets=$enableval ;;
6642esac
81ecdfbb
RW
6643fi
6644
20e95c23 6645
783e057b 6646# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
6647# Check whether --enable-64-bit-bfd was given.
6648if test "${enable_64_bit_bfd+set}" = set; then :
6649 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
6650 yes) want64=true ;;
6651 no) want64=false ;;
d0ac1c44 6652 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
6653esac
6654else
6655 want64=false
81ecdfbb
RW
6656fi
6657
783e057b
DJ
6658# Provide defaults for some variables set by the per-host and per-target
6659# configuration.
6660gdb_host_obs=posix-hdep.o
20e95c23 6661
783e057b
DJ
6662if test "${target}" = "${host}"; then
6663 gdb_native=yes
6664else
6665 gdb_native=no
6666fi
20e95c23 6667
783e057b 6668. $srcdir/configure.host
20e95c23 6669
fb23d554
SDJ
6670# Add in the common host objects.
6671. $srcdir/common/common.host
6672gdb_host_obs="$gdb_host_obs $common_host_obs"
6673
783e057b 6674# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 6675
783e057b
DJ
6676TARGET_OBS=
6677all_targets=
b292c783 6678HAVE_NATIVE_GCORE_TARGET=
20e95c23 6679
783e057b 6680for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 6681do
783e057b
DJ
6682 if test "$targ_alias" = "all"; then
6683 all_targets=true
6684 else
6685 # Canonicalize the secondary target names.
6686 result=`$ac_config_sub $targ_alias 2>/dev/null`
6687 if test -n "$result"; then
6688 targ=$result
6689 else
6690 targ=$targ_alias
6691 fi
20e95c23 6692
783e057b 6693 . ${srcdir}/configure.tgt
20e95c23 6694
bf307134 6695 if test -z "${gdb_target_obs}"; then :
d0ac1c44 6696 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
bf307134
JB
6697fi
6698
783e057b
DJ
6699 # Target-specific object files
6700 for i in ${gdb_target_obs}; do
6701 case " $TARGET_OBS " in
6702 *" ${i} "*) ;;
6703 *)
6704 TARGET_OBS="$TARGET_OBS ${i}"
6705 ;;
6706 esac
6707 done
20e95c23 6708
783e057b
DJ
6709 # Check whether this target needs 64-bit CORE_ADDR
6710 if test x${want64} = xfalse; then
6711 . ${srcdir}/../bfd/config.bfd
6712 fi
b292c783
JK
6713
6714 # Check whether this target is native and supports gcore.
6715 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6716 && $gdb_have_gcore; then
6717 HAVE_NATIVE_GCORE_TARGET=1
6718 fi
783e057b 6719 fi
20e95c23
DJ
6720done
6721
783e057b
DJ
6722if test x${all_targets} = xtrue; then
6723
6724 # We want all 64-bit targets if we either:
6725 # - run on a 64-bit host or
6726 # - already require 64-bit support for some other target or
6727 # - the --enable-64-bit-bfd option was supplied
6728 # Otherwise we only support all 32-bit targets.
6729 #
6730 # NOTE: This test must be in sync with the corresponding
6731 # tests in BFD!
20e95c23 6732
783e057b 6733 if test x${want64} = xfalse; then
81ecdfbb
RW
6734 # The cast to long int works around a bug in the HP C Compiler
6735# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6736# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6737# This bug is HP SR number 8606223364.
6738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6739$as_echo_n "checking size of long... " >&6; }
d0ac1c44 6740if ${ac_cv_sizeof_long+:} false; then :
81ecdfbb 6741 $as_echo_n "(cached) " >&6
c0993dbe 6742else
81ecdfbb 6743 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 6744
81ecdfbb
RW
6745else
6746 if test "$ac_cv_type_long" = yes; then
6747 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6748$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
6749as_fn_error 77 "cannot compute sizeof (long)
6750See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
6751 else
6752 ac_cv_sizeof_long=0
6753 fi
c0993dbe 6754fi
81ecdfbb 6755
c0993dbe 6756fi
81ecdfbb
RW
6757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6758$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 6759
c0993dbe 6760
c0993dbe 6761
c0993dbe
UW
6762cat >>confdefs.h <<_ACEOF
6763#define SIZEOF_LONG $ac_cv_sizeof_long
6764_ACEOF
6765
6766
6767 if test "x${ac_cv_sizeof_long}" = "x8"; then
6768 want64=true
6769 fi
6770 fi
6771 if test x${want64} = xtrue; then
6772 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6773 else
6774 TARGET_OBS='$(ALL_TARGET_OBS)'
6775 fi
6776fi
6777
6778
6779
b292c783 6780
c0993dbe
UW
6781# For other settings, only the main target counts.
6782gdb_sim=
6783gdb_osabi=
6784build_gdbserver=
6785targ=$target; . ${srcdir}/configure.tgt
6786
6787# Fetch the default architecture and default target vector from BFD.
6788targ=$target; . $srcdir/../bfd/config.bfd
6789
6790# We only want the first architecture, so strip off the others if
6791# there is more than one.
6792targ_archs=`echo $targ_archs | sed 's/ .*//'`
6793
6794if test "x$targ_archs" != x; then
6795
6796cat >>confdefs.h <<_ACEOF
6797#define DEFAULT_BFD_ARCH $targ_archs
6798_ACEOF
6799
6800fi
6801if test "x$targ_defvec" != x; then
6802
6803cat >>confdefs.h <<_ACEOF
6804#define DEFAULT_BFD_VEC $targ_defvec
6805_ACEOF
6806
6807fi
6808
c0993dbe 6809# Enable MI.
81ecdfbb
RW
6810# Check whether --enable-gdbmi was given.
6811if test "${enable_gdbmi+set}" = set; then :
6812 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
6813 yes | no)
6814 ;;
6815 *)
d0ac1c44 6816 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
6817 esac
6818else
6819 enable_gdbmi=yes
81ecdfbb
RW
6820fi
6821
c0993dbe
UW
6822if test x"$enable_gdbmi" = xyes; then
6823 if test -d $srcdir/mi; then
6824 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6825 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6826 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6827 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6828 fi
6829fi
6830
6831# Enable TUI.
81ecdfbb
RW
6832# Check whether --enable-tui was given.
6833if test "${enable_tui+set}" = set; then :
6834 enableval=$enable_tui; case $enableval in
3ca64bd3 6835 yes | no | auto)
c0993dbe
UW
6836 ;;
6837 *)
d0ac1c44 6838 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
6839 esac
6840else
3ca64bd3 6841 enable_tui=auto
81ecdfbb
RW
6842fi
6843
c0993dbe
UW
6844
6845# Enable gdbtk.
81ecdfbb
RW
6846# Check whether --enable-gdbtk was given.
6847if test "${enable_gdbtk+set}" = set; then :
6848 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
6849 yes | no)
6850 ;;
6851 *)
d0ac1c44 6852 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
6853 esac
6854else
5062cc19 6855 if test -d $srcdir/gdbtk; then
c0993dbe
UW
6856 enable_gdbtk=yes
6857 else
6858 enable_gdbtk=no
6859 fi
81ecdfbb
RW
6860fi
6861
c0993dbe
UW
6862# We unconditionally disable gdbtk tests on selected platforms.
6863case $host_os in
6864 go32* | windows*)
81ecdfbb
RW
6865 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6866$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
6867 enable_gdbtk=no ;;
6868esac
6869
05e7c244 6870# Libunwind support for ia64.
bec39cab 6871
05e7c244
JK
6872
6873# Check whether --with-libunwind-ia64 was given.
6874if test "${with_libunwind_ia64+set}" = set; then :
6875 withval=$with_libunwind_ia64;
bec39cab 6876else
05e7c244
JK
6877 with_libunwind_ia64=auto
6878fi
bec39cab 6879
05e7c244
JK
6880
6881# Backward compatibility option.
6882if test "${with_libunwind+set}" = set; then
6883 if test x"$with_libunwind_ia64" != xauto; then
d0ac1c44 6884 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
05e7c244
JK
6885 fi
6886 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6887$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6888 with_libunwind_ia64="$with_libunwind"
6889fi
6890
6891case "$with_libunwind_ia64" in
6892 yes | no)
6893 ;;
6894 auto)
6895 for ac_header in libunwind-ia64.h
81ecdfbb 6896do :
b54a8fd7 6897 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 6898if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6899 cat >>confdefs.h <<_ACEOF
b54a8fd7 6900#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6901_ACEOF
6902
6903fi
6904
6905done
6906
05e7c244
JK
6907 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6908 ;;
6909 *)
d0ac1c44 6910 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
05e7c244
JK
6911 ;;
6912esac
bec39cab 6913
05e7c244 6914if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 6915 for ac_header in libunwind-ia64.h
81ecdfbb 6916do :
b54a8fd7 6917 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 6918if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6919 cat >>confdefs.h <<_ACEOF
b54a8fd7 6920#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6921_ACEOF
6922
6923fi
6924
6925done
6926
05e7c244 6927 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
d0ac1c44 6928 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
05e7c244
JK
6929 fi
6930 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6931 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6932 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
6933fi
6934
cb01cfba
JB
6935opt_curses=no
6936
81ecdfbb
RW
6937# Check whether --with-curses was given.
6938if test "${with_curses+set}" = set; then :
6939 withval=$with_curses; opt_curses=$withval
6940fi
6941
cb01cfba 6942
76a39ba7 6943prefer_curses=no
cb01cfba 6944if test "$opt_curses" = "yes"; then
76a39ba7 6945 prefer_curses=yes
cb01cfba
JB
6946fi
6947
a9322a30 6948# Profiling support.
81ecdfbb
RW
6949# Check whether --enable-profiling was given.
6950if test "${enable_profiling+set}" = set; then :
6951 enableval=$enable_profiling; case $enableval in
a9322a30
TT
6952 yes | no)
6953 ;;
6954 *)
d0ac1c44 6955 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
6956 esac
6957else
6958 enable_profiling=no
81ecdfbb 6959fi
bec39cab 6960
a9322a30
TT
6961
6962for ac_func in monstartup _mcleanup
81ecdfbb
RW
6963do :
6964 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6965ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 6966if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
81ecdfbb
RW
6967 cat >>confdefs.h <<_ACEOF
6968#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 6969_ACEOF
a9322a30 6970
81ecdfbb
RW
6971fi
6972done
a9322a30 6973
81ecdfbb
RW
6974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6975$as_echo_n "checking for _etext... " >&6; }
d0ac1c44 6976if ${ac_cv_var__etext+:} false; then :
81ecdfbb
RW
6977 $as_echo_n "(cached) " >&6
6978else
6979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6980/* end confdefs.h. */
6981#include <stdlib.h>
6982extern char _etext;
a9322a30
TT
6983
6984int
6985main ()
6986{
6987free (&_etext);
6988 ;
6989 return 0;
6990}
bec39cab 6991_ACEOF
81ecdfbb 6992if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6993 ac_cv_var__etext=yes
bec39cab 6994else
81ecdfbb 6995 ac_cv_var__etext=no
bec39cab 6996fi
81ecdfbb
RW
6997rm -f core conftest.err conftest.$ac_objext \
6998 conftest$ac_exeext conftest.$ac_ext
bec39cab 6999fi
81ecdfbb
RW
7000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
7001$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 7002if test $ac_cv_var__etext = yes; then
60ca704f 7003
81ecdfbb 7004$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 7005
bec39cab 7006fi
81ecdfbb
RW
7007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
7008$as_echo_n "checking for etext... " >&6; }
d0ac1c44 7009if ${ac_cv_var_etext+:} false; then :
81ecdfbb 7010 $as_echo_n "(cached) " >&6
bec39cab 7011else
81ecdfbb 7012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7013/* end confdefs.h. */
a9322a30
TT
7014#include <stdlib.h>
7015extern char etext;
bec39cab
AC
7016
7017int
7018main ()
7019{
a9322a30 7020free (&etext);
bec39cab
AC
7021 ;
7022 return 0;
7023}
7024_ACEOF
81ecdfbb 7025if ac_fn_c_try_link "$LINENO"; then :
a9322a30 7026 ac_cv_var_etext=yes
bec39cab 7027else
81ecdfbb 7028 ac_cv_var_etext=no
bec39cab 7029fi
81ecdfbb
RW
7030rm -f core conftest.err conftest.$ac_objext \
7031 conftest$ac_exeext conftest.$ac_ext
bec39cab 7032fi
81ecdfbb
RW
7033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7034$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
7035if test $ac_cv_var_etext = yes; then
7036
81ecdfbb 7037$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
7038
7039fi
a9322a30
TT
7040if test "$enable_profiling" = yes ; then
7041 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
d0ac1c44 7042 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
7043 fi
7044 PROFILE_CFLAGS=-pg
7045 OLD_CFLAGS="$CFLAGS"
7046 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 7047
81ecdfbb
RW
7048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7049$as_echo_n "checking whether $CC supports -pg... " >&6; }
d0ac1c44 7050if ${ac_cv_cc_supports_pg+:} false; then :
81ecdfbb 7051 $as_echo_n "(cached) " >&6
bec39cab 7052else
81ecdfbb 7053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7054/* end confdefs.h. */
bec39cab
AC
7055
7056int
7057main ()
7058{
a9322a30 7059int x;
bec39cab
AC
7060 ;
7061 return 0;
7062}
7063_ACEOF
81ecdfbb 7064if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 7065 ac_cv_cc_supports_pg=yes
bec39cab 7066else
81ecdfbb 7067 ac_cv_cc_supports_pg=no
bec39cab 7068fi
81ecdfbb 7069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 7070fi
81ecdfbb
RW
7071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7072$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 7073
a9322a30 7074 if test $ac_cv_cc_supports_pg = no; then
d0ac1c44 7075 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 7076 fi
bec39cab 7077
a9322a30 7078 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
7079fi
7080
44cee4fd
TT
7081CODESIGN_CERT=
7082# Check whether --enable-codesign was given.
7083if test "${enable_codesign+set}" = set; then :
7084 enableval=$enable_codesign; CODESIGN_CERT=$enableval
7085fi
7086
7087
7088
c16158bc
JM
7089
7090
81ecdfbb
RW
7091# Check whether --with-pkgversion was given.
7092if test "${with_pkgversion+set}" = set; then :
7093 withval=$with_pkgversion; case "$withval" in
d0ac1c44 7094 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
7095 no) PKGVERSION= ;;
7096 *) PKGVERSION="($withval) " ;;
7097 esac
7098else
7099 PKGVERSION="(GDB) "
7100
81ecdfbb 7101fi
c16158bc
JM
7102
7103
7104
7105
81ecdfbb
RW
7106
7107# Check whether --with-bugurl was given.
7108if test "${with_bugurl+set}" = set; then :
7109 withval=$with_bugurl; case "$withval" in
d0ac1c44 7110 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
7111 no) BUGURL=
7112 ;;
7113 *) BUGURL="$withval"
7114 ;;
7115 esac
7116else
7117 BUGURL="http://www.gnu.org/software/gdb/bugs/"
7118
81ecdfbb
RW
7119fi
7120
c16158bc
JM
7121 case ${BUGURL} in
7122 "")
7123 REPORT_BUGS_TO=
7124 REPORT_BUGS_TEXI=
7125 ;;
7126 *)
7127 REPORT_BUGS_TO="<$BUGURL>"
7128 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7129 ;;
7130 esac;
7131
7132
7133
7134
7135cat >>confdefs.h <<_ACEOF
7136#define PKGVERSION "$PKGVERSION"
7137_ACEOF
7138
7139
7140cat >>confdefs.h <<_ACEOF
7141#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7142_ACEOF
7143
7144
bec39cab
AC
7145# --------------------- #
7146# Checks for programs. #
7147# --------------------- #
7148
7149for ac_prog in gawk mawk nawk awk
7150do
7151 # Extract the first word of "$ac_prog", so it can be a program name with args.
7152set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7154$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7155if ${ac_cv_prog_AWK+:} false; then :
81ecdfbb 7156 $as_echo_n "(cached) " >&6
bec39cab
AC
7157else
7158 if test -n "$AWK"; then
7159 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7160else
7161as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7162for as_dir in $PATH
7163do
7164 IFS=$as_save_IFS
7165 test -z "$as_dir" && as_dir=.
81ecdfbb 7166 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7167 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7168 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7169 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7170 break 2
7171 fi
7172done
81ecdfbb
RW
7173 done
7174IFS=$as_save_IFS
bec39cab
AC
7175
7176fi
7177fi
7178AWK=$ac_cv_prog_AWK
7179if test -n "$AWK"; then
81ecdfbb
RW
7180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7181$as_echo "$AWK" >&6; }
bec39cab 7182else
81ecdfbb
RW
7183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7184$as_echo "no" >&6; }
bec39cab
AC
7185fi
7186
bec39cab 7187
81ecdfbb 7188 test -n "$AWK" && break
bec39cab
AC
7189done
7190
c971b7fa
PA
7191# Find a good install program. We prefer a C program (faster),
7192# so one script is as good as another. But avoid the broken or
7193# incompatible versions:
7194# SysV /etc/install, /usr/sbin/install
7195# SunOS /usr/etc/install
7196# IRIX /sbin/install
7197# AIX /bin/install
7198# AmigaOS /C/install, which installs bootblocks on floppy discs
7199# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7200# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7201# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7202# OS/2's system install, which has a completely different semantic
7203# ./install, which can be erroneously created by make from ./install.sh.
7204# Reject install programs that cannot install multiple files.
7205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7206$as_echo_n "checking for a BSD-compatible install... " >&6; }
7207if test -z "$INSTALL"; then
d0ac1c44 7208if ${ac_cv_path_install+:} false; then :
c971b7fa
PA
7209 $as_echo_n "(cached) " >&6
7210else
7211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7212for as_dir in $PATH
7213do
7214 IFS=$as_save_IFS
7215 test -z "$as_dir" && as_dir=.
7216 # Account for people who put trailing slashes in PATH elements.
7217case $as_dir/ in #((
7218 ./ | .// | /[cC]/* | \
7219 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7220 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7221 /usr/ucb/* ) ;;
7222 *)
7223 # OSF1 and SCO ODT 3.0 have their own names for install.
7224 # Don't use installbsd from OSF since it installs stuff as root
7225 # by default.
7226 for ac_prog in ginstall scoinst install; do
7227 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7228 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
c971b7fa
PA
7229 if test $ac_prog = install &&
7230 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7231 # AIX install. It has an incompatible calling convention.
7232 :
7233 elif test $ac_prog = install &&
7234 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7235 # program-specific install script used by HP pwplus--don't use.
7236 :
7237 else
7238 rm -rf conftest.one conftest.two conftest.dir
7239 echo one > conftest.one
7240 echo two > conftest.two
7241 mkdir conftest.dir
7242 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7243 test -s conftest.one && test -s conftest.two &&
7244 test -s conftest.dir/conftest.one &&
7245 test -s conftest.dir/conftest.two
7246 then
7247 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7248 break 3
7249 fi
7250 fi
7251 fi
7252 done
7253 done
7254 ;;
7255esac
7256
7257 done
7258IFS=$as_save_IFS
7259
7260rm -rf conftest.one conftest.two conftest.dir
7261
7262fi
7263 if test "${ac_cv_path_install+set}" = set; then
7264 INSTALL=$ac_cv_path_install
7265 else
7266 # As a last resort, use the slow shell script. Don't cache a
7267 # value for INSTALL within a source directory, because that will
7268 # break other packages using the cache if that directory is
7269 # removed, or if the value is a relative name.
7270 INSTALL=$ac_install_sh
7271 fi
7272fi
7273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7274$as_echo "$INSTALL" >&6; }
7275
7276# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7277# It thinks the first close brace ends the variable substitution.
7278test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7279
7280test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7281
7282test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 7283
81ecdfbb
RW
7284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7285$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
7286LN_S=$as_ln_s
7287if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
7288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7289$as_echo "yes" >&6; }
bec39cab 7290else
81ecdfbb
RW
7291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7292$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
7293fi
7294
7295if test -n "$ac_tool_prefix"; then
7296 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7297set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
7298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7299$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7300if ${ac_cv_prog_RANLIB+:} false; then :
81ecdfbb 7301 $as_echo_n "(cached) " >&6
bec39cab
AC
7302else
7303 if test -n "$RANLIB"; then
7304 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7305else
7306as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7307for as_dir in $PATH
7308do
7309 IFS=$as_save_IFS
7310 test -z "$as_dir" && as_dir=.
81ecdfbb 7311 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7312 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7313 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 7314 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7315 break 2
7316 fi
7317done
81ecdfbb
RW
7318 done
7319IFS=$as_save_IFS
bec39cab
AC
7320
7321fi
7322fi
7323RANLIB=$ac_cv_prog_RANLIB
7324if test -n "$RANLIB"; then
81ecdfbb
RW
7325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7326$as_echo "$RANLIB" >&6; }
bec39cab 7327else
81ecdfbb
RW
7328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7329$as_echo "no" >&6; }
bec39cab
AC
7330fi
7331
81ecdfbb 7332
bec39cab
AC
7333fi
7334if test -z "$ac_cv_prog_RANLIB"; then
7335 ac_ct_RANLIB=$RANLIB
7336 # Extract the first word of "ranlib", so it can be a program name with args.
7337set dummy ranlib; ac_word=$2
81ecdfbb
RW
7338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7339$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7340if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
81ecdfbb 7341 $as_echo_n "(cached) " >&6
bec39cab
AC
7342else
7343 if test -n "$ac_ct_RANLIB"; then
7344 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7345else
7346as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7347for as_dir in $PATH
7348do
7349 IFS=$as_save_IFS
7350 test -z "$as_dir" && as_dir=.
81ecdfbb 7351 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7352 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7353 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 7354 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7355 break 2
7356 fi
7357done
81ecdfbb
RW
7358 done
7359IFS=$as_save_IFS
bec39cab 7360
bec39cab
AC
7361fi
7362fi
7363ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7364if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
7365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7366$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 7367else
81ecdfbb
RW
7368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7369$as_echo "no" >&6; }
bec39cab
AC
7370fi
7371
81ecdfbb
RW
7372 if test "x$ac_ct_RANLIB" = x; then
7373 RANLIB=":"
7374 else
7375 case $cross_compiling:$ac_tool_warned in
7376yes:)
7377{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7378$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7379ac_tool_warned=yes ;;
7380esac
7381 RANLIB=$ac_ct_RANLIB
7382 fi
bec39cab
AC
7383else
7384 RANLIB="$ac_cv_prog_RANLIB"
7385fi
7386
7387for ac_prog in 'bison -y' byacc
7388do
7389 # Extract the first word of "$ac_prog", so it can be a program name with args.
7390set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7392$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7393if ${ac_cv_prog_YACC+:} false; then :
81ecdfbb 7394 $as_echo_n "(cached) " >&6
bec39cab
AC
7395else
7396 if test -n "$YACC"; then
7397 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7398else
7399as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7400for as_dir in $PATH
7401do
7402 IFS=$as_save_IFS
7403 test -z "$as_dir" && as_dir=.
81ecdfbb 7404 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7405 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7406 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 7407 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7408 break 2
7409 fi
7410done
81ecdfbb
RW
7411 done
7412IFS=$as_save_IFS
bec39cab
AC
7413
7414fi
7415fi
7416YACC=$ac_cv_prog_YACC
7417if test -n "$YACC"; then
81ecdfbb
RW
7418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7419$as_echo "$YACC" >&6; }
bec39cab 7420else
81ecdfbb
RW
7421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7422$as_echo "no" >&6; }
bec39cab
AC
7423fi
7424
81ecdfbb 7425
bec39cab
AC
7426 test -n "$YACC" && break
7427done
7428test -n "$YACC" || YACC="yacc"
7429
7430
7431if test -n "$ac_tool_prefix"; then
7432 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7433set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
7434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7435$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7436if ${ac_cv_prog_AR+:} false; then :
81ecdfbb 7437 $as_echo_n "(cached) " >&6
bec39cab
AC
7438else
7439 if test -n "$AR"; then
7440 ac_cv_prog_AR="$AR" # Let the user override the test.
7441else
7442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7443for as_dir in $PATH
7444do
7445 IFS=$as_save_IFS
7446 test -z "$as_dir" && as_dir=.
81ecdfbb 7447 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7448 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7449 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 7450 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7451 break 2
7452 fi
7453done
81ecdfbb
RW
7454 done
7455IFS=$as_save_IFS
bec39cab
AC
7456
7457fi
7458fi
7459AR=$ac_cv_prog_AR
7460if test -n "$AR"; then
81ecdfbb
RW
7461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7462$as_echo "$AR" >&6; }
bec39cab 7463else
81ecdfbb
RW
7464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7465$as_echo "no" >&6; }
bec39cab
AC
7466fi
7467
81ecdfbb 7468
bec39cab
AC
7469fi
7470if test -z "$ac_cv_prog_AR"; then
7471 ac_ct_AR=$AR
7472 # Extract the first word of "ar", so it can be a program name with args.
7473set dummy ar; ac_word=$2
81ecdfbb
RW
7474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7475$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7476if ${ac_cv_prog_ac_ct_AR+:} false; then :
81ecdfbb 7477 $as_echo_n "(cached) " >&6
bec39cab
AC
7478else
7479 if test -n "$ac_ct_AR"; then
7480 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7481else
7482as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7483for as_dir in $PATH
7484do
7485 IFS=$as_save_IFS
7486 test -z "$as_dir" && as_dir=.
81ecdfbb 7487 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7488 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7489 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 7490 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7491 break 2
7492 fi
7493done
81ecdfbb
RW
7494 done
7495IFS=$as_save_IFS
bec39cab
AC
7496
7497fi
7498fi
7499ac_ct_AR=$ac_cv_prog_ac_ct_AR
7500if test -n "$ac_ct_AR"; then
81ecdfbb
RW
7501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7502$as_echo "$ac_ct_AR" >&6; }
bec39cab 7503else
81ecdfbb
RW
7504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7505$as_echo "no" >&6; }
bec39cab
AC
7506fi
7507
81ecdfbb
RW
7508 if test "x$ac_ct_AR" = x; then
7509 AR=""
7510 else
7511 case $cross_compiling:$ac_tool_warned in
7512yes:)
7513{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7514$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7515ac_tool_warned=yes ;;
7516esac
7517 AR=$ac_ct_AR
7518 fi
bec39cab
AC
7519else
7520 AR="$ac_cv_prog_AR"
7521fi
7522
7523if test -n "$ac_tool_prefix"; then
7524 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7525set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
7526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7527$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7528if ${ac_cv_prog_DLLTOOL+:} false; then :
81ecdfbb 7529 $as_echo_n "(cached) " >&6
bec39cab
AC
7530else
7531 if test -n "$DLLTOOL"; then
7532 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7533else
7534as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7535for as_dir in $PATH
7536do
7537 IFS=$as_save_IFS
7538 test -z "$as_dir" && as_dir=.
81ecdfbb 7539 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7540 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7541 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 7542 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7543 break 2
7544 fi
7545done
81ecdfbb
RW
7546 done
7547IFS=$as_save_IFS
bec39cab
AC
7548
7549fi
7550fi
7551DLLTOOL=$ac_cv_prog_DLLTOOL
7552if test -n "$DLLTOOL"; then
81ecdfbb
RW
7553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7554$as_echo "$DLLTOOL" >&6; }
bec39cab 7555else
81ecdfbb
RW
7556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7557$as_echo "no" >&6; }
bec39cab
AC
7558fi
7559
81ecdfbb 7560
bec39cab
AC
7561fi
7562if test -z "$ac_cv_prog_DLLTOOL"; then
7563 ac_ct_DLLTOOL=$DLLTOOL
7564 # Extract the first word of "dlltool", so it can be a program name with args.
7565set dummy dlltool; ac_word=$2
81ecdfbb
RW
7566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7567$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7568if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
81ecdfbb 7569 $as_echo_n "(cached) " >&6
bec39cab
AC
7570else
7571 if test -n "$ac_ct_DLLTOOL"; then
7572 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7573else
7574as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7575for as_dir in $PATH
7576do
7577 IFS=$as_save_IFS
7578 test -z "$as_dir" && as_dir=.
81ecdfbb 7579 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7580 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7581 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 7582 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7583 break 2
7584 fi
7585done
81ecdfbb
RW
7586 done
7587IFS=$as_save_IFS
bec39cab
AC
7588
7589fi
7590fi
7591ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7592if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
7593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7594$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 7595else
81ecdfbb
RW
7596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7597$as_echo "no" >&6; }
bec39cab
AC
7598fi
7599
81ecdfbb
RW
7600 if test "x$ac_ct_DLLTOOL" = x; then
7601 DLLTOOL=""
7602 else
7603 case $cross_compiling:$ac_tool_warned in
7604yes:)
7605{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7606$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7607ac_tool_warned=yes ;;
7608esac
7609 DLLTOOL=$ac_ct_DLLTOOL
7610 fi
bec39cab
AC
7611else
7612 DLLTOOL="$ac_cv_prog_DLLTOOL"
7613fi
7614
7615if test -n "$ac_tool_prefix"; then
7616 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7617set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
7618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7619$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7620if ${ac_cv_prog_WINDRES+:} false; then :
81ecdfbb 7621 $as_echo_n "(cached) " >&6
bec39cab
AC
7622else
7623 if test -n "$WINDRES"; then
7624 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7625else
7626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7627for as_dir in $PATH
7628do
7629 IFS=$as_save_IFS
7630 test -z "$as_dir" && as_dir=.
81ecdfbb 7631 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7632 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7633 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 7634 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7635 break 2
7636 fi
7637done
81ecdfbb
RW
7638 done
7639IFS=$as_save_IFS
bec39cab
AC
7640
7641fi
7642fi
7643WINDRES=$ac_cv_prog_WINDRES
7644if test -n "$WINDRES"; then
81ecdfbb
RW
7645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7646$as_echo "$WINDRES" >&6; }
bec39cab 7647else
81ecdfbb
RW
7648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7649$as_echo "no" >&6; }
bec39cab
AC
7650fi
7651
81ecdfbb 7652
bec39cab
AC
7653fi
7654if test -z "$ac_cv_prog_WINDRES"; then
7655 ac_ct_WINDRES=$WINDRES
7656 # Extract the first word of "windres", so it can be a program name with args.
7657set dummy windres; 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_ac_ct_WINDRES+:} false; then :
81ecdfbb 7661 $as_echo_n "(cached) " >&6
bec39cab
AC
7662else
7663 if test -n "$ac_ct_WINDRES"; then
7664 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # 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_ac_ct_WINDRES="windres"
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
AC
7680
7681fi
7682fi
7683ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7684if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
7685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7686$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 7687else
81ecdfbb
RW
7688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7689$as_echo "no" >&6; }
c906108c 7690fi
bec39cab 7691
81ecdfbb
RW
7692 if test "x$ac_ct_WINDRES" = x; then
7693 WINDRES=""
7694 else
7695 case $cross_compiling:$ac_tool_warned in
7696yes:)
7697{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7698$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7699ac_tool_warned=yes ;;
7700esac
7701 WINDRES=$ac_ct_WINDRES
7702 fi
c906108c 7703else
bec39cab 7704 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
7705fi
7706
bec39cab 7707
036c3acb
TS
7708case $host_os in
7709 gnu*)
7710 # Needed for GNU Hurd hosts.
7711 if test -n "$ac_tool_prefix"; then
bec39cab
AC
7712 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7713set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
7714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7715$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7716if ${ac_cv_prog_MIG+:} false; then :
81ecdfbb 7717 $as_echo_n "(cached) " >&6
c906108c 7718else
bec39cab
AC
7719 if test -n "$MIG"; then
7720 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7721else
7722as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7723for as_dir in $PATH
7724do
7725 IFS=$as_save_IFS
7726 test -z "$as_dir" && as_dir=.
81ecdfbb 7727 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7728 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7729 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 7730 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7731 break 2
7732 fi
7733done
81ecdfbb
RW
7734 done
7735IFS=$as_save_IFS
bec39cab 7736
c906108c 7737fi
bec39cab
AC
7738fi
7739MIG=$ac_cv_prog_MIG
7740if test -n "$MIG"; then
81ecdfbb
RW
7741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7742$as_echo "$MIG" >&6; }
c906108c 7743else
81ecdfbb
RW
7744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7745$as_echo "no" >&6; }
c906108c
SS
7746fi
7747
81ecdfbb 7748
bec39cab
AC
7749fi
7750if test -z "$ac_cv_prog_MIG"; then
7751 ac_ct_MIG=$MIG
7752 # Extract the first word of "mig", so it can be a program name with args.
7753set dummy mig; ac_word=$2
81ecdfbb
RW
7754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7755$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7756if ${ac_cv_prog_ac_ct_MIG+:} false; then :
81ecdfbb 7757 $as_echo_n "(cached) " >&6
bec39cab
AC
7758else
7759 if test -n "$ac_ct_MIG"; then
7760 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7761else
7762as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7763for as_dir in $PATH
7764do
7765 IFS=$as_save_IFS
7766 test -z "$as_dir" && as_dir=.
81ecdfbb 7767 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7768 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7769 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 7770 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7771 break 2
7772 fi
7773done
81ecdfbb
RW
7774 done
7775IFS=$as_save_IFS
c906108c 7776
bec39cab
AC
7777fi
7778fi
7779ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7780if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
7781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7782$as_echo "$ac_ct_MIG" >&6; }
bec39cab 7783else
81ecdfbb
RW
7784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7785$as_echo "no" >&6; }
bec39cab 7786fi
c906108c 7787
81ecdfbb
RW
7788 if test "x$ac_ct_MIG" = x; then
7789 MIG=""
7790 else
7791 case $cross_compiling:$ac_tool_warned in
7792yes:)
7793{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7794$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7795ac_tool_warned=yes ;;
7796esac
7797 MIG=$ac_ct_MIG
7798 fi
bec39cab
AC
7799else
7800 MIG="$ac_cv_prog_MIG"
7801fi
c906108c 7802
036c3acb 7803 if test x"$MIG" = x; then
d0ac1c44 7804 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
036c3acb
TS
7805 fi
7806 ;;
7807esac
c906108c 7808
bec39cab
AC
7809# ---------------------- #
7810# Checks for libraries. #
7811# ---------------------- #
c906108c 7812
bec39cab 7813# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
7814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7815$as_echo_n "checking for main in -lm... " >&6; }
d0ac1c44 7816if ${ac_cv_lib_m_main+:} false; then :
81ecdfbb 7817 $as_echo_n "(cached) " >&6
bec39cab
AC
7818else
7819 ac_check_lib_save_LIBS=$LIBS
7820LIBS="-lm $LIBS"
81ecdfbb 7821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7822/* end confdefs.h. */
c906108c 7823
c906108c 7824
bec39cab
AC
7825int
7826main ()
7827{
81ecdfbb 7828return main ();
bec39cab
AC
7829 ;
7830 return 0;
7831}
7832_ACEOF
81ecdfbb 7833if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
7834 ac_cv_lib_m_main=yes
7835else
81ecdfbb 7836 ac_cv_lib_m_main=no
bec39cab 7837fi
81ecdfbb
RW
7838rm -f core conftest.err conftest.$ac_objext \
7839 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
7840LIBS=$ac_check_lib_save_LIBS
7841fi
81ecdfbb
RW
7842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7843$as_echo "$ac_cv_lib_m_main" >&6; }
d0ac1c44 7844if test "x$ac_cv_lib_m_main" = xyes; then :
bec39cab
AC
7845 cat >>confdefs.h <<_ACEOF
7846#define HAVE_LIBM 1
7847_ACEOF
7848
7849 LIBS="-lm $LIBS"
c906108c 7850
c906108c 7851fi
bec39cab
AC
7852
7853
bec39cab 7854# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
7855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7856$as_echo_n "checking for library containing gethostbyname... " >&6; }
d0ac1c44 7857if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb 7858 $as_echo_n "(cached) " >&6
bec39cab
AC
7859else
7860 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7862/* end confdefs.h. */
ddc9cd0f 7863
81ecdfbb
RW
7864/* Override any GCC internal prototype to avoid an error.
7865 Use char because int might match the return type of a GCC
7866 builtin and then its argument prototype would still apply. */
bec39cab
AC
7867#ifdef __cplusplus
7868extern "C"
7869#endif
bec39cab
AC
7870char gethostbyname ();
7871int
7872main ()
7873{
81ecdfbb 7874return gethostbyname ();
bec39cab
AC
7875 ;
7876 return 0;
7877}
7878_ACEOF
81ecdfbb
RW
7879for ac_lib in '' nsl; do
7880 if test -z "$ac_lib"; then
7881 ac_res="none required"
7882 else
7883 ac_res=-l$ac_lib
b4e70030 7884 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7885 fi
7886 if ac_fn_c_try_link "$LINENO"; then :
7887 ac_cv_search_gethostbyname=$ac_res
7888fi
7889rm -f core conftest.err conftest.$ac_objext \
7890 conftest$ac_exeext
d0ac1c44 7891 if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb
RW
7892 break
7893fi
7894done
d0ac1c44 7895if ${ac_cv_search_gethostbyname+:} false; then :
ddc9cd0f 7896
bec39cab 7897else
81ecdfbb 7898 ac_cv_search_gethostbyname=no
bec39cab 7899fi
81ecdfbb 7900rm conftest.$ac_ext
bec39cab
AC
7901LIBS=$ac_func_search_save_LIBS
7902fi
81ecdfbb
RW
7903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7904$as_echo "$ac_cv_search_gethostbyname" >&6; }
7905ac_res=$ac_cv_search_gethostbyname
7906if test "$ac_res" != no; then :
7907 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 7908
bec39cab 7909fi
96baa820 7910
c906108c 7911
b4e70030 7912# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
7913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7914$as_echo_n "checking for library containing socketpair... " >&6; }
d0ac1c44 7915if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb 7916 $as_echo_n "(cached) " >&6
b4e70030
JB
7917else
7918 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7920/* end confdefs.h. */
7921
81ecdfbb
RW
7922/* Override any GCC internal prototype to avoid an error.
7923 Use char because int might match the return type of a GCC
7924 builtin and then its argument prototype would still apply. */
b4e70030
JB
7925#ifdef __cplusplus
7926extern "C"
7927#endif
b4e70030
JB
7928char socketpair ();
7929int
7930main ()
7931{
81ecdfbb 7932return socketpair ();
b4e70030
JB
7933 ;
7934 return 0;
7935}
7936_ACEOF
81ecdfbb
RW
7937for ac_lib in '' socket; do
7938 if test -z "$ac_lib"; then
7939 ac_res="none required"
7940 else
7941 ac_res=-l$ac_lib
b4e70030 7942 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7943 fi
7944 if ac_fn_c_try_link "$LINENO"; then :
7945 ac_cv_search_socketpair=$ac_res
7946fi
7947rm -f core conftest.err conftest.$ac_objext \
7948 conftest$ac_exeext
d0ac1c44 7949 if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb
RW
7950 break
7951fi
7952done
d0ac1c44 7953if ${ac_cv_search_socketpair+:} false; then :
b4e70030 7954
b4e70030 7955else
81ecdfbb 7956 ac_cv_search_socketpair=no
b4e70030 7957fi
81ecdfbb 7958rm conftest.$ac_ext
b4e70030
JB
7959LIBS=$ac_func_search_save_LIBS
7960fi
81ecdfbb
RW
7961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7962$as_echo "$ac_cv_search_socketpair" >&6; }
7963ac_res=$ac_cv_search_socketpair
7964if test "$ac_res" != no; then :
7965 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7966
7967fi
7968
7969
233a11ab 7970# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 7971
711a72d3 7972 # Use the system's zlib library.
39f3de7c
L
7973 zlibdir="-L\$(top_builddir)/../zlib"
7974 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 7975
711a72d3
L
7976# Check whether --with-system-zlib was given.
7977if test "${with_system_zlib+set}" = set; then :
afa59b79
L
7978 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7979 zlibdir=
7980 zlibinc=
7981 fi
b040ad30 7982
233a11ab 7983fi
233a11ab 7984
233a11ab 7985
233a11ab 7986
b040ad30 7987
233a11ab 7988
25268153 7989# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
37773e78 7990# On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
25268153
JB
7991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7992$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
d0ac1c44 7993if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7994 $as_echo_n "(cached) " >&6
7995else
7996 ac_func_search_save_LIBS=$LIBS
7997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7998/* end confdefs.h. */
7999
8000/* Override any GCC internal prototype to avoid an error.
8001 Use char because int might match the return type of a GCC
8002 builtin and then its argument prototype would still apply. */
8003#ifdef __cplusplus
8004extern "C"
8005#endif
8006char kinfo_getvmmap ();
8007int
8008main ()
8009{
8010return kinfo_getvmmap ();
8011 ;
8012 return 0;
8013}
8014_ACEOF
37773e78 8015for ac_lib in '' util util-freebsd; do
25268153
JB
8016 if test -z "$ac_lib"; then
8017 ac_res="none required"
8018 else
8019 ac_res=-l$ac_lib
8020 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8021 fi
8022 if ac_fn_c_try_link "$LINENO"; then :
8023 ac_cv_search_kinfo_getvmmap=$ac_res
8024fi
8025rm -f core conftest.err conftest.$ac_objext \
8026 conftest$ac_exeext
d0ac1c44 8027 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
8028 break
8029fi
8030done
d0ac1c44 8031if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
8032
8033else
8034 ac_cv_search_kinfo_getvmmap=no
8035fi
8036rm conftest.$ac_ext
8037LIBS=$ac_func_search_save_LIBS
8038fi
8039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
8040$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
8041ac_res=$ac_cv_search_kinfo_getvmmap
8042if test "$ac_res" != no; then :
8043 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8044
8045$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
8046
8047fi
8048
8049
92fce24d
JB
8050# fbsd-nat.c can also use kinfo_getfile.
8051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
8052$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
d0ac1c44 8053if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
8054 $as_echo_n "(cached) " >&6
8055else
8056 ac_func_search_save_LIBS=$LIBS
8057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8058/* end confdefs.h. */
8059
8060/* Override any GCC internal prototype to avoid an error.
8061 Use char because int might match the return type of a GCC
8062 builtin and then its argument prototype would still apply. */
8063#ifdef __cplusplus
8064extern "C"
8065#endif
8066char kinfo_getfile ();
8067int
8068main ()
8069{
8070return kinfo_getfile ();
8071 ;
8072 return 0;
8073}
8074_ACEOF
8075for ac_lib in '' util util-freebsd; do
8076 if test -z "$ac_lib"; then
8077 ac_res="none required"
8078 else
8079 ac_res=-l$ac_lib
8080 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8081 fi
8082 if ac_fn_c_try_link "$LINENO"; then :
8083 ac_cv_search_kinfo_getfile=$ac_res
8084fi
8085rm -f core conftest.err conftest.$ac_objext \
8086 conftest$ac_exeext
d0ac1c44 8087 if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
8088 break
8089fi
8090done
d0ac1c44 8091if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
8092
8093else
8094 ac_cv_search_kinfo_getfile=no
8095fi
8096rm conftest.$ac_ext
8097LIBS=$ac_func_search_save_LIBS
8098fi
8099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
8100$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
8101ac_res=$ac_cv_search_kinfo_getfile
8102if test "$ac_res" != no; then :
8103 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8104
8105$as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
8106
8107fi
8108
8109
77f120bf 8110
016a3251
DD
8111 if test "X$prefix" = "XNONE"; then
8112 acl_final_prefix="$ac_default_prefix"
8113 else
8114 acl_final_prefix="$prefix"
8115 fi
8116 if test "X$exec_prefix" = "XNONE"; then
8117 acl_final_exec_prefix='${prefix}'
8118 else
8119 acl_final_exec_prefix="$exec_prefix"
8120 fi
8121 acl_save_prefix="$prefix"
8122 prefix="$acl_final_prefix"
8123 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8124 prefix="$acl_save_prefix"
8125
8126
8127# Check whether --with-gnu-ld was given.
8128if test "${with_gnu_ld+set}" = set; then :
8129 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8130else
8131 with_gnu_ld=no
8132fi
8133
8134# Prepare PATH_SEPARATOR.
8135# The user is always right.
8136if test "${PATH_SEPARATOR+set}" != set; then
8137 echo "#! /bin/sh" >conf$$.sh
8138 echo "exit 0" >>conf$$.sh
8139 chmod +x conf$$.sh
8140 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8141 PATH_SEPARATOR=';'
8142 else
8143 PATH_SEPARATOR=:
8144 fi
8145 rm -f conf$$.sh
8146fi
8147ac_prog=ld
8148if test "$GCC" = yes; then
8149 # Check if gcc -print-prog-name=ld gives a path.
8150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8151$as_echo_n "checking for ld used by GCC... " >&6; }
8152 case $host in
8153 *-*-mingw*)
8154 # gcc leaves a trailing carriage return which upsets mingw
8155 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8156 *)
8157 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8158 esac
8159 case $ac_prog in
8160 # Accept absolute paths.
8161 [\\/]* | [A-Za-z]:[\\/]*)
8162 re_direlt='/[^/][^/]*/\.\./'
8163 # Canonicalize the path of ld
8164 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8165 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8166 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8167 done
8168 test -z "$LD" && LD="$ac_prog"
8169 ;;
8170 "")
8171 # If it fails, then pretend we aren't using GCC.
8172 ac_prog=ld
8173 ;;
8174 *)
8175 # If it is relative, then search for the first ld in PATH.
8176 with_gnu_ld=unknown
8177 ;;
8178 esac
8179elif test "$with_gnu_ld" = yes; then
8180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8181$as_echo_n "checking for GNU ld... " >&6; }
8182else
8183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8184$as_echo_n "checking for non-GNU ld... " >&6; }
8185fi
d0ac1c44 8186if ${acl_cv_path_LD+:} false; then :
016a3251
DD
8187 $as_echo_n "(cached) " >&6
8188else
8189 if test -z "$LD"; then
8190 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8191 for ac_dir in $PATH; do
8192 test -z "$ac_dir" && ac_dir=.
8193 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8194 acl_cv_path_LD="$ac_dir/$ac_prog"
8195 # Check to see if the program is GNU ld. I'd rather use --version,
8196 # but apparently some GNU ld's only accept -v.
8197 # Break only if it was the GNU/non-GNU ld that we prefer.
8198 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8199 test "$with_gnu_ld" != no && break
8200 else
8201 test "$with_gnu_ld" != yes && break
8202 fi
8203 fi
8204 done
8205 IFS="$ac_save_ifs"
8206else
8207 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8208fi
8209fi
8210
8211LD="$acl_cv_path_LD"
8212if test -n "$LD"; then
8213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8214$as_echo "$LD" >&6; }
8215else
8216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8217$as_echo "no" >&6; }
8218fi
d0ac1c44 8219test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
016a3251
DD
8220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8221$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
d0ac1c44 8222if ${acl_cv_prog_gnu_ld+:} false; then :
016a3251
DD
8223 $as_echo_n "(cached) " >&6
8224else
8225 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8226if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8227 acl_cv_prog_gnu_ld=yes
8228else
8229 acl_cv_prog_gnu_ld=no
8230fi
8231fi
8232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8233$as_echo "$acl_cv_prog_gnu_ld" >&6; }
8234with_gnu_ld=$acl_cv_prog_gnu_ld
8235
8236
8237
8238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8239$as_echo_n "checking for shared library run path origin... " >&6; }
d0ac1c44 8240if ${acl_cv_rpath+:} false; then :
016a3251
DD
8241 $as_echo_n "(cached) " >&6
8242else
8243
8244 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8245 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8246 . ./conftest.sh
8247 rm -f ./conftest.sh
8248 acl_cv_rpath=done
8249
8250fi
8251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8252$as_echo "$acl_cv_rpath" >&6; }
8253 wl="$acl_cv_wl"
8254 libext="$acl_cv_libext"
8255 shlibext="$acl_cv_shlibext"
8256 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8257 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8258 hardcode_direct="$acl_cv_hardcode_direct"
8259 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8260 # Check whether --enable-rpath was given.
8261if test "${enable_rpath+set}" = set; then :
8262 enableval=$enable_rpath; :
8263else
8264 enable_rpath=yes
8265fi
8266
8267
8268
8269
8270
8271
8272
8273
8274 use_additional=yes
8275
8276 acl_save_prefix="$prefix"
8277 prefix="$acl_final_prefix"
8278 acl_save_exec_prefix="$exec_prefix"
8279 exec_prefix="$acl_final_exec_prefix"
8280
8281 eval additional_includedir=\"$includedir\"
8282 eval additional_libdir=\"$libdir\"
8283
8284 exec_prefix="$acl_save_exec_prefix"
8285 prefix="$acl_save_prefix"
77f120bf 8286
6c7a06a3 8287
81ecdfbb
RW
8288# Check whether --with-libiconv-prefix was given.
8289if test "${with_libiconv_prefix+set}" = set; then :
8290 withval=$with_libiconv_prefix;
016a3251
DD
8291 if test "X$withval" = "Xno"; then
8292 use_additional=no
8293 else
8294 if test "X$withval" = "X"; then
8295
8296 acl_save_prefix="$prefix"
8297 prefix="$acl_final_prefix"
8298 acl_save_exec_prefix="$exec_prefix"
8299 exec_prefix="$acl_final_exec_prefix"
8300
8301 eval additional_includedir=\"$includedir\"
8302 eval additional_libdir=\"$libdir\"
8303
8304 exec_prefix="$acl_save_exec_prefix"
8305 prefix="$acl_save_prefix"
8306
8307 else
8308 additional_includedir="$withval/include"
8309 additional_libdir="$withval/lib"
8310 fi
8311 fi
6c7a06a3 8312
81ecdfbb
RW
8313fi
8314
016a3251
DD
8315 LIBICONV=
8316 LTLIBICONV=
8317 INCICONV=
8318 rpathdirs=
8319 ltrpathdirs=
8320 names_already_handled=
8321 names_next_round='iconv '
8322 while test -n "$names_next_round"; do
8323 names_this_round="$names_next_round"
8324 names_next_round=
8325 for name in $names_this_round; do
8326 already_handled=
8327 for n in $names_already_handled; do
8328 if test "$n" = "$name"; then
8329 already_handled=yes
8330 break
8331 fi
8332 done
8333 if test -z "$already_handled"; then
8334 names_already_handled="$names_already_handled $name"
8335 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8336 eval value=\"\$HAVE_LIB$uppername\"
8337 if test -n "$value"; then
8338 if test "$value" = yes; then
8339 eval value=\"\$LIB$uppername\"
8340 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8341 eval value=\"\$LTLIB$uppername\"
8342 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8343 else
8344 :
8345 fi
8346 else
8347 found_dir=
8348 found_la=
8349 found_so=
8350 found_a=
8351 if test $use_additional = yes; then
8352 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8353 found_dir="$additional_libdir"
8354 found_so="$additional_libdir/lib$name.$shlibext"
8355 if test -f "$additional_libdir/lib$name.la"; then
8356 found_la="$additional_libdir/lib$name.la"
8357 fi
8358 else
8359 if test -f "$additional_libdir/lib$name.$libext"; then
8360 found_dir="$additional_libdir"
8361 found_a="$additional_libdir/lib$name.$libext"
8362 if test -f "$additional_libdir/lib$name.la"; then
8363 found_la="$additional_libdir/lib$name.la"
8364 fi
8365 fi
8366 fi
8367 fi
8368 if test "X$found_dir" = "X"; then
8369 for x in $LDFLAGS $LTLIBICONV; do
8370
8371 acl_save_prefix="$prefix"
8372 prefix="$acl_final_prefix"
8373 acl_save_exec_prefix="$exec_prefix"
8374 exec_prefix="$acl_final_exec_prefix"
8375 eval x=\"$x\"
8376 exec_prefix="$acl_save_exec_prefix"
8377 prefix="$acl_save_prefix"
8378
8379 case "$x" in
8380 -L*)
8381 dir=`echo "X$x" | sed -e 's/^X-L//'`
8382 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8383 found_dir="$dir"
8384 found_so="$dir/lib$name.$shlibext"
8385 if test -f "$dir/lib$name.la"; then
8386 found_la="$dir/lib$name.la"
8387 fi
8388 else
8389 if test -f "$dir/lib$name.$libext"; then
8390 found_dir="$dir"
8391 found_a="$dir/lib$name.$libext"
8392 if test -f "$dir/lib$name.la"; then
8393 found_la="$dir/lib$name.la"
8394 fi
8395 fi
8396 fi
8397 ;;
8398 esac
8399 if test "X$found_dir" != "X"; then
8400 break
8401 fi
8402 done
8403 fi
8404 if test "X$found_dir" != "X"; then
8405 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8406 if test "X$found_so" != "X"; then
8407 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8408 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8409 else
8410 haveit=
8411 for x in $ltrpathdirs; do
8412 if test "X$x" = "X$found_dir"; then
8413 haveit=yes
8414 break
8415 fi
8416 done
8417 if test -z "$haveit"; then
8418 ltrpathdirs="$ltrpathdirs $found_dir"
8419 fi
8420 if test "$hardcode_direct" = yes; then
8421 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8422 else
8423 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8424 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8425 haveit=
8426 for x in $rpathdirs; do
8427 if test "X$x" = "X$found_dir"; then
8428 haveit=yes
8429 break
8430 fi
8431 done
8432 if test -z "$haveit"; then
8433 rpathdirs="$rpathdirs $found_dir"
8434 fi
8435 else
8436 haveit=
8437 for x in $LDFLAGS $LIBICONV; do
8438
8439 acl_save_prefix="$prefix"
8440 prefix="$acl_final_prefix"
8441 acl_save_exec_prefix="$exec_prefix"
8442 exec_prefix="$acl_final_exec_prefix"
8443 eval x=\"$x\"
8444 exec_prefix="$acl_save_exec_prefix"
8445 prefix="$acl_save_prefix"
8446
8447 if test "X$x" = "X-L$found_dir"; then
8448 haveit=yes
8449 break
8450 fi
8451 done
8452 if test -z "$haveit"; then
8453 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8454 fi
8455 if test "$hardcode_minus_L" != no; then
8456 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8457 else
8458 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8459 fi
8460 fi
8461 fi
8462 fi
8463 else
8464 if test "X$found_a" != "X"; then
8465 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8466 else
8467 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8468 fi
8469 fi
8470 additional_includedir=
8471 case "$found_dir" in
8472 */lib | */lib/)
8473 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8474 additional_includedir="$basedir/include"
8475 ;;
8476 esac
8477 if test "X$additional_includedir" != "X"; then
8478 if test "X$additional_includedir" != "X/usr/include"; then
8479 haveit=
8480 if test "X$additional_includedir" = "X/usr/local/include"; then
8481 if test -n "$GCC"; then
8482 case $host_os in
8483 linux*) haveit=yes;;
8484 esac
8485 fi
8486 fi
8487 if test -z "$haveit"; then
8488 for x in $CPPFLAGS $INCICONV; do
8489
8490 acl_save_prefix="$prefix"
8491 prefix="$acl_final_prefix"
8492 acl_save_exec_prefix="$exec_prefix"
8493 exec_prefix="$acl_final_exec_prefix"
8494 eval x=\"$x\"
8495 exec_prefix="$acl_save_exec_prefix"
8496 prefix="$acl_save_prefix"
8497
8498 if test "X$x" = "X-I$additional_includedir"; then
8499 haveit=yes
8500 break
8501 fi
8502 done
8503 if test -z "$haveit"; then
8504 if test -d "$additional_includedir"; then
8505 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8506 fi
8507 fi
8508 fi
8509 fi
8510 fi
8511 if test -n "$found_la"; then
8512 save_libdir="$libdir"
8513 case "$found_la" in
8514 */* | *\\*) . "$found_la" ;;
8515 *) . "./$found_la" ;;
8516 esac
8517 libdir="$save_libdir"
8518 for dep in $dependency_libs; do
8519 case "$dep" in
8520 -L*)
8521 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8522 if test "X$additional_libdir" != "X/usr/lib"; then
8523 haveit=
8524 if test "X$additional_libdir" = "X/usr/local/lib"; then
8525 if test -n "$GCC"; then
8526 case $host_os in
8527 linux*) haveit=yes;;
8528 esac
8529 fi
8530 fi
8531 if test -z "$haveit"; then
8532 haveit=
8533 for x in $LDFLAGS $LIBICONV; do
8534
8535 acl_save_prefix="$prefix"
8536 prefix="$acl_final_prefix"
8537 acl_save_exec_prefix="$exec_prefix"
8538 exec_prefix="$acl_final_exec_prefix"
8539 eval x=\"$x\"
8540 exec_prefix="$acl_save_exec_prefix"
8541 prefix="$acl_save_prefix"
8542
8543 if test "X$x" = "X-L$additional_libdir"; then
8544 haveit=yes
8545 break
8546 fi
8547 done
8548 if test -z "$haveit"; then
8549 if test -d "$additional_libdir"; then
8550 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8551 fi
8552 fi
8553 haveit=
8554 for x in $LDFLAGS $LTLIBICONV; do
8555
8556 acl_save_prefix="$prefix"
8557 prefix="$acl_final_prefix"
8558 acl_save_exec_prefix="$exec_prefix"
8559 exec_prefix="$acl_final_exec_prefix"
8560 eval x=\"$x\"
8561 exec_prefix="$acl_save_exec_prefix"
8562 prefix="$acl_save_prefix"
8563
8564 if test "X$x" = "X-L$additional_libdir"; then
8565 haveit=yes
8566 break
8567 fi
8568 done
8569 if test -z "$haveit"; then
8570 if test -d "$additional_libdir"; then
8571 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8572 fi
8573 fi
8574 fi
8575 fi
8576 ;;
8577 -R*)
8578 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8579 if test "$enable_rpath" != no; then
8580 haveit=
8581 for x in $rpathdirs; do
8582 if test "X$x" = "X$dir"; then
8583 haveit=yes
8584 break
8585 fi
8586 done
8587 if test -z "$haveit"; then
8588 rpathdirs="$rpathdirs $dir"
8589 fi
8590 haveit=
8591 for x in $ltrpathdirs; do
8592 if test "X$x" = "X$dir"; then
8593 haveit=yes
8594 break
8595 fi
8596 done
8597 if test -z "$haveit"; then
8598 ltrpathdirs="$ltrpathdirs $dir"
8599 fi
8600 fi
8601 ;;
8602 -l*)
8603 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8604 ;;
8605 *.la)
8606 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8607 ;;
8608 *)
8609 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8610 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8611 ;;
8612 esac
8613 done
8614 fi
8615 else
8616 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8617 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8618 fi
8619 fi
8620 fi
8621 done
8622 done
8623 if test "X$rpathdirs" != "X"; then
8624 if test -n "$hardcode_libdir_separator"; then
8625 alldirs=
8626 for found_dir in $rpathdirs; do
8627 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8628 done
8629 acl_save_libdir="$libdir"
8630 libdir="$alldirs"
8631 eval flag=\"$hardcode_libdir_flag_spec\"
8632 libdir="$acl_save_libdir"
8633 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8634 else
8635 for found_dir in $rpathdirs; do
8636 acl_save_libdir="$libdir"
8637 libdir="$found_dir"
8638 eval flag=\"$hardcode_libdir_flag_spec\"
8639 libdir="$acl_save_libdir"
8640 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8641 done
8642 fi
8643 fi
8644 if test "X$ltrpathdirs" != "X"; then
8645 for found_dir in $ltrpathdirs; do
8646 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8647 done
8648 fi
8649
8650
8651
8652
8653
6c7a06a3 8654
6c7a06a3 8655
81ecdfbb
RW
8656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8657$as_echo_n "checking for iconv... " >&6; }
d0ac1c44 8658if ${am_cv_func_iconv+:} false; then :
81ecdfbb 8659 $as_echo_n "(cached) " >&6
d542061a 8660else
6c7a06a3
TT
8661
8662 am_cv_func_iconv="no, consider installing GNU libiconv"
8663 am_cv_lib_iconv=no
016a3251
DD
8664 am_save_CPPFLAGS="$CPPFLAGS"
8665 CPPFLAGS="$CPPFLAGS $INCICONV"
8666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8667/* end confdefs.h. */
6c7a06a3
TT
8668#include <stdlib.h>
8669#include <iconv.h>
d542061a
UW
8670int
8671main ()
8672{
6c7a06a3 8673iconv_t cd = iconv_open("","");
016a3251
DD
8674 iconv(cd,NULL,NULL,NULL,NULL);
8675 iconv_close(cd);
d542061a
UW
8676 ;
8677 return 0;
8678}
8679_ACEOF
81ecdfbb 8680if ac_fn_c_try_link "$LINENO"; then :
016a3251 8681 am_cv_func_iconv=yes
d542061a 8682fi
81ecdfbb
RW
8683rm -f core conftest.err conftest.$ac_objext \
8684 conftest$ac_exeext conftest.$ac_ext
016a3251 8685 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 8686
016a3251
DD
8687 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8688 for _libs in .libs _libs; do
8689 am_save_CPPFLAGS="$CPPFLAGS"
8690 am_save_LIBS="$LIBS"
8691 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8692 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8694/* end confdefs.h. */
6c7a06a3
TT
8695#include <stdlib.h>
8696#include <iconv.h>
d542061a
UW
8697int
8698main ()
8699{
6c7a06a3 8700iconv_t cd = iconv_open("","");
016a3251
DD
8701 iconv(cd,NULL,NULL,NULL,NULL);
8702 iconv_close(cd);
d542061a
UW
8703 ;
8704 return 0;
8705}
8706_ACEOF
81ecdfbb 8707if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
8708 INCICONV="-I../libiconv/include"
8709 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8710 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8711 am_cv_lib_iconv=yes
8712 am_cv_func_iconv=yes
d542061a 8713fi
81ecdfbb
RW
8714rm -f core conftest.err conftest.$ac_objext \
8715 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
8716 CPPFLAGS="$am_save_CPPFLAGS"
8717 LIBS="$am_save_LIBS"
8718 if test "$am_cv_func_iconv" = "yes"; then
8719 break
8720 fi
8721 done
77f120bf 8722 fi
94ae1714 8723
4edb1e84 8724 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 8725 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 8726 am_save_LIBS="$LIBS"
5d762de0 8727 CPPFLAGS="$CPPFLAGS $INCICONV"
016a3251 8728 LIBS="$LIBS $LIBICONV"
81ecdfbb 8729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8730/* end confdefs.h. */
6c7a06a3
TT
8731#include <stdlib.h>
8732#include <iconv.h>
bec39cab
AC
8733int
8734main ()
8735{
6c7a06a3
TT
8736iconv_t cd = iconv_open("","");
8737 iconv(cd,NULL,NULL,NULL,NULL);
8738 iconv_close(cd);
bec39cab
AC
8739 ;
8740 return 0;
8741}
8742_ACEOF
81ecdfbb 8743if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8744 am_cv_lib_iconv=yes
6c7a06a3 8745 am_cv_func_iconv=yes
627af7ea 8746fi
81ecdfbb
RW
8747rm -f core conftest.err conftest.$ac_objext \
8748 conftest$ac_exeext conftest.$ac_ext
fc3b640d 8749 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 8750 LIBS="$am_save_LIBS"
6c7a06a3
TT
8751 fi
8752
8753fi
81ecdfbb
RW
8754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8755$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
8756 if test "$am_cv_func_iconv" = yes; then
8757
8758$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 8759
016a3251 8760 fi
fc3b640d 8761 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
8762
8763 for element in $INCICONV; do
8764 haveit=
8765 for x in $CPPFLAGS; do
8766
8767 acl_save_prefix="$prefix"
8768 prefix="$acl_final_prefix"
8769 acl_save_exec_prefix="$exec_prefix"
8770 exec_prefix="$acl_final_exec_prefix"
8771 eval x=\"$x\"
8772 exec_prefix="$acl_save_exec_prefix"
8773 prefix="$acl_save_prefix"
8774
8775 if test "X$x" = "X$element"; then
8776 haveit=yes
8777 break
8778 fi
8779 done
8780 if test -z "$haveit"; then
8781 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8782 fi
8783 done
8784
8785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8786$as_echo_n "checking how to link with libiconv... " >&6; }
8787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8788$as_echo "$LIBICONV" >&6; }
94ae1714 8789 else
016a3251
DD
8790 LIBICONV=
8791 LTLIBICONV=
fc3b640d 8792 fi
94ae1714 8793
6c7a06a3 8794
6c7a06a3 8795
016a3251 8796 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
8797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8798$as_echo_n "checking for iconv declaration... " >&6; }
d0ac1c44 8799 if ${am_cv_proto_iconv+:} false; then :
81ecdfbb 8800 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8801else
8802
81ecdfbb 8803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8804/* end confdefs.h. */
8805
6c7a06a3
TT
8806#include <stdlib.h>
8807#include <iconv.h>
8808extern
b4e70030 8809#ifdef __cplusplus
6c7a06a3 8810"C"
b4e70030 8811#endif
6c7a06a3
TT
8812#if defined(__STDC__) || defined(__cplusplus)
8813size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8814#else
8815size_t iconv();
8816#endif
8817
b4e70030
JB
8818int
8819main ()
8820{
6c7a06a3 8821
b4e70030
JB
8822 ;
8823 return 0;
8824}
8825_ACEOF
81ecdfbb 8826if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 8827 am_cv_proto_iconv_arg1=""
4e8d927d 8828else
81ecdfbb 8829 am_cv_proto_iconv_arg1="const"
b4e70030 8830fi
81ecdfbb 8831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
8832 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);"
8833fi
8834
8835 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 8836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 8837 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
8838$as_echo "${ac_t:-
8839 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
8840
8841cat >>confdefs.h <<_ACEOF
8842#define ICONV_CONST $am_cv_proto_iconv_arg1
8843_ACEOF
8844
8845 fi
6c7a06a3
TT
8846
8847
478aac75
DE
8848# GDB may fork/exec the iconv program to get the list of supported character
8849# sets. Allow the user to specify where to find it.
8850# There are several factors affecting the choice of option name:
8851# - There is already --with-libiconv-prefix but we can't use it, it specifies
8852# the build-time location of libiconv files.
8853# - The program we need to find is iconv, which comes with glibc. The user
8854# doesn't necessarily have libiconv installed. Therefore naming this
8855# --with-libiconv-foo feels wrong.
8856# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8857# defined to work on directories not files (though it really doesn't know
8858# the difference).
8859# - Calling this --with-iconv-prefix is perceived to cause too much confusion
8860# with --with-libiconv-prefix.
8861# Putting these together is why the option name is --with-iconv-bin.
8862
8863
8864# Check whether --with-iconv-bin was given.
8865if test "${with_iconv_bin+set}" = set; then :
8866 withval=$with_iconv_bin; iconv_bin="${withval}"
8867
8868cat >>confdefs.h <<_ACEOF
8869#define ICONV_BIN "${iconv_bin}"
8870_ACEOF
8871
8872
8873 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8874 if test "x$prefix" = xNONE; then
8875 test_prefix=/usr/local
8876 else
8877 test_prefix=$prefix
8878 fi
8879 else
8880 test_prefix=$exec_prefix
8881 fi
8882 value=0
8883 case ${iconv_bin} in
8884 "${test_prefix}"|"${test_prefix}/"*|\
8885 '${exec_prefix}'|'${exec_prefix}/'*)
8886 value=1
8887 ;;
8888 esac
8889
8890cat >>confdefs.h <<_ACEOF
8891#define ICONV_BIN_RELOCATABLE $value
8892_ACEOF
8893
8894
8895
8896fi
8897
8898
cb01cfba 8899# For the TUI, we need enhanced curses functionality.
bd8a8e1b 8900if test x"$enable_tui" != xno; then
cb01cfba
JB
8901 prefer_curses=yes
8902fi
8903
8904curses_found=no
8905if test x"$prefer_curses" = xyes; then
8906 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8907 # curses library because the latter might not provide all the
8908 # functionality we need. However, this leads to problems on systems
8909 # where the linker searches /usr/local/lib, but the compiler doesn't
8910 # search /usr/local/include, if ncurses is installed in /usr/local. A
8911 # default installation of ncurses on alpha*-dec-osf* will lead to such
8912 # a situation.
81ecdfbb
RW
8913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8914$as_echo_n "checking for library containing waddstr... " >&6; }
d0ac1c44 8915if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8916 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8917else
8918 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8920/* end confdefs.h. */
8921
81ecdfbb
RW
8922/* Override any GCC internal prototype to avoid an error.
8923 Use char because int might match the return type of a GCC
8924 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8925#ifdef __cplusplus
8926extern "C"
8927#endif
6c7a06a3
TT
8928char waddstr ();
8929int
8930main ()
8931{
81ecdfbb 8932return waddstr ();
6c7a06a3
TT
8933 ;
8934 return 0;
8935}
8936_ACEOF
5007d765 8937for ac_lib in '' ncursesw ncurses cursesX curses; do
81ecdfbb
RW
8938 if test -z "$ac_lib"; then
8939 ac_res="none required"
8940 else
8941 ac_res=-l$ac_lib
8942 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8943 fi
8944 if ac_fn_c_try_link "$LINENO"; then :
8945 ac_cv_search_waddstr=$ac_res
8946fi
8947rm -f core conftest.err conftest.$ac_objext \
8948 conftest$ac_exeext
d0ac1c44 8949 if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb
RW
8950 break
8951fi
8952done
d0ac1c44 8953if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8954
6c7a06a3 8955else
81ecdfbb
RW
8956 ac_cv_search_waddstr=no
8957fi
8958rm conftest.$ac_ext
8959LIBS=$ac_func_search_save_LIBS
8960fi
8961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8962$as_echo "$ac_cv_search_waddstr" >&6; }
8963ac_res=$ac_cv_search_waddstr
8964if test "$ac_res" != no; then :
8965 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
8966
8967fi
8968
8969
cb01cfba
JB
8970 if test "$ac_cv_search_waddstr" != no; then
8971 curses_found=yes
8972 fi
8973fi
8974
8975# Check whether we should enable the TUI, but only do so if we really
8976# can.
8977if test x"$enable_tui" != xno; then
8978 if test -d $srcdir/tui; then
8979 if test "$curses_found" != no; then
6c7a06a3
TT
8980 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8981 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8982 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8983 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
8984 else
8985 if test x"$enable_tui" = xyes; then
d0ac1c44 8986 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 8987 else
81ecdfbb
RW
8988 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8989$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
8990 fi
8991 fi
8992 fi
8993fi
8994
8995# Since GDB uses Readline, we need termcap functionality. In many
8996# cases this will be provided by the curses library, but some systems
96fe4562 8997# have a separate termcap library, or no curses library at all.
6c7a06a3
TT
8998
8999case $host_os in
9000 cygwin*)
9001 if test -d $srcdir/libtermcap; then
9002 LIBS="../libtermcap/libtermcap.a $LIBS"
9003 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
9004 fi ;;
9005 go32* | *djgpp*)
9006 ac_cv_search_tgetent="none required"
9007 ;;
6c7a06a3
TT
9008esac
9009
9010# These are the libraries checked by Readline.
81ecdfbb
RW
9011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9012$as_echo_n "checking for library containing tgetent... " >&6; }
d0ac1c44 9013if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb 9014 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9015else
9016 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9017cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9018/* end confdefs.h. */
9019
81ecdfbb
RW
9020/* Override any GCC internal prototype to avoid an error.
9021 Use char because int might match the return type of a GCC
9022 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9023#ifdef __cplusplus
9024extern "C"
9025#endif
6c7a06a3
TT
9026char tgetent ();
9027int
9028main ()
9029{
81ecdfbb 9030return tgetent ();
6c7a06a3
TT
9031 ;
9032 return 0;
9033}
9034_ACEOF
2578ecb1 9035for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
81ecdfbb
RW
9036 if test -z "$ac_lib"; then
9037 ac_res="none required"
9038 else
9039 ac_res=-l$ac_lib
6c7a06a3 9040 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9041 fi
9042 if ac_fn_c_try_link "$LINENO"; then :
9043 ac_cv_search_tgetent=$ac_res
9044fi
9045rm -f core conftest.err conftest.$ac_objext \
9046 conftest$ac_exeext
d0ac1c44 9047 if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb
RW
9048 break
9049fi
9050done
d0ac1c44 9051if ${ac_cv_search_tgetent+:} false; then :
6c7a06a3 9052
6c7a06a3 9053else
81ecdfbb 9054 ac_cv_search_tgetent=no
6c7a06a3 9055fi
81ecdfbb 9056rm conftest.$ac_ext
6c7a06a3
TT
9057LIBS=$ac_func_search_save_LIBS
9058fi
81ecdfbb
RW
9059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9060$as_echo "$ac_cv_search_tgetent" >&6; }
9061ac_res=$ac_cv_search_tgetent
9062if test "$ac_res" != no; then :
9063 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 9064
06825bd1
MK
9065fi
9066
06825bd1 9067
bec39cab 9068if test "$ac_cv_search_tgetent" = no; then
7a85168d 9069 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
9070fi
9071
3841debe 9072
81ecdfbb
RW
9073# Check whether --with-system-readline was given.
9074if test "${with_system_readline+set}" = set; then :
9075 withval=$with_system_readline;
9076fi
6a30b0a5 9077
6a30b0a5
AS
9078
9079if test "$with_system_readline" = yes; then
9080 READLINE=-lreadline
9081 READLINE_DEPS=
9082 READLINE_CFLAGS=
39037522 9083 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
9084else
9085 READLINE='$(READLINE_DIR)/libreadline.a'
9086 READLINE_DEPS='$(READLINE)'
9087 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 9088 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
9089fi
9090
9091
9092
9093
9094
f997c383
SD
9095# Generate jit-reader.h
9096
9097# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9098TARGET_PTR=
9099
9100# The cast to long int works around a bug in the HP C Compiler
9101# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9102# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9103# This bug is HP SR number 8606223364.
9104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9105$as_echo_n "checking size of unsigned long long... " >&6; }
d0ac1c44 9106if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
f997c383
SD
9107 $as_echo_n "(cached) " >&6
9108else
9109 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9110
9111else
9112 if test "$ac_cv_type_unsigned_long_long" = yes; then
9113 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9114$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9115as_fn_error 77 "cannot compute sizeof (unsigned long long)
9116See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9117 else
9118 ac_cv_sizeof_unsigned_long_long=0
9119 fi
9120fi
9121
9122fi
9123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9124$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9125
9126
9127
9128cat >>confdefs.h <<_ACEOF
9129#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9130_ACEOF
9131
9132
9133# The cast to long int works around a bug in the HP C Compiler
9134# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9135# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9136# This bug is HP SR number 8606223364.
9137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9138$as_echo_n "checking size of unsigned long... " >&6; }
d0ac1c44 9139if ${ac_cv_sizeof_unsigned_long+:} false; then :
f997c383
SD
9140 $as_echo_n "(cached) " >&6
9141else
9142 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9143
9144else
9145 if test "$ac_cv_type_unsigned_long" = yes; then
9146 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9147$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9148as_fn_error 77 "cannot compute sizeof (unsigned long)
9149See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9150 else
9151 ac_cv_sizeof_unsigned_long=0
9152 fi
9153fi
9154
9155fi
9156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9157$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9158
9159
9160
9161cat >>confdefs.h <<_ACEOF
9162#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9163_ACEOF
9164
9165
9166# The cast to long int works around a bug in the HP C Compiler
9167# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9168# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9169# This bug is HP SR number 8606223364.
9170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9171$as_echo_n "checking size of unsigned __int128... " >&6; }
d0ac1c44 9172if ${ac_cv_sizeof_unsigned___int128+:} false; then :
f997c383
SD
9173 $as_echo_n "(cached) " >&6
9174else
9175 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9176
9177else
9178 if test "$ac_cv_type_unsigned___int128" = yes; then
9179 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9180$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9181as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9182See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9183 else
9184 ac_cv_sizeof_unsigned___int128=0
9185 fi
9186fi
9187
9188fi
9189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9190$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9191
9192
9193
9194cat >>confdefs.h <<_ACEOF
9195#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9196_ACEOF
9197
9198
9199
9200if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9201 TARGET_PTR="unsigned long"
9202elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9203 TARGET_PTR="unsigned long long"
9204elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9205 TARGET_PTR="unsigned __int128"
9206else
9207 TARGET_PTR="unsigned long"
9208fi
9209
9210
9211ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9212
9213
a2d08b9e
SD
9214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9215$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 9216if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9217 $as_echo_n "(cached) " >&6
9218else
9219 ac_func_search_save_LIBS=$LIBS
9220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9221/* end confdefs.h. */
9222
9223/* Override any GCC internal prototype to avoid an error.
9224 Use char because int might match the return type of a GCC
9225 builtin and then its argument prototype would still apply. */
9226#ifdef __cplusplus
9227extern "C"
9228#endif
9229char dlopen ();
9230int
9231main ()
9232{
9233return dlopen ();
9234 ;
9235 return 0;
9236}
9237_ACEOF
9238for ac_lib in '' dl; do
9239 if test -z "$ac_lib"; then
9240 ac_res="none required"
9241 else
9242 ac_res=-l$ac_lib
9243 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9244 fi
9245 if ac_fn_c_try_link "$LINENO"; then :
9246 ac_cv_search_dlopen=$ac_res
9247fi
9248rm -f core conftest.err conftest.$ac_objext \
9249 conftest$ac_exeext
d0ac1c44 9250 if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9251 break
9252fi
9253done
d0ac1c44 9254if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9255
9256else
9257 ac_cv_search_dlopen=no
9258fi
9259rm conftest.$ac_ext
9260LIBS=$ac_func_search_save_LIBS
9261fi
9262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9263$as_echo "$ac_cv_search_dlopen" >&6; }
9264ac_res=$ac_cv_search_dlopen
9265if test "$ac_res" != no; then :
9266 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9267
9268fi
9269
9270
39037522 9271
b8e0a31c
SD
9272
9273# Check whether --with-jit-reader-dir was given.
9274if test "${with_jit_reader_dir+set}" = set; then :
9275 withval=$with_jit_reader_dir;
9276 JIT_READER_DIR=$withval
9277else
9278 JIT_READER_DIR=${libdir}/gdb
9279fi
9280
9281
9282 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9283 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9284 ac_define_dir=`eval echo $JIT_READER_DIR`
9285 ac_define_dir=`eval echo $ac_define_dir`
9286
9287cat >>confdefs.h <<_ACEOF
9288#define JIT_READER_DIR "$ac_define_dir"
9289_ACEOF
9290
9291
9292
9293
9294 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9295 if test "x$prefix" = xNONE; then
9296 test_prefix=/usr/local
9297 else
9298 test_prefix=$prefix
9299 fi
9300 else
9301 test_prefix=$exec_prefix
9302 fi
9303 value=0
9304 case ${ac_define_dir} in
9305 "${test_prefix}"|"${test_prefix}/"*|\
9306 '${exec_prefix}'|'${exec_prefix}/'*)
9307 value=1
9308 ;;
9309 esac
9310
9311cat >>confdefs.h <<_ACEOF
9312#define JIT_READER_DIR_RELOCATABLE $value
9313_ACEOF
9314
9315
9316
9317
9318
81ecdfbb
RW
9319# Check whether --with-expat was given.
9320if test "${with_expat+set}" = set; then :
9321 withval=$with_expat;
5c39566f
DJ
9322else
9323 with_expat=auto
81ecdfbb
RW
9324fi
9325
9326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9327$as_echo_n "checking whether to use expat... " >&6; }
9328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9329$as_echo "$with_expat" >&6; }
5c39566f
DJ
9330
9331if test "${with_expat}" = no; then
81ecdfbb
RW
9332 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9333$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9334 HAVE_LIBEXPAT=no
9335else
9336
3841debe
DJ
9337
9338
9339
9340
9341
9342
9343
9344 use_additional=yes
9345
9346 acl_save_prefix="$prefix"
9347 prefix="$acl_final_prefix"
9348 acl_save_exec_prefix="$exec_prefix"
9349 exec_prefix="$acl_final_exec_prefix"
9350
9351 eval additional_includedir=\"$includedir\"
9352 eval additional_libdir=\"$libdir\"
9353
9354 exec_prefix="$acl_save_exec_prefix"
9355 prefix="$acl_save_prefix"
9356
9357
81ecdfbb
RW
9358# Check whether --with-libexpat-prefix was given.
9359if test "${with_libexpat_prefix+set}" = set; then :
9360 withval=$with_libexpat_prefix;
3841debe
DJ
9361 if test "X$withval" = "Xno"; then
9362 use_additional=no
9363 else
9364 if test "X$withval" = "X"; then
9365
9366 acl_save_prefix="$prefix"
9367 prefix="$acl_final_prefix"
9368 acl_save_exec_prefix="$exec_prefix"
9369 exec_prefix="$acl_final_exec_prefix"
9370
9371 eval additional_includedir=\"$includedir\"
9372 eval additional_libdir=\"$libdir\"
9373
9374 exec_prefix="$acl_save_exec_prefix"
9375 prefix="$acl_save_prefix"
9376
9377 else
9378 additional_includedir="$withval/include"
9379 additional_libdir="$withval/lib"
9380 fi
9381 fi
9382
81ecdfbb
RW
9383fi
9384
3841debe
DJ
9385 LIBEXPAT=
9386 LTLIBEXPAT=
9387 INCEXPAT=
9388 rpathdirs=
9389 ltrpathdirs=
9390 names_already_handled=
9391 names_next_round='expat '
9392 while test -n "$names_next_round"; do
9393 names_this_round="$names_next_round"
9394 names_next_round=
9395 for name in $names_this_round; do
9396 already_handled=
9397 for n in $names_already_handled; do
9398 if test "$n" = "$name"; then
9399 already_handled=yes
9400 break
9401 fi
9402 done
9403 if test -z "$already_handled"; then
9404 names_already_handled="$names_already_handled $name"
9405 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9406 eval value=\"\$HAVE_LIB$uppername\"
9407 if test -n "$value"; then
9408 if test "$value" = yes; then
9409 eval value=\"\$LIB$uppername\"
9410 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9411 eval value=\"\$LTLIB$uppername\"
9412 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9413 else
9414 :
9415 fi
9416 else
9417 found_dir=
9418 found_la=
9419 found_so=
9420 found_a=
9421 if test $use_additional = yes; then
9422 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9423 found_dir="$additional_libdir"
9424 found_so="$additional_libdir/lib$name.$shlibext"
9425 if test -f "$additional_libdir/lib$name.la"; then
9426 found_la="$additional_libdir/lib$name.la"
9427 fi
9428 else
9429 if test -f "$additional_libdir/lib$name.$libext"; then
9430 found_dir="$additional_libdir"
9431 found_a="$additional_libdir/lib$name.$libext"
9432 if test -f "$additional_libdir/lib$name.la"; then
9433 found_la="$additional_libdir/lib$name.la"
9434 fi
9435 fi
9436 fi
9437 fi
9438 if test "X$found_dir" = "X"; then
9439 for x in $LDFLAGS $LTLIBEXPAT; do
9440
9441 acl_save_prefix="$prefix"
9442 prefix="$acl_final_prefix"
9443 acl_save_exec_prefix="$exec_prefix"
9444 exec_prefix="$acl_final_exec_prefix"
9445 eval x=\"$x\"
9446 exec_prefix="$acl_save_exec_prefix"
9447 prefix="$acl_save_prefix"
9448
9449 case "$x" in
9450 -L*)
9451 dir=`echo "X$x" | sed -e 's/^X-L//'`
9452 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9453 found_dir="$dir"
9454 found_so="$dir/lib$name.$shlibext"
9455 if test -f "$dir/lib$name.la"; then
9456 found_la="$dir/lib$name.la"
9457 fi
9458 else
9459 if test -f "$dir/lib$name.$libext"; then
9460 found_dir="$dir"
9461 found_a="$dir/lib$name.$libext"
9462 if test -f "$dir/lib$name.la"; then
9463 found_la="$dir/lib$name.la"
9464 fi
9465 fi
9466 fi
9467 ;;
9468 esac
9469 if test "X$found_dir" != "X"; then
9470 break
9471 fi
9472 done
9473 fi
9474 if test "X$found_dir" != "X"; then
9475 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9476 if test "X$found_so" != "X"; then
9477 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9478 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9479 else
9480 haveit=
9481 for x in $ltrpathdirs; do
9482 if test "X$x" = "X$found_dir"; then
9483 haveit=yes
9484 break
9485 fi
9486 done
9487 if test -z "$haveit"; then
9488 ltrpathdirs="$ltrpathdirs $found_dir"
9489 fi
9490 if test "$hardcode_direct" = yes; then
9491 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9492 else
9493 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9494 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9495 haveit=
9496 for x in $rpathdirs; do
9497 if test "X$x" = "X$found_dir"; then
9498 haveit=yes
9499 break
9500 fi
9501 done
9502 if test -z "$haveit"; then
9503 rpathdirs="$rpathdirs $found_dir"
9504 fi
9505 else
9506 haveit=
9507 for x in $LDFLAGS $LIBEXPAT; do
9508
9509 acl_save_prefix="$prefix"
9510 prefix="$acl_final_prefix"
9511 acl_save_exec_prefix="$exec_prefix"
9512 exec_prefix="$acl_final_exec_prefix"
9513 eval x=\"$x\"
9514 exec_prefix="$acl_save_exec_prefix"
9515 prefix="$acl_save_prefix"
9516
9517 if test "X$x" = "X-L$found_dir"; then
9518 haveit=yes
9519 break
9520 fi
9521 done
9522 if test -z "$haveit"; then
9523 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9524 fi
9525 if test "$hardcode_minus_L" != no; then
9526 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9527 else
9528 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9529 fi
9530 fi
9531 fi
9532 fi
9533 else
9534 if test "X$found_a" != "X"; then
9535 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9536 else
9537 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9538 fi
9539 fi
9540 additional_includedir=
9541 case "$found_dir" in
9542 */lib | */lib/)
9543 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9544 additional_includedir="$basedir/include"
9545 ;;
9546 esac
9547 if test "X$additional_includedir" != "X"; then
9548 if test "X$additional_includedir" != "X/usr/include"; then
9549 haveit=
9550 if test "X$additional_includedir" = "X/usr/local/include"; then
9551 if test -n "$GCC"; then
9552 case $host_os in
9553 linux*) haveit=yes;;
9554 esac
9555 fi
9556 fi
9557 if test -z "$haveit"; then
9558 for x in $CPPFLAGS $INCEXPAT; do
9559
9560 acl_save_prefix="$prefix"
9561 prefix="$acl_final_prefix"
9562 acl_save_exec_prefix="$exec_prefix"
9563 exec_prefix="$acl_final_exec_prefix"
9564 eval x=\"$x\"
9565 exec_prefix="$acl_save_exec_prefix"
9566 prefix="$acl_save_prefix"
9567
9568 if test "X$x" = "X-I$additional_includedir"; then
9569 haveit=yes
9570 break
9571 fi
9572 done
9573 if test -z "$haveit"; then
9574 if test -d "$additional_includedir"; then
9575 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9576 fi
9577 fi
9578 fi
9579 fi
9580 fi
9581 if test -n "$found_la"; then
9582 save_libdir="$libdir"
9583 case "$found_la" in
9584 */* | *\\*) . "$found_la" ;;
9585 *) . "./$found_la" ;;
9586 esac
9587 libdir="$save_libdir"
9588 for dep in $dependency_libs; do
9589 case "$dep" in
9590 -L*)
9591 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9592 if test "X$additional_libdir" != "X/usr/lib"; then
9593 haveit=
9594 if test "X$additional_libdir" = "X/usr/local/lib"; then
9595 if test -n "$GCC"; then
9596 case $host_os in
9597 linux*) haveit=yes;;
9598 esac
9599 fi
9600 fi
9601 if test -z "$haveit"; then
9602 haveit=
9603 for x in $LDFLAGS $LIBEXPAT; do
9604
9605 acl_save_prefix="$prefix"
9606 prefix="$acl_final_prefix"
9607 acl_save_exec_prefix="$exec_prefix"
9608 exec_prefix="$acl_final_exec_prefix"
9609 eval x=\"$x\"
9610 exec_prefix="$acl_save_exec_prefix"
9611 prefix="$acl_save_prefix"
9612
9613 if test "X$x" = "X-L$additional_libdir"; then
9614 haveit=yes
9615 break
9616 fi
9617 done
9618 if test -z "$haveit"; then
9619 if test -d "$additional_libdir"; then
9620 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9621 fi
9622 fi
9623 haveit=
9624 for x in $LDFLAGS $LTLIBEXPAT; do
9625
9626 acl_save_prefix="$prefix"
9627 prefix="$acl_final_prefix"
9628 acl_save_exec_prefix="$exec_prefix"
9629 exec_prefix="$acl_final_exec_prefix"
9630 eval x=\"$x\"
9631 exec_prefix="$acl_save_exec_prefix"
9632 prefix="$acl_save_prefix"
9633
9634 if test "X$x" = "X-L$additional_libdir"; then
9635 haveit=yes
9636 break
9637 fi
9638 done
9639 if test -z "$haveit"; then
9640 if test -d "$additional_libdir"; then
9641 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9642 fi
9643 fi
9644 fi
9645 fi
9646 ;;
9647 -R*)
9648 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9649 if test "$enable_rpath" != no; then
9650 haveit=
9651 for x in $rpathdirs; do
9652 if test "X$x" = "X$dir"; then
9653 haveit=yes
9654 break
9655 fi
9656 done
9657 if test -z "$haveit"; then
9658 rpathdirs="$rpathdirs $dir"
9659 fi
9660 haveit=
9661 for x in $ltrpathdirs; do
9662 if test "X$x" = "X$dir"; then
9663 haveit=yes
9664 break
9665 fi
9666 done
9667 if test -z "$haveit"; then
9668 ltrpathdirs="$ltrpathdirs $dir"
9669 fi
9670 fi
9671 ;;
9672 -l*)
9673 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9674 ;;
9675 *.la)
9676 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9677 ;;
9678 *)
9679 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9680 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9681 ;;
81ecdfbb
RW
9682 esac
9683 done
9684 fi
9685 else
9686 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9687 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9688 fi
9689 fi
9690 fi
9691 done
9692 done
9693 if test "X$rpathdirs" != "X"; then
9694 if test -n "$hardcode_libdir_separator"; then
9695 alldirs=
9696 for found_dir in $rpathdirs; do
9697 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9698 done
9699 acl_save_libdir="$libdir"
9700 libdir="$alldirs"
9701 eval flag=\"$hardcode_libdir_flag_spec\"
9702 libdir="$acl_save_libdir"
9703 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9704 else
9705 for found_dir in $rpathdirs; do
9706 acl_save_libdir="$libdir"
9707 libdir="$found_dir"
9708 eval flag=\"$hardcode_libdir_flag_spec\"
9709 libdir="$acl_save_libdir"
9710 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9711 done
9712 fi
9713 fi
9714 if test "X$ltrpathdirs" != "X"; then
9715 for found_dir in $ltrpathdirs; do
9716 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9717 done
9718 fi
a9322a30
TT
9719
9720
81ecdfbb 9721 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 9722
81ecdfbb
RW
9723 for element in $INCEXPAT; do
9724 haveit=
9725 for x in $CPPFLAGS; do
a9322a30 9726
81ecdfbb
RW
9727 acl_save_prefix="$prefix"
9728 prefix="$acl_final_prefix"
9729 acl_save_exec_prefix="$exec_prefix"
9730 exec_prefix="$acl_final_exec_prefix"
9731 eval x=\"$x\"
9732 exec_prefix="$acl_save_exec_prefix"
9733 prefix="$acl_save_prefix"
a8111142 9734
81ecdfbb
RW
9735 if test "X$x" = "X$element"; then
9736 haveit=yes
9737 break
9738 fi
9739 done
9740 if test -z "$haveit"; then
9741 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9742 fi
9743 done
a9322a30
TT
9744
9745
81ecdfbb
RW
9746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9747$as_echo_n "checking for libexpat... " >&6; }
d0ac1c44 9748if ${ac_cv_libexpat+:} false; then :
81ecdfbb 9749 $as_echo_n "(cached) " >&6
bec39cab 9750else
bec39cab 9751
81ecdfbb
RW
9752 ac_save_LIBS="$LIBS"
9753 LIBS="$LIBS $LIBEXPAT"
9754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9755/* end confdefs.h. */
81ecdfbb
RW
9756#include "expat.h"
9757int
9758main ()
9759{
9760XML_Parser p = XML_ParserCreate (0);
9761 ;
9762 return 0;
9763}
bec39cab 9764_ACEOF
81ecdfbb
RW
9765if ac_fn_c_try_link "$LINENO"; then :
9766 ac_cv_libexpat=yes
c906108c 9767else
81ecdfbb 9768 ac_cv_libexpat=no
bec39cab 9769fi
81ecdfbb
RW
9770rm -f core conftest.err conftest.$ac_objext \
9771 conftest$ac_exeext conftest.$ac_ext
9772 LIBS="$ac_save_LIBS"
c906108c 9773
95ca63c4 9774fi
81ecdfbb
RW
9775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9776$as_echo "$ac_cv_libexpat" >&6; }
9777 if test "$ac_cv_libexpat" = yes; then
9778 HAVE_LIBEXPAT=yes
bec39cab 9779
81ecdfbb 9780$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 9781
81ecdfbb
RW
9782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9783$as_echo_n "checking how to link with libexpat... " >&6; }
9784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9785$as_echo "$LIBEXPAT" >&6; }
9786 else
9787 HAVE_LIBEXPAT=no
9788 CPPFLAGS="$ac_save_CPPFLAGS"
9789 LIBEXPAT=
9790 LTLIBEXPAT=
9791 fi
95ca63c4
CF
9792
9793
9794
7cb9022a
MK
9795
9796
bec39cab 9797
81ecdfbb
RW
9798 if test "$HAVE_LIBEXPAT" != yes; then
9799 if test "$with_expat" = yes; then
d0ac1c44 9800 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
81ecdfbb
RW
9801 else
9802 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9803$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9804 fi
9805 else
9806 save_LIBS=$LIBS
9807 LIBS="$LIBS $LIBEXPAT"
9808 for ac_func in XML_StopParser
9809do :
9810 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
d0ac1c44 9811if test "x$ac_cv_func_XML_StopParser" = xyes; then :
bec39cab 9812 cat >>confdefs.h <<_ACEOF
81ecdfbb 9813#define HAVE_XML_STOPPARSER 1
bec39cab 9814_ACEOF
95ca63c4 9815
bec39cab 9816fi
bec39cab 9817done
95ca63c4 9818
81ecdfbb
RW
9819 LIBS=$save_LIBS
9820 fi
a9322a30
TT
9821fi
9822
2400729e
UW
9823
9824# Check whether --with-mpfr was given.
9825if test "${with_mpfr+set}" = set; then :
9826 withval=$with_mpfr;
9827else
9828 with_mpfr=auto
9829fi
9830
9831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
9832$as_echo_n "checking whether to use MPFR... " >&6; }
9833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
9834$as_echo "$with_mpfr" >&6; }
9835
9836if test "${with_mpfr}" = no; then
9837 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
9838$as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
9839 HAVE_LIBMPFR=no
9840else
9841
9842
9843
9844
9845
9846
9847
9848
9849 use_additional=yes
9850
9851 acl_save_prefix="$prefix"
9852 prefix="$acl_final_prefix"
9853 acl_save_exec_prefix="$exec_prefix"
9854 exec_prefix="$acl_final_exec_prefix"
9855
9856 eval additional_includedir=\"$includedir\"
9857 eval additional_libdir=\"$libdir\"
9858
9859 exec_prefix="$acl_save_exec_prefix"
9860 prefix="$acl_save_prefix"
9861
9862
9863# Check whether --with-libmpfr-prefix was given.
9864if test "${with_libmpfr_prefix+set}" = set; then :
9865 withval=$with_libmpfr_prefix;
9866 if test "X$withval" = "Xno"; then
9867 use_additional=no
9868 else
9869 if test "X$withval" = "X"; then
9870
9871 acl_save_prefix="$prefix"
9872 prefix="$acl_final_prefix"
9873 acl_save_exec_prefix="$exec_prefix"
9874 exec_prefix="$acl_final_exec_prefix"
9875
9876 eval additional_includedir=\"$includedir\"
9877 eval additional_libdir=\"$libdir\"
9878
9879 exec_prefix="$acl_save_exec_prefix"
9880 prefix="$acl_save_prefix"
9881
9882 else
9883 additional_includedir="$withval/include"
9884 additional_libdir="$withval/lib"
9885 fi
9886 fi
9887
9888fi
9889
9890 LIBMPFR=
9891 LTLIBMPFR=
9892 INCMPFR=
9893 rpathdirs=
9894 ltrpathdirs=
9895 names_already_handled=
da658607 9896 names_next_round='mpfr gmp'
2400729e
UW
9897 while test -n "$names_next_round"; do
9898 names_this_round="$names_next_round"
9899 names_next_round=
9900 for name in $names_this_round; do
9901 already_handled=
9902 for n in $names_already_handled; do
9903 if test "$n" = "$name"; then
9904 already_handled=yes
9905 break
9906 fi
9907 done
9908 if test -z "$already_handled"; then
9909 names_already_handled="$names_already_handled $name"
9910 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9911 eval value=\"\$HAVE_LIB$uppername\"
9912 if test -n "$value"; then
9913 if test "$value" = yes; then
9914 eval value=\"\$LIB$uppername\"
9915 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
9916 eval value=\"\$LTLIB$uppername\"
9917 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
9918 else
9919 :
9920 fi
9921 else
9922 found_dir=
9923 found_la=
9924 found_so=
9925 found_a=
9926 if test $use_additional = yes; then
9927 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9928 found_dir="$additional_libdir"
9929 found_so="$additional_libdir/lib$name.$shlibext"
9930 if test -f "$additional_libdir/lib$name.la"; then
9931 found_la="$additional_libdir/lib$name.la"
9932 fi
9933 else
9934 if test -f "$additional_libdir/lib$name.$libext"; then
9935 found_dir="$additional_libdir"
9936 found_a="$additional_libdir/lib$name.$libext"
9937 if test -f "$additional_libdir/lib$name.la"; then
9938 found_la="$additional_libdir/lib$name.la"
9939 fi
9940 fi
9941 fi
9942 fi
9943 if test "X$found_dir" = "X"; then
9944 for x in $LDFLAGS $LTLIBMPFR; do
9945
9946 acl_save_prefix="$prefix"
9947 prefix="$acl_final_prefix"
9948 acl_save_exec_prefix="$exec_prefix"
9949 exec_prefix="$acl_final_exec_prefix"
9950 eval x=\"$x\"
9951 exec_prefix="$acl_save_exec_prefix"
9952 prefix="$acl_save_prefix"
9953
9954 case "$x" in
9955 -L*)
9956 dir=`echo "X$x" | sed -e 's/^X-L//'`
9957 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9958 found_dir="$dir"
9959 found_so="$dir/lib$name.$shlibext"
9960 if test -f "$dir/lib$name.la"; then
9961 found_la="$dir/lib$name.la"
9962 fi
9963 else
9964 if test -f "$dir/lib$name.$libext"; then
9965 found_dir="$dir"
9966 found_a="$dir/lib$name.$libext"
9967 if test -f "$dir/lib$name.la"; then
9968 found_la="$dir/lib$name.la"
9969 fi
9970 fi
9971 fi
9972 ;;
9973 esac
9974 if test "X$found_dir" != "X"; then
9975 break
9976 fi
9977 done
9978 fi
9979 if test "X$found_dir" != "X"; then
9980 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
9981 if test "X$found_so" != "X"; then
9982 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9983 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9984 else
9985 haveit=
9986 for x in $ltrpathdirs; do
9987 if test "X$x" = "X$found_dir"; then
9988 haveit=yes
9989 break
9990 fi
9991 done
9992 if test -z "$haveit"; then
9993 ltrpathdirs="$ltrpathdirs $found_dir"
9994 fi
9995 if test "$hardcode_direct" = yes; then
9996 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9997 else
9998 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9999 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10000 haveit=
10001 for x in $rpathdirs; do
10002 if test "X$x" = "X$found_dir"; then
10003 haveit=yes
10004 break
10005 fi
10006 done
10007 if test -z "$haveit"; then
10008 rpathdirs="$rpathdirs $found_dir"
10009 fi
10010 else
10011 haveit=
10012 for x in $LDFLAGS $LIBMPFR; do
10013
10014 acl_save_prefix="$prefix"
10015 prefix="$acl_final_prefix"
10016 acl_save_exec_prefix="$exec_prefix"
10017 exec_prefix="$acl_final_exec_prefix"
10018 eval x=\"$x\"
10019 exec_prefix="$acl_save_exec_prefix"
10020 prefix="$acl_save_prefix"
10021
10022 if test "X$x" = "X-L$found_dir"; then
10023 haveit=yes
10024 break
10025 fi
10026 done
10027 if test -z "$haveit"; then
10028 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
10029 fi
10030 if test "$hardcode_minus_L" != no; then
10031 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10032 else
10033 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10034 fi
10035 fi
10036 fi
10037 fi
10038 else
10039 if test "X$found_a" != "X"; then
10040 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
10041 else
10042 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
10043 fi
10044 fi
10045 additional_includedir=
10046 case "$found_dir" in
10047 */lib | */lib/)
10048 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10049 additional_includedir="$basedir/include"
10050 ;;
10051 esac
10052 if test "X$additional_includedir" != "X"; then
10053 if test "X$additional_includedir" != "X/usr/include"; then
10054 haveit=
10055 if test "X$additional_includedir" = "X/usr/local/include"; then
10056 if test -n "$GCC"; then
10057 case $host_os in
10058 linux*) haveit=yes;;
10059 esac
10060 fi
10061 fi
10062 if test -z "$haveit"; then
10063 for x in $CPPFLAGS $INCMPFR; do
10064
10065 acl_save_prefix="$prefix"
10066 prefix="$acl_final_prefix"
10067 acl_save_exec_prefix="$exec_prefix"
10068 exec_prefix="$acl_final_exec_prefix"
10069 eval x=\"$x\"
10070 exec_prefix="$acl_save_exec_prefix"
10071 prefix="$acl_save_prefix"
10072
10073 if test "X$x" = "X-I$additional_includedir"; then
10074 haveit=yes
10075 break
10076 fi
10077 done
10078 if test -z "$haveit"; then
10079 if test -d "$additional_includedir"; then
10080 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10081 fi
10082 fi
10083 fi
10084 fi
10085 fi
10086 if test -n "$found_la"; then
10087 save_libdir="$libdir"
10088 case "$found_la" in
10089 */* | *\\*) . "$found_la" ;;
10090 *) . "./$found_la" ;;
10091 esac
10092 libdir="$save_libdir"
10093 for dep in $dependency_libs; do
10094 case "$dep" in
10095 -L*)
10096 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10097 if test "X$additional_libdir" != "X/usr/lib"; then
10098 haveit=
10099 if test "X$additional_libdir" = "X/usr/local/lib"; then
10100 if test -n "$GCC"; then
10101 case $host_os in
10102 linux*) haveit=yes;;
10103 esac
10104 fi
10105 fi
10106 if test -z "$haveit"; then
10107 haveit=
10108 for x in $LDFLAGS $LIBMPFR; do
10109
10110 acl_save_prefix="$prefix"
10111 prefix="$acl_final_prefix"
10112 acl_save_exec_prefix="$exec_prefix"
10113 exec_prefix="$acl_final_exec_prefix"
10114 eval x=\"$x\"
10115 exec_prefix="$acl_save_exec_prefix"
10116 prefix="$acl_save_prefix"
10117
10118 if test "X$x" = "X-L$additional_libdir"; then
10119 haveit=yes
10120 break
10121 fi
10122 done
10123 if test -z "$haveit"; then
10124 if test -d "$additional_libdir"; then
10125 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10126 fi
10127 fi
10128 haveit=
10129 for x in $LDFLAGS $LTLIBMPFR; do
10130
10131 acl_save_prefix="$prefix"
10132 prefix="$acl_final_prefix"
10133 acl_save_exec_prefix="$exec_prefix"
10134 exec_prefix="$acl_final_exec_prefix"
10135 eval x=\"$x\"
10136 exec_prefix="$acl_save_exec_prefix"
10137 prefix="$acl_save_prefix"
10138
10139 if test "X$x" = "X-L$additional_libdir"; then
10140 haveit=yes
10141 break
10142 fi
10143 done
10144 if test -z "$haveit"; then
10145 if test -d "$additional_libdir"; then
10146 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10147 fi
10148 fi
10149 fi
10150 fi
10151 ;;
10152 -R*)
10153 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10154 if test "$enable_rpath" != no; then
10155 haveit=
10156 for x in $rpathdirs; do
10157 if test "X$x" = "X$dir"; then
10158 haveit=yes
10159 break
10160 fi
10161 done
10162 if test -z "$haveit"; then
10163 rpathdirs="$rpathdirs $dir"
10164 fi
10165 haveit=
10166 for x in $ltrpathdirs; do
10167 if test "X$x" = "X$dir"; then
10168 haveit=yes
10169 break
10170 fi
10171 done
10172 if test -z "$haveit"; then
10173 ltrpathdirs="$ltrpathdirs $dir"
10174 fi
10175 fi
10176 ;;
10177 -l*)
10178 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10179 ;;
10180 *.la)
10181 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10182 ;;
10183 *)
10184 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10185 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10186 ;;
10187 esac
10188 done
10189 fi
10190 else
10191 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10192 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10193 fi
10194 fi
10195 fi
10196 done
10197 done
10198 if test "X$rpathdirs" != "X"; then
10199 if test -n "$hardcode_libdir_separator"; then
10200 alldirs=
10201 for found_dir in $rpathdirs; do
10202 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10203 done
10204 acl_save_libdir="$libdir"
10205 libdir="$alldirs"
10206 eval flag=\"$hardcode_libdir_flag_spec\"
10207 libdir="$acl_save_libdir"
10208 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10209 else
10210 for found_dir in $rpathdirs; do
10211 acl_save_libdir="$libdir"
10212 libdir="$found_dir"
10213 eval flag=\"$hardcode_libdir_flag_spec\"
10214 libdir="$acl_save_libdir"
10215 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10216 done
10217 fi
10218 fi
10219 if test "X$ltrpathdirs" != "X"; then
10220 for found_dir in $ltrpathdirs; do
10221 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10222 done
10223 fi
10224
10225
10226 ac_save_CPPFLAGS="$CPPFLAGS"
10227
10228 for element in $INCMPFR; do
10229 haveit=
10230 for x in $CPPFLAGS; do
10231
10232 acl_save_prefix="$prefix"
10233 prefix="$acl_final_prefix"
10234 acl_save_exec_prefix="$exec_prefix"
10235 exec_prefix="$acl_final_exec_prefix"
10236 eval x=\"$x\"
10237 exec_prefix="$acl_save_exec_prefix"
10238 prefix="$acl_save_prefix"
10239
10240 if test "X$x" = "X$element"; then
10241 haveit=yes
10242 break
10243 fi
10244 done
10245 if test -z "$haveit"; then
10246 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10247 fi
10248 done
10249
10250
10251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10252$as_echo_n "checking for libmpfr... " >&6; }
d0ac1c44 10253if ${ac_cv_libmpfr+:} false; then :
2400729e
UW
10254 $as_echo_n "(cached) " >&6
10255else
10256
10257 ac_save_LIBS="$LIBS"
10258 LIBS="$LIBS $LIBMPFR"
10259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10260/* end confdefs.h. */
10261#include <mpfr.h>
10262int
10263main ()
10264{
10265mpfr_exp_t exp; mpfr_t x;
10266 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10267 ;
10268 return 0;
10269}
10270_ACEOF
10271if ac_fn_c_try_link "$LINENO"; then :
10272 ac_cv_libmpfr=yes
10273else
10274 ac_cv_libmpfr=no
10275fi
10276rm -f core conftest.err conftest.$ac_objext \
10277 conftest$ac_exeext conftest.$ac_ext
10278 LIBS="$ac_save_LIBS"
10279
10280fi
10281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10282$as_echo "$ac_cv_libmpfr" >&6; }
10283 if test "$ac_cv_libmpfr" = yes; then
10284 HAVE_LIBMPFR=yes
10285
10286$as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10287
10288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10289$as_echo_n "checking how to link with libmpfr... " >&6; }
10290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10291$as_echo "$LIBMPFR" >&6; }
10292 else
10293 HAVE_LIBMPFR=no
10294 CPPFLAGS="$ac_save_CPPFLAGS"
10295 LIBMPFR=
10296 LTLIBMPFR=
10297 fi
10298
10299
10300
10301
10302
10303
10304 if test "$HAVE_LIBMPFR" != yes; then
10305 if test "$with_mpfr" = yes; then
d0ac1c44 10306 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
2400729e
UW
10307 else
10308 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10309$as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10310 fi
10311 fi
10312fi
10313
d344e670
DE
10314# --------------------- #
10315# Check for libpython. #
10316# --------------------- #
10317
a9322a30 10318
a9322a30
TT
10319
10320
ec685c5e 10321
0c4a4063 10322
81ecdfbb
RW
10323# Check whether --with-python was given.
10324if test "${with_python+set}" = set; then :
10325 withval=$with_python;
bec39cab 10326else
81ecdfbb 10327 with_python=auto
bec39cab 10328fi
bec39cab 10329
81ecdfbb
RW
10330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10331$as_echo_n "checking whether to use python... " >&6; }
10332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10333$as_echo "$with_python" >&6; }
9a156167 10334
81ecdfbb
RW
10335if test "${with_python}" = no; then
10336 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10337$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10338 have_libpython=no
bec39cab 10339else
81ecdfbb 10340 case "${with_python}" in
8c85a4e2 10341 [\\/]* | ?:[\\/]*)
ec685c5e
DE
10342 if test -d ${with_python}; then
10343 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10344 python_prog="${with_python}/bin/python"
0c4a4063 10345 python_prefix=
9c4ea6c5
JB
10346 # If python does not exit ${with_python}/bin, then try in
10347 # ${with_python}. On Windows/MinGW, this is where the Python
10348 # executable is.
10349 if test ! -x "${python_prog}"; then
10350 python_prog="${with_python}/python"
10351 python_prefix=
10352 fi
e7a30f46 10353 if test ! -x "${python_prog}"; then
ec685c5e
DE
10354 # Fall back to gdb 7.0/7.1 behaviour.
10355 python_prog=missing
0c4a4063 10356 python_prefix=${with_python}
ec685c5e 10357 fi
e7a30f46 10358 elif test -x "${with_python}"; then
ec685c5e
DE
10359 # While we can't run python compiled for $host (unless host == build),
10360 # the user could write a script that provides the needed information,
10361 # so we support that.
ec685c5e 10362 python_prog=${with_python}
0c4a4063 10363 python_prefix=
ec685c5e 10364 else
d0ac1c44 10365 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
ec685c5e 10366 fi
81ecdfbb 10367 ;;
ec685c5e
DE
10368 */*)
10369 # Disallow --with-python=foo/bar.
d0ac1c44 10370 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
81ecdfbb 10371 ;;
ec685c5e
DE
10372 *)
10373 # The user has either specified auto, yes, or the name of the python
10374 # program assumed to be in $PATH.
10375 python_prefix=
10376 case "${with_python}" in
10377 yes | auto)
10378 if test ${build} = ${host}; then
10379 # Extract the first word of "python", so it can be a program name with args.
10380set dummy python; ac_word=$2
10381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10382$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10383if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10384 $as_echo_n "(cached) " >&6
10385else
10386 case $python_prog_path in
10387 [\\/]* | ?:[\\/]*)
10388 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10389 ;;
10390 *)
10391 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10392for as_dir in $PATH
10393do
10394 IFS=$as_save_IFS
10395 test -z "$as_dir" && as_dir=.
10396 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10397 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10398 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10399 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10400 break 2
10401 fi
10402done
10403 done
10404IFS=$as_save_IFS
10405
10406 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10407 ;;
10408esac
10409fi
10410python_prog_path=$ac_cv_path_python_prog_path
10411if test -n "$python_prog_path"; then
10412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10413$as_echo "$python_prog_path" >&6; }
10414else
10415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10416$as_echo "no" >&6; }
10417fi
10418
10419
10420 if test "${python_prog_path}" = missing; then
10421 python_prog=missing
10422 else
10423 python_prog=${python_prog_path}
10424 fi
10425 else
10426 # Not much we can do except assume the cross-compiler will find the
10427 # right files.
10428 python_prog=missing
10429 fi
10430 ;;
10431 *)
10432 # While we can't run python compiled for $host (unless host == build),
10433 # the user could write a script that provides the needed information,
10434 # so we support that.
10435 python_prog="${with_python}"
10436 # Extract the first word of "${python_prog}", so it can be a program name with args.
10437set dummy ${python_prog}; ac_word=$2
10438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10439$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10440if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10441 $as_echo_n "(cached) " >&6
10442else
10443 case $python_prog_path in
10444 [\\/]* | ?:[\\/]*)
10445 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10446 ;;
10447 *)
10448 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10449for as_dir in $PATH
10450do
10451 IFS=$as_save_IFS
10452 test -z "$as_dir" && as_dir=.
10453 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10454 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10455 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10456 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10457 break 2
10458 fi
10459done
10460 done
10461IFS=$as_save_IFS
10462
10463 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10464 ;;
10465esac
10466fi
10467python_prog_path=$ac_cv_path_python_prog_path
10468if test -n "$python_prog_path"; then
10469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10470$as_echo "$python_prog_path" >&6; }
10471else
10472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10473$as_echo "no" >&6; }
10474fi
10475
10476
10477 if test "${python_prog_path}" = missing; then
d0ac1c44 10478 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
ec685c5e
DE
10479 fi
10480 ;;
10481 esac
81ecdfbb
RW
10482 esac
10483
ec685c5e 10484 if test "${python_prog}" != missing; then
e7a30f46
DE
10485 # We have a python program to use, but it may be too old.
10486 # Don't flag an error for --with-python=auto (the default).
10487 have_python_config=yes
ec685c5e
DE
10488 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10489 if test $? != 0; then
e7a30f46
DE
10490 have_python_config=failed
10491 if test "${with_python}" != auto; then
d0ac1c44 10492 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
e7a30f46 10493 fi
ec685c5e
DE
10494 fi
10495 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10496 if test $? != 0; then
e7a30f46
DE
10497 have_python_config=failed
10498 if test "${with_python}" != auto; then
d0ac1c44 10499 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
e7a30f46 10500 fi
ec685c5e 10501 fi
0c4a4063
DE
10502 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10503 if test $? != 0; then
e7a30f46
DE
10504 have_python_config=failed
10505 if test "${with_python}" != auto; then
d0ac1c44 10506 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
e7a30f46 10507 fi
0c4a4063 10508 fi
ec685c5e 10509 else
ac534cba
JB
10510 # We do not have a python executable we can use to determine where
10511 # to find the Python headers and libs. We cannot guess the include
10512 # path from the python_prefix either, because that include path
10513 # depends on the Python version. So, there is nothing much we can
10514 # do except assume that the compiler will be able to find those files.
10515 python_includes=
10516 python_libs=
0c4a4063 10517 have_python_config=no
ec685c5e 10518 fi
bec39cab 10519
ec685c5e
DE
10520 # If we have python-config, only try the configuration it provides.
10521 # Otherwise fallback on the old way of trying different versions of
10522 # python in turn.
81ecdfbb 10523
ec685c5e
DE
10524 have_libpython=no
10525 if test "${have_python_config}" = yes; then
c1039e3c
JB
10526 # Determine the Python version by extracting "-lpython<version>"
10527 # part of the python_libs. <version> is usually X.Y with X and Y
10528 # being decimal numbers, but can also be XY (seen on Windows).
10529 #
10530 # The extraction is performed using sed with a regular expression.
10531 # Initially, the regexp used was using the '?' quantifier to make
10532 # the dot in the version number optional. Unfortunately, this
10533 # does not work with non-GNU versions of sed because, because of
10534 # what looks like a limitation (the '?' quantifier does not work
10535 # with back-references). We work around this limitation by using
10536 # the '*' quantifier instead. It means that, in theory, we might
10537 # match unexpected version strings such as "-lpython2..7", but
10538 # this seems unlikely in practice. And even if that happens,
10539 # an error will be triggered later on, when checking that version
10540 # number.
ec685c5e 10541 python_version=`echo " ${python_libs} " \
c1039e3c 10542 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
10543 case "${python_version}" in
10544 python*)
ec685c5e
DE
10545
10546 version=${python_version}
10547
10548 new_CPPFLAGS=${python_includes}
10549 new_LIBS=${python_libs}
81ecdfbb
RW
10550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10551$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10552 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10553 save_LIBS=$LIBS
ec685c5e 10554 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10555 LIBS="$new_LIBS $LIBS"
ec685c5e 10556 found_usable_python=no
81ecdfbb 10557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10558/* end confdefs.h. */
ac534cba 10559#include "Python.h"
81ecdfbb
RW
10560int
10561main ()
10562{
10563Py_Initialize ();
10564 ;
10565 return 0;
10566}
bec39cab 10567_ACEOF
81ecdfbb 10568if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10569 have_libpython=${version}
10570 found_usable_python=yes
ac534cba
JB
10571 PYTHON_CPPFLAGS=$new_CPPFLAGS
10572 PYTHON_LIBS=$new_LIBS
9a156167 10573fi
81ecdfbb
RW
10574rm -f core conftest.err conftest.$ac_objext \
10575 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10576 CPPFLAGS=$save_CPPFLAGS
10577 LIBS=$save_LIBS
ec685c5e
DE
10578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10579$as_echo "${found_usable_python}" >&6; }
9a156167 10580
0c4a4063
DE
10581 ;;
10582 *)
d0ac1c44 10583 as_fn_error $? "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
10584 ;;
10585 esac
e7a30f46 10586 elif test "${have_python_config}" != failed; then
ec685c5e 10587 if test "${have_libpython}" = no; then
9a156167 10588
420697bb
TT
10589 version=python2.7
10590
10591 new_CPPFLAGS=${python_includes}
bf27f0e2 10592 new_LIBS="-lpython2.7 ${python_libs}"
420697bb
TT
10593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10594$as_echo_n "checking for ${version}... " >&6; }
10595 save_CPPFLAGS=$CPPFLAGS
10596 save_LIBS=$LIBS
10597 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10598 LIBS="$new_LIBS $LIBS"
420697bb
TT
10599 found_usable_python=no
10600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10601/* end confdefs.h. */
ac534cba 10602#include "Python.h"
420697bb
TT
10603int
10604main ()
10605{
10606Py_Initialize ();
10607 ;
10608 return 0;
10609}
10610_ACEOF
10611if ac_fn_c_try_link "$LINENO"; then :
10612 have_libpython=${version}
10613 found_usable_python=yes
ac534cba
JB
10614 PYTHON_CPPFLAGS=$new_CPPFLAGS
10615 PYTHON_LIBS=$new_LIBS
420697bb
TT
10616fi
10617rm -f core conftest.err conftest.$ac_objext \
10618 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10619 CPPFLAGS=$save_CPPFLAGS
10620 LIBS=$save_LIBS
420697bb
TT
10621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10622$as_echo "${found_usable_python}" >&6; }
10623
10624 fi
10625 if test "${have_libpython}" = no; then
10626
ec685c5e
DE
10627 version=python2.6
10628
10629 new_CPPFLAGS=${python_includes}
bf27f0e2 10630 new_LIBS="-lpython2.6 ${python_libs}"
ec685c5e
DE
10631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10632$as_echo_n "checking for ${version}... " >&6; }
10633 save_CPPFLAGS=$CPPFLAGS
10634 save_LIBS=$LIBS
10635 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10636 LIBS="$new_LIBS $LIBS"
ec685c5e
DE
10637 found_usable_python=no
10638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10639/* end confdefs.h. */
ac534cba 10640#include "Python.h"
ec685c5e
DE
10641int
10642main ()
10643{
10644Py_Initialize ();
10645 ;
10646 return 0;
10647}
10648_ACEOF
10649if ac_fn_c_try_link "$LINENO"; then :
10650 have_libpython=${version}
10651 found_usable_python=yes
ac534cba
JB
10652 PYTHON_CPPFLAGS=$new_CPPFLAGS
10653 PYTHON_LIBS=$new_LIBS
ec685c5e 10654fi
81ecdfbb
RW
10655rm -f core conftest.err conftest.$ac_objext \
10656 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10657 CPPFLAGS=$save_CPPFLAGS
10658 LIBS=$save_LIBS
ec685c5e
DE
10659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10660$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10661
ec685c5e
DE
10662 fi
10663 fi
9c4ea6c5 10664 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
10665
10666$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
10667
9c4ea6c5 10668 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
10669
10670$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
10671
81ecdfbb 10672 fi
ec685c5e
DE
10673
10674 if test "${have_libpython}" = no; then
81ecdfbb
RW
10675 case "${with_python}" in
10676 yes)
d0ac1c44 10677 as_fn_error $? "python is missing or unusable" "$LINENO" 5
81ecdfbb
RW
10678 ;;
10679 auto)
10680 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10681$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10682 ;;
10683 *)
d0ac1c44 10684 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
81ecdfbb
RW
10685 ;;
10686 esac
0c4a4063
DE
10687 else
10688 if test -n "${python_prefix}"; then
10689
10690cat >>confdefs.h <<_ACEOF
10691#define WITH_PYTHON_PATH "${python_prefix}"
10692_ACEOF
10693
10694
10695 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10696 if test "x$prefix" = xNONE; then
10697 test_prefix=/usr/local
10698 else
10699 test_prefix=$prefix
10700 fi
10701 else
10702 test_prefix=$exec_prefix
10703 fi
10704 value=0
10705 case ${python_prefix} in
10706 "${test_prefix}"|"${test_prefix}/"*|\
10707 '${exec_prefix}'|'${exec_prefix}/'*)
10708 value=1
10709 ;;
10710 esac
10711
10712cat >>confdefs.h <<_ACEOF
10713#define PYTHON_PATH_RELOCATABLE $value
10714_ACEOF
10715
10716
10717 fi
81ecdfbb 10718 fi
436868fb 10719fi
436868fb 10720
ec685c5e 10721if test "${have_libpython}" != no; then
436868fb 10722
81ecdfbb 10723$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 10724
81ecdfbb
RW
10725 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10726 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10727 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 10728 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 10729 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 10730
81ecdfbb
RW
10731 # Flags needed to compile Python code (taken from python-config --cflags).
10732 # We cannot call python-config directly because it will output whatever was
10733 # used when compiling the Python interpreter itself, including flags which
10734 # would make the python-related objects be compiled differently from the
10735 # rest of GDB (e.g., -O2 and -fPIC).
10736 if test "${GCC}" = yes; then
ae292b3a
TT
10737 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
10738 # Python headers recommend -DNDEBUG, but it's unclear if that just
10739 # refers to building Python itself. In release mode, though, it
10740 # doesn't hurt for the Python code in gdb to follow.
10741 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
81ecdfbb 10742 fi
436868fb 10743
81ecdfbb
RW
10744 if test "x${tentative_python_cflags}" != x; then
10745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10746$as_echo_n "checking compiler flags for python code... " >&6; }
10747 for flag in ${tentative_python_cflags}; do
10748 # Check that the compiler accepts it
10749 saved_CFLAGS="$CFLAGS"
10750 CFLAGS="$CFLAGS $flag"
10751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10752/* end confdefs.h. */
81ecdfbb 10753
a9322a30
TT
10754int
10755main ()
10756{
a9322a30
TT
10757
10758 ;
10759 return 0;
10760}
bec39cab 10761_ACEOF
81ecdfbb
RW
10762if ac_fn_c_try_compile "$LINENO"; then :
10763 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 10764fi
81ecdfbb
RW
10765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10766 CFLAGS="$saved_CFLAGS"
10767 done
10768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10769$as_echo "${PYTHON_CFLAGS}" >&6; }
10770 fi
043b6510 10771
c83393b9
JB
10772 # On x64 Windows, Python's include headers, and pyconfig.h in
10773 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10774 # version of Windows. Unfortunately, MS_WIN64 is only defined if
10775 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
10776 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10777 # The issue was reported to the Python community, but still isn't
10778 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10779
043b6510 10780 case "$gdb_host" in
c83393b9
JB
10781 mingw64)
10782 if test "${GCC}" = yes; then
10783 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10784 fi
10785 ;;
043b6510 10786 esac
a8db4212
YPK
10787
10788 # Note that "python -m threading" cannot be used to check for
10789 # threading support due to a bug in Python 2.7.3
10790 # (http://bugs.python.org/issue15567).
10791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
10792$as_echo_n "checking whether python supports threads... " >&6; }
10793 saved_CPPFLAGS="${CPPFLAGS}"
10794 CPPFLAGS="${PYTHON_CPPFLAGS}"
10795 # Note that the test is reversed so that python_has_threads=yes on
10796 # unexpected failures.
10797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10798/* end confdefs.h. */
10799
10800#include <Python.h>
10801#ifdef WITH_THREAD
10802# error
10803#endif
10804
10805_ACEOF
10806if ac_fn_c_try_cpp "$LINENO"; then :
10807 python_has_threads=no
10808else
10809 python_has_threads=yes
10810fi
d0ac1c44 10811rm -f conftest.err conftest.i conftest.$ac_ext
a8db4212
YPK
10812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
10813$as_echo "${python_has_threads}" >&6; }
10814 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 10815else
6dddc817
DE
10816 # Even if Python support is not compiled in, we need to have this file
10817 # included so that the "python" command, et.al., still exists.
8fd8d003 10818 CONFIG_OBS="$CONFIG_OBS python/python.o"
6dddc817 10819 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 10820fi
9a156167 10821
a4a1c157
PA
10822# Work around Python http://bugs.python.org/issue10112. See also
10823# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10824# no effect. Note that the only test after this that uses Python is
10825# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10826# run without -export-dynamic too.
10827PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10828
10829
ed3ef339
DE
10830
10831
4df42755
DE
10832 if test "${have_libpython}" != no; then
10833 HAVE_PYTHON_TRUE=
10834 HAVE_PYTHON_FALSE='#'
10835else
10836 HAVE_PYTHON_TRUE='#'
10837 HAVE_PYTHON_FALSE=
10838fi
10839
ed3ef339
DE
10840
10841# -------------------- #
10842# Check for libguile. #
10843# -------------------- #
10844
10845
e1402065
DE
10846
10847
10848
10849
10850# Check whether --with-guile was given.
10851if test "${with_guile+set}" = set; then :
10852 withval=$with_guile;
10853else
10854 with_guile=auto
10855fi
10856
10857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10858$as_echo_n "checking whether to use guile... " >&6; }
10859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10860$as_echo "$with_guile" >&6; }
10861
ed3ef339
DE
10862# Extract the first word of "pkg-config", so it can be a program name with args.
10863set dummy pkg-config; ac_word=$2
10864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10865$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10866if ${ac_cv_path_pkg_config_prog_path+:} false; then :
ed3ef339
DE
10867 $as_echo_n "(cached) " >&6
10868else
10869 case $pkg_config_prog_path in
10870 [\\/]* | ?:[\\/]*)
10871 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10872 ;;
10873 *)
10874 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10875for as_dir in $PATH
10876do
10877 IFS=$as_save_IFS
10878 test -z "$as_dir" && as_dir=.
10879 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10880 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ed3ef339
DE
10881 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10882 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10883 break 2
10884 fi
10885done
10886 done
10887IFS=$as_save_IFS
10888
10889 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10890 ;;
10891esac
10892fi
10893pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10894if test -n "$pkg_config_prog_path"; then
10895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10896$as_echo "$pkg_config_prog_path" >&6; }
10897else
10898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10899$as_echo "no" >&6; }
10900fi
10901
10902
10903
6e66f753 10904try_guile_versions="guile-2.0"
ed3ef339
DE
10905have_libguile=no
10906case "${with_guile}" in
10907no)
10908 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10909$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10910 ;;
10911auto)
e1402065
DE
10912 if test "${pkg_config_prog_path}" = "missing"; then
10913 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10914$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10915 else
ed3ef339
DE
10916
10917 pkg_config=${pkg_config_prog_path}
10918 guile_version_list=${try_guile_versions}
10919 flag_errors=no
10920
ed3ef339
DE
10921 found_usable_guile=checking
10922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10923$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10924 for guile_version in ${guile_version_list}; do
10925 ${pkg_config} --exists ${guile_version} 2>/dev/null
10926 if test $? != 0; then
10927 continue
10928 fi
10929 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10930 if test $? != 0; then
d0ac1c44 10931 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
10932 fi
10933 new_LIBS=`${pkg_config} --libs ${guile_version}`
10934 if test $? != 0; then
d0ac1c44 10935 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
10936 fi
10937 found_usable_guile=${guile_version}
10938 break
10939 done
10940 if test "${found_usable_guile}" = "checking"; then
10941 if test "${flag_errors}" = "yes"; then
d0ac1c44 10942 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
10943 else
10944 found_usable_guile=no
10945 fi
10946 fi
10947 if test "${found_usable_guile}" != no; then
10948 save_CPPFLAGS=$CPPFLAGS
10949 save_LIBS=$LIBS
10950 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10951 LIBS="$LIBS $new_LIBS"
10952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10953/* end confdefs.h. */
10954#include "libguile.h"
10955int
10956main ()
10957{
10958scm_init_guile ();
10959 ;
10960 return 0;
10961}
10962_ACEOF
10963if ac_fn_c_try_link "$LINENO"; then :
10964 have_libguile=yes
10965 GUILE_CPPFLAGS=$new_CPPFLAGS
10966 GUILE_LIBS=$new_LIBS
10967else
10968 found_usable_guile=no
10969fi
10970rm -f core conftest.err conftest.$ac_objext \
10971 conftest$ac_exeext conftest.$ac_ext
92fab5a6 10972 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 10973if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
10974
10975$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10976
10977
10978fi
10979
ed3ef339
DE
10980 CPPFLAGS=$save_CPPFLAGS
10981 LIBS=$save_LIBS
10982 if test "${found_usable_guile}" = no; then
10983 if test "${flag_errors}" = yes; then
10984 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10985$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
10986as_fn_error $? "linking guile version ${guile_version} test program failed
10987See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
10988 fi
10989 fi
10990 fi
10991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10992$as_echo "${found_usable_guile}" >&6; }
10993
e1402065 10994 fi
ed3ef339
DE
10995 ;;
10996yes)
e1402065 10997 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 10998 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 10999 fi
ed3ef339
DE
11000
11001 pkg_config=${pkg_config_prog_path}
11002 guile_version_list=${try_guile_versions}
11003 flag_errors=yes
11004
ed3ef339
DE
11005 found_usable_guile=checking
11006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11007$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11008 for guile_version in ${guile_version_list}; do
11009 ${pkg_config} --exists ${guile_version} 2>/dev/null
11010 if test $? != 0; then
11011 continue
11012 fi
11013 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11014 if test $? != 0; then
d0ac1c44 11015 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11016 fi
11017 new_LIBS=`${pkg_config} --libs ${guile_version}`
11018 if test $? != 0; then
d0ac1c44 11019 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11020 fi
11021 found_usable_guile=${guile_version}
11022 break
11023 done
11024 if test "${found_usable_guile}" = "checking"; then
11025 if test "${flag_errors}" = "yes"; then
d0ac1c44 11026 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11027 else
11028 found_usable_guile=no
11029 fi
11030 fi
11031 if test "${found_usable_guile}" != no; then
11032 save_CPPFLAGS=$CPPFLAGS
11033 save_LIBS=$LIBS
11034 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11035 LIBS="$LIBS $new_LIBS"
11036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11037/* end confdefs.h. */
11038#include "libguile.h"
11039int
11040main ()
11041{
11042scm_init_guile ();
11043 ;
11044 return 0;
11045}
11046_ACEOF
11047if ac_fn_c_try_link "$LINENO"; then :
11048 have_libguile=yes
11049 GUILE_CPPFLAGS=$new_CPPFLAGS
11050 GUILE_LIBS=$new_LIBS
11051else
11052 found_usable_guile=no
11053fi
11054rm -f core conftest.err conftest.$ac_objext \
11055 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11056 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11057if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11058
11059$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11060
11061
11062fi
11063
ed3ef339
DE
11064 CPPFLAGS=$save_CPPFLAGS
11065 LIBS=$save_LIBS
11066 if test "${found_usable_guile}" = no; then
11067 if test "${flag_errors}" = yes; then
11068 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11069$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11070as_fn_error $? "linking guile version ${guile_version} test program failed
11071See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11072 fi
11073 fi
11074 fi
11075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11076$as_echo "${found_usable_guile}" >&6; }
11077
11078 ;;
11079[\\/]* | ?:[\\/]*)
e1402065 11080 if test -x "${with_guile}"; then
ed3ef339
DE
11081
11082 pkg_config=${with_guile}
11083 guile_version_list=${try_guile_versions}
11084 flag_errors=yes
11085
ed3ef339
DE
11086 found_usable_guile=checking
11087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11088$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11089 for guile_version in ${guile_version_list}; do
11090 ${pkg_config} --exists ${guile_version} 2>/dev/null
11091 if test $? != 0; then
11092 continue
11093 fi
11094 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11095 if test $? != 0; then
d0ac1c44 11096 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11097 fi
11098 new_LIBS=`${pkg_config} --libs ${guile_version}`
11099 if test $? != 0; then
d0ac1c44 11100 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11101 fi
11102 found_usable_guile=${guile_version}
11103 break
11104 done
11105 if test "${found_usable_guile}" = "checking"; then
11106 if test "${flag_errors}" = "yes"; then
d0ac1c44 11107 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11108 else
11109 found_usable_guile=no
11110 fi
11111 fi
11112 if test "${found_usable_guile}" != no; then
11113 save_CPPFLAGS=$CPPFLAGS
11114 save_LIBS=$LIBS
11115 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11116 LIBS="$LIBS $new_LIBS"
11117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11118/* end confdefs.h. */
11119#include "libguile.h"
11120int
11121main ()
11122{
11123scm_init_guile ();
11124 ;
11125 return 0;
11126}
11127_ACEOF
11128if ac_fn_c_try_link "$LINENO"; then :
11129 have_libguile=yes
11130 GUILE_CPPFLAGS=$new_CPPFLAGS
11131 GUILE_LIBS=$new_LIBS
11132else
11133 found_usable_guile=no
11134fi
11135rm -f core conftest.err conftest.$ac_objext \
11136 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11137 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11138if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11139
11140$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11141
11142
11143fi
11144
ed3ef339
DE
11145 CPPFLAGS=$save_CPPFLAGS
11146 LIBS=$save_LIBS
11147 if test "${found_usable_guile}" = no; then
11148 if test "${flag_errors}" = yes; then
11149 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11150$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11151as_fn_error $? "linking guile version ${guile_version} test program failed
11152See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11153 fi
11154 fi
11155 fi
11156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11157$as_echo "${found_usable_guile}" >&6; }
11158
e1402065 11159 else
d0ac1c44 11160 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
e1402065 11161 fi
ed3ef339
DE
11162 ;;
11163"" | */*)
11164 # Disallow --with=guile="" and --with-guile=foo/bar.
d0ac1c44 11165 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
ed3ef339
DE
11166 ;;
11167*)
11168 # A space separate list of guile versions to try, in order.
e1402065 11169 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11170 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11171 fi
ed3ef339
DE
11172
11173 pkg_config=${pkg_config_prog_path}
11174 guile_version_list=${with_guile}
11175 flag_errors=yes
11176
ed3ef339
DE
11177 found_usable_guile=checking
11178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11179$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11180 for guile_version in ${guile_version_list}; do
11181 ${pkg_config} --exists ${guile_version} 2>/dev/null
11182 if test $? != 0; then
11183 continue
11184 fi
11185 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11186 if test $? != 0; then
d0ac1c44 11187 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11188 fi
11189 new_LIBS=`${pkg_config} --libs ${guile_version}`
11190 if test $? != 0; then
d0ac1c44 11191 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11192 fi
11193 found_usable_guile=${guile_version}
11194 break
11195 done
11196 if test "${found_usable_guile}" = "checking"; then
11197 if test "${flag_errors}" = "yes"; then
d0ac1c44 11198 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11199 else
11200 found_usable_guile=no
11201 fi
11202 fi
11203 if test "${found_usable_guile}" != no; then
11204 save_CPPFLAGS=$CPPFLAGS
11205 save_LIBS=$LIBS
11206 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11207 LIBS="$LIBS $new_LIBS"
11208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11209/* end confdefs.h. */
11210#include "libguile.h"
11211int
11212main ()
11213{
11214scm_init_guile ();
11215 ;
11216 return 0;
11217}
11218_ACEOF
11219if ac_fn_c_try_link "$LINENO"; then :
11220 have_libguile=yes
11221 GUILE_CPPFLAGS=$new_CPPFLAGS
11222 GUILE_LIBS=$new_LIBS
11223else
11224 found_usable_guile=no
11225fi
11226rm -f core conftest.err conftest.$ac_objext \
11227 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11228 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11229if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11230
11231$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11232
11233
11234fi
11235
ed3ef339
DE
11236 CPPFLAGS=$save_CPPFLAGS
11237 LIBS=$save_LIBS
11238 if test "${found_usable_guile}" = no; then
11239 if test "${flag_errors}" = yes; then
11240 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11241$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11242as_fn_error $? "linking guile version ${guile_version} test program failed
11243See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11244 fi
11245 fi
11246 fi
11247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11248$as_echo "${found_usable_guile}" >&6; }
11249
11250 ;;
11251esac
11252
e76c5d17 11253if test "${have_libguile}" != no; then
d342a0da
DE
11254 case "${with_guile}" in
11255 [\\/]* | ?:[\\/]*)
e76c5d17
DE
11256
11257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11258$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11259if ${ac_cv_guild_program_name+:} false; then :
e76c5d17
DE
11260 $as_echo_n "(cached) " >&6
11261else
d342a0da 11262 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
11263
11264 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11265 # the 'guild' and 'bindir' variables. In that case, try to guess
11266 # what the program name is, at the risk of getting it wrong if
11267 # Guile was configured with '--program-suffix' or similar.
11268 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 11269 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
11270 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11271 fi
11272
11273fi
11274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11275$as_echo "$ac_cv_guild_program_name" >&6; }
11276
11277 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11278 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
e76c5d17
DE
11279 fi
11280
11281 GUILD="$ac_cv_guild_program_name"
11282
11283
d342a0da
DE
11284 ;;
11285 *)
11286
11287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11288$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11289if ${ac_cv_guild_program_name+:} false; then :
d342a0da
DE
11290 $as_echo_n "(cached) " >&6
11291else
11292 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11293
11294 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11295 # the 'guild' and 'bindir' variables. In that case, try to guess
11296 # what the program name is, at the risk of getting it wrong if
11297 # Guile was configured with '--program-suffix' or similar.
11298 if test "x$ac_cv_guild_program_name" = "x"; then
11299 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11300 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11301 fi
11302
11303fi
11304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11305$as_echo "$ac_cv_guild_program_name" >&6; }
11306
11307 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11308 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
d342a0da
DE
11309 fi
11310
11311 GUILD="$ac_cv_guild_program_name"
11312
11313
11314 ;;
11315 esac
e76c5d17
DE
11316
11317
11318 if test "$cross_compiling" = no; then
11319 GUILD_TARGET_FLAG=
11320 else
11321 GUILD_TARGET_FLAG="--target=$host"
11322 fi
11323
11324
11325
11326
11327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11328$as_echo_n "checking whether guild supports this host... " >&6; }
d0ac1c44 11329if ${ac_cv_guild_ok+:} false; then :
e76c5d17
DE
11330 $as_echo_n "(cached) " >&6
11331else
11332 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11333 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11334 ac_cv_guild_ok=yes
11335 else
11336 ac_cv_guild_ok=no
11337 fi
11338fi
11339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11340$as_echo "$ac_cv_guild_ok" >&6; }
11341
11342 if test "$ac_cv_guild_ok" = no; then
11343 have_libguile=no
11344 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11345$as_echo "$as_me: WARNING: disabling guile support" >&2;}
11346 fi
11347fi
11348
ed3ef339
DE
11349if test "${have_libguile}" != no; then
11350
11351$as_echo "#define HAVE_GUILE 1" >>confdefs.h
11352
11353 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11354 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11355 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11356 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11357 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
11358
11359 save_LIBS="$LIBS"
11360 save_CPPFLAGS="$CPPFLAGS"
11361 LIBS="$GUILE_LIBS"
11362 CPPFLAGS="$GUILE_CPPFLAGS"
11363 for ac_func in scm_new_smob
11364do :
11365 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
d0ac1c44 11366if test "x$ac_cv_func_scm_new_smob" = xyes; then :
16954d5d
LC
11367 cat >>confdefs.h <<_ACEOF
11368#define HAVE_SCM_NEW_SMOB 1
11369_ACEOF
11370
11371fi
11372done
11373
11374 LIBS="$save_LIBS"
11375 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
11376else
11377 # Even if Guile support is not compiled in, we need to have these files
11378 # included.
bd810fff 11379 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
ed3ef339
DE
11380 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11381fi
9a156167 11382
ac534cba 11383
4df42755
DE
11384 if test "${have_libguile}" != no; then
11385 HAVE_GUILE_TRUE=
11386 HAVE_GUILE_FALSE='#'
11387else
11388 HAVE_GUILE_TRUE='#'
11389 HAVE_GUILE_FALSE=
11390fi
11391
ac534cba 11392
62f29fda
TT
11393# ---------------------------- #
11394# Check for source highlight. #
11395# ---------------------------- #
11396
11397SRCHIGH_LIBS=
11398SRCHIGH_CFLAGS=
189b8c2e
ST
11399
11400# Check whether --enable-source-highlight was given.
11401if test "${enable_source_highlight+set}" = set; then :
11402 enableval=$enable_source_highlight; case "${enableval}" in
11403 yes) enable_source_highlight=yes ;;
11404 no) enable_source_highlight=no ;;
11405 *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;;
11406esac
11407else
11408 enable_source_highlight=auto
11409fi
11410
11411
11412if test "${enable_source_highlight}" != "no"; then
11413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
6c28e44a 11414$as_echo_n "checking for the source-highlight library... " >&6; }
189b8c2e
ST
11415 if test "${pkg_config_prog_path}" = "missing"; then
11416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
62f29fda 11417$as_echo "no - pkg-config not found" >&6; }
189b8c2e
ST
11418 if test "${enable_source_highlight}" = "yes"; then
11419 as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
11420 fi
11421 else
11422 if ${pkg_config_prog_path} --exists source-highlight; then
62f29fda
TT
11423 SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
11424 SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
11425
11426$as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
11427
11428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11429$as_echo "yes" >&6; }
189b8c2e 11430 else
62f29fda
TT
11431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11432$as_echo "no" >&6; }
189b8c2e
ST
11433 if test "${enable_source_highlight}" = "yes"; then
11434 as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
11435 fi
11436 fi
11437 fi
62f29fda
TT
11438fi
11439
11440
11441
d344e670
DE
11442# --------------------- #
11443# Check for libmcheck. #
11444# --------------------- #
11445
a8db4212
YPK
11446# Enable -lmcheck by default (it provides cheap-enough memory mangling),
11447# but turn it off if Python is enabled with threads, since -lmcheck is
11448# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
11449# and for releases.
17ef446e
PA
11450if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
11451 && $development; then
11452 libmcheck_default=yes
11453else
11454 libmcheck_default=no
a8db4212
YPK
11455fi
11456
17ef446e
PA
11457 # Check whether --enable-libmcheck was given.
11458if test "${enable_libmcheck+set}" = set; then :
11459 enableval=$enable_libmcheck; case "${enableval}" in
11460 yes | y) ENABLE_LIBMCHECK="yes" ;;
11461 no | n) ENABLE_LIBMCHECK="no" ;;
d0ac1c44 11462 *) as_fn_error $? "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
17ef446e
PA
11463 esac
11464fi
11465
11466
11467 if test -z "${ENABLE_LIBMCHECK}"; then
11468 ENABLE_LIBMCHECK=${libmcheck_default}
a8db4212 11469 fi
17ef446e
PA
11470
11471 if test "$ENABLE_LIBMCHECK" = "yes" ; then
11472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
a8db4212 11473$as_echo_n "checking for main in -lmcheck... " >&6; }
d0ac1c44 11474if ${ac_cv_lib_mcheck_main+:} false; then :
a8db4212
YPK
11475 $as_echo_n "(cached) " >&6
11476else
11477 ac_check_lib_save_LIBS=$LIBS
11478LIBS="-lmcheck $LIBS"
11479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11480/* end confdefs.h. */
11481
11482
11483int
11484main ()
11485{
11486return main ();
11487 ;
11488 return 0;
11489}
11490_ACEOF
11491if ac_fn_c_try_link "$LINENO"; then :
11492 ac_cv_lib_mcheck_main=yes
11493else
11494 ac_cv_lib_mcheck_main=no
11495fi
11496rm -f core conftest.err conftest.$ac_objext \
11497 conftest$ac_exeext conftest.$ac_ext
11498LIBS=$ac_check_lib_save_LIBS
11499fi
11500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
11501$as_echo "$ac_cv_lib_mcheck_main" >&6; }
d0ac1c44 11502if test "x$ac_cv_lib_mcheck_main" = xyes; then :
a8db4212
YPK
11503 cat >>confdefs.h <<_ACEOF
11504#define HAVE_LIBMCHECK 1
11505_ACEOF
11506
11507 LIBS="-lmcheck $LIBS"
11508
11509fi
11510
17ef446e
PA
11511 fi
11512
11513
11514if test "$ENABLE_LIBMCHECK" = "yes" \
11515 -a "${have_libpython}" != "no" \
11516 -a "${python_has_threads}" = "yes" ; then
11517 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
11518$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
a8db4212
YPK
11519fi
11520
58bfce93
MM
11521
11522# Check whether --with-intel_pt was given.
11523if test "${with_intel_pt+set}" = set; then :
11524 withval=$with_intel_pt;
11525else
11526 with_intel_pt=auto
11527fi
11528
11529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
11530$as_echo_n "checking whether to use intel pt... " >&6; }
11531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
11532$as_echo "$with_intel_pt" >&6; }
11533
11534if test "${with_intel_pt}" = no; then
bc504a31
PA
11535 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
11536$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
58bfce93
MM
11537 HAVE_LIBIPT=no
11538else
5599c404
MM
11539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11540/* end confdefs.h. */
11541
11542#include <linux/perf_event.h>
11543#ifndef PERF_ATTR_SIZE_VER5
11544# error
11545#endif
11546
11547_ACEOF
11548if ac_fn_c_try_cpp "$LINENO"; then :
11549 perf_event=yes
11550else
11551 perf_event=no
11552fi
d0ac1c44 11553rm -f conftest.err conftest.i conftest.$ac_ext
5599c404
MM
11554 if test "$perf_event" != yes; then
11555 if test "$with_intel_pt" = yes; then
d0ac1c44 11556 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
5599c404
MM
11557 else
11558 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
11559$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
11560 fi
11561 fi
11562
58bfce93
MM
11563
11564
11565
11566
11567
11568
11569
11570
11571 use_additional=yes
11572
11573 acl_save_prefix="$prefix"
11574 prefix="$acl_final_prefix"
11575 acl_save_exec_prefix="$exec_prefix"
11576 exec_prefix="$acl_final_exec_prefix"
11577
11578 eval additional_includedir=\"$includedir\"
11579 eval additional_libdir=\"$libdir\"
11580
11581 exec_prefix="$acl_save_exec_prefix"
11582 prefix="$acl_save_prefix"
11583
11584
11585# Check whether --with-libipt-prefix was given.
11586if test "${with_libipt_prefix+set}" = set; then :
11587 withval=$with_libipt_prefix;
11588 if test "X$withval" = "Xno"; then
11589 use_additional=no
11590 else
11591 if test "X$withval" = "X"; then
11592
11593 acl_save_prefix="$prefix"
11594 prefix="$acl_final_prefix"
11595 acl_save_exec_prefix="$exec_prefix"
11596 exec_prefix="$acl_final_exec_prefix"
11597
11598 eval additional_includedir=\"$includedir\"
11599 eval additional_libdir=\"$libdir\"
11600
11601 exec_prefix="$acl_save_exec_prefix"
11602 prefix="$acl_save_prefix"
11603
11604 else
11605 additional_includedir="$withval/include"
11606 additional_libdir="$withval/lib"
11607 fi
11608 fi
11609
11610fi
11611
11612 LIBIPT=
11613 LTLIBIPT=
11614 INCIPT=
11615 rpathdirs=
11616 ltrpathdirs=
11617 names_already_handled=
11618 names_next_round='ipt '
11619 while test -n "$names_next_round"; do
11620 names_this_round="$names_next_round"
11621 names_next_round=
11622 for name in $names_this_round; do
11623 already_handled=
11624 for n in $names_already_handled; do
11625 if test "$n" = "$name"; then
11626 already_handled=yes
11627 break
11628 fi
11629 done
11630 if test -z "$already_handled"; then
11631 names_already_handled="$names_already_handled $name"
11632 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11633 eval value=\"\$HAVE_LIB$uppername\"
11634 if test -n "$value"; then
11635 if test "$value" = yes; then
11636 eval value=\"\$LIB$uppername\"
11637 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
11638 eval value=\"\$LTLIB$uppername\"
11639 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
11640 else
11641 :
11642 fi
11643 else
11644 found_dir=
11645 found_la=
11646 found_so=
11647 found_a=
11648 if test $use_additional = yes; then
11649 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11650 found_dir="$additional_libdir"
11651 found_so="$additional_libdir/lib$name.$shlibext"
11652 if test -f "$additional_libdir/lib$name.la"; then
11653 found_la="$additional_libdir/lib$name.la"
11654 fi
11655 else
11656 if test -f "$additional_libdir/lib$name.$libext"; then
11657 found_dir="$additional_libdir"
11658 found_a="$additional_libdir/lib$name.$libext"
11659 if test -f "$additional_libdir/lib$name.la"; then
11660 found_la="$additional_libdir/lib$name.la"
11661 fi
11662 fi
11663 fi
11664 fi
11665 if test "X$found_dir" = "X"; then
11666 for x in $LDFLAGS $LTLIBIPT; do
11667
11668 acl_save_prefix="$prefix"
11669 prefix="$acl_final_prefix"
11670 acl_save_exec_prefix="$exec_prefix"
11671 exec_prefix="$acl_final_exec_prefix"
11672 eval x=\"$x\"
11673 exec_prefix="$acl_save_exec_prefix"
11674 prefix="$acl_save_prefix"
11675
11676 case "$x" in
11677 -L*)
11678 dir=`echo "X$x" | sed -e 's/^X-L//'`
11679 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11680 found_dir="$dir"
11681 found_so="$dir/lib$name.$shlibext"
11682 if test -f "$dir/lib$name.la"; then
11683 found_la="$dir/lib$name.la"
11684 fi
11685 else
11686 if test -f "$dir/lib$name.$libext"; then
11687 found_dir="$dir"
11688 found_a="$dir/lib$name.$libext"
11689 if test -f "$dir/lib$name.la"; then
11690 found_la="$dir/lib$name.la"
11691 fi
11692 fi
11693 fi
11694 ;;
11695 esac
11696 if test "X$found_dir" != "X"; then
11697 break
11698 fi
11699 done
11700 fi
11701 if test "X$found_dir" != "X"; then
11702 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
11703 if test "X$found_so" != "X"; then
11704 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11705 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11706 else
11707 haveit=
11708 for x in $ltrpathdirs; do
11709 if test "X$x" = "X$found_dir"; then
11710 haveit=yes
11711 break
11712 fi
11713 done
11714 if test -z "$haveit"; then
11715 ltrpathdirs="$ltrpathdirs $found_dir"
11716 fi
11717 if test "$hardcode_direct" = yes; then
11718 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11719 else
11720 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11721 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11722 haveit=
11723 for x in $rpathdirs; do
11724 if test "X$x" = "X$found_dir"; then
11725 haveit=yes
11726 break
11727 fi
11728 done
11729 if test -z "$haveit"; then
11730 rpathdirs="$rpathdirs $found_dir"
11731 fi
11732 else
11733 haveit=
11734 for x in $LDFLAGS $LIBIPT; do
11735
11736 acl_save_prefix="$prefix"
11737 prefix="$acl_final_prefix"
11738 acl_save_exec_prefix="$exec_prefix"
11739 exec_prefix="$acl_final_exec_prefix"
11740 eval x=\"$x\"
11741 exec_prefix="$acl_save_exec_prefix"
11742 prefix="$acl_save_prefix"
11743
11744 if test "X$x" = "X-L$found_dir"; then
11745 haveit=yes
11746 break
11747 fi
11748 done
11749 if test -z "$haveit"; then
11750 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
11751 fi
11752 if test "$hardcode_minus_L" != no; then
11753 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11754 else
11755 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11756 fi
11757 fi
11758 fi
11759 fi
11760 else
11761 if test "X$found_a" != "X"; then
11762 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
11763 else
11764 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
11765 fi
11766 fi
11767 additional_includedir=
11768 case "$found_dir" in
11769 */lib | */lib/)
11770 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11771 additional_includedir="$basedir/include"
11772 ;;
11773 esac
11774 if test "X$additional_includedir" != "X"; then
11775 if test "X$additional_includedir" != "X/usr/include"; then
11776 haveit=
11777 if test "X$additional_includedir" = "X/usr/local/include"; then
11778 if test -n "$GCC"; then
11779 case $host_os in
11780 linux*) haveit=yes;;
11781 esac
11782 fi
11783 fi
11784 if test -z "$haveit"; then
11785 for x in $CPPFLAGS $INCIPT; do
11786
11787 acl_save_prefix="$prefix"
11788 prefix="$acl_final_prefix"
11789 acl_save_exec_prefix="$exec_prefix"
11790 exec_prefix="$acl_final_exec_prefix"
11791 eval x=\"$x\"
11792 exec_prefix="$acl_save_exec_prefix"
11793 prefix="$acl_save_prefix"
11794
11795 if test "X$x" = "X-I$additional_includedir"; then
11796 haveit=yes
11797 break
11798 fi
11799 done
11800 if test -z "$haveit"; then
11801 if test -d "$additional_includedir"; then
11802 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
11803 fi
11804 fi
11805 fi
11806 fi
11807 fi
11808 if test -n "$found_la"; then
11809 save_libdir="$libdir"
11810 case "$found_la" in
11811 */* | *\\*) . "$found_la" ;;
11812 *) . "./$found_la" ;;
11813 esac
11814 libdir="$save_libdir"
11815 for dep in $dependency_libs; do
11816 case "$dep" in
11817 -L*)
11818 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11819 if test "X$additional_libdir" != "X/usr/lib"; then
11820 haveit=
11821 if test "X$additional_libdir" = "X/usr/local/lib"; then
11822 if test -n "$GCC"; then
11823 case $host_os in
11824 linux*) haveit=yes;;
11825 esac
11826 fi
11827 fi
11828 if test -z "$haveit"; then
11829 haveit=
11830 for x in $LDFLAGS $LIBIPT; do
11831
11832 acl_save_prefix="$prefix"
11833 prefix="$acl_final_prefix"
11834 acl_save_exec_prefix="$exec_prefix"
11835 exec_prefix="$acl_final_exec_prefix"
11836 eval x=\"$x\"
11837 exec_prefix="$acl_save_exec_prefix"
11838 prefix="$acl_save_prefix"
11839
11840 if test "X$x" = "X-L$additional_libdir"; then
11841 haveit=yes
11842 break
11843 fi
11844 done
11845 if test -z "$haveit"; then
11846 if test -d "$additional_libdir"; then
11847 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
11848 fi
11849 fi
11850 haveit=
11851 for x in $LDFLAGS $LTLIBIPT; do
11852
11853 acl_save_prefix="$prefix"
11854 prefix="$acl_final_prefix"
11855 acl_save_exec_prefix="$exec_prefix"
11856 exec_prefix="$acl_final_exec_prefix"
11857 eval x=\"$x\"
11858 exec_prefix="$acl_save_exec_prefix"
11859 prefix="$acl_save_prefix"
11860
11861 if test "X$x" = "X-L$additional_libdir"; then
11862 haveit=yes
11863 break
11864 fi
11865 done
11866 if test -z "$haveit"; then
11867 if test -d "$additional_libdir"; then
11868 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
11869 fi
11870 fi
11871 fi
11872 fi
11873 ;;
11874 -R*)
11875 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11876 if test "$enable_rpath" != no; then
11877 haveit=
11878 for x in $rpathdirs; do
11879 if test "X$x" = "X$dir"; then
11880 haveit=yes
11881 break
11882 fi
11883 done
11884 if test -z "$haveit"; then
11885 rpathdirs="$rpathdirs $dir"
11886 fi
11887 haveit=
11888 for x in $ltrpathdirs; do
11889 if test "X$x" = "X$dir"; then
11890 haveit=yes
11891 break
11892 fi
11893 done
11894 if test -z "$haveit"; then
11895 ltrpathdirs="$ltrpathdirs $dir"
11896 fi
11897 fi
11898 ;;
11899 -l*)
11900 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11901 ;;
11902 *.la)
11903 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11904 ;;
11905 *)
11906 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
11907 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
11908 ;;
11909 esac
11910 done
11911 fi
11912 else
11913 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11914 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
11915 fi
11916 fi
11917 fi
11918 done
11919 done
11920 if test "X$rpathdirs" != "X"; then
11921 if test -n "$hardcode_libdir_separator"; then
11922 alldirs=
11923 for found_dir in $rpathdirs; do
11924 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11925 done
11926 acl_save_libdir="$libdir"
11927 libdir="$alldirs"
11928 eval flag=\"$hardcode_libdir_flag_spec\"
11929 libdir="$acl_save_libdir"
11930 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11931 else
11932 for found_dir in $rpathdirs; do
11933 acl_save_libdir="$libdir"
11934 libdir="$found_dir"
11935 eval flag=\"$hardcode_libdir_flag_spec\"
11936 libdir="$acl_save_libdir"
11937 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11938 done
11939 fi
11940 fi
11941 if test "X$ltrpathdirs" != "X"; then
11942 for found_dir in $ltrpathdirs; do
11943 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
11944 done
11945 fi
11946
11947
11948 ac_save_CPPFLAGS="$CPPFLAGS"
11949
11950 for element in $INCIPT; do
11951 haveit=
11952 for x in $CPPFLAGS; do
11953
11954 acl_save_prefix="$prefix"
11955 prefix="$acl_final_prefix"
11956 acl_save_exec_prefix="$exec_prefix"
11957 exec_prefix="$acl_final_exec_prefix"
11958 eval x=\"$x\"
11959 exec_prefix="$acl_save_exec_prefix"
11960 prefix="$acl_save_prefix"
11961
11962 if test "X$x" = "X$element"; then
11963 haveit=yes
11964 break
11965 fi
11966 done
11967 if test -z "$haveit"; then
11968 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11969 fi
11970 done
11971
11972
11973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
11974$as_echo_n "checking for libipt... " >&6; }
d0ac1c44 11975if ${ac_cv_libipt+:} false; then :
58bfce93
MM
11976 $as_echo_n "(cached) " >&6
11977else
11978
11979 ac_save_LIBS="$LIBS"
11980 LIBS="$LIBS $LIBIPT"
11981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11982/* end confdefs.h. */
11983#include "intel-pt.h"
11984int
11985main ()
11986{
11987pt_insn_alloc_decoder (0);
11988 ;
11989 return 0;
11990}
11991_ACEOF
11992if ac_fn_c_try_link "$LINENO"; then :
11993 ac_cv_libipt=yes
11994else
11995 ac_cv_libipt=no
11996fi
11997rm -f core conftest.err conftest.$ac_objext \
11998 conftest$ac_exeext conftest.$ac_ext
11999 LIBS="$ac_save_LIBS"
12000
12001fi
12002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
12003$as_echo "$ac_cv_libipt" >&6; }
12004 if test "$ac_cv_libipt" = yes; then
12005 HAVE_LIBIPT=yes
12006
12007$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
12008
12009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
12010$as_echo_n "checking how to link with libipt... " >&6; }
12011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
12012$as_echo "$LIBIPT" >&6; }
12013 else
12014 HAVE_LIBIPT=no
12015 CPPFLAGS="$ac_save_CPPFLAGS"
12016 LIBIPT=
12017 LTLIBIPT=
12018 fi
12019
12020
12021
12022
12023
12024
12025 if test "$HAVE_LIBIPT" != yes; then
12026 if test "$with_intel_pt" = yes; then
d0ac1c44 12027 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
58bfce93
MM
12028 else
12029 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
12030$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
12031 fi
c56ccc05
MM
12032 else
12033 save_LIBS=$LIBS
12034 LIBS="$LIBS $LIBIPT"
12035 for ac_func in pt_insn_event
12036do :
12037 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
d0ac1c44 12038if test "x$ac_cv_func_pt_insn_event" = xyes; then :
c56ccc05
MM
12039 cat >>confdefs.h <<_ACEOF
12040#define HAVE_PT_INSN_EVENT 1
12041_ACEOF
12042
12043fi
12044done
12045
12046 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
12047"
d0ac1c44 12048if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
c56ccc05
MM
12049
12050cat >>confdefs.h <<_ACEOF
12051#define HAVE_STRUCT_PT_INSN_ENABLED 1
12052_ACEOF
12053
12054
12055fi
12056ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
12057"
d0ac1c44 12058if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
c56ccc05
MM
12059
12060cat >>confdefs.h <<_ACEOF
12061#define HAVE_STRUCT_PT_INSN_RESYNCED 1
12062_ACEOF
12063
12064
12065fi
12066
12067 LIBS=$save_LIBS
58bfce93
MM
12068 fi
12069fi
12070
81ecdfbb
RW
12071# ------------------------- #
12072# Checks for header files. #
12073# ------------------------- #
c890192f 12074
81ecdfbb
RW
12075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12076$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 12077if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 12078 $as_echo_n "(cached) " >&6
bec39cab 12079else
81ecdfbb 12080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12081/* end confdefs.h. */
81ecdfbb
RW
12082#include <stdlib.h>
12083#include <stdarg.h>
12084#include <string.h>
12085#include <float.h>
12086
a9322a30
TT
12087int
12088main ()
12089{
a9322a30
TT
12090
12091 ;
12092 return 0;
12093}
bec39cab 12094_ACEOF
81ecdfbb
RW
12095if ac_fn_c_try_compile "$LINENO"; then :
12096 ac_cv_header_stdc=yes
bec39cab 12097else
81ecdfbb 12098 ac_cv_header_stdc=no
a9322a30 12099fi
81ecdfbb 12100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12101
81ecdfbb
RW
12102if test $ac_cv_header_stdc = yes; then
12103 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12105/* end confdefs.h. */
12106#include <string.h>
bec39cab 12107
81ecdfbb
RW
12108_ACEOF
12109if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12110 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 12111
bec39cab 12112else
81ecdfbb
RW
12113 ac_cv_header_stdc=no
12114fi
12115rm -f conftest*
12116
12117fi
12118
12119if test $ac_cv_header_stdc = yes; then
12120 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12122/* end confdefs.h. */
12123#include <stdlib.h>
12124
bec39cab 12125_ACEOF
81ecdfbb
RW
12126if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12127 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 12128
81ecdfbb
RW
12129else
12130 ac_cv_header_stdc=no
12131fi
12132rm -f conftest*
bec39cab 12133
bec39cab 12134fi
81ecdfbb
RW
12135
12136if test $ac_cv_header_stdc = yes; then
12137 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12138 if test "$cross_compiling" = yes; then :
12139 :
bec39cab 12140else
81ecdfbb 12141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12142/* end confdefs.h. */
81ecdfbb
RW
12143#include <ctype.h>
12144#include <stdlib.h>
12145#if ((' ' & 0x0FF) == 0x020)
12146# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12147# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12148#else
12149# define ISLOWER(c) \
12150 (('a' <= (c) && (c) <= 'i') \
12151 || ('j' <= (c) && (c) <= 'r') \
12152 || ('s' <= (c) && (c) <= 'z'))
12153# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12154#endif
12155
12156#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
12157int
12158main ()
12159{
81ecdfbb
RW
12160 int i;
12161 for (i = 0; i < 256; i++)
12162 if (XOR (islower (i), ISLOWER (i))
12163 || toupper (i) != TOUPPER (i))
12164 return 2;
a9322a30
TT
12165 return 0;
12166}
bec39cab 12167_ACEOF
81ecdfbb
RW
12168if ac_fn_c_try_run "$LINENO"; then :
12169
bec39cab 12170else
81ecdfbb
RW
12171 ac_cv_header_stdc=no
12172fi
12173rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12174 conftest.$ac_objext conftest.beam conftest.$ac_ext
12175fi
bec39cab 12176
bec39cab 12177fi
a9322a30 12178fi
81ecdfbb
RW
12179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12180$as_echo "$ac_cv_header_stdc" >&6; }
12181if test $ac_cv_header_stdc = yes; then
bec39cab 12182
81ecdfbb 12183$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 12184
81ecdfbb 12185fi
bec39cab 12186
81ecdfbb 12187# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 12188for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
43b7e92b 12189 thread_db.h linux/elf.h \
81ecdfbb
RW
12190 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12191 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
44122162 12192 sys/reg.h sys/debugreg.h sys/select.h \
726e1356 12193 termios.h elf_hp.h \
9467110b 12194 dlfcn.h
81ecdfbb
RW
12195do :
12196 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12197ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 12198if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12199 cat >>confdefs.h <<_ACEOF
81ecdfbb 12200#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12201_ACEOF
c906108c 12202
bec39cab 12203fi
81ecdfbb
RW
12204
12205done
12206
81ecdfbb
RW
12207for ac_header in sys/user.h
12208do :
12209 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
12210# include <sys/param.h>
a9322a30
TT
12211#endif
12212
81ecdfbb 12213"
d0ac1c44 12214if test "x$ac_cv_header_sys_user_h" = xyes; then :
81ecdfbb
RW
12215 cat >>confdefs.h <<_ACEOF
12216#define HAVE_SYS_USER_H 1
bec39cab 12217_ACEOF
bec39cab 12218
a9322a30 12219fi
bec39cab 12220
81ecdfbb 12221done
5ee754fc 12222
5ee754fc 12223
5007d765 12224for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
81ecdfbb
RW
12225do :
12226 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12227ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 12228if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12229 cat >>confdefs.h <<_ACEOF
81ecdfbb 12230#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12231_ACEOF
5ee754fc
MK
12232
12233fi
12234
81ecdfbb 12235done
bec39cab 12236
81ecdfbb
RW
12237for ac_header in term.h
12238do :
12239 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
12240# include <curses.h>
12241#endif
bec39cab 12242
81ecdfbb 12243"
d0ac1c44 12244if test "x$ac_cv_header_term_h" = xyes; then :
81ecdfbb
RW
12245 cat >>confdefs.h <<_ACEOF
12246#define HAVE_TERM_H 1
a8111142 12247_ACEOF
a8111142 12248
a8111142 12249fi
a8111142 12250
81ecdfbb 12251done
a8111142
TT
12252
12253
81ecdfbb
RW
12254# ------------------------- #
12255# Checks for declarations. #
12256# ------------------------- #
a9322a30 12257
07697489
PA
12258
12259 # Check for presence and size of long long.
12260 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
d0ac1c44 12261if test "x$ac_cv_type_long_long" = xyes; then :
07697489
PA
12262
12263cat >>confdefs.h <<_ACEOF
12264#define HAVE_LONG_LONG 1
12265_ACEOF
12266
12267# The cast to long int works around a bug in the HP C Compiler
12268# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12269# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12270# This bug is HP SR number 8606223364.
12271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
12272$as_echo_n "checking size of long long... " >&6; }
d0ac1c44 12273if ${ac_cv_sizeof_long_long+:} false; then :
07697489
PA
12274 $as_echo_n "(cached) " >&6
12275else
12276 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
12277
12278else
12279 if test "$ac_cv_type_long_long" = yes; then
12280 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12281$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
12282as_fn_error 77 "cannot compute sizeof (long long)
12283See \`config.log' for more details" "$LINENO" 5; }
07697489
PA
12284 else
12285 ac_cv_sizeof_long_long=0
12286 fi
12287fi
12288
12289fi
12290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
12291$as_echo "$ac_cv_sizeof_long_long" >&6; }
12292
12293
12294
12295cat >>confdefs.h <<_ACEOF
12296#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12297_ACEOF
12298
12299
12300fi
12301
12302
d0ac1c44
SM
12303 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
12304ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
12305if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
07697489
PA
12306 ac_have_decl=1
12307else
12308 ac_have_decl=0
12309fi
12310
12311cat >>confdefs.h <<_ACEOF
12312#define HAVE_DECL_BASENAME $ac_have_decl
12313_ACEOF
12314ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
d0ac1c44 12315if test "x$ac_cv_have_decl_ffs" = xyes; then :
07697489
PA
12316 ac_have_decl=1
12317else
12318 ac_have_decl=0
12319fi
12320
12321cat >>confdefs.h <<_ACEOF
12322#define HAVE_DECL_FFS $ac_have_decl
12323_ACEOF
12324ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
d0ac1c44 12325if test "x$ac_cv_have_decl_asprintf" = xyes; then :
07697489
PA
12326 ac_have_decl=1
12327else
12328 ac_have_decl=0
12329fi
12330
12331cat >>confdefs.h <<_ACEOF
12332#define HAVE_DECL_ASPRINTF $ac_have_decl
12333_ACEOF
12334ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
d0ac1c44 12335if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
07697489
PA
12336 ac_have_decl=1
12337else
12338 ac_have_decl=0
12339fi
12340
12341cat >>confdefs.h <<_ACEOF
12342#define HAVE_DECL_VASPRINTF $ac_have_decl
12343_ACEOF
12344ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
d0ac1c44 12345if test "x$ac_cv_have_decl_snprintf" = xyes; then :
07697489
PA
12346 ac_have_decl=1
12347else
12348 ac_have_decl=0
12349fi
12350
12351cat >>confdefs.h <<_ACEOF
12352#define HAVE_DECL_SNPRINTF $ac_have_decl
12353_ACEOF
12354ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
d0ac1c44 12355if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
07697489
PA
12356 ac_have_decl=1
12357else
12358 ac_have_decl=0
12359fi
12360
12361cat >>confdefs.h <<_ACEOF
12362#define HAVE_DECL_VSNPRINTF $ac_have_decl
12363_ACEOF
12364
12365 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
d0ac1c44 12366if test "x$ac_cv_have_decl_strtol" = xyes; then :
07697489
PA
12367 ac_have_decl=1
12368else
12369 ac_have_decl=0
12370fi
12371
12372cat >>confdefs.h <<_ACEOF
12373#define HAVE_DECL_STRTOL $ac_have_decl
12374_ACEOF
12375ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
d0ac1c44 12376if test "x$ac_cv_have_decl_strtoul" = xyes; then :
07697489
PA
12377 ac_have_decl=1
12378else
12379 ac_have_decl=0
12380fi
12381
12382cat >>confdefs.h <<_ACEOF
12383#define HAVE_DECL_STRTOUL $ac_have_decl
12384_ACEOF
12385ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
d0ac1c44 12386if test "x$ac_cv_have_decl_strtoll" = xyes; then :
07697489
PA
12387 ac_have_decl=1
12388else
12389 ac_have_decl=0
12390fi
12391
12392cat >>confdefs.h <<_ACEOF
12393#define HAVE_DECL_STRTOLL $ac_have_decl
12394_ACEOF
12395ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
d0ac1c44 12396if test "x$ac_cv_have_decl_strtoull" = xyes; then :
07697489
PA
12397 ac_have_decl=1
12398else
12399 ac_have_decl=0
12400fi
12401
12402cat >>confdefs.h <<_ACEOF
12403#define HAVE_DECL_STRTOULL $ac_have_decl
12404_ACEOF
12405
12406 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
d0ac1c44 12407if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
07697489
PA
12408 ac_have_decl=1
12409else
12410 ac_have_decl=0
12411fi
12412
12413cat >>confdefs.h <<_ACEOF
12414#define HAVE_DECL_STRVERSCMP $ac_have_decl
12415_ACEOF
12416
12417
12418
81ecdfbb 12419ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
d0ac1c44 12420if test "x$ac_cv_have_decl_snprintf" = xyes; then :
81ecdfbb
RW
12421 ac_have_decl=1
12422else
12423 ac_have_decl=0
5ee754fc 12424fi
81ecdfbb
RW
12425
12426cat >>confdefs.h <<_ACEOF
12427#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 12428_ACEOF
5ee754fc 12429
5ee754fc 12430
81ecdfbb
RW
12431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12432$as_echo_n "checking for LC_MESSAGES... " >&6; }
d0ac1c44 12433if ${am_cv_val_LC_MESSAGES+:} false; then :
81ecdfbb 12434 $as_echo_n "(cached) " >&6
bec39cab 12435else
81ecdfbb 12436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12437/* end confdefs.h. */
81ecdfbb 12438#include <locale.h>
a9322a30
TT
12439int
12440main ()
12441{
81ecdfbb 12442return LC_MESSAGES
a9322a30
TT
12443 ;
12444 return 0;
12445}
bec39cab 12446_ACEOF
81ecdfbb
RW
12447if ac_fn_c_try_link "$LINENO"; then :
12448 am_cv_val_LC_MESSAGES=yes
bec39cab 12449else
81ecdfbb
RW
12450 am_cv_val_LC_MESSAGES=no
12451fi
12452rm -f core conftest.err conftest.$ac_objext \
12453 conftest$ac_exeext conftest.$ac_ext
12454fi
12455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12456$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12457 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 12458
81ecdfbb
RW
12459$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
12460
12461 fi
12462
12463
12464# ----------------------- #
12465# Checks for structures. #
12466# ----------------------- #
12467
12468ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
d0ac1c44 12469if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
81ecdfbb
RW
12470
12471cat >>confdefs.h <<_ACEOF
12472#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 12473_ACEOF
7eb368b3 12474
81ecdfbb 12475
7eb368b3 12476fi
81ecdfbb 12477ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
d0ac1c44 12478if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
7eb368b3 12479
a9322a30
TT
12480cat >>confdefs.h <<_ACEOF
12481#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
12482_ACEOF
12483
a9322a30 12484
7eb368b3
NR
12485fi
12486
7eb368b3 12487
a9322a30
TT
12488# ------------------ #
12489# Checks for types. #
12490# ------------------ #
7eb368b3 12491
81ecdfbb 12492ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
12493#include <sys/socket.h>
12494
81ecdfbb 12495"
d0ac1c44 12496if test "x$ac_cv_type_socklen_t" = xyes; then :
bec39cab 12497
a9322a30
TT
12498cat >>confdefs.h <<_ACEOF
12499#define HAVE_SOCKLEN_T 1
12500_ACEOF
12501
12502
12503fi
12504
12505
12506# ------------------------------------- #
12507# Checks for compiler characteristics. #
12508# ------------------------------------- #
12509
81ecdfbb
RW
12510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12511$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
d0ac1c44 12512if ${ac_cv_c_const+:} false; then :
81ecdfbb 12513 $as_echo_n "(cached) " >&6
a9322a30 12514else
81ecdfbb 12515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12516/* end confdefs.h. */
a9322a30
TT
12517
12518int
12519main ()
12520{
d0ac1c44 12521
a9322a30 12522#ifndef __cplusplus
d0ac1c44 12523 /* Ultrix mips cc rejects this sort of thing. */
a9322a30 12524 typedef int charset[2];
d0ac1c44 12525 const charset cs = { 0, 0 };
a9322a30 12526 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
12527 char const *const *pcpcc;
12528 char **ppc;
a9322a30
TT
12529 /* NEC SVR4.0.2 mips cc rejects this. */
12530 struct point {int x, y;};
12531 static struct point const zero = {0,0};
12532 /* AIX XL C 1.02.0.0 rejects this.
12533 It does not let you subtract one const X* pointer from another in
12534 an arm of an if-expression whose if-part is not a constant
12535 expression */
12536 const char *g = "string";
81ecdfbb 12537 pcpcc = &g + (g ? g-g : 0);
a9322a30 12538 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
12539 ++pcpcc;
12540 ppc = (char**) pcpcc;
12541 pcpcc = (char const *const *) ppc;
d0ac1c44
SM
12542 { /* SCO 3.2v4 cc rejects this sort of thing. */
12543 char tx;
12544 char *t = &tx;
a9322a30
TT
12545 char const *s = 0 ? (char *) 0 : (char const *) 0;
12546
12547 *t++ = 0;
81ecdfbb 12548 if (s) return 0;
a9322a30
TT
12549 }
12550 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12551 int x[] = {25, 17};
12552 const int *foo = &x[0];
12553 ++foo;
12554 }
12555 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12556 typedef const int *iptr;
12557 iptr p = 0;
12558 ++p;
12559 }
d0ac1c44 12560 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
a9322a30 12561 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
d0ac1c44
SM
12562 struct s { int j; const int *ap[3]; } bx;
12563 struct s *b = &bx; b->j = 5;
a9322a30
TT
12564 }
12565 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12566 const int foo = 10;
81ecdfbb 12567 if (!foo) return 0;
a9322a30 12568 }
81ecdfbb 12569 return !cs[0] && !zero.x;
a9322a30
TT
12570#endif
12571
12572 ;
12573 return 0;
12574}
bec39cab 12575_ACEOF
81ecdfbb 12576if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12577 ac_cv_c_const=yes
5ee754fc 12578else
81ecdfbb 12579 ac_cv_c_const=no
5ee754fc 12580fi
81ecdfbb 12581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 12582fi
81ecdfbb
RW
12583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12584$as_echo "$ac_cv_c_const" >&6; }
a9322a30 12585if test $ac_cv_c_const = no; then
bec39cab 12586
81ecdfbb 12587$as_echo "#define const /**/" >>confdefs.h
bec39cab 12588
5ee754fc 12589fi
bec39cab 12590
81ecdfbb
RW
12591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12592$as_echo_n "checking for inline... " >&6; }
d0ac1c44 12593if ${ac_cv_c_inline+:} false; then :
81ecdfbb 12594 $as_echo_n "(cached) " >&6
bec39cab 12595else
a9322a30
TT
12596 ac_cv_c_inline=no
12597for ac_kw in inline __inline__ __inline; do
81ecdfbb 12598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12599/* end confdefs.h. */
a9322a30
TT
12600#ifndef __cplusplus
12601typedef int foo_t;
12602static $ac_kw foo_t static_foo () {return 0; }
12603$ac_kw foo_t foo () {return 0; }
12604#endif
12605
bec39cab 12606_ACEOF
81ecdfbb
RW
12607if ac_fn_c_try_compile "$LINENO"; then :
12608 ac_cv_c_inline=$ac_kw
bec39cab 12609fi
81ecdfbb
RW
12610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12611 test "$ac_cv_c_inline" != no && break
a9322a30 12612done
bec39cab 12613
5ee754fc 12614fi
81ecdfbb
RW
12615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12616$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 12617
a9322a30
TT
12618case $ac_cv_c_inline in
12619 inline | yes) ;;
12620 *)
12621 case $ac_cv_c_inline in
12622 no) ac_val=;;
12623 *) ac_val=$ac_cv_c_inline;;
12624 esac
12625 cat >>confdefs.h <<_ACEOF
12626#ifndef __cplusplus
12627#define inline $ac_val
12628#endif
12629_ACEOF
bec39cab
AC
12630 ;;
12631esac
bec39cab 12632
81ecdfbb
RW
12633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12634$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
d0ac1c44 12635if ${ac_cv_c_bigendian+:} false; then :
81ecdfbb 12636 $as_echo_n "(cached) " >&6
bec39cab 12637else
81ecdfbb
RW
12638 ac_cv_c_bigendian=unknown
12639 # See if we're dealing with a universal compiler.
12640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12641/* end confdefs.h. */
12642#ifndef __APPLE_CC__
12643 not a universal capable compiler
12644 #endif
12645 typedef int dummy;
12646
12647_ACEOF
12648if ac_fn_c_try_compile "$LINENO"; then :
12649
12650 # Check for potential -arch flags. It is not universal unless
12651 # there are at least two -arch flags with different values.
12652 ac_arch=
12653 ac_prev=
12654 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12655 if test -n "$ac_prev"; then
12656 case $ac_word in
12657 i?86 | x86_64 | ppc | ppc64)
12658 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12659 ac_arch=$ac_word
12660 else
12661 ac_cv_c_bigendian=universal
12662 break
12663 fi
12664 ;;
12665 esac
12666 ac_prev=
12667 elif test "x$ac_word" = "x-arch"; then
12668 ac_prev=arch
12669 fi
12670 done
12671fi
12672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12673 if test $ac_cv_c_bigendian = unknown; then
12674 # See if sys/param.h defines the BYTE_ORDER macro.
12675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12676/* end confdefs.h. */
a9322a30 12677#include <sys/types.h>
81ecdfbb 12678 #include <sys/param.h>
a9322a30
TT
12679
12680int
12681main ()
12682{
81ecdfbb
RW
12683#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12684 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12685 && LITTLE_ENDIAN)
12686 bogus endian macros
12687 #endif
a9322a30
TT
12688
12689 ;
12690 return 0;
12691}
bec39cab 12692_ACEOF
81ecdfbb 12693if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12694 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 12695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12696/* end confdefs.h. */
a9322a30 12697#include <sys/types.h>
81ecdfbb 12698 #include <sys/param.h>
a9322a30
TT
12699
12700int
12701main ()
12702{
12703#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
12704 not big endian
12705 #endif
a9322a30
TT
12706
12707 ;
12708 return 0;
12709}
bec39cab 12710_ACEOF
81ecdfbb 12711if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12712 ac_cv_c_bigendian=yes
5ee754fc 12713else
81ecdfbb 12714 ac_cv_c_bigendian=no
5ee754fc 12715fi
81ecdfbb
RW
12716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12717fi
12718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12719 fi
12720 if test $ac_cv_c_bigendian = unknown; then
12721 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12723/* end confdefs.h. */
12724#include <limits.h>
bec39cab 12725
81ecdfbb
RW
12726int
12727main ()
12728{
12729#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12730 bogus endian macros
12731 #endif
12732
12733 ;
12734 return 0;
12735}
7eb368b3 12736_ACEOF
81ecdfbb
RW
12737if ac_fn_c_try_compile "$LINENO"; then :
12738 # It does; now see whether it defined to _BIG_ENDIAN or not.
12739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 12740/* end confdefs.h. */
81ecdfbb
RW
12741#include <limits.h>
12742
7eb368b3
NR
12743int
12744main ()
12745{
81ecdfbb
RW
12746#ifndef _BIG_ENDIAN
12747 not big endian
12748 #endif
12749
7eb368b3
NR
12750 ;
12751 return 0;
12752}
12753_ACEOF
81ecdfbb 12754if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12755 ac_cv_c_bigendian=yes
81ecdfbb
RW
12756else
12757 ac_cv_c_bigendian=no
a9322a30 12758fi
81ecdfbb 12759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 12760fi
81ecdfbb
RW
12761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12762 fi
12763 if test $ac_cv_c_bigendian = unknown; then
12764 # Compile a test program.
12765 if test "$cross_compiling" = yes; then :
12766 # Try to guess by grepping values from an object file.
12767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12768/* end confdefs.h. */
12769short int ascii_mm[] =
12770 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12771 short int ascii_ii[] =
12772 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12773 int use_ascii (int i) {
12774 return ascii_mm[i] + ascii_ii[i];
12775 }
12776 short int ebcdic_ii[] =
12777 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12778 short int ebcdic_mm[] =
12779 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12780 int use_ebcdic (int i) {
12781 return ebcdic_mm[i] + ebcdic_ii[i];
12782 }
12783 extern int foo;
7eb368b3 12784
81ecdfbb
RW
12785int
12786main ()
12787{
12788return use_ascii (foo) == use_ebcdic (foo);
12789 ;
12790 return 0;
12791}
12792_ACEOF
12793if ac_fn_c_try_compile "$LINENO"; then :
12794 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12795 ac_cv_c_bigendian=yes
12796 fi
12797 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12798 if test "$ac_cv_c_bigendian" = unknown; then
12799 ac_cv_c_bigendian=no
12800 else
12801 # finding both strings is unlikely to happen, but who knows?
12802 ac_cv_c_bigendian=unknown
12803 fi
12804 fi
7eb368b3 12805fi
81ecdfbb 12806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12807else
81ecdfbb 12808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12809/* end confdefs.h. */
81ecdfbb 12810$ac_includes_default
d3ea6809
MM
12811int
12812main ()
12813{
81ecdfbb
RW
12814
12815 /* Are we little or big endian? From Harbison&Steele. */
12816 union
12817 {
12818 long int l;
12819 char c[sizeof (long int)];
12820 } u;
12821 u.l = 1;
12822 return u.c[sizeof (long int) - 1] == 1;
12823
12824 ;
12825 return 0;
d3ea6809
MM
12826}
12827_ACEOF
81ecdfbb 12828if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12829 ac_cv_c_bigendian=no
d3ea6809 12830else
81ecdfbb 12831 ac_cv_c_bigendian=yes
d3ea6809 12832fi
81ecdfbb
RW
12833rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12834 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12835fi
a9322a30 12836
81ecdfbb
RW
12837 fi
12838fi
12839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12840$as_echo "$ac_cv_c_bigendian" >&6; }
12841 case $ac_cv_c_bigendian in #(
12842 yes)
12843 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12844;; #(
12845 no)
12846 ;; #(
12847 universal)
12848
12849$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12850
12851 ;; #(
12852 *)
d0ac1c44 12853 as_fn_error $? "unknown endianness
81ecdfbb
RW
12854 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12855 esac
d3ea6809
MM
12856
12857
a9322a30
TT
12858# ------------------------------ #
12859# Checks for library functions. #
12860# ------------------------------ #
d3ea6809 12861
d0ac1c44
SM
12862
12863
12864
12865 for ac_header in $ac_header_list
81ecdfbb
RW
12866do :
12867 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
d0ac1c44
SM
12868ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12869"
12870if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12871 cat >>confdefs.h <<_ACEOF
81ecdfbb 12872#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12873_ACEOF
b757528f 12874
b757528f 12875fi
bec39cab 12876
a9322a30 12877done
a3828db0 12878
d0ac1c44
SM
12879
12880
12881
12882
12883
12884
12885
a9322a30 12886for ac_func in getpagesize
81ecdfbb
RW
12887do :
12888 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
d0ac1c44 12889if test "x$ac_cv_func_getpagesize" = xyes; then :
bec39cab 12890 cat >>confdefs.h <<_ACEOF
81ecdfbb 12891#define HAVE_GETPAGESIZE 1
bec39cab 12892_ACEOF
bcb3dc3d 12893
bcb3dc3d
MK
12894fi
12895done
12896
81ecdfbb
RW
12897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12898$as_echo_n "checking for working mmap... " >&6; }
d0ac1c44 12899if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
81ecdfbb 12900 $as_echo_n "(cached) " >&6
a9322a30 12901else
81ecdfbb 12902 if test "$cross_compiling" = yes; then :
a9322a30 12903 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12904else
81ecdfbb 12905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12906/* end confdefs.h. */
a9322a30
TT
12907$ac_includes_default
12908/* malloc might have been renamed as rpl_malloc. */
12909#undef malloc
bec39cab 12910
a9322a30
TT
12911/* Thanks to Mike Haertel and Jim Avera for this test.
12912 Here is a matrix of mmap possibilities:
12913 mmap private not fixed
12914 mmap private fixed at somewhere currently unmapped
12915 mmap private fixed at somewhere already mapped
12916 mmap shared not fixed
12917 mmap shared fixed at somewhere currently unmapped
12918 mmap shared fixed at somewhere already mapped
12919 For private mappings, we should verify that changes cannot be read()
12920 back from the file, nor mmap's back from the file at a different
12921 address. (There have been systems where private was not correctly
12922 implemented like the infamous i386 svr4.0, and systems where the
12923 VM page cache was not coherent with the file system buffer cache
12924 like early versions of FreeBSD and possibly contemporary NetBSD.)
12925 For shared mappings, we should conversely verify that changes get
12926 propagated back to all the places they're supposed to be.
bec39cab 12927
a9322a30
TT
12928 Grep wants private fixed already mapped.
12929 The main things grep needs to know about mmap are:
12930 * does it exist and is it safe to write into the mmap'd area
12931 * how to use it (BSD variants) */
8b9cf735 12932
a9322a30
TT
12933#include <fcntl.h>
12934#include <sys/mman.h>
8b9cf735 12935
81ecdfbb 12936#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12937char *malloc ();
a3828db0
MK
12938#endif
12939
a9322a30 12940/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12941#ifndef HAVE_GETPAGESIZE
a9322a30
TT
12942# ifdef _SC_PAGESIZE
12943# define getpagesize() sysconf(_SC_PAGESIZE)
12944# else /* no _SC_PAGESIZE */
81ecdfbb 12945# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12946# include <sys/param.h>
12947# ifdef EXEC_PAGESIZE
12948# define getpagesize() EXEC_PAGESIZE
12949# else /* no EXEC_PAGESIZE */
12950# ifdef NBPG
12951# define getpagesize() NBPG * CLSIZE
12952# ifndef CLSIZE
12953# define CLSIZE 1
12954# endif /* no CLSIZE */
12955# else /* no NBPG */
12956# ifdef NBPC
12957# define getpagesize() NBPC
12958# else /* no NBPC */
12959# ifdef PAGESIZE
12960# define getpagesize() PAGESIZE
12961# endif /* PAGESIZE */
12962# endif /* no NBPC */
12963# endif /* no NBPG */
12964# endif /* no EXEC_PAGESIZE */
12965# else /* no HAVE_SYS_PARAM_H */
12966# define getpagesize() 8192 /* punt totally */
12967# endif /* no HAVE_SYS_PARAM_H */
12968# endif /* no _SC_PAGESIZE */
12969
12970#endif /* no HAVE_GETPAGESIZE */
12971
bec39cab
AC
12972int
12973main ()
12974{
a9322a30 12975 char *data, *data2, *data3;
d0ac1c44 12976 const char *cdata2;
a9322a30 12977 int i, pagesize;
d0ac1c44 12978 int fd, fd2;
a9322a30
TT
12979
12980 pagesize = getpagesize ();
12981
12982 /* First, make a file with some known garbage in it. */
12983 data = (char *) malloc (pagesize);
12984 if (!data)
81ecdfbb 12985 return 1;
a9322a30
TT
12986 for (i = 0; i < pagesize; ++i)
12987 *(data + i) = rand ();
12988 umask (0);
12989 fd = creat ("conftest.mmap", 0600);
12990 if (fd < 0)
d0ac1c44 12991 return 2;
a9322a30 12992 if (write (fd, data, pagesize) != pagesize)
d0ac1c44 12993 return 3;
a9322a30
TT
12994 close (fd);
12995
d0ac1c44
SM
12996 /* Next, check that the tail of a page is zero-filled. File must have
12997 non-zero length, otherwise we risk SIGBUS for entire page. */
12998 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
12999 if (fd2 < 0)
13000 return 4;
13001 cdata2 = "";
13002 if (write (fd2, cdata2, 1) != 1)
13003 return 5;
13004 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
13005 if (data2 == MAP_FAILED)
13006 return 6;
13007 for (i = 0; i < pagesize; ++i)
13008 if (*(data2 + i))
13009 return 7;
13010 close (fd2);
13011 if (munmap (data2, pagesize))
13012 return 8;
13013
a9322a30
TT
13014 /* Next, try to mmap the file at a fixed address which already has
13015 something else allocated at it. If we can, also make sure that
13016 we see the same garbage. */
13017 fd = open ("conftest.mmap", O_RDWR);
13018 if (fd < 0)
d0ac1c44 13019 return 9;
a9322a30
TT
13020 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
13021 MAP_PRIVATE | MAP_FIXED, fd, 0L))
d0ac1c44 13022 return 10;
a9322a30
TT
13023 for (i = 0; i < pagesize; ++i)
13024 if (*(data + i) != *(data2 + i))
d0ac1c44 13025 return 11;
a9322a30
TT
13026
13027 /* Finally, make sure that changes to the mapped area do not
13028 percolate back to the file as seen by read(). (This is a bug on
13029 some variants of i386 svr4.0.) */
13030 for (i = 0; i < pagesize; ++i)
13031 *(data2 + i) = *(data2 + i) + 1;
13032 data3 = (char *) malloc (pagesize);
13033 if (!data3)
d0ac1c44 13034 return 12;
a9322a30 13035 if (read (fd, data3, pagesize) != pagesize)
d0ac1c44 13036 return 13;
a9322a30
TT
13037 for (i = 0; i < pagesize; ++i)
13038 if (*(data + i) != *(data3 + i))
d0ac1c44 13039 return 14;
a9322a30 13040 close (fd);
81ecdfbb 13041 return 0;
bec39cab
AC
13042}
13043_ACEOF
81ecdfbb 13044if ac_fn_c_try_run "$LINENO"; then :
a9322a30 13045 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 13046else
81ecdfbb 13047 ac_cv_func_mmap_fixed_mapped=no
a3828db0 13048fi
81ecdfbb
RW
13049rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13050 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 13051fi
81ecdfbb 13052
a9322a30 13053fi
81ecdfbb
RW
13054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
13055$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
13056if test $ac_cv_func_mmap_fixed_mapped = yes; then
13057
81ecdfbb 13058$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 13059
086ec9eb 13060fi
d0ac1c44 13061rm -f conftest.mmap conftest.txt
a3828db0 13062
81ecdfbb 13063ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
d0ac1c44 13064if test "x$ac_cv_type_pid_t" = xyes; then :
bec39cab 13065
a9322a30
TT
13066else
13067
13068cat >>confdefs.h <<_ACEOF
13069#define pid_t int
bec39cab 13070_ACEOF
086ec9eb
MK
13071
13072fi
13073
81ecdfbb
RW
13074for ac_header in vfork.h
13075do :
13076 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
d0ac1c44 13077if test "x$ac_cv_header_vfork_h" = xyes; then :
a3828db0 13078 cat >>confdefs.h <<_ACEOF
81ecdfbb 13079#define HAVE_VFORK_H 1
bec39cab 13080_ACEOF
c906108c
SS
13081
13082fi
a9322a30 13083
a3828db0 13084done
c906108c 13085
a9322a30 13086for ac_func in fork vfork
81ecdfbb
RW
13087do :
13088 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13089ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13090if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
a3828db0 13091 cat >>confdefs.h <<_ACEOF
81ecdfbb 13092#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 13093_ACEOF
b83266a0 13094
97bf5e38 13095fi
a3828db0 13096done
b83266a0 13097
a9322a30 13098if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
13099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13100$as_echo_n "checking for working fork... " >&6; }
d0ac1c44 13101if ${ac_cv_func_fork_works+:} false; then :
81ecdfbb 13102 $as_echo_n "(cached) " >&6
a9322a30 13103else
81ecdfbb 13104 if test "$cross_compiling" = yes; then :
a9322a30
TT
13105 ac_cv_func_fork_works=cross
13106else
81ecdfbb
RW
13107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13108/* end confdefs.h. */
13109$ac_includes_default
13110int
13111main ()
13112{
13113
13114 /* By Ruediger Kuhlmann. */
13115 return fork () < 0;
13116
13117 ;
13118 return 0;
13119}
a9322a30 13120_ACEOF
81ecdfbb 13121if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13122 ac_cv_func_fork_works=yes
13123else
81ecdfbb 13124 ac_cv_func_fork_works=no
a9322a30 13125fi
81ecdfbb
RW
13126rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13127 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13128fi
81ecdfbb 13129
a9322a30 13130fi
81ecdfbb
RW
13131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13132$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
13133
13134else
13135 ac_cv_func_fork_works=$ac_cv_func_fork
13136fi
13137if test "x$ac_cv_func_fork_works" = xcross; then
13138 case $host in
13139 *-*-amigaos* | *-*-msdosdjgpp*)
13140 # Override, as these systems have only a dummy fork() stub
13141 ac_cv_func_fork_works=no
13142 ;;
13143 *)
13144 ac_cv_func_fork_works=yes
13145 ;;
13146 esac
81ecdfbb
RW
13147 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13148$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13149fi
13150ac_cv_func_vfork_works=$ac_cv_func_vfork
13151if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
13152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13153$as_echo_n "checking for working vfork... " >&6; }
d0ac1c44 13154if ${ac_cv_func_vfork_works+:} false; then :
81ecdfbb 13155 $as_echo_n "(cached) " >&6
a9322a30 13156else
81ecdfbb 13157 if test "$cross_compiling" = yes; then :
a9322a30
TT
13158 ac_cv_func_vfork_works=cross
13159else
81ecdfbb 13160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
13161/* end confdefs.h. */
13162/* Thanks to Paul Eggert for this test. */
81ecdfbb 13163$ac_includes_default
a9322a30 13164#include <sys/wait.h>
81ecdfbb 13165#ifdef HAVE_VFORK_H
a9322a30
TT
13166# include <vfork.h>
13167#endif
13168/* On some sparc systems, changes by the child to local and incoming
13169 argument registers are propagated back to the parent. The compiler
13170 is told about this with #include <vfork.h>, but some compilers
13171 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13172 static variable whose address is put into a register that is
13173 clobbered by the vfork. */
13174static void
13175#ifdef __cplusplus
13176sparc_address_test (int arg)
13177# else
13178sparc_address_test (arg) int arg;
13179#endif
13180{
13181 static pid_t child;
13182 if (!child) {
13183 child = vfork ();
13184 if (child < 0) {
13185 perror ("vfork");
13186 _exit(2);
13187 }
13188 if (!child) {
13189 arg = getpid();
13190 write(-1, "", 0);
13191 _exit (arg);
13192 }
13193 }
13194}
13195
13196int
13197main ()
13198{
13199 pid_t parent = getpid ();
13200 pid_t child;
13201
13202 sparc_address_test (0);
13203
13204 child = vfork ();
13205
13206 if (child == 0) {
13207 /* Here is another test for sparc vfork register problems. This
13208 test uses lots of local variables, at least as many local
13209 variables as main has allocated so far including compiler
13210 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13211 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13212 reuse the register of parent for one of the local variables,
13213 since it will think that parent can't possibly be used any more
13214 in this routine. Assigning to the local variable will thus
13215 munge parent in the parent process. */
13216 pid_t
13217 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13218 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13219 /* Convince the compiler that p..p7 are live; otherwise, it might
13220 use the same hardware register for all 8 local variables. */
13221 if (p != p1 || p != p2 || p != p3 || p != p4
13222 || p != p5 || p != p6 || p != p7)
13223 _exit(1);
13224
13225 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13226 from child file descriptors. If the child closes a descriptor
13227 before it execs or exits, this munges the parent's descriptor
13228 as well. Test for this by closing stdout in the child. */
13229 _exit(close(fileno(stdout)) != 0);
13230 } else {
13231 int status;
13232 struct stat st;
13233
13234 while (wait(&status) != child)
13235 ;
81ecdfbb 13236 return (
a9322a30
TT
13237 /* Was there some problem with vforking? */
13238 child < 0
13239
13240 /* Did the child fail? (This shouldn't happen.) */
13241 || status
13242
13243 /* Did the vfork/compiler bug occur? */
13244 || parent != getpid()
13245
13246 /* Did the file descriptor bug occur? */
13247 || fstat(fileno(stdout), &st) != 0
13248 );
13249 }
13250}
13251_ACEOF
81ecdfbb 13252if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13253 ac_cv_func_vfork_works=yes
13254else
81ecdfbb 13255 ac_cv_func_vfork_works=no
a9322a30 13256fi
81ecdfbb
RW
13257rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13258 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13259fi
81ecdfbb 13260
a9322a30 13261fi
81ecdfbb
RW
13262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13263$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
13264
13265fi;
13266if test "x$ac_cv_func_fork_works" = xcross; then
13267 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
13268 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13269$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13270fi
13271
13272if test "x$ac_cv_func_vfork_works" = xyes; then
13273
81ecdfbb 13274$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
13275
13276else
13277
81ecdfbb 13278$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
13279
13280fi
13281if test "x$ac_cv_func_fork_works" = xyes; then
13282
81ecdfbb 13283$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
13284
13285fi
13286
cdf43629 13287for ac_func in getauxval getrusage getuid getgid \
bdca27a2 13288 pipe poll pread pread64 pwrite resize_term \
e671cd59 13289 sbrk getpgid setpgid setpgrp setsid \
9467110b 13290 sigaction sigprocmask sigsetmask socketpair \
110ed339 13291 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 13292 setrlimit getrlimit posix_madvise waitpid \
1d1d0bf7 13293 ptrace64 sigaltstack setns use_default_colors
81ecdfbb
RW
13294do :
13295 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13296ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13297if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6c7a06a3 13298 cat >>confdefs.h <<_ACEOF
81ecdfbb 13299#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
13300_ACEOF
13301
13302fi
13303done
13304
13305
81ecdfbb
RW
13306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13307$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 13308if ${am_cv_langinfo_codeset+:} false; then :
81ecdfbb 13309 $as_echo_n "(cached) " >&6
6c7a06a3 13310else
81ecdfbb 13311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
13312/* end confdefs.h. */
13313#include <langinfo.h>
13314int
13315main ()
13316{
13317char* cs = nl_langinfo(CODESET);
bec39cab
AC
13318 ;
13319 return 0;
13320}
13321_ACEOF
81ecdfbb 13322if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 13323 am_cv_langinfo_codeset=yes
a4db0f07 13324else
81ecdfbb 13325 am_cv_langinfo_codeset=no
a4db0f07 13326fi
81ecdfbb
RW
13327rm -f core conftest.err conftest.$ac_objext \
13328 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 13329
a4db0f07 13330fi
81ecdfbb
RW
13331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13332$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
13333 if test $am_cv_langinfo_codeset = yes; then
13334
81ecdfbb 13335$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 13336
6c7a06a3 13337 fi
c906108c 13338
d0ac1c44
SM
13339ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13340if test "x$ac_cv_type_size_t" = xyes; then :
13341
13342else
13343
13344cat >>confdefs.h <<_ACEOF
13345#define size_t unsigned int
13346_ACEOF
13347
13348fi
13349
06825bd1 13350
3266f10b
TT
13351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13352$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 13353if ${ac_cv_header_stdc+:} false; then :
3266f10b
TT
13354 $as_echo_n "(cached) " >&6
13355else
13356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13357/* end confdefs.h. */
13358#include <stdlib.h>
13359#include <stdarg.h>
13360#include <string.h>
13361#include <float.h>
13362
13363int
13364main ()
13365{
13366
13367 ;
13368 return 0;
13369}
13370_ACEOF
13371if ac_fn_c_try_compile "$LINENO"; then :
13372 ac_cv_header_stdc=yes
13373else
13374 ac_cv_header_stdc=no
13375fi
13376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13377
13378if test $ac_cv_header_stdc = yes; then
13379 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13381/* end confdefs.h. */
13382#include <string.h>
13383
13384_ACEOF
13385if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13386 $EGREP "memchr" >/dev/null 2>&1; then :
13387
13388else
13389 ac_cv_header_stdc=no
13390fi
13391rm -f conftest*
13392
13393fi
13394
13395if test $ac_cv_header_stdc = yes; then
13396 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13398/* end confdefs.h. */
13399#include <stdlib.h>
13400
13401_ACEOF
13402if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13403 $EGREP "free" >/dev/null 2>&1; then :
13404
13405else
13406 ac_cv_header_stdc=no
13407fi
13408rm -f conftest*
13409
13410fi
13411
13412if test $ac_cv_header_stdc = yes; then
13413 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13414 if test "$cross_compiling" = yes; then :
13415 :
13416else
13417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13418/* end confdefs.h. */
13419#include <ctype.h>
13420#include <stdlib.h>
13421#if ((' ' & 0x0FF) == 0x020)
13422# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13423# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13424#else
13425# define ISLOWER(c) \
13426 (('a' <= (c) && (c) <= 'i') \
13427 || ('j' <= (c) && (c) <= 'r') \
13428 || ('s' <= (c) && (c) <= 'z'))
13429# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13430#endif
13431
13432#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13433int
13434main ()
13435{
13436 int i;
13437 for (i = 0; i < 256; i++)
13438 if (XOR (islower (i), ISLOWER (i))
13439 || toupper (i) != TOUPPER (i))
13440 return 2;
13441 return 0;
13442}
13443_ACEOF
13444if ac_fn_c_try_run "$LINENO"; then :
13445
13446else
13447 ac_cv_header_stdc=no
13448fi
13449rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13450 conftest.$ac_objext conftest.beam conftest.$ac_ext
13451fi
13452
13453fi
13454fi
13455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
13456$as_echo "$ac_cv_header_stdc" >&6; }
13457if test $ac_cv_header_stdc = yes; then
13458
13459$as_echo "#define STDC_HEADERS 1" >>confdefs.h
13460
3266f10b
TT
13461fi
13462
13463 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13464# for constant arguments. Useless!
13465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13466$as_echo_n "checking for working alloca.h... " >&6; }
d0ac1c44 13467if ${ac_cv_working_alloca_h+:} false; then :
3266f10b
TT
13468 $as_echo_n "(cached) " >&6
13469else
13470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13471/* end confdefs.h. */
13472#include <alloca.h>
13473int
13474main ()
13475{
13476char *p = (char *) alloca (2 * sizeof (int));
13477 if (p) return 0;
13478 ;
13479 return 0;
13480}
13481_ACEOF
13482if ac_fn_c_try_link "$LINENO"; then :
13483 ac_cv_working_alloca_h=yes
13484else
13485 ac_cv_working_alloca_h=no
13486fi
13487rm -f core conftest.err conftest.$ac_objext \
13488 conftest$ac_exeext conftest.$ac_ext
13489fi
13490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13491$as_echo "$ac_cv_working_alloca_h" >&6; }
13492if test $ac_cv_working_alloca_h = yes; then
13493
13494$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
13495
13496fi
13497
13498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13499$as_echo_n "checking for alloca... " >&6; }
d0ac1c44 13500if ${ac_cv_func_alloca_works+:} false; then :
3266f10b
TT
13501 $as_echo_n "(cached) " >&6
13502else
13503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13504/* end confdefs.h. */
13505#ifdef __GNUC__
13506# define alloca __builtin_alloca
13507#else
13508# ifdef _MSC_VER
13509# include <malloc.h>
13510# define alloca _alloca
13511# else
13512# ifdef HAVE_ALLOCA_H
13513# include <alloca.h>
13514# else
13515# ifdef _AIX
13516 #pragma alloca
13517# else
13518# ifndef alloca /* predefined by HP cc +Olibcalls */
d0ac1c44 13519void *alloca (size_t);
3266f10b
TT
13520# endif
13521# endif
13522# endif
13523# endif
13524#endif
13525
13526int
13527main ()
13528{
13529char *p = (char *) alloca (1);
13530 if (p) return 0;
13531 ;
13532 return 0;
13533}
13534_ACEOF
13535if ac_fn_c_try_link "$LINENO"; then :
13536 ac_cv_func_alloca_works=yes
13537else
13538 ac_cv_func_alloca_works=no
13539fi
13540rm -f core conftest.err conftest.$ac_objext \
13541 conftest$ac_exeext conftest.$ac_ext
13542fi
13543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13544$as_echo "$ac_cv_func_alloca_works" >&6; }
13545
13546if test $ac_cv_func_alloca_works = yes; then
13547
13548$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13549
13550else
13551 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13552# that cause trouble. Some versions do not even contain alloca or
13553# contain a buggy version. If you still want to use their alloca,
13554# use ar to extract alloca.o from them instead of compiling alloca.c.
13555
13556ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
13557
13558$as_echo "#define C_ALLOCA 1" >>confdefs.h
13559
13560
13561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13562$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
d0ac1c44 13563if ${ac_cv_os_cray+:} false; then :
3266f10b
TT
13564 $as_echo_n "(cached) " >&6
13565else
13566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13567/* end confdefs.h. */
13568#if defined CRAY && ! defined CRAY2
13569webecray
13570#else
13571wenotbecray
13572#endif
13573
13574_ACEOF
13575if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13576 $EGREP "webecray" >/dev/null 2>&1; then :
13577 ac_cv_os_cray=yes
13578else
13579 ac_cv_os_cray=no
13580fi
13581rm -f conftest*
13582
13583fi
13584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13585$as_echo "$ac_cv_os_cray" >&6; }
13586if test $ac_cv_os_cray = yes; then
13587 for ac_func in _getb67 GETB67 getb67; do
13588 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13589ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13590if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
13591
13592cat >>confdefs.h <<_ACEOF
13593#define CRAY_STACKSEG_END $ac_func
13594_ACEOF
13595
13596 break
13597fi
13598
13599 done
13600fi
13601
13602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13603$as_echo_n "checking stack direction for C alloca... " >&6; }
d0ac1c44 13604if ${ac_cv_c_stack_direction+:} false; then :
3266f10b
TT
13605 $as_echo_n "(cached) " >&6
13606else
13607 if test "$cross_compiling" = yes; then :
13608 ac_cv_c_stack_direction=0
13609else
13610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13611/* end confdefs.h. */
13612$ac_includes_default
13613int
d0ac1c44 13614find_stack_direction (int *addr, int depth)
3266f10b 13615{
d0ac1c44
SM
13616 int dir, dummy = 0;
13617 if (! addr)
13618 addr = &dummy;
13619 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
13620 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
13621 return dir + dummy;
3266f10b
TT
13622}
13623
13624int
d0ac1c44 13625main (int argc, char **argv)
3266f10b 13626{
d0ac1c44 13627 return find_stack_direction (0, argc + !argv + 20) < 0;
3266f10b
TT
13628}
13629_ACEOF
13630if ac_fn_c_try_run "$LINENO"; then :
13631 ac_cv_c_stack_direction=1
13632else
13633 ac_cv_c_stack_direction=-1
13634fi
13635rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13636 conftest.$ac_objext conftest.beam conftest.$ac_ext
13637fi
13638
13639fi
13640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13641$as_echo "$ac_cv_c_stack_direction" >&6; }
13642cat >>confdefs.h <<_ACEOF
13643#define STACK_DIRECTION $ac_cv_c_stack_direction
13644_ACEOF
13645
13646
13647fi
13648
13649
13650
13651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13652$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 13653if ${am_cv_langinfo_codeset+:} false; then :
3266f10b
TT
13654 $as_echo_n "(cached) " >&6
13655else
13656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13657/* end confdefs.h. */
13658#include <langinfo.h>
13659int
13660main ()
13661{
13662char* cs = nl_langinfo(CODESET);
13663 ;
13664 return 0;
13665}
13666_ACEOF
13667if ac_fn_c_try_link "$LINENO"; then :
13668 am_cv_langinfo_codeset=yes
13669else
13670 am_cv_langinfo_codeset=no
13671fi
13672rm -f core conftest.err conftest.$ac_objext \
13673 conftest$ac_exeext conftest.$ac_ext
13674
13675fi
13676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13677$as_echo "$am_cv_langinfo_codeset" >&6; }
13678 if test $am_cv_langinfo_codeset = yes; then
13679
13680$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13681
13682 fi
13683
13684
44122162 13685 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
13686do :
13687 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13688ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 13689if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3266f10b
TT
13690 cat >>confdefs.h <<_ACEOF
13691#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13692_ACEOF
13693
13694fi
13695
13696done
13697
13698
f348d89a 13699 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction
3266f10b
TT
13700do :
13701 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13702ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13703if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
13704 cat >>confdefs.h <<_ACEOF
13705#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13706_ACEOF
13707
13708fi
13709done
13710
13711
13712 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
d0ac1c44 13713if test "x$ac_cv_have_decl_strerror" = xyes; then :
3266f10b
TT
13714 ac_have_decl=1
13715else
13716 ac_have_decl=0
13717fi
13718
13719cat >>confdefs.h <<_ACEOF
13720#define HAVE_DECL_STRERROR $ac_have_decl
13721_ACEOF
13722ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
d0ac1c44 13723if test "x$ac_cv_have_decl_strstr" = xyes; then :
3266f10b
TT
13724 ac_have_decl=1
13725else
13726 ac_have_decl=0
13727fi
13728
13729cat >>confdefs.h <<_ACEOF
13730#define HAVE_DECL_STRSTR $ac_have_decl
13731_ACEOF
13732
13733
e9bcb658
GB
13734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13735$as_echo_n "checking for sigsetjmp... " >&6; }
d0ac1c44 13736if ${gdb_cv_func_sigsetjmp+:} false; then :
e9bcb658
GB
13737 $as_echo_n "(cached) " >&6
13738else
13739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13740/* end confdefs.h. */
13741
13742#include <setjmp.h>
13743
13744int
13745main ()
13746{
13747sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
13748 ;
13749 return 0;
13750}
13751_ACEOF
13752if ac_fn_c_try_compile "$LINENO"; then :
13753 gdb_cv_func_sigsetjmp=yes
13754else
13755 gdb_cv_func_sigsetjmp=no
13756fi
13757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13758fi
13759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13760$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
13761if test $gdb_cv_func_sigsetjmp = yes; then
13762
13763$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
13764
13765fi
13766
3266f10b 13767
54019719
PA
13768# Check the return and argument types of ptrace.
13769
13770
54019719
PA
13771for ac_header in sys/ptrace.h ptrace.h
13772do :
13773 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13774ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 13775if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
54019719
PA
13776 cat >>confdefs.h <<_ACEOF
13777#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13778_ACEOF
13779
13780fi
13781
13782done
13783
13784
a3828db0 13785gdb_ptrace_headers='
4ff70b84 13786#include <sys/types.h>
a3828db0
MK
13787#if HAVE_SYS_PTRACE_H
13788# include <sys/ptrace.h>
13789#endif
13790#if HAVE_UNISTD_H
13791# include <unistd.h>
13792#endif
13793'
13794# There is no point in checking if we don't have a prototype.
9b30624b 13795ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
81ecdfbb 13796"
d0ac1c44 13797if test "x$ac_cv_have_decl_ptrace" = xyes; then :
81ecdfbb 13798 ac_have_decl=1
06825bd1 13799else
81ecdfbb 13800 ac_have_decl=0
06825bd1 13801fi
06825bd1 13802
a3828db0 13803cat >>confdefs.h <<_ACEOF
81ecdfbb 13804#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 13805_ACEOF
81ecdfbb 13806if test $ac_have_decl = 1; then :
bec39cab 13807
a3828db0 13808else
a3828db0
MK
13809
13810 : ${gdb_cv_func_ptrace_ret='int'}
13811 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13812
06825bd1
MK
13813fi
13814
064ef605
DJ
13815# Check return type. Varargs (used on GNU/Linux) conflict with the
13816# empty argument list, so check for that explicitly.
81ecdfbb
RW
13817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
13818$as_echo_n "checking return type of ptrace... " >&6; }
d0ac1c44 13819if ${gdb_cv_func_ptrace_ret+:} false; then :
81ecdfbb 13820 $as_echo_n "(cached) " >&6
bec39cab 13821else
81ecdfbb 13822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13823/* end confdefs.h. */
a3828db0 13824$gdb_ptrace_headers
bec39cab
AC
13825int
13826main ()
13827{
064ef605
DJ
13828extern long ptrace (enum __ptrace_request, ...);
13829 ;
13830 return 0;
13831}
13832_ACEOF
9b30624b 13833if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
13834 gdb_cv_func_ptrace_ret='long'
13835else
81ecdfbb 13836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13837/* end confdefs.h. */
13838$gdb_ptrace_headers
13839int
13840main ()
13841{
a3828db0 13842extern int ptrace ();
bec39cab
AC
13843 ;
13844 return 0;
13845}
13846_ACEOF
9b30624b 13847if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13848 gdb_cv_func_ptrace_ret='int'
70f9f479 13849else
81ecdfbb 13850 gdb_cv_func_ptrace_ret='long'
70f9f479 13851fi
81ecdfbb 13852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 13853fi
81ecdfbb 13854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 13855fi
81ecdfbb
RW
13856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13857$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 13858
a3828db0
MK
13859cat >>confdefs.h <<_ACEOF
13860#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 13861_ACEOF
70f9f479 13862
a3828db0 13863# Check argument types.
81ecdfbb
RW
13864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13865$as_echo_n "checking types of arguments for ptrace... " >&6; }
d0ac1c44 13866if ${gdb_cv_func_ptrace_args+:} false; then :
81ecdfbb 13867 $as_echo_n "(cached) " >&6
bec39cab 13868else
a3828db0 13869
81ecdfbb 13870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13871/* end confdefs.h. */
13872$gdb_ptrace_headers
13873int
13874main ()
13875{
13876extern long ptrace (enum __ptrace_request, ...);
13877 ;
13878 return 0;
13879}
13880_ACEOF
9b30624b 13881if ac_fn_c_try_compile "$LINENO"; then :
54019719 13882 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
064ef605 13883else
064ef605 13884
a3828db0
MK
13885for gdb_arg1 in 'int' 'long'; do
13886 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 13887 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 13888 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 13889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13890/* end confdefs.h. */
a3828db0 13891$gdb_ptrace_headers
bec39cab
AC
13892int
13893main ()
13894{
a3828db0
MK
13895
13896extern $gdb_cv_func_ptrace_ret
13897 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13898
bec39cab
AC
13899 ;
13900 return 0;
13901}
13902_ACEOF
9b30624b 13903if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13904 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13905 break 4;
5c7f2947 13906fi
81ecdfbb 13907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 13908 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 13909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13910/* end confdefs.h. */
a3828db0 13911$gdb_ptrace_headers
bec39cab
AC
13912int
13913main ()
13914{
a3828db0
MK
13915
13916extern $gdb_cv_func_ptrace_ret
13917 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13918
bec39cab
AC
13919 ;
13920 return 0;
13921}
13922_ACEOF
9b30624b 13923if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13924
13925gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13926 break 5;
78434e59 13927fi
81ecdfbb 13928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
13929 done
13930 done
13931 done
13932 done
13933done
13934# Provide a safe default value.
13935: ${gdb_cv_func_ptrace_args='int,int,long,long'}
13936
064ef605 13937fi
81ecdfbb 13938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 13939fi
81ecdfbb
RW
13940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13941$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
13942ac_save_IFS=$IFS; IFS=','
13943set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13944IFS=$ac_save_IFS
13945shift
bec39cab 13946
54019719
PA
13947cat >>confdefs.h <<_ACEOF
13948#define PTRACE_TYPE_ARG1 $1
13949_ACEOF
13950
13951
a3828db0
MK
13952cat >>confdefs.h <<_ACEOF
13953#define PTRACE_TYPE_ARG3 $3
13954_ACEOF
13955
96d7229d
LM
13956
13957cat >>confdefs.h <<_ACEOF
13958#define PTRACE_TYPE_ARG4 $4
13959_ACEOF
13960
a3828db0
MK
13961if test -n "$5"; then
13962
13963cat >>confdefs.h <<_ACEOF
13964#define PTRACE_TYPE_ARG5 $5
bec39cab 13965_ACEOF
78434e59
MK
13966
13967fi
13968
54019719 13969
a3828db0 13970if test "$cross_compiling" = no; then
81ecdfbb
RW
13971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13972$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
d0ac1c44 13973if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 13974 $as_echo_n "(cached) " >&6
a3828db0 13975else
81ecdfbb 13976 if test "$cross_compiling" = yes; then :
d0ac1c44 13977 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 13978else
81ecdfbb 13979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13980/* end confdefs.h. */
81ecdfbb 13981$ac_includes_default
bec39cab
AC
13982int
13983main ()
13984{
a3828db0
MK
13985/* If this system has a BSD-style setpgrp which takes arguments,
13986 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
13987 exit successfully. */
81ecdfbb 13988 return setpgrp (1,1) != -1;
bec39cab
AC
13989 ;
13990 return 0;
13991}
13992_ACEOF
81ecdfbb 13993if ac_fn_c_try_run "$LINENO"; then :
a3828db0 13994 ac_cv_func_setpgrp_void=no
c906108c 13995else
81ecdfbb 13996 ac_cv_func_setpgrp_void=yes
c906108c 13997fi
81ecdfbb
RW
13998rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13999 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14000fi
81ecdfbb 14001
a3828db0 14002fi
81ecdfbb
RW
14003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
14004$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
14005if test $ac_cv_func_setpgrp_void = yes; then
14006
81ecdfbb 14007$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
14008
14009fi
a3828db0
MK
14010
14011else
81ecdfbb
RW
14012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
14013$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
d0ac1c44 14014if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 14015 $as_echo_n "(cached) " >&6
97bf5e38 14016else
81ecdfbb 14017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14018/* end confdefs.h. */
a3828db0
MK
14019
14020#include <unistd.h>
14021
bec39cab
AC
14022int
14023main ()
14024{
a3828db0
MK
14025
14026 if (setpgrp(1,1) == -1)
14027 exit (0);
14028 else
14029 exit (1);
14030
bec39cab
AC
14031 ;
14032 return 0;
14033}
14034_ACEOF
81ecdfbb 14035if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14036 ac_cv_func_setpgrp_void=no
c906108c 14037else
81ecdfbb 14038 ac_cv_func_setpgrp_void=yes
c906108c 14039fi
81ecdfbb 14040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14041fi
81ecdfbb
RW
14042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
14043$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 14044if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 14045 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 14046
a3828db0 14047fi
c906108c
SS
14048fi
14049
db1ff28b
JK
14050# Assume we'll default to using the included libiberty regex.
14051gdb_use_included_regex=yes
14052
14053# However, if the system regex is GNU regex, then default to *not*
14054# using the included regex.
14055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
14056$as_echo_n "checking for GNU regex... " >&6; }
d0ac1c44 14057if ${gdb_cv_have_gnu_regex+:} false; then :
db1ff28b
JK
14058 $as_echo_n "(cached) " >&6
14059else
14060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14061/* end confdefs.h. */
14062#include <gnu-versions.h>
14063int
14064main ()
14065{
14066#define REGEX_INTERFACE_VERSION 1
14067#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
14068# error "Version mismatch"
14069#endif
14070 ;
14071 return 0;
14072}
14073_ACEOF
14074if ac_fn_c_try_compile "$LINENO"; then :
14075 gdb_cv_have_gnu_regex=yes
14076else
14077 gdb_cv_have_gnu_regex=no
14078fi
14079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14080fi
14081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
14082$as_echo "$gdb_cv_have_gnu_regex" >&6; }
14083if test $gdb_cv_have_gnu_regex = yes; then
14084 gdb_use_included_regex=no
14085fi
14086
14087
14088# Check whether --with-included-regex was given.
14089if test "${with_included_regex+set}" = set; then :
14090 withval=$with_included_regex; gdb_with_regex=$withval
14091else
14092 gdb_with_regex=$gdb_use_included_regex
14093fi
14094
14095if test "$gdb_with_regex" = yes; then
14096
14097$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
14098
14099fi
14100
81ecdfbb
RW
14101# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
14102ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
14103#include <sys/proc.h>
14104
14105"
d0ac1c44 14106if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
c906108c 14107
5c45e068 14108cat >>confdefs.h <<_ACEOF
a3828db0 14109#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 14110_ACEOF
c906108c 14111
5c45e068 14112
97bf5e38 14113fi
c906108c 14114
5c45e068 14115
a3828db0 14116# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
14117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
14118$as_echo_n "checking for struct lwp... " >&6; }
d0ac1c44 14119if ${gdb_cv_struct_lwp+:} false; then :
81ecdfbb 14120 $as_echo_n "(cached) " >&6
bec39cab 14121else
81ecdfbb 14122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14123/* end confdefs.h. */
a3828db0 14124#include <sys/param.h>
c49fbc6c 14125#define _KMEMUSER
a3828db0 14126#include <sys/lwp.h>
bec39cab
AC
14127int
14128main ()
14129{
a3828db0 14130struct lwp l;
bec39cab
AC
14131 ;
14132 return 0;
14133}
14134_ACEOF
81ecdfbb 14135if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14136 gdb_cv_struct_lwp=yes
c906108c 14137else
81ecdfbb 14138 gdb_cv_struct_lwp=no
c906108c 14139fi
81ecdfbb 14140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14141fi
81ecdfbb
RW
14142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
14143$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 14144if test $gdb_cv_struct_lwp = yes; then
c906108c 14145
81ecdfbb 14146$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 14147
97bf5e38 14148fi
c906108c 14149
a3828db0 14150# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
14151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
14152$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
d0ac1c44 14153if ${gdb_cv_struct_reg+:} false; then :
81ecdfbb 14154 $as_echo_n "(cached) " >&6
bec39cab 14155else
81ecdfbb 14156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14157/* end confdefs.h. */
a3828db0
MK
14158#include <sys/types.h>
14159#include <machine/reg.h>
bec39cab
AC
14160int
14161main ()
14162{
a3828db0 14163struct reg r;
bec39cab
AC
14164 ;
14165 return 0;
14166}
14167_ACEOF
81ecdfbb 14168if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14169 gdb_cv_struct_reg=yes
27ca5dad 14170else
81ecdfbb 14171 gdb_cv_struct_reg=no
27ca5dad 14172fi
81ecdfbb 14173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 14174fi
81ecdfbb
RW
14175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
14176$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 14177if test $gdb_cv_struct_reg = yes; then
bec39cab 14178
81ecdfbb 14179$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
14180
14181fi
97bf5e38 14182
a3828db0
MK
14183# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
14184# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
a6e69c1f
JB
14185ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
14186#include <machine/reg.h>
81ecdfbb 14187"
d0ac1c44 14188if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
5c45e068
MK
14189
14190cat >>confdefs.h <<_ACEOF
a3828db0 14191#define HAVE_STRUCT_REG_R_FS 1
bec39cab 14192_ACEOF
3862412b 14193
5c45e068 14194
97bf5e38 14195fi
a6e69c1f
JB
14196ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
14197#include <machine/reg.h>
81ecdfbb 14198"
d0ac1c44 14199if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
5c45e068
MK
14200
14201cat >>confdefs.h <<_ACEOF
a3828db0 14202#define HAVE_STRUCT_REG_R_GS 1
bec39cab 14203_ACEOF
3862412b 14204
5c45e068 14205
97bf5e38 14206fi
3862412b 14207
5c45e068 14208
6fea9e18
L
14209# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
14210# Older amd64 Linux's don't have the fs_base and gs_base members of
14211# `struct user_regs_struct'.
f517c180
EA
14212ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/types.h>
14213#include <sys/user.h>
6fea9e18 14214"
d0ac1c44 14215if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then :
6fea9e18
L
14216
14217cat >>confdefs.h <<_ACEOF
14218#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
14219_ACEOF
14220
14221
14222fi
f517c180
EA
14223ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/types.h>
14224#include <sys/user.h>
6fea9e18 14225"
d0ac1c44 14226if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then :
6fea9e18
L
14227
14228cat >>confdefs.h <<_ACEOF
14229#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
14230_ACEOF
14231
14232
14233fi
14234
14235
a3828db0 14236# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
14237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
14238$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
d0ac1c44 14239if ${gdb_cv_have_ptrace_getregs+:} false; then :
81ecdfbb 14240 $as_echo_n "(cached) " >&6
451928c5 14241else
81ecdfbb 14242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14243/* end confdefs.h. */
a3828db0 14244#include <sys/ptrace.h>
bec39cab
AC
14245int
14246main ()
14247{
a3828db0 14248PTRACE_GETREGS;
bec39cab
AC
14249 ;
14250 return 0;
14251}
14252_ACEOF
81ecdfbb 14253if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14254 gdb_cv_have_ptrace_getregs=yes
451928c5 14255else
81ecdfbb 14256 gdb_cv_have_ptrace_getregs=no
451928c5 14257fi
81ecdfbb 14258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14259fi
14260
81ecdfbb
RW
14261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
14262$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 14263if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 14264
81ecdfbb 14265$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 14266
97bf5e38 14267fi
451928c5 14268
a3828db0 14269# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
14270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
14271$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
d0ac1c44 14272if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
81ecdfbb 14273 $as_echo_n "(cached) " >&6
451928c5 14274else
81ecdfbb 14275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14276/* end confdefs.h. */
a3828db0 14277#include <sys/ptrace.h>
bec39cab
AC
14278int
14279main ()
14280{
a3828db0 14281PTRACE_GETFPXREGS;
bec39cab
AC
14282 ;
14283 return 0;
14284}
14285_ACEOF
81ecdfbb 14286if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14287 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 14288else
81ecdfbb 14289 gdb_cv_have_ptrace_getfpxregs=no
451928c5 14290fi
81ecdfbb 14291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14292fi
14293
81ecdfbb
RW
14294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
14295$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 14296if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 14297
81ecdfbb 14298$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 14299
97bf5e38 14300fi
451928c5 14301
a3828db0 14302# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
14303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
14304$as_echo_n "checking for PT_GETDBREGS... " >&6; }
d0ac1c44 14305if ${gdb_cv_have_pt_getdbregs+:} false; then :
81ecdfbb 14306 $as_echo_n "(cached) " >&6
3862412b 14307else
81ecdfbb 14308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14309/* end confdefs.h. */
a3828db0
MK
14310#include <sys/types.h>
14311#include <sys/ptrace.h>
bec39cab
AC
14312int
14313main ()
14314{
a3828db0 14315PT_GETDBREGS;
bec39cab
AC
14316 ;
14317 return 0;
14318}
14319_ACEOF
81ecdfbb 14320if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14321 gdb_cv_have_pt_getdbregs=yes
3862412b 14322else
81ecdfbb 14323 gdb_cv_have_pt_getdbregs=no
3862412b 14324fi
81ecdfbb 14325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14326fi
14327
81ecdfbb
RW
14328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
14329$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 14330if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 14331
81ecdfbb 14332$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 14333
97bf5e38 14334fi
3862412b 14335
a3828db0 14336# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
14337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
14338$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
d0ac1c44 14339if ${gdb_cv_have_pt_getxmmregs+:} false; then :
81ecdfbb 14340 $as_echo_n "(cached) " >&6
3862412b 14341else
81ecdfbb 14342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14343/* end confdefs.h. */
a3828db0
MK
14344#include <sys/types.h>
14345#include <sys/ptrace.h>
bec39cab
AC
14346int
14347main ()
14348{
a3828db0 14349PT_GETXMMREGS;
bec39cab
AC
14350 ;
14351 return 0;
14352}
14353_ACEOF
81ecdfbb 14354if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14355 gdb_cv_have_pt_getxmmregs=yes
3862412b 14356else
81ecdfbb 14357 gdb_cv_have_pt_getxmmregs=no
3862412b 14358fi
81ecdfbb 14359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14360fi
14361
81ecdfbb
RW
14362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
14363$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 14364if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 14365
81ecdfbb 14366$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 14367
97bf5e38 14368fi
3862412b 14369
6e9567fe
JB
14370# See if <sys/ptrace.h> supports LWP names on FreeBSD
14371# Older FreeBSD versions don't have the pl_tdname member of
14372# `struct ptrace_lwpinfo'.
14373ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
14374"
d0ac1c44 14375if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
6e9567fe
JB
14376
14377cat >>confdefs.h <<_ACEOF
14378#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
14379_ACEOF
14380
14381
14382fi
14383
14384
e6cdd38e
JB
14385# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
14386# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
14387# FreeBSD 10.3.
14388ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
14389"
d0ac1c44 14390if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
e6cdd38e
JB
14391
14392cat >>confdefs.h <<_ACEOF
14393#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
14394_ACEOF
14395
14396
14397fi
14398
6e9567fe 14399
97bf5e38 14400if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
14401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
14402$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14403 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
81ecdfbb 14404 $as_echo_n "(cached) " >&6
596c9d4b 14405else
81ecdfbb 14406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14407/* end confdefs.h. */
596c9d4b
KB
14408
14409#define _SYSCALL32
d30c5336
JK
14410/* Needed for new procfs interface on sparc-solaris. */
14411#define _STRUCTURED_PROC 1
596c9d4b 14412#include <sys/procfs.h>
bec39cab
AC
14413int
14414main ()
14415{
97bf5e38 14416gregset_t avar
bec39cab
AC
14417 ;
14418 return 0;
14419}
14420_ACEOF
81ecdfbb 14421if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14422 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 14423else
81ecdfbb 14424 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 14425
596c9d4b 14426fi
81ecdfbb 14427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
14428fi
14429
97bf5e38 14430 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 14431
81ecdfbb 14432$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
14433
14434 fi
81ecdfbb
RW
14435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14436$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 14437
81ecdfbb
RW
14438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
14439$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14440 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
81ecdfbb 14441 $as_echo_n "(cached) " >&6
d84dd0c5 14442else
81ecdfbb 14443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14444/* end confdefs.h. */
97bf5e38
MK
14445
14446#define _SYSCALL32
d30c5336
JK
14447/* Needed for new procfs interface on sparc-solaris. */
14448#define _STRUCTURED_PROC 1
d84dd0c5 14449#include <sys/procfs.h>
bec39cab
AC
14450int
14451main ()
14452{
97bf5e38 14453fpregset_t avar
bec39cab
AC
14454 ;
14455 return 0;
14456}
14457_ACEOF
81ecdfbb 14458if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14459 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 14460else
81ecdfbb 14461 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 14462
d84dd0c5 14463fi
81ecdfbb 14464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
14465fi
14466
97bf5e38 14467 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 14468
81ecdfbb 14469$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 14470
97bf5e38 14471 fi
81ecdfbb
RW
14472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14473$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 14474
81ecdfbb
RW
14475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
14476$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14477 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
81ecdfbb 14478 $as_echo_n "(cached) " >&6
c906108c 14479else
81ecdfbb 14480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14481/* end confdefs.h. */
c906108c 14482
97bf5e38 14483#define _SYSCALL32
d30c5336
JK
14484/* Needed for new procfs interface on sparc-solaris. */
14485#define _STRUCTURED_PROC 1
97bf5e38 14486#include <sys/procfs.h>
bec39cab
AC
14487int
14488main ()
14489{
97bf5e38 14490prgregset_t avar
bec39cab
AC
14491 ;
14492 return 0;
14493}
14494_ACEOF
81ecdfbb 14495if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14496 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 14497else
81ecdfbb 14498 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 14499
c906108c 14500fi
81ecdfbb 14501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14502fi
14503
97bf5e38 14504 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 14505
81ecdfbb 14506$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 14507
97bf5e38 14508 fi
81ecdfbb
RW
14509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14510$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 14511
81ecdfbb
RW
14512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
14513$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14514 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
81ecdfbb 14515 $as_echo_n "(cached) " >&6
d45fe813 14516else
81ecdfbb 14517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14518/* end confdefs.h. */
97bf5e38
MK
14519
14520#define _SYSCALL32
d30c5336
JK
14521/* Needed for new procfs interface on sparc-solaris. */
14522#define _STRUCTURED_PROC 1
97bf5e38 14523#include <sys/procfs.h>
bec39cab
AC
14524int
14525main ()
14526{
97bf5e38 14527prfpregset_t avar
bec39cab
AC
14528 ;
14529 return 0;
14530}
14531_ACEOF
81ecdfbb 14532if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14533 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 14534else
81ecdfbb 14535 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 14536
d45fe813 14537fi
81ecdfbb 14538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14539fi
14540
97bf5e38 14541 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 14542
81ecdfbb 14543$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 14544
97bf5e38 14545 fi
81ecdfbb
RW
14546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14547$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 14548
81ecdfbb
RW
14549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14550$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
d0ac1c44 14551 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
81ecdfbb 14552 $as_echo_n "(cached) " >&6
d45fe813 14553else
81ecdfbb 14554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14555/* end confdefs.h. */
97bf5e38
MK
14556
14557#define _SYSCALL32
d30c5336
JK
14558/* Needed for new procfs interface on sparc-solaris. */
14559#define _STRUCTURED_PROC 1
97bf5e38 14560#include <sys/procfs.h>
bec39cab
AC
14561int
14562main ()
14563{
97bf5e38 14564prgregset32_t avar
bec39cab
AC
14565 ;
14566 return 0;
14567}
14568_ACEOF
81ecdfbb 14569if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14570 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 14571else
81ecdfbb 14572 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 14573
d45fe813 14574fi
81ecdfbb 14575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14576fi
14577
97bf5e38 14578 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 14579
81ecdfbb 14580$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 14581
97bf5e38 14582 fi
81ecdfbb
RW
14583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14584$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 14585
81ecdfbb
RW
14586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14587$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
d0ac1c44 14588 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
81ecdfbb 14589 $as_echo_n "(cached) " >&6
d45fe813 14590else
81ecdfbb 14591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14592/* end confdefs.h. */
97bf5e38 14593
d45fe813 14594#define _SYSCALL32
d30c5336
JK
14595/* Needed for new procfs interface on sparc-solaris. */
14596#define _STRUCTURED_PROC 1
97bf5e38 14597#include <sys/procfs.h>
bec39cab
AC
14598int
14599main ()
14600{
97bf5e38 14601lwpid_t avar
bec39cab
AC
14602 ;
14603 return 0;
14604}
14605_ACEOF
81ecdfbb 14606if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14607 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 14608else
81ecdfbb 14609 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 14610
d45fe813 14611fi
81ecdfbb 14612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14613fi
14614
97bf5e38 14615 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 14616
81ecdfbb 14617$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 14618
97bf5e38 14619 fi
81ecdfbb
RW
14620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14621$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 14622
81ecdfbb
RW
14623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14624$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
d0ac1c44 14625 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
81ecdfbb 14626 $as_echo_n "(cached) " >&6
c906108c 14627else
81ecdfbb 14628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14629/* end confdefs.h. */
c906108c 14630
97bf5e38 14631#define _SYSCALL32
d30c5336
JK
14632/* Needed for new procfs interface on sparc-solaris. */
14633#define _STRUCTURED_PROC 1
97bf5e38 14634#include <sys/procfs.h>
bec39cab
AC
14635int
14636main ()
14637{
97bf5e38 14638psaddr_t avar
bec39cab
AC
14639 ;
14640 return 0;
14641}
14642_ACEOF
81ecdfbb 14643if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14644 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 14645else
81ecdfbb 14646 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 14647
c906108c 14648fi
81ecdfbb 14649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14650fi
14651
97bf5e38 14652 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 14653
81ecdfbb 14654$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 14655
97bf5e38 14656 fi
81ecdfbb
RW
14657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14658$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 14659
43b7e92b
GB
14660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
14661$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
14662 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
14663 $as_echo_n "(cached) " >&6
14664else
14665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14666/* end confdefs.h. */
14667
14668#define _SYSCALL32
14669/* Needed for new procfs interface on sparc-solaris. */
14670#define _STRUCTURED_PROC 1
14671#include <sys/procfs.h>
14672int
14673main ()
14674{
14675elf_fpregset_t avar
14676 ;
14677 return 0;
14678}
14679_ACEOF
14680if ac_fn_c_try_compile "$LINENO"; then :
14681 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
14682else
14683 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
14684
14685fi
14686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14687fi
14688
14689 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
14690
14691$as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
14692
14693 fi
14694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
14695$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
14696
c906108c 14697fi
c906108c 14698
bc8bcb4b 14699# Check if the compiler supports the `long long' type.
c906108c 14700
81ecdfbb
RW
14701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14702$as_echo_n "checking for long long support in compiler... " >&6; }
d0ac1c44 14703if ${gdb_cv_c_long_long+:} false; then :
81ecdfbb 14704 $as_echo_n "(cached) " >&6
97bf5e38 14705else
81ecdfbb 14706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14707/* end confdefs.h. */
bc8bcb4b 14708extern long long foo;
bec39cab
AC
14709int
14710main ()
14711{
bc8bcb4b 14712switch (foo & 2) { case 0: return 1; }
bec39cab
AC
14713 ;
14714 return 0;
14715}
14716_ACEOF
81ecdfbb 14717if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14718 gdb_cv_c_long_long=yes
14719else
81ecdfbb 14720 gdb_cv_c_long_long=no
97bf5e38 14721fi
81ecdfbb 14722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14723fi
81ecdfbb
RW
14724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14725$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
14726if test $gdb_cv_c_long_long != yes; then
14727 # libdecnumber requires long long.
d0ac1c44 14728 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
14729fi
14730
bc8bcb4b 14731# Check if the compiler and runtime support printing long longs.
97bf5e38 14732
81ecdfbb
RW
14733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14734$as_echo_n "checking for long long support in printf... " >&6; }
d0ac1c44 14735if ${gdb_cv_printf_has_long_long+:} false; then :
81ecdfbb 14736 $as_echo_n "(cached) " >&6
97bf5e38 14737else
81ecdfbb 14738 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14739 gdb_cv_printf_has_long_long=no
14740else
81ecdfbb 14741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14742/* end confdefs.h. */
bc8bcb4b
MK
14743$ac_includes_default
14744int
14745main ()
14746{
14747char buf[32];
97bf5e38
MK
14748 long long l = 0;
14749 l = (l << 16) + 0x0123;
14750 l = (l << 16) + 0x4567;
14751 l = (l << 16) + 0x89ab;
14752 l = (l << 16) + 0xcdef;
14753 sprintf (buf, "0x%016llx", l);
14754 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
14755 ;
14756 return 0;
c906108c 14757}
bec39cab 14758_ACEOF
81ecdfbb 14759if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14760 gdb_cv_printf_has_long_long=yes
14761else
81ecdfbb 14762 gdb_cv_printf_has_long_long=no
97bf5e38 14763fi
81ecdfbb
RW
14764rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14765 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14766fi
81ecdfbb 14767
97bf5e38 14768fi
81ecdfbb
RW
14769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14770$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 14771if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 14772
81ecdfbb 14773$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14774
14775fi
97bf5e38 14776
1a619819
LM
14777# Check if the compiler and runtime support printing decfloats.
14778
81ecdfbb
RW
14779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14780$as_echo_n "checking for decfloat support in printf... " >&6; }
d0ac1c44 14781if ${gdb_cv_printf_has_decfloat+:} false; then :
81ecdfbb 14782 $as_echo_n "(cached) " >&6
1a619819 14783else
81ecdfbb 14784 if test "$cross_compiling" = yes; then :
1a619819
LM
14785 gdb_cv_printf_has_decfloat=no
14786else
81ecdfbb 14787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
14788/* end confdefs.h. */
14789$ac_includes_default
14790int
14791main ()
14792{
14793char buf[64];
14794 _Decimal32 d32 = 1.2345df;
14795 _Decimal64 d64 = 1.2345dd;
14796 _Decimal128 d128 = 1.2345dl;
14797 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14798 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14799 ;
14800 return 0;
14801}
14802_ACEOF
81ecdfbb 14803if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
14804 gdb_cv_printf_has_decfloat=yes
14805else
81ecdfbb 14806 gdb_cv_printf_has_decfloat=no
1a619819 14807fi
81ecdfbb
RW
14808rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14809 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 14810fi
81ecdfbb 14811
1a619819 14812fi
81ecdfbb
RW
14813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14814$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
14815if test $gdb_cv_printf_has_decfloat = yes; then
14816
81ecdfbb 14817$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
14818
14819fi
14820
bc8bcb4b
MK
14821# Check if the compiler supports the `long double' type. We can't use
14822# AC_C_LONG_DOUBLE because that one does additional checks on the
14823# constants defined in <float.h> that fail on some systems,
14824# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 14825
81ecdfbb
RW
14826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14827$as_echo_n "checking for long double support in compiler... " >&6; }
d0ac1c44 14828if ${gdb_cv_c_long_double+:} false; then :
81ecdfbb 14829 $as_echo_n "(cached) " >&6
97bf5e38 14830else
81ecdfbb 14831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14832/* end confdefs.h. */
97bf5e38 14833long double foo;
bec39cab 14834_ACEOF
81ecdfbb 14835if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 14836 gdb_cv_c_long_double=yes
97bf5e38 14837else
81ecdfbb 14838 gdb_cv_c_long_double=no
97bf5e38 14839fi
81ecdfbb 14840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14841fi
81ecdfbb
RW
14842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14843$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 14844if test $gdb_cv_c_long_double = yes; then
c906108c 14845
81ecdfbb 14846$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14847
14848fi
14849
bc8bcb4b 14850# Check if the compiler and runtime support printing long doubles.
97bf5e38 14851
81ecdfbb
RW
14852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14853$as_echo_n "checking for long double support in printf... " >&6; }
d0ac1c44 14854if ${gdb_cv_printf_has_long_double+:} false; then :
81ecdfbb 14855 $as_echo_n "(cached) " >&6
97bf5e38 14856else
81ecdfbb 14857 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14858 gdb_cv_printf_has_long_double=no
14859else
81ecdfbb 14860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14861/* end confdefs.h. */
bc8bcb4b
MK
14862$ac_includes_default
14863int
14864main ()
14865{
14866char buf[16];
97bf5e38
MK
14867 long double f = 3.141592653;
14868 sprintf (buf, "%Lg", f);
14869 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
14870 ;
14871 return 0;
97bf5e38 14872}
bec39cab 14873_ACEOF
81ecdfbb 14874if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14875 gdb_cv_printf_has_long_double=yes
c906108c 14876else
81ecdfbb 14877 gdb_cv_printf_has_long_double=no
c906108c 14878fi
81ecdfbb
RW
14879rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14880 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14881fi
81ecdfbb 14882
c906108c 14883fi
81ecdfbb
RW
14884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14885$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 14886if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 14887
81ecdfbb 14888$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14889
14890fi
97bf5e38 14891
bc8bcb4b 14892# Check if the compiler and runtime support scanning long doubles.
97bf5e38 14893
81ecdfbb
RW
14894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14895$as_echo_n "checking for long double support in scanf... " >&6; }
d0ac1c44 14896if ${gdb_cv_scanf_has_long_double+:} false; then :
81ecdfbb 14897 $as_echo_n "(cached) " >&6
97bf5e38 14898else
81ecdfbb 14899 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14900 gdb_cv_scanf_has_long_double=no
14901else
81ecdfbb 14902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14903/* end confdefs.h. */
bc8bcb4b
MK
14904#include <stdio.h>
14905int
14906main ()
14907{
14908char *buf = "3.141592653";
97bf5e38
MK
14909 long double f = 0;
14910 sscanf (buf, "%Lg", &f);
14911 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
14912 ;
14913 return 0;
97bf5e38 14914}
bec39cab 14915_ACEOF
81ecdfbb 14916if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14917 gdb_cv_scanf_has_long_double=yes
14918else
81ecdfbb 14919 gdb_cv_scanf_has_long_double=no
97bf5e38 14920fi
81ecdfbb
RW
14921rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14922 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14923fi
81ecdfbb 14924
c906108c 14925fi
81ecdfbb
RW
14926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14927$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 14928if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 14929
81ecdfbb 14930$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14931
14932fi
c906108c 14933
438013df
AO
14934case ${host_os} in
14935aix*)
81ecdfbb
RW
14936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14937$as_echo_n "checking for -bbigtoc option... " >&6; }
d0ac1c44 14938if ${gdb_cv_bigtoc+:} false; then :
81ecdfbb 14939 $as_echo_n "(cached) " >&6
438013df 14940else
bec39cab 14941
438013df
AO
14942 SAVE_LDFLAGS=$LDFLAGS
14943
14944 case $GCC in
14945 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14946 *) gdb_cv_bigtoc=-bbigtoc ;;
14947 esac
14948
14949 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 14950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14951/* end confdefs.h. */
438013df 14952
bec39cab
AC
14953int
14954main ()
14955{
438013df 14956int i;
bec39cab
AC
14957 ;
14958 return 0;
14959}
14960_ACEOF
81ecdfbb 14961if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14962
81ecdfbb
RW
14963else
14964 gdb_cv_bigtoc=
438013df 14965fi
81ecdfbb
RW
14966rm -f core conftest.err conftest.$ac_objext \
14967 conftest$ac_exeext conftest.$ac_ext
ec76baa5 14968 LDFLAGS="${SAVE_LDFLAGS}"
438013df 14969
bec39cab 14970fi
81ecdfbb
RW
14971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
14972$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
14973 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
14974 ;;
14975esac
14976
38f6b338 14977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 14978$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
14979dynamic_list=false
14980if test "${gdb_native}" = yes; then
14981 # The dynamically loaded libthread_db needs access to symbols in the gdb
14982 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
14983 # may not be supported there.
14984 old_LDFLAGS="$LDFLAGS"
14985 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
14986 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
14987 LDFLAGS="$LDFLAGS $RDYNAMIC"
14988 if test "${have_libpython}" = no; then
14989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
14990/* end confdefs.h. */
14991
14992int
14993main ()
14994{
14995
14996 ;
14997 return 0;
14998}
14999_ACEOF
15000if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
15001 dynamic_list=true
15002fi
15003rm -f core conftest.err conftest.$ac_objext \
15004 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
15005 else
15006 # Workaround http://bugs.python.org/issue4434 where static
15007 # libpythonX.Y.a would get its symbols required for
15008 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
15009 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
15010
15011 # Note the workaround for Python
15012 # http://bugs.python.org/issue10112 earlier has removed
15013 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
15014 # here too, as otherwise it'd make this -Wl,--dynamic-list test
15015 # always pass.
38f6b338
JK
15016 old_CFLAGS="$CFLAGS"
15017 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
15018 old_LIBS="$LIBS"
15019 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
15020 old_CPPFLAGS="$CPPFLAGS"
15021 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 15022 if test "$cross_compiling" = yes; then :
3bebe2f2 15023 true
f6528abd 15024else
3bebe2f2
JK
15025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15026/* end confdefs.h. */
1b4f615e 15027#include "Python.h"
3bebe2f2
JK
15028int
15029main ()
15030{
15031int err;
38f6b338
JK
15032 Py_Initialize ();
15033 err = PyRun_SimpleString ("import itertools\n");
15034 Py_Finalize ();
15035 return err == 0 ? 0 : 1;
3bebe2f2
JK
15036 ;
15037 return 0;
15038}
15039_ACEOF
15040if ac_fn_c_try_run "$LINENO"; then :
15041 dynamic_list=true
15042fi
15043rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15044 conftest.$ac_objext conftest.beam conftest.$ac_ext
15045fi
15046
8c1fb155 15047 LIBS="$old_LIBS"
38f6b338 15048 CFLAGS="$old_CFLAGS"
1b4f615e 15049 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
15050 fi
15051 LDFLAGS="$old_LDFLAGS"
15052fi
15053if $dynamic_list; then
15054 found="-Wl,--dynamic-list"
15055 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 15056else
38f6b338
JK
15057 found="-rdynamic"
15058 RDYNAMIC="-rdynamic"
f6528abd 15059fi
f6528abd 15060
38f6b338 15061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 15062$as_echo "$found" >&6; }
0407b3f1 15063
f6528abd 15064
0407b3f1 15065if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 15066 case ${host_os} in
d92419e5 15067 aix*)
81ecdfbb
RW
15068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
15069$as_echo_n "checking for AiX thread debugging library... " >&6; }
d0ac1c44 15070 if ${gdb_cv_have_aix_thread_debug+:} false; then :
81ecdfbb 15071 $as_echo_n "(cached) " >&6
bec39cab 15072else
81ecdfbb 15073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15074/* end confdefs.h. */
d92419e5 15075#include <sys/pthdebug.h>
bec39cab
AC
15076int
15077main ()
15078{
d92419e5
JB
15079#ifndef PTHDB_VERSION_3
15080 #error
15081 #endif
bec39cab
AC
15082 ;
15083 return 0;
15084}
15085_ACEOF
81ecdfbb 15086if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
15087 gdb_cv_have_aix_thread_debug=yes
15088else
81ecdfbb 15089 gdb_cv_have_aix_thread_debug=no
d92419e5 15090fi
81ecdfbb 15091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
15092fi
15093
81ecdfbb
RW
15094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
15095$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
15096 if test $gdb_cv_have_aix_thread_debug = yes; then
15097 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 15098 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 15099 LIBS="$LIBS -lpthdebug"
d645e32e
JB
15100
15101 # Older versions of AIX do not provide the declaration for
15102 # the getthrds function (it appears that it was introduced
15103 # with AIX 6.x).
15104 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
15105"
d0ac1c44 15106if test "x$ac_cv_have_decl_getthrds" = xyes; then :
d645e32e
JB
15107 ac_have_decl=1
15108else
15109 ac_have_decl=0
15110fi
15111
15112cat >>confdefs.h <<_ACEOF
15113#define HAVE_DECL_GETTHRDS $ac_have_decl
15114_ACEOF
15115
d92419e5
JB
15116 fi
15117 ;;
c906108c 15118 esac
bec39cab 15119
c906108c
SS
15120fi
15121
3f47be5c 15122if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
15123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
15124$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
d0ac1c44 15125if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
81ecdfbb 15126 $as_echo_n "(cached) " >&6
bec39cab 15127else
81ecdfbb 15128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15129/* end confdefs.h. */
3f47be5c 15130#include <thread_db.h>
bec39cab
AC
15131int
15132main ()
15133{
3f47be5c 15134int i = TD_NOTALLOC;
bec39cab
AC
15135 ;
15136 return 0;
15137}
15138_ACEOF
81ecdfbb 15139if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
15140 gdb_cv_thread_db_h_has_td_notalloc=yes
15141else
81ecdfbb 15142 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 15143
3f47be5c 15144fi
81ecdfbb 15145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 15146
bec39cab 15147fi
81ecdfbb
RW
15148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
15149$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
15150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
15151$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
d0ac1c44 15152if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
81ecdfbb 15153 $as_echo_n "(cached) " >&6
59f80f10 15154else
81ecdfbb 15155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
15156/* end confdefs.h. */
15157#include <thread_db.h>
15158int
15159main ()
15160{
15161int i = TD_VERSION;
15162 ;
15163 return 0;
15164}
15165_ACEOF
81ecdfbb 15166if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15167 gdb_cv_thread_db_h_has_td_version=yes
15168else
81ecdfbb 15169 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
15170
15171fi
81ecdfbb 15172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15173
15174fi
81ecdfbb
RW
15175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
15176$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
15177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
15178$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
d0ac1c44 15179if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
81ecdfbb 15180 $as_echo_n "(cached) " >&6
59f80f10 15181else
81ecdfbb 15182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
15183/* end confdefs.h. */
15184#include <thread_db.h>
15185int
15186main ()
15187{
15188int i = TD_NOTLS;
15189 ;
15190 return 0;
15191}
15192_ACEOF
81ecdfbb 15193if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15194 gdb_cv_thread_db_h_has_td_notls=yes
15195else
81ecdfbb 15196 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
15197
15198fi
81ecdfbb 15199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15200
15201fi
81ecdfbb
RW
15202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
15203$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
15204fi
15205if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 15206
81ecdfbb 15207$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 15208
59f80f10
DJ
15209fi
15210if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
15211
81ecdfbb 15212$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
15213
15214fi
15215if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
15216
81ecdfbb 15217$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 15218
3f47be5c
EZ
15219fi
15220
81ecdfbb
RW
15221ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
15222"
d0ac1c44 15223if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
81ecdfbb 15224 ac_have_decl=1
10568435 15225else
81ecdfbb 15226 ac_have_decl=0
10568435 15227fi
10568435
JK
15228
15229cat >>confdefs.h <<_ACEOF
81ecdfbb 15230#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
15231_ACEOF
15232
15233
81ecdfbb
RW
15234if test "$cross_compiling" = yes; then :
15235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15236/* end confdefs.h. */
15237#include <sys/personality.h>
15238int
15239main ()
15240{
15241
15242# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15243# define ADDR_NO_RANDOMIZE 0x0040000
15244# endif
15245 /* Test the flag could be set and stays set. */
15246 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15247 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15248 return 1
15249 ;
15250 return 0;
15251}
15252_ACEOF
81ecdfbb 15253if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
15254 have_personality=true
15255else
81ecdfbb 15256 have_personality=false
10568435 15257fi
81ecdfbb
RW
15258rm -f core conftest.err conftest.$ac_objext \
15259 conftest$ac_exeext conftest.$ac_ext
10568435 15260else
81ecdfbb 15261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15262/* end confdefs.h. */
15263#include <sys/personality.h>
15264int
15265main ()
15266{
15267
15268# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15269# define ADDR_NO_RANDOMIZE 0x0040000
15270# endif
15271 /* Test the flag could be set and stays set. */
15272 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15273 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15274 return 1
15275 ;
15276 return 0;
15277}
15278_ACEOF
81ecdfbb 15279if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
15280 have_personality=true
15281else
81ecdfbb 15282 have_personality=false
10568435 15283fi
81ecdfbb
RW
15284rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15285 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 15286fi
81ecdfbb 15287
10568435
JK
15288if $have_personality
15289then
15290
81ecdfbb 15291$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
15292
15293fi
15294
e655c1a2
PA
15295case $host_os in
15296 go32* | *djgpp*)
15297 gdbinit=gdb.ini
15298 ;;
15299 *)
15300 gdbinit=.gdbinit
15301 ;;
15302esac
15303
15304cat >>confdefs.h <<_ACEOF
15305#define GDBINIT "$gdbinit"
15306_ACEOF
15307
15308
fb40c209 15309
f83d8a90
DE
15310# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
15311# except that the argument to --with-sysroot is optional.
15312# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
15313if test "x$with_sysroot" = xyes; then
15314 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
15315fi
bec39cab 15316
81ecdfbb
RW
15317# Check whether --with-sysroot was given.
15318if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
15319 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
15320else
15321 TARGET_SYSTEM_ROOT=
15322fi
030292b7 15323
030292b7 15324
f83d8a90
DE
15325 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15326 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15327 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
15328 ac_define_dir=`eval echo $ac_define_dir`
030292b7 15329
f83d8a90
DE
15330cat >>confdefs.h <<_ACEOF
15331#define TARGET_SYSTEM_ROOT "$ac_define_dir"
15332_ACEOF
bec39cab 15333
030292b7 15334
b14b1491 15335
f83d8a90
DE
15336
15337 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15338 if test "x$prefix" = xNONE; then
15339 test_prefix=/usr/local
15340 else
15341 test_prefix=$prefix
15342 fi
15343 else
15344 test_prefix=$exec_prefix
15345 fi
15346 value=0
15347 case ${ac_define_dir} in
15348 "${test_prefix}"|"${test_prefix}/"*|\
15349 '${exec_prefix}'|'${exec_prefix}/'*)
15350 value=1
15351 ;;
15352 esac
15353
15354cat >>confdefs.h <<_ACEOF
15355#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
15356_ACEOF
030292b7
DJ
15357
15358
15359
16e7150e 15360
16e7150e 15361
81ecdfbb
RW
15362# Check whether --with-system-gdbinit was given.
15363if test "${with_system_gdbinit+set}" = set; then :
15364 withval=$with_system_gdbinit;
b14b1491
TT
15365 SYSTEM_GDBINIT=$withval
15366else
15367 SYSTEM_GDBINIT=
81ecdfbb
RW
15368fi
15369
16e7150e
JG
15370
15371 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15372 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 15373 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
15374 ac_define_dir=`eval echo $ac_define_dir`
15375
15376cat >>confdefs.h <<_ACEOF
15377#define SYSTEM_GDBINIT "$ac_define_dir"
15378_ACEOF
15379
15380
15381
0c4a4063 15382
b14b1491
TT
15383 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15384 if test "x$prefix" = xNONE; then
15385 test_prefix=/usr/local
15386 else
15387 test_prefix=$prefix
15388 fi
15389 else
15390 test_prefix=$exec_prefix
15391 fi
15392 value=0
15393 case ${ac_define_dir} in
15394 "${test_prefix}"|"${test_prefix}/"*|\
15395 '${exec_prefix}'|'${exec_prefix}/'*)
15396 value=1
15397 ;;
15398 esac
16e7150e 15399
b14b1491
TT
15400cat >>confdefs.h <<_ACEOF
15401#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
15402_ACEOF
15403
b14b1491 15404
16e7150e 15405
0c4a4063 15406
b835bb52 15407
81ecdfbb
RW
15408# Check whether --enable-werror was given.
15409if test "${enable_werror+set}" = set; then :
15410 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
15411 yes | y) ERROR_ON_WARNING="yes" ;;
15412 no | n) ERROR_ON_WARNING="no" ;;
d0ac1c44 15413 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 15414 esac
81ecdfbb
RW
15415fi
15416
094a342e 15417
9a084706
PA
15418# Enable -Werror by default when using gcc. Turn it off for releases.
15419if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
15420 ERROR_ON_WARNING=yes
15421fi
15422
15423WERROR_CFLAGS=""
15424if test "${ERROR_ON_WARNING}" = yes ; then
15425 WERROR_CFLAGS="-Werror"
15426fi
15427
cf6de44d 15428# The options we'll try to enable.
aac331e4 15429build_warnings="-Wall -Wpointer-arith \
a0de763e 15430-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
aac331e4 15431-Wno-switch -Wno-char-subscripts \
cf6de44d 15432-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
d3d8724a 15433-Wno-sign-compare -Wno-error=maybe-uninitialized \
7f8a5d38 15434-Wno-mismatched-tags \
632e107b 15435-Wno-error=deprecated-register \
85e26832 15436-Wsuggest-override \
1a34f210 15437-Wimplicit-fallthrough=3 \
96643e35 15438-Wduplicated-cond \
33a6bc35
TT
15439-Wshadow=local \
15440-Wdeprecated-copy \
15441-Wdeprecated-copy-dtor \
15442-Wredundant-move"
3bc3d82a 15443
3526781e 15444case "${host}" in
4fa7574e
RO
15445 *-*-mingw32*)
15446 # Enable -Wno-format by default when using gcc on mingw since many
15447 # GCC versions complain about %I64.
15448 build_warnings="$build_warnings -Wno-format" ;;
15449 *-*-solaris*)
15450 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
15451 # doesn't understand.
15452 build_warnings="$build_warnings -Wno-unknown-pragmas"
15453 # Solaris 11 <unistd.h> marks vfork deprecated.
15454 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
f1628857
TT
15455 *)
15456 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
15457 # but there's a special case for this below.
15458 build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
15459esac
15460
81ecdfbb
RW
15461# Check whether --enable-build-warnings was given.
15462if test "${enable_build_warnings+set}" = set; then :
15463 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
15464 yes) ;;
15465 no) build_warnings="-w";;
15466 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15467 build_warnings="${build_warnings} ${t}";;
15468 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15469 build_warnings="${t} ${build_warnings}";;
15470 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15471esac
d4f3574e 15472if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 15473 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 15474fi
81ecdfbb
RW
15475fi
15476# Check whether --enable-gdb-build-warnings was given.
15477if test "${enable_gdb_build_warnings+set}" = set; then :
15478 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
15479 yes) ;;
15480 no) build_warnings="-w";;
15481 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15482 build_warnings="${build_warnings} ${t}";;
15483 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15484 build_warnings="${t} ${build_warnings}";;
15485 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15486esac
15487if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15488 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
15489fi
81ecdfbb 15490fi
3bc3d82a
PA
15491
15492# The set of warnings supported by a C++ compiler is not the same as
15493# of the C compiler.
cf6de44d 15494ac_ext=cpp
3bc3d82a
PA
15495ac_cpp='$CXXCPP $CPPFLAGS'
15496ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15497ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15498ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15499
3bc3d82a 15500
81ecdfbb 15501WARN_CFLAGS=""
c906108c
SS
15502if test "x${build_warnings}" != x -a "x$GCC" = xyes
15503then
81ecdfbb
RW
15504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
15505$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
15506 # Separate out the -Werror flag as some files just cannot be
15507 # compiled with it enabled.
15508 for w in ${build_warnings}; do
7544db95
PA
15509 # GCC does not complain about -Wno-unknown-warning. Invert
15510 # and test -Wunknown-warning instead.
15511 case $w in
15512 -Wno-*)
15513 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
f1628857
TT
15514 -Wformat-nonliteral)
15515 # gcc requires -Wformat before -Wformat-nonliteral
15516 # will work, so stick them together.
15517 w="-Wformat $w"
15518 wtest="$w"
15519 ;;
7544db95
PA
15520 *)
15521 wtest=$w ;;
15522 esac
15523
746a987d
AC
15524 case $w in
15525 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
15526 *)
15527 # Check whether GCC accepts it.
4536bbc6 15528 saved_CFLAGS="$CFLAGS"
3e019bdc 15529 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 15530 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 15531 CXXFLAGS="$CXXFLAGS -Werror $wtest"
a0de763e
TT
15532 if test "x$w" = "x-Wunused-variable"; then
15533 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
15534 # fixed in GCC 4.9. This test is derived from the gdb
15535 # source code that triggered this bug in GCC.
15536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15537/* end confdefs.h. */
15538struct scoped_restore_base {};
15539 struct scoped_restore_tmpl : public scoped_restore_base {
15540 ~scoped_restore_tmpl() {}
15541 };
15542int
15543main ()
15544{
15545const scoped_restore_base &b = scoped_restore_tmpl();
15546 ;
15547 return 0;
15548}
15549_ACEOF
15550if ac_fn_cxx_try_compile "$LINENO"; then :
15551 WARN_CFLAGS="${WARN_CFLAGS} $w"
15552fi
15553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15554 else
15555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15556/* end confdefs.h. */
4536bbc6 15557
bec39cab
AC
15558int
15559main ()
15560{
4536bbc6 15561
bec39cab
AC
15562 ;
15563 return 0;
15564}
15565_ACEOF
3bc3d82a 15566if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 15567 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 15568fi
81ecdfbb 15569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a0de763e 15570 fi
4536bbc6 15571 CFLAGS="$saved_CFLAGS"
3bc3d82a 15572 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
15573 esac
15574 done
81ecdfbb
RW
15575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
15576$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
15577fi
15578
15579
104c1213 15580
cf6de44d 15581ac_ext=c
3bc3d82a
PA
15582ac_cpp='$CPP $CPPFLAGS'
15583ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15584ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15585ac_compiler_gnu=$ac_cv_c_compiler_gnu
15586
3bc3d82a 15587
b835bb52 15588
f35d5ade
TT
15589# Check whether --enable-ubsan was given.
15590if test "${enable_ubsan+set}" = set; then :
15591 enableval=$enable_ubsan;
15592else
eff98030 15593 enable_ubsan=no
f35d5ade
TT
15594fi
15595
15596if test "x$enable_ubsan" = xauto; then
15597 if $development; then
15598 enable_ubsan=yes
15599 fi
15600fi
15601ac_ext=cpp
15602ac_cpp='$CXXCPP $CPPFLAGS'
15603ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15604ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15605ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15606
15607if test "x$enable_ubsan" = xyes; then
15608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
15609$as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
15610 saved_CXXFLAGS="$CXXFLAGS"
15611 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
15612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15613/* end confdefs.h. */
15614
15615int
15616main ()
15617{
15618
15619 ;
15620 return 0;
15621}
15622_ACEOF
15623if ac_fn_cxx_try_link "$LINENO"; then :
15624 enable_ubsan=yes
15625else
15626 enable_ubsan=no
15627fi
15628rm -f core conftest.err conftest.$ac_objext \
15629 conftest$ac_exeext conftest.$ac_ext
15630 CXXFLAGS="$saved_CXXFLAGS"
15631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
15632$as_echo "$enable_ubsan" >&6; }
15633 if test "x$enable_ubsan" = xyes; then
15634 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
15635 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
15636 fi
15637fi
15638ac_ext=c
15639ac_cpp='$CPP $CPPFLAGS'
15640ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15641ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15642ac_compiler_gnu=$ac_cv_c_compiler_gnu
15643
15644
15645
7a292a7a 15646# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
15647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
15648$as_echo_n "checking for cygwin... " >&6; }
d0ac1c44 15649if ${gdb_cv_os_cygwin+:} false; then :
81ecdfbb 15650 $as_echo_n "(cached) " >&6
bec39cab 15651else
81ecdfbb 15652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15653/* end confdefs.h. */
7a292a7a
SS
15654
15655#if defined (__CYGWIN__) || defined (__CYGWIN32__)
15656lose
15657#endif
bec39cab 15658_ACEOF
7a292a7a 15659if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 15660 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
15661 gdb_cv_os_cygwin=yes
15662else
7a292a7a
SS
15663 gdb_cv_os_cygwin=no
15664fi
15665rm -f conftest*
15666
15667fi
81ecdfbb
RW
15668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
15669$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 15670
aff38e61 15671
3eb25fda 15672SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 15673case ${host} in
95cbc983
AC
15674 *go32* ) SER_HARDWIRE=ser-go32.o ;;
15675 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 15676 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
c1168a2f 15677 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
aff38e61
AC
15678esac
15679
15680
cd0fc7c3
SS
15681# libreadline needs libuser32.a in a cygwin environment
15682WIN32LIBS=
15683if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
15684 WIN32LIBS="-luser32"
15685 case "${target}" in
15686 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15687 ;;
15688 esac
cd0fc7c3 15689fi
c906108c 15690
b4505029
MM
15691# The ser-tcp.c module requires sockets.
15692case ${host} in
15693 *mingw32*)
15694
81ecdfbb 15695$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
15696
15697 WIN32LIBS="$WIN32LIBS -lws2_32"
15698 ;;
15699esac
15700
7a292a7a 15701
31d99776 15702# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
15703
15704 OLD_CFLAGS=$CFLAGS
15705 OLD_LDFLAGS=$LDFLAGS
15706 OLD_LIBS=$LIBS
15707 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15708 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15709 # always want our bfd.
15710 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15711 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15712 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 15713 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15714 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 15715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb 15716$as_echo_n "checking for ELF support in BFD... " >&6; }
d0ac1c44 15717if ${gdb_cv_var_elf+:} false; then :
81ecdfbb 15718 $as_echo_n "(cached) " >&6
31d99776 15719else
81ecdfbb 15720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
15721/* end confdefs.h. */
15722#include <stdlib.h>
def63ff0
TT
15723 #include "bfd.h"
15724 #include "elf-bfd.h"
31d99776
DJ
15725
15726int
15727main ()
15728{
def63ff0 15729return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
15730 ;
15731 return 0;
15732}
15733_ACEOF
81ecdfbb 15734if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
15735 gdb_cv_var_elf=yes
15736else
81ecdfbb 15737 gdb_cv_var_elf=no
31d99776 15738fi
81ecdfbb
RW
15739rm -f core conftest.err conftest.$ac_objext \
15740 conftest$ac_exeext conftest.$ac_ext
31d99776 15741fi
81ecdfbb
RW
15742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15743$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
15744 CFLAGS=$OLD_CFLAGS
15745 LDFLAGS=$OLD_LDFLAGS
15746 LIBS=$OLD_LIBS
31d99776 15747if test $gdb_cv_var_elf = yes; then
d4777acb 15748 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 15749
81ecdfbb 15750$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 15751
075ff26d
JK
15752 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15753 if test "$plugins" = "yes"; then
a48b32c0
L
15754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
15755$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 15756if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15757 $as_echo_n "(cached) " >&6
15758else
15759 ac_func_search_save_LIBS=$LIBS
15760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15761/* end confdefs.h. */
15762
15763/* Override any GCC internal prototype to avoid an error.
15764 Use char because int might match the return type of a GCC
15765 builtin and then its argument prototype would still apply. */
15766#ifdef __cplusplus
15767extern "C"
15768#endif
15769char dlopen ();
15770int
15771main ()
15772{
15773return dlopen ();
15774 ;
15775 return 0;
15776}
15777_ACEOF
15778for ac_lib in '' dl; do
15779 if test -z "$ac_lib"; then
15780 ac_res="none required"
15781 else
15782 ac_res=-l$ac_lib
15783 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15784 fi
15785 if ac_fn_c_try_link "$LINENO"; then :
15786 ac_cv_search_dlopen=$ac_res
15787fi
15788rm -f core conftest.err conftest.$ac_objext \
15789 conftest$ac_exeext
d0ac1c44 15790 if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15791 break
15792fi
15793done
d0ac1c44 15794if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15795
15796else
15797 ac_cv_search_dlopen=no
15798fi
15799rm conftest.$ac_ext
15800LIBS=$ac_func_search_save_LIBS
15801fi
15802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
15803$as_echo "$ac_cv_search_dlopen" >&6; }
15804ac_res=$ac_cv_search_dlopen
15805if test "$ac_res" != no; then :
15806 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15807
15808fi
15809
075ff26d 15810 fi
31d99776 15811fi
31d99776 15812
4f05add4
TT
15813# Add macho support to GDB, but only if BFD includes it.
15814
15815 OLD_CFLAGS=$CFLAGS
15816 OLD_LDFLAGS=$LDFLAGS
15817 OLD_LIBS=$LIBS
15818 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15819 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15820 # always want our bfd.
15821 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15822 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15823 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 15824 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15825 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
15826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
15827$as_echo_n "checking for Mach-O support in BFD... " >&6; }
d0ac1c44 15828if ${gdb_cv_var_macho+:} false; then :
4f05add4
TT
15829 $as_echo_n "(cached) " >&6
15830else
15831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15832/* end confdefs.h. */
15833#include <stdlib.h>
15834 #include "bfd.h"
15835 #include "mach-o.h"
15836
15837int
15838main ()
15839{
15840return bfd_mach_o_lookup_command (NULL, 0, NULL);
15841 ;
15842 return 0;
15843}
15844_ACEOF
15845if ac_fn_c_try_link "$LINENO"; then :
15846 gdb_cv_var_macho=yes
15847else
15848 gdb_cv_var_macho=no
15849fi
15850rm -f core conftest.err conftest.$ac_objext \
15851 conftest$ac_exeext conftest.$ac_ext
15852fi
15853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
15854$as_echo "$gdb_cv_var_macho" >&6; }
15855 CFLAGS=$OLD_CFLAGS
15856 LDFLAGS=$OLD_LDFLAGS
15857 LIBS=$OLD_LIBS
15858if test $gdb_cv_var_macho = yes; then
15859 CONFIG_OBS="$CONFIG_OBS machoread.o"
15860fi
15861
121ce6e5
DJ
15862# Add any host-specific objects to GDB.
15863CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15864
608e2dbb
TT
15865# If building on ELF, look for lzma support for embedded compressed debug info.
15866if test $gdb_cv_var_elf = yes; then
15867
15868# Check whether --with-lzma was given.
15869if test "${with_lzma+set}" = set; then :
15870 withval=$with_lzma;
15871else
15872 with_lzma=auto
15873fi
15874
15875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
15876$as_echo_n "checking whether to use lzma... " >&6; }
15877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
15878$as_echo "$with_lzma" >&6; }
15879
15880 if test "${with_lzma}" != no; then
15881
15882
15883
15884
15885
15886
15887
15888
15889 use_additional=yes
15890
15891 acl_save_prefix="$prefix"
15892 prefix="$acl_final_prefix"
15893 acl_save_exec_prefix="$exec_prefix"
15894 exec_prefix="$acl_final_exec_prefix"
15895
15896 eval additional_includedir=\"$includedir\"
15897 eval additional_libdir=\"$libdir\"
15898
15899 exec_prefix="$acl_save_exec_prefix"
15900 prefix="$acl_save_prefix"
15901
15902
15903# Check whether --with-liblzma-prefix was given.
15904if test "${with_liblzma_prefix+set}" = set; then :
15905 withval=$with_liblzma_prefix;
15906 if test "X$withval" = "Xno"; then
15907 use_additional=no
15908 else
15909 if test "X$withval" = "X"; then
15910
15911 acl_save_prefix="$prefix"
15912 prefix="$acl_final_prefix"
15913 acl_save_exec_prefix="$exec_prefix"
15914 exec_prefix="$acl_final_exec_prefix"
15915
15916 eval additional_includedir=\"$includedir\"
15917 eval additional_libdir=\"$libdir\"
15918
15919 exec_prefix="$acl_save_exec_prefix"
15920 prefix="$acl_save_prefix"
15921
15922 else
15923 additional_includedir="$withval/include"
15924 additional_libdir="$withval/lib"
15925 fi
15926 fi
15927
15928fi
15929
15930 LIBLZMA=
15931 LTLIBLZMA=
15932 INCLZMA=
15933 rpathdirs=
15934 ltrpathdirs=
15935 names_already_handled=
15936 names_next_round='lzma '
15937 while test -n "$names_next_round"; do
15938 names_this_round="$names_next_round"
15939 names_next_round=
15940 for name in $names_this_round; do
15941 already_handled=
15942 for n in $names_already_handled; do
15943 if test "$n" = "$name"; then
15944 already_handled=yes
15945 break
15946 fi
15947 done
15948 if test -z "$already_handled"; then
15949 names_already_handled="$names_already_handled $name"
15950 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
15951 eval value=\"\$HAVE_LIB$uppername\"
15952 if test -n "$value"; then
15953 if test "$value" = yes; then
15954 eval value=\"\$LIB$uppername\"
15955 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
15956 eval value=\"\$LTLIB$uppername\"
15957 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
15958 else
15959 :
15960 fi
15961 else
15962 found_dir=
15963 found_la=
15964 found_so=
15965 found_a=
15966 if test $use_additional = yes; then
15967 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
15968 found_dir="$additional_libdir"
15969 found_so="$additional_libdir/lib$name.$shlibext"
15970 if test -f "$additional_libdir/lib$name.la"; then
15971 found_la="$additional_libdir/lib$name.la"
15972 fi
15973 else
15974 if test -f "$additional_libdir/lib$name.$libext"; then
15975 found_dir="$additional_libdir"
15976 found_a="$additional_libdir/lib$name.$libext"
15977 if test -f "$additional_libdir/lib$name.la"; then
15978 found_la="$additional_libdir/lib$name.la"
15979 fi
15980 fi
15981 fi
15982 fi
15983 if test "X$found_dir" = "X"; then
15984 for x in $LDFLAGS $LTLIBLZMA; do
15985
15986 acl_save_prefix="$prefix"
15987 prefix="$acl_final_prefix"
15988 acl_save_exec_prefix="$exec_prefix"
15989 exec_prefix="$acl_final_exec_prefix"
15990 eval x=\"$x\"
15991 exec_prefix="$acl_save_exec_prefix"
15992 prefix="$acl_save_prefix"
15993
15994 case "$x" in
15995 -L*)
15996 dir=`echo "X$x" | sed -e 's/^X-L//'`
15997 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
15998 found_dir="$dir"
15999 found_so="$dir/lib$name.$shlibext"
16000 if test -f "$dir/lib$name.la"; then
16001 found_la="$dir/lib$name.la"
16002 fi
16003 else
16004 if test -f "$dir/lib$name.$libext"; then
16005 found_dir="$dir"
16006 found_a="$dir/lib$name.$libext"
16007 if test -f "$dir/lib$name.la"; then
16008 found_la="$dir/lib$name.la"
16009 fi
16010 fi
16011 fi
16012 ;;
16013 esac
16014 if test "X$found_dir" != "X"; then
16015 break
16016 fi
16017 done
16018 fi
16019 if test "X$found_dir" != "X"; then
16020 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
16021 if test "X$found_so" != "X"; then
16022 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
16023 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16024 else
16025 haveit=
16026 for x in $ltrpathdirs; do
16027 if test "X$x" = "X$found_dir"; then
16028 haveit=yes
16029 break
16030 fi
16031 done
16032 if test -z "$haveit"; then
16033 ltrpathdirs="$ltrpathdirs $found_dir"
16034 fi
16035 if test "$hardcode_direct" = yes; then
16036 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16037 else
16038 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
16039 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16040 haveit=
16041 for x in $rpathdirs; do
16042 if test "X$x" = "X$found_dir"; then
16043 haveit=yes
16044 break
16045 fi
16046 done
16047 if test -z "$haveit"; then
16048 rpathdirs="$rpathdirs $found_dir"
16049 fi
16050 else
16051 haveit=
16052 for x in $LDFLAGS $LIBLZMA; do
16053
16054 acl_save_prefix="$prefix"
16055 prefix="$acl_final_prefix"
16056 acl_save_exec_prefix="$exec_prefix"
16057 exec_prefix="$acl_final_exec_prefix"
16058 eval x=\"$x\"
16059 exec_prefix="$acl_save_exec_prefix"
16060 prefix="$acl_save_prefix"
16061
16062 if test "X$x" = "X-L$found_dir"; then
16063 haveit=yes
16064 break
16065 fi
16066 done
16067 if test -z "$haveit"; then
16068 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
16069 fi
16070 if test "$hardcode_minus_L" != no; then
16071 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16072 else
16073 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16074 fi
16075 fi
16076 fi
16077 fi
16078 else
16079 if test "X$found_a" != "X"; then
16080 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
16081 else
16082 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
16083 fi
16084 fi
16085 additional_includedir=
16086 case "$found_dir" in
16087 */lib | */lib/)
16088 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16089 additional_includedir="$basedir/include"
16090 ;;
16091 esac
16092 if test "X$additional_includedir" != "X"; then
16093 if test "X$additional_includedir" != "X/usr/include"; then
16094 haveit=
16095 if test "X$additional_includedir" = "X/usr/local/include"; then
16096 if test -n "$GCC"; then
16097 case $host_os in
16098 linux*) haveit=yes;;
16099 esac
16100 fi
16101 fi
16102 if test -z "$haveit"; then
16103 for x in $CPPFLAGS $INCLZMA; do
16104
16105 acl_save_prefix="$prefix"
16106 prefix="$acl_final_prefix"
16107 acl_save_exec_prefix="$exec_prefix"
16108 exec_prefix="$acl_final_exec_prefix"
16109 eval x=\"$x\"
16110 exec_prefix="$acl_save_exec_prefix"
16111 prefix="$acl_save_prefix"
16112
16113 if test "X$x" = "X-I$additional_includedir"; then
16114 haveit=yes
16115 break
16116 fi
16117 done
16118 if test -z "$haveit"; then
16119 if test -d "$additional_includedir"; then
16120 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
16121 fi
16122 fi
16123 fi
16124 fi
16125 fi
16126 if test -n "$found_la"; then
16127 save_libdir="$libdir"
16128 case "$found_la" in
16129 */* | *\\*) . "$found_la" ;;
16130 *) . "./$found_la" ;;
16131 esac
16132 libdir="$save_libdir"
16133 for dep in $dependency_libs; do
16134 case "$dep" in
16135 -L*)
16136 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16137 if test "X$additional_libdir" != "X/usr/lib"; then
16138 haveit=
16139 if test "X$additional_libdir" = "X/usr/local/lib"; then
16140 if test -n "$GCC"; then
16141 case $host_os in
16142 linux*) haveit=yes;;
16143 esac
16144 fi
16145 fi
16146 if test -z "$haveit"; then
16147 haveit=
16148 for x in $LDFLAGS $LIBLZMA; do
16149
16150 acl_save_prefix="$prefix"
16151 prefix="$acl_final_prefix"
16152 acl_save_exec_prefix="$exec_prefix"
16153 exec_prefix="$acl_final_exec_prefix"
16154 eval x=\"$x\"
16155 exec_prefix="$acl_save_exec_prefix"
16156 prefix="$acl_save_prefix"
16157
16158 if test "X$x" = "X-L$additional_libdir"; then
16159 haveit=yes
16160 break
16161 fi
16162 done
16163 if test -z "$haveit"; then
16164 if test -d "$additional_libdir"; then
16165 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
16166 fi
16167 fi
16168 haveit=
16169 for x in $LDFLAGS $LTLIBLZMA; do
16170
16171 acl_save_prefix="$prefix"
16172 prefix="$acl_final_prefix"
16173 acl_save_exec_prefix="$exec_prefix"
16174 exec_prefix="$acl_final_exec_prefix"
16175 eval x=\"$x\"
16176 exec_prefix="$acl_save_exec_prefix"
16177 prefix="$acl_save_prefix"
16178
16179 if test "X$x" = "X-L$additional_libdir"; then
16180 haveit=yes
16181 break
16182 fi
16183 done
16184 if test -z "$haveit"; then
16185 if test -d "$additional_libdir"; then
16186 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
16187 fi
16188 fi
16189 fi
16190 fi
16191 ;;
16192 -R*)
16193 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16194 if test "$enable_rpath" != no; then
16195 haveit=
16196 for x in $rpathdirs; do
16197 if test "X$x" = "X$dir"; then
16198 haveit=yes
16199 break
16200 fi
16201 done
16202 if test -z "$haveit"; then
16203 rpathdirs="$rpathdirs $dir"
16204 fi
16205 haveit=
16206 for x in $ltrpathdirs; do
16207 if test "X$x" = "X$dir"; then
16208 haveit=yes
16209 break
16210 fi
16211 done
16212 if test -z "$haveit"; then
16213 ltrpathdirs="$ltrpathdirs $dir"
16214 fi
16215 fi
16216 ;;
16217 -l*)
16218 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16219 ;;
16220 *.la)
16221 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16222 ;;
16223 *)
16224 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
16225 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
16226 ;;
16227 esac
16228 done
16229 fi
16230 else
16231 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16232 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
16233 fi
16234 fi
16235 fi
16236 done
16237 done
16238 if test "X$rpathdirs" != "X"; then
16239 if test -n "$hardcode_libdir_separator"; then
16240 alldirs=
16241 for found_dir in $rpathdirs; do
16242 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16243 done
16244 acl_save_libdir="$libdir"
16245 libdir="$alldirs"
16246 eval flag=\"$hardcode_libdir_flag_spec\"
16247 libdir="$acl_save_libdir"
16248 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16249 else
16250 for found_dir in $rpathdirs; do
16251 acl_save_libdir="$libdir"
16252 libdir="$found_dir"
16253 eval flag=\"$hardcode_libdir_flag_spec\"
16254 libdir="$acl_save_libdir"
16255 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16256 done
16257 fi
16258 fi
16259 if test "X$ltrpathdirs" != "X"; then
16260 for found_dir in $ltrpathdirs; do
16261 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
16262 done
16263 fi
16264
16265
16266 ac_save_CPPFLAGS="$CPPFLAGS"
16267
16268 for element in $INCLZMA; do
16269 haveit=
16270 for x in $CPPFLAGS; do
16271
16272 acl_save_prefix="$prefix"
16273 prefix="$acl_final_prefix"
16274 acl_save_exec_prefix="$exec_prefix"
16275 exec_prefix="$acl_final_exec_prefix"
16276 eval x=\"$x\"
16277 exec_prefix="$acl_save_exec_prefix"
16278 prefix="$acl_save_prefix"
16279
16280 if test "X$x" = "X$element"; then
16281 haveit=yes
16282 break
16283 fi
16284 done
16285 if test -z "$haveit"; then
16286 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16287 fi
16288 done
16289
16290
16291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
16292$as_echo_n "checking for liblzma... " >&6; }
d0ac1c44 16293if ${ac_cv_liblzma+:} false; then :
608e2dbb
TT
16294 $as_echo_n "(cached) " >&6
16295else
16296
16297 ac_save_LIBS="$LIBS"
16298 LIBS="$LIBS $LIBLZMA"
16299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16300/* end confdefs.h. */
16301#include "lzma.h"
16302int
16303main ()
16304{
16305lzma_index_iter iter;
16306 lzma_index_iter_init (&iter, 0);
16307 lzma_mf_is_supported (LZMA_MF_HC3);
16308 ;
16309 return 0;
16310}
16311_ACEOF
16312if ac_fn_c_try_link "$LINENO"; then :
16313 ac_cv_liblzma=yes
16314else
16315 ac_cv_liblzma=no
16316fi
16317rm -f core conftest.err conftest.$ac_objext \
16318 conftest$ac_exeext conftest.$ac_ext
16319 LIBS="$ac_save_LIBS"
16320
16321fi
16322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
16323$as_echo "$ac_cv_liblzma" >&6; }
16324 if test "$ac_cv_liblzma" = yes; then
16325 HAVE_LIBLZMA=yes
16326
16327$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
16328
16329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
16330$as_echo_n "checking how to link with liblzma... " >&6; }
16331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
16332$as_echo "$LIBLZMA" >&6; }
16333 else
16334 HAVE_LIBLZMA=no
16335 CPPFLAGS="$ac_save_CPPFLAGS"
16336 LIBLZMA=
16337 LTLIBLZMA=
16338 fi
16339
16340
16341
16342
16343
16344
16345 if test "$HAVE_LIBLZMA" != yes; then
16346 if test "$with_lzma" = yes; then
d0ac1c44 16347 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
608e2dbb
TT
16348 fi
16349 fi
16350 fi
16351fi
16352
3fc11d3e
JM
16353LIBGUI="../libgui/src/libgui.a"
16354GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
16355
16356
7a292a7a 16357
3fc11d3e
JM
16358WIN32LDAPP=
16359
16360
16361
d91670b9 16362case "${host}" in
686a5eed 16363*-*-cygwin* | *-*-mingw* )
d91670b9
CV
16364 configdir="win"
16365 ;;
16366*)
16367 configdir="unix"
16368 ;;
16369esac
3fc11d3e
JM
16370
16371GDBTKLIBS=
16372if test "${enable_gdbtk}" = "yes"; then
16373
d1c3b63a
KS
16374 # Gdbtk must have an absolute path to srcdir in order to run
16375 # properly when not installed.
16376 here=`pwd`
16377 cd ${srcdir}
16378 GDBTK_SRC_DIR=`pwd`
16379 cd $here
16380
bec39cab 16381
5062cc19
KS
16382 #
16383 # Ok, lets find the tcl configuration
16384 # First, look for one uninstalled.
16385 # the alternative search directory is invoked by --with-tcl
16386 #
3fc11d3e 16387
5062cc19
KS
16388 if test x"${no_tcl}" = x ; then
16389 # we reset no_tcl in case something fails here
16390 no_tcl=true
bec39cab 16391
81ecdfbb
RW
16392# Check whether --with-tcl was given.
16393if test "${with_tcl+set}" = set; then :
16394 withval=$with_tcl; with_tclconfig=${withval}
16395fi
16396
16397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
16398$as_echo_n "checking for Tcl configuration... " >&6; }
d0ac1c44 16399 if ${ac_cv_c_tclconfig+:} false; then :
81ecdfbb 16400 $as_echo_n "(cached) " >&6
3fc11d3e 16401else
bec39cab 16402
3fc11d3e 16403
5062cc19
KS
16404 # First check to see if --with-tcl was specified.
16405 case "${host}" in
16406 *-*-cygwin*) platDir="win" ;;
16407 *) platDir="unix" ;;
16408 esac
16409 if test x"${with_tclconfig}" != x ; then
16410 if test -f "${with_tclconfig}/tclConfig.sh" ; then
16411 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
16412 else
d0ac1c44 16413 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
16414 fi
16415 fi
16416
16417 # then check for a private Tcl installation
16418 if test x"${ac_cv_c_tclconfig}" = x ; then
16419 for i in \
16420 ../tcl \
16421 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16422 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
16423 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
16424 ../../tcl \
16425 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16426 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
16427 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
16428 ../../../tcl \
16429 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16430 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
16431 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
16432 if test -f "$i/$platDir/tclConfig.sh" ; then
16433 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16434 break
16435 fi
16436 done
16437 fi
16438
16439 # on Darwin, check in Framework installation locations
16440 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
16441 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16442 `ls -d /Library/Frameworks 2>/dev/null` \
16443 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16444 `ls -d /System/Library/Frameworks 2>/dev/null` \
16445 ; do
16446 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
16447 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
16448 break
16449 fi
16450 done
16451 fi
16452
16453 # check in a few common install locations
16454 if test x"${ac_cv_c_tclconfig}" = x ; then
16455 for i in `ls -d ${libdir} 2>/dev/null` \
16456 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16457 `ls -d ${prefix}/lib 2>/dev/null` \
16458 `ls -d /usr/local/lib 2>/dev/null` \
16459 `ls -d /usr/contrib/lib 2>/dev/null` \
16460 `ls -d /usr/lib 2>/dev/null` \
16461 ; do
16462 if test -f "$i/tclConfig.sh" ; then
16463 ac_cv_c_tclconfig=`(cd $i; pwd)`
16464 break
16465 fi
16466 done
16467 fi
3fc11d3e 16468
5062cc19
KS
16469 # check in a few other private locations
16470 if test x"${ac_cv_c_tclconfig}" = x ; then
16471 for i in \
16472 ${srcdir}/../tcl \
16473 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16474 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
16475 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
16476 if test -f "$i/$platDir/tclConfig.sh" ; then
16477 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16478 break
16479 fi
16480 done
16481 fi
bec39cab 16482
3fc11d3e
JM
16483fi
16484
5062cc19
KS
16485
16486 if test x"${ac_cv_c_tclconfig}" = x ; then
16487 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
16488 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
16489$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
16490 else
16491 no_tcl=
16492 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
16493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
16494$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
16495 fi
16496 fi
3fc11d3e 16497
bec39cab 16498
85541719
DE
16499 # If $no_tk is nonempty, then we can't do Tk, and there is no
16500 # point to doing Tcl.
bec39cab 16501
5062cc19
KS
16502 #
16503 # Ok, lets find the tk configuration
16504 # First, look for one uninstalled.
16505 # the alternative search directory is invoked by --with-tk
16506 #
3fc11d3e 16507
5062cc19
KS
16508 if test x"${no_tk}" = x ; then
16509 # we reset no_tk in case something fails here
16510 no_tk=true
bec39cab 16511
81ecdfbb
RW
16512# Check whether --with-tk was given.
16513if test "${with_tk+set}" = set; then :
16514 withval=$with_tk; with_tkconfig=${withval}
16515fi
16516
16517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
16518$as_echo_n "checking for Tk configuration... " >&6; }
d0ac1c44 16519 if ${ac_cv_c_tkconfig+:} false; then :
81ecdfbb 16520 $as_echo_n "(cached) " >&6
bec39cab 16521else
3fc11d3e
JM
16522
16523
5062cc19
KS
16524 # First check to see if --with-tkconfig was specified.
16525 if test x"${with_tkconfig}" != x ; then
16526 if test -f "${with_tkconfig}/tkConfig.sh" ; then
16527 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
16528 else
d0ac1c44 16529 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
16530 fi
16531 fi
3fc11d3e 16532
5062cc19
KS
16533 # then check for a private Tk library
16534 case "${host}" in
16535 *-*-cygwin*) platDir="win" ;;
16536 *) platDir="unix" ;;
16537 esac
16538 if test x"${ac_cv_c_tkconfig}" = x ; then
16539 for i in \
16540 ../tk \
16541 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16542 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
16543 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
16544 ../../tk \
16545 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16546 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
16547 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
16548 ../../../tk \
16549 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16550 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
16551 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
16552 if test -f "$i/$platDir/tkConfig.sh" ; then
16553 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16554 break
16555 fi
16556 done
16557 fi
16558
16559 # on Darwin, check in Framework installation locations
16560 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
16561 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16562 `ls -d /Library/Frameworks 2>/dev/null` \
16563 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16564 `ls -d /System/Library/Frameworks 2>/dev/null` \
16565 ; do
16566 if test -f "$i/Tk.framework/tkConfig.sh" ; then
16567 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
16568 break
16569 fi
16570 done
16571 fi
16572
16573 # check in a few common install locations
16574 if test x"${ac_cv_c_tkconfig}" = x ; then
16575 for i in `ls -d ${libdir} 2>/dev/null` \
16576 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16577 `ls -d ${prefix}/lib 2>/dev/null` \
16578 `ls -d /usr/local/lib 2>/dev/null` \
16579 `ls -d /usr/contrib/lib 2>/dev/null` \
16580 `ls -d /usr/lib 2>/dev/null` \
16581 ; do
16582 if test -f "$i/tkConfig.sh" ; then
16583 ac_cv_c_tkconfig=`(cd $i; pwd)`
16584 break
16585 fi
16586 done
16587 fi
16588 # check in a few other private locations
16589 if test x"${ac_cv_c_tkconfig}" = x ; then
16590 for i in \
16591 ${srcdir}/../tk \
16592 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16593 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
16594 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
16595 if test -f "$i/$platDir/tkConfig.sh" ; then
16596 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16597 break
16598 fi
16599 done
16600 fi
3fc11d3e 16601
3fc11d3e
JM
16602fi
16603
16604
5062cc19
KS
16605 if test x"${ac_cv_c_tkconfig}" = x ; then
16606 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
16607 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
16608$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
16609 else
16610 no_tk=
16611 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
16612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
16613$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 16614 fi
3fc11d3e 16615 fi
dd2504ab 16616
dd2504ab 16617
85541719
DE
16618 if test -z "${no_tcl}" -a -z "${no_tk}"; then
16619
81ecdfbb
RW
16620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
16621$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
16622
16623 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
16624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16625$as_echo "loading" >&6; }
85541719
DE
16626 . ${TCL_BIN_DIR}/tclConfig.sh
16627 else
81ecdfbb
RW
16628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
16629$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
16630 fi
16631
16632 # eval is required to do the TCL_DBGX substitution
16633 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
16634 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
16635
16636 # If the TCL_BIN_DIR is the build directory (not the install directory),
16637 # then set the common variable name to the value of the build variables.
16638 # For example, the variable TCL_LIB_SPEC will be set to the value
16639 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
16640 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
16641 # installed and uninstalled version of Tcl.
16642 if test -f "${TCL_BIN_DIR}/Makefile" ; then
16643 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
16644 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
16645 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
16646 elif test "`uname -s`" = "Darwin"; then
16647 # If Tcl was built as a framework, attempt to use the libraries
16648 # from the framework at the given location so that linking works
a68ffae9 16649 # against Tcl.framework installed in an arbitrary location.
85541719
DE
16650 case ${TCL_DEFS} in
16651 *TCL_FRAMEWORK*)
16652 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
16653 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
16654 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
16655 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
16656 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
16657 break
16658 fi
16659 done
16660 fi
16661 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
16662 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
16663 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
16664 fi
16665 ;;
16666 esac
16667 fi
16668
16669 # eval is required to do the TCL_DBGX substitution
16670 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
16671 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
16672 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
16673 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
16674
16675
16676
16677
16678
16679
16680
16681
16682
16683
16684
16685
16686
16687
16688
16689 # Check for in-tree tcl
16690 here=`pwd`
16691 cd ${srcdir}/..
16692 topdir=`pwd`
16693 cd ${here}
16694
16695 intree="no"
16696 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
16697 intree="yes"
16698 fi
16699
16700 # Find Tcl private headers
16701 if test x"${intree}" = xno; then
16702
81ecdfbb
RW
16703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
16704$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
16705 private_dir=""
16706 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
16707 if test -f ${dir}/tclInt.h ; then
16708 private_dir=${dir}
16709 fi
16710
16711 if test x"${private_dir}" = x; then
d0ac1c44 16712 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
85541719
DE
16713 else
16714 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16716$as_echo "${private_dir}" >&6; }
85541719
DE
16717 fi
16718
16719 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
16720 TCL_LIBRARY="${TCL_LIB_SPEC}"
16721 TCL_DEPS=""
16722 else
16723 # If building tcl in the same src tree, private headers
16724 # are not needed, but we need to be sure to use the right
16725 # headers library
16726 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
16727 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
16728 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
16729 fi
16730
16731
16732
16733
16734
81ecdfbb
RW
16735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
16736$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 16737
5062cc19 16738 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
16739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16740$as_echo "loading" >&6; }
5062cc19 16741 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 16742 else
81ecdfbb
RW
16743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
16744$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 16745 fi
bec39cab 16746
5062cc19
KS
16747 # eval is required to do the TK_DBGX substitution
16748 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
16749 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
16750
16751 # If the TK_BIN_DIR is the build directory (not the install directory),
16752 # then set the common variable name to the value of the build variables.
16753 # For example, the variable TK_LIB_SPEC will be set to the value
16754 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
16755 # instead of TK_BUILD_LIB_SPEC since it will work with both an
16756 # installed and uninstalled version of Tcl.
85541719 16757 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
16758 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
16759 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
16760 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
16761 elif test "`uname -s`" = "Darwin"; then
16762 # If Tk was built as a framework, attempt to use the libraries
16763 # from the framework at the given location so that linking works
a68ffae9 16764 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
16765 case ${TK_DEFS} in
16766 *TK_FRAMEWORK*)
85541719 16767 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
16768 for i in "`cd ${TK_BIN_DIR}; pwd`" \
16769 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
16770 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
16771 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
16772 break
16773 fi
16774 done
16775 fi
85541719 16776 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
16777 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
16778 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
16779 fi
16780 ;;
16781 esac
3fc11d3e
JM
16782 fi
16783
5062cc19
KS
16784 # eval is required to do the TK_DBGX substitution
16785 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
16786 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
16787 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
16788 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 16789
3fc11d3e
JM
16790
16791
bec39cab
AC
16792
16793
16794
16795
16796
16797
16798
3fc11d3e 16799
3fc11d3e 16800
bec39cab 16801
bec39cab 16802
85541719
DE
16803 # Check for in-tree Tk
16804 intree="no"
16805 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
16806 intree="yes"
16807 fi
3fc11d3e 16808
85541719
DE
16809 # Find Tk private headers
16810 if test x"${intree}" = xno; then
3fc11d3e 16811
81ecdfbb
RW
16812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
16813$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
16814 private_dir=""
16815 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
16816 if test -f ${dir}/tkInt.h; then
16817 private_dir=${dir}
3fc11d3e 16818 fi
bec39cab 16819
5062cc19 16820 if test x"${private_dir}" = x; then
d0ac1c44 16821 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
3fc11d3e 16822 else
5062cc19 16823 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16825$as_echo "${private_dir}" >&6; }
3fc11d3e 16826 fi
3fc11d3e 16827
85541719
DE
16828 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
16829 TK_LIBRARY=${TK_LIB_SPEC}
16830 TK_DEPS=""
16831 else
16832 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
16833 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
16834 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
16835 fi
3fc11d3e
JM
16836
16837
3fc11d3e
JM
16838
16839
3fc11d3e 16840
85541719 16841 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 16842
85541719
DE
16843 # Include some libraries that Tcl and Tk want.
16844 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
16845 # Yes, the ordering seems wrong here. But it isn't.
16846 # TK_LIBS is the list of libraries that need to be linked
16847 # after Tcl/Tk. Note that this isn't put into LIBS. If it
16848 # were in LIBS then any link tests after this point would
16849 # try to include things like `$(LIBGUI)', which wouldn't work.
16850 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 16851
85541719
DE
16852 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
16853 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
16854 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
16855 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
16856 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
16857 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
16858 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 16859
85541719
DE
16860 if test x$gdb_cv_os_cygwin = xyes; then
16861 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
16862 WIN32LDAPP="-Wl,--subsystem,console"
16863 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 16864 fi
ffc6a242 16865
81ecdfbb 16866 subdirs="$subdirs gdbtk"
3ace7edb 16867
85541719 16868 fi
3fc11d3e
JM
16869fi
16870
16871
16872
16873
16874
16875
16876
16877
81ecdfbb
RW
16878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
16879$as_echo_n "checking for X... " >&6; }
bec39cab 16880
c906108c 16881
81ecdfbb
RW
16882# Check whether --with-x was given.
16883if test "${with_x+set}" = set; then :
16884 withval=$with_x;
16885fi
c906108c
SS
16886
16887# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
16888if test "x$with_x" = xno; then
16889 # The user explicitly disabled X.
16890 have_x=disabled
16891else
81ecdfbb 16892 case $x_includes,$x_libraries in #(
d0ac1c44
SM
16893 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
16894 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
81ecdfbb 16895 $as_echo_n "(cached) " >&6
c906108c
SS
16896else
16897 # One or both of the vars are not set, and there is no cached value.
bec39cab 16898ac_x_includes=no ac_x_libraries=no
81ecdfbb 16899rm -f -r conftest.dir
bec39cab
AC
16900if mkdir conftest.dir; then
16901 cd conftest.dir
bec39cab 16902 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
16903incroot:
16904 @echo incroot='${INCROOT}'
16905usrlibdir:
16906 @echo usrlibdir='${USRLIBDIR}'
16907libdir:
16908 @echo libdir='${LIBDIR}'
16909_ACEOF
16910 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
d0ac1c44 16911 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
81ecdfbb
RW
16912 for ac_var in incroot usrlibdir libdir; do
16913 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
16914 done
c906108c 16915 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
16916 for ac_extension in a so sl dylib la dll; do
16917 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
16918 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 16919 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
16920 fi
16921 done
16922 # Screen out bogus values from the imake configuration. They are
16923 # bogus both because they are the default anyway, and because
16924 # using them would break gcc on systems where it needs fixed includes.
bec39cab 16925 case $ac_im_incroot in
81ecdfbb 16926 /usr/include) ac_x_includes= ;;
bec39cab 16927 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 16928 esac
bec39cab 16929 case $ac_im_usrlibdir in
81ecdfbb 16930 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 16931 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
16932 esac
16933 fi
16934 cd ..
81ecdfbb 16935 rm -f -r conftest.dir
c906108c
SS
16936fi
16937
bec39cab
AC
16938# Standard set of common directories for X headers.
16939# Check X11 before X11Rn because it is often a symlink to the current release.
16940ac_x_header_dirs='
16941/usr/X11/include
81ecdfbb 16942/usr/X11R7/include
bec39cab
AC
16943/usr/X11R6/include
16944/usr/X11R5/include
16945/usr/X11R4/include
16946
16947/usr/include/X11
81ecdfbb 16948/usr/include/X11R7
bec39cab
AC
16949/usr/include/X11R6
16950/usr/include/X11R5
16951/usr/include/X11R4
16952
16953/usr/local/X11/include
81ecdfbb 16954/usr/local/X11R7/include
bec39cab
AC
16955/usr/local/X11R6/include
16956/usr/local/X11R5/include
16957/usr/local/X11R4/include
16958
16959/usr/local/include/X11
81ecdfbb 16960/usr/local/include/X11R7
bec39cab
AC
16961/usr/local/include/X11R6
16962/usr/local/include/X11R5
16963/usr/local/include/X11R4
16964
16965/usr/X386/include
16966/usr/x386/include
16967/usr/XFree86/include/X11
16968
16969/usr/include
16970/usr/local/include
16971/usr/unsupported/include
16972/usr/athena/include
16973/usr/local/x11r5/include
16974/usr/lpp/Xamples/include
16975
16976/usr/openwin/include
16977/usr/openwin/share/include'
16978
16979if test "$ac_x_includes" = no; then
81ecdfbb 16980 # Guess where to find include files, by looking for Xlib.h.
c906108c 16981 # First, try using that file with no special directory specified.
81ecdfbb 16982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16983/* end confdefs.h. */
81ecdfbb 16984#include <X11/Xlib.h>
bec39cab 16985_ACEOF
81ecdfbb 16986if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
16987 # We can compile using X headers with no special include directory.
16988ac_x_includes=
16989else
bec39cab 16990 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 16991 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
16992 ac_x_includes=$ac_dir
16993 break
16994 fi
16995done
c906108c 16996fi
d0ac1c44 16997rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 16998fi # $ac_x_includes = no
c906108c 16999
bec39cab 17000if test "$ac_x_libraries" = no; then
c906108c 17001 # Check for the libraries.
c906108c
SS
17002 # See if we find them without any special options.
17003 # Don't add to $LIBS permanently.
bec39cab 17004 ac_save_LIBS=$LIBS
81ecdfbb
RW
17005 LIBS="-lX11 $LIBS"
17006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 17007/* end confdefs.h. */
81ecdfbb 17008#include <X11/Xlib.h>
bec39cab
AC
17009int
17010main ()
17011{
81ecdfbb 17012XrmInitialize ()
bec39cab
AC
17013 ;
17014 return 0;
17015}
17016_ACEOF
81ecdfbb 17017if ac_fn_c_try_link "$LINENO"; then :
bec39cab 17018 LIBS=$ac_save_LIBS
c906108c
SS
17019# We can link X programs with no special library path.
17020ac_x_libraries=
17021else
81ecdfbb
RW
17022 LIBS=$ac_save_LIBS
17023for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 17024do
bec39cab 17025 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
17026 for ac_extension in a so sl dylib la dll; do
17027 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
17028 ac_x_libraries=$ac_dir
17029 break 2
17030 fi
17031 done
17032done
17033fi
81ecdfbb
RW
17034rm -f core conftest.err conftest.$ac_objext \
17035 conftest$ac_exeext conftest.$ac_ext
bec39cab 17036fi # $ac_x_libraries = no
c906108c 17037
81ecdfbb
RW
17038case $ac_x_includes,$ac_x_libraries in #(
17039 no,* | *,no | *\'*)
17040 # Didn't find X, or a directory has "'" in its name.
17041 ac_cv_have_x="have_x=no";; #(
17042 *)
17043 # Record where we found X for the cache.
17044 ac_cv_have_x="have_x=yes\
17045 ac_x_includes='$ac_x_includes'\
17046 ac_x_libraries='$ac_x_libraries'"
17047esac
c906108c 17048fi
81ecdfbb
RW
17049;; #(
17050 *) have_x=yes;;
17051 esac
c906108c
SS
17052 eval "$ac_cv_have_x"
17053fi # $with_x != no
17054
17055if test "$have_x" != yes; then
81ecdfbb
RW
17056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
17057$as_echo "$have_x" >&6; }
c906108c
SS
17058 no_x=yes
17059else
17060 # If each of the values was on the command line, it overrides each guess.
17061 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
17062 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
17063 # Update the cache value to reflect the command line values.
81ecdfbb
RW
17064 ac_cv_have_x="have_x=yes\
17065 ac_x_includes='$x_includes'\
17066 ac_x_libraries='$x_libraries'"
17067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
17068$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
17069fi
17070
17071
bec39cab 17072# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 17073# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
17074# This code just checks for a few cases where we'd like to ignore those
17075# definitions, even when they're present in the '.mt' file. These cases
17076# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 17077# not part of the source tree.
7a292a7a 17078#
81ecdfbb
RW
17079# Check whether --enable-sim was given.
17080if test "${enable_sim+set}" = set; then :
17081 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
17082 echo "enableval = ${enableval}";
17083 case "${enableval}" in
17084 yes) ignore_sim=false ;;
17085 no) ignore_sim=true ;;
17086 *) ignore_sim=false ;;
17087 esac
17088else
17089 ignore_sim=false
81ecdfbb
RW
17090fi
17091
7a292a7a
SS
17092
17093if test ! -d "${srcdir}/../sim"; then
17094 ignore_sim=true
17095fi
17096
9b624dbe
UW
17097SIM=
17098SIM_OBS=
17099if test "${ignore_sim}" = "false"; then
17100 if test x"${gdb_sim}" != x ; then
17101 SIM="${gdb_sim}"
17102 SIM_OBS="remote-sim.o"
60ca704f 17103
81ecdfbb 17104$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 17105
976102cd
PA
17106
17107 # Some tdep code should only be compiled in when the ppc sim is
17108 # built. PR sim/13418.
17109 case $target in
17110 powerpc*-*-*)
17111
17112$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
17113
17114 ;;
17115 esac
9b624dbe 17116 fi
7a292a7a
SS
17117fi
17118
17119
17120
c906108c
SS
17121
17122
17123
17124
17125
17126
dfcd3bfb 17127
e56ac5c3
AC
17128
17129
b3a90332
AC
17130
17131
c35f4ffc 17132# List of host floatformats.
bec39cab
AC
17133
17134cat >>confdefs.h <<_ACEOF
c35f4ffc 17135#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 17136_ACEOF
c35f4ffc 17137
bec39cab
AC
17138
17139cat >>confdefs.h <<_ACEOF
c35f4ffc 17140#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
17141_ACEOF
17142
c35f4ffc 17143
bec39cab 17144cat >>confdefs.h <<_ACEOF
c35f4ffc 17145#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 17146_ACEOF
c35f4ffc
AC
17147
17148
c906108c
SS
17149# target_subdir is used by the testsuite to find the target libraries.
17150target_subdir=
17151if test "${host}" != "${target}"; then
17152 target_subdir="${target_alias}/"
17153fi
17154
17155
21ea5acd 17156# Import nat definitions.
2b351b19 17157nat_makefile_frag=/dev/null
771b4502 17158if test "${gdb_native}" = "yes"; then
21ea5acd
SDJ
17159 . ${srcdir}/configure.nat
17160 nativefile=$NAT_FILE
c906108c 17161fi
c906108c 17162
c906108c
SS
17163
17164
17165
21ea5acd
SDJ
17166
17167
17168
17169
17170
c906108c
SS
17171
17172
b00a8037 17173if test x"${gdb_osabi}" != x ; then
bec39cab
AC
17174
17175cat >>confdefs.h <<_ACEOF
b00a8037 17176#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 17177_ACEOF
b00a8037
DJ
17178
17179fi
17180
496c0e1b
JB
17181# Check whether --enable-gdbserver was given.
17182if test "${enable_gdbserver+set}" = set; then :
17183 enableval=$enable_gdbserver; case "${enableval}" in
17184 yes| no|auto) ;;
d0ac1c44 17185 *) as_fn_error $? "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
496c0e1b
JB
17186esac
17187else
17188 enable_gdbserver=auto
17189fi
17190
17191
17192# We only build gdbserver automatically in a native configuration, and
17193# only if the user did not explicitly disable its build.
17194if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
17195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
17196$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 17197 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
17198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17199$as_echo "yes" >&6; }
17200 subdirs="$subdirs gdbserver"
3ace7edb 17201
496c0e1b 17202 gdbserver_build_enabled=yes
8dcde887 17203 else
81ecdfbb
RW
17204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17205$as_echo "no" >&6; }
8dcde887
MK
17206 fi
17207fi
17208
496c0e1b
JB
17209# If the user explicitly request the gdbserver to be built, verify that
17210# we were in fact able to enable it.
17211if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
d0ac1c44 17212 as_fn_error $? "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
496c0e1b
JB
17213fi
17214
393fd4c3
YQ
17215# Check for babeltrace and babeltrace-ctf
17216
17217# Check whether --with-babeltrace was given.
17218if test "${with_babeltrace+set}" = set; then :
17219 withval=$with_babeltrace;
17220else
17221 with_babeltrace=auto
17222fi
17223
17224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
17225$as_echo_n "checking whether to use babeltrace... " >&6; }
17226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
17227$as_echo "$with_babeltrace" >&6; }
17228
17229if test "x$with_babeltrace" = "xno"; then
17230 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
17231$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
17232else
17233 # Append -Werror to CFLAGS so that configure can catch the warning
17234 # "assignment from incompatible pointer type", which is related to
17235 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
17236 # in GDB, while babeltrace 1.0.3 is broken.
17237 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
17238 # safe to save and restore CFLAGS here.
17239 saved_CFLAGS=$CFLAGS
17240 CFLAGS="$CFLAGS -Werror"
17241
17242
17243
17244
17245
17246
17247
17248
17249 use_additional=yes
17250
17251 acl_save_prefix="$prefix"
17252 prefix="$acl_final_prefix"
17253 acl_save_exec_prefix="$exec_prefix"
17254 exec_prefix="$acl_final_exec_prefix"
17255
17256 eval additional_includedir=\"$includedir\"
17257 eval additional_libdir=\"$libdir\"
17258
17259 exec_prefix="$acl_save_exec_prefix"
17260 prefix="$acl_save_prefix"
17261
17262
17263# Check whether --with-libbabeltrace-prefix was given.
17264if test "${with_libbabeltrace_prefix+set}" = set; then :
17265 withval=$with_libbabeltrace_prefix;
17266 if test "X$withval" = "Xno"; then
17267 use_additional=no
17268 else
17269 if test "X$withval" = "X"; then
17270
17271 acl_save_prefix="$prefix"
17272 prefix="$acl_final_prefix"
17273 acl_save_exec_prefix="$exec_prefix"
17274 exec_prefix="$acl_final_exec_prefix"
17275
17276 eval additional_includedir=\"$includedir\"
17277 eval additional_libdir=\"$libdir\"
17278
17279 exec_prefix="$acl_save_exec_prefix"
17280 prefix="$acl_save_prefix"
17281
17282 else
17283 additional_includedir="$withval/include"
17284 additional_libdir="$withval/lib"
17285 fi
17286 fi
17287
17288fi
17289
17290 LIBBABELTRACE=
17291 LTLIBBABELTRACE=
17292 INCBABELTRACE=
17293 rpathdirs=
17294 ltrpathdirs=
17295 names_already_handled=
17296 names_next_round='babeltrace babeltrace-ctf'
17297 while test -n "$names_next_round"; do
17298 names_this_round="$names_next_round"
17299 names_next_round=
17300 for name in $names_this_round; do
17301 already_handled=
17302 for n in $names_already_handled; do
17303 if test "$n" = "$name"; then
17304 already_handled=yes
17305 break
17306 fi
17307 done
17308 if test -z "$already_handled"; then
17309 names_already_handled="$names_already_handled $name"
17310 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17311 eval value=\"\$HAVE_LIB$uppername\"
17312 if test -n "$value"; then
17313 if test "$value" = yes; then
17314 eval value=\"\$LIB$uppername\"
17315 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
17316 eval value=\"\$LTLIB$uppername\"
17317 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
17318 else
17319 :
17320 fi
17321 else
17322 found_dir=
17323 found_la=
17324 found_so=
17325 found_a=
17326 if test $use_additional = yes; then
17327 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
17328 found_dir="$additional_libdir"
17329 found_so="$additional_libdir/lib$name.$shlibext"
17330 if test -f "$additional_libdir/lib$name.la"; then
17331 found_la="$additional_libdir/lib$name.la"
17332 fi
17333 else
17334 if test -f "$additional_libdir/lib$name.$libext"; then
17335 found_dir="$additional_libdir"
17336 found_a="$additional_libdir/lib$name.$libext"
17337 if test -f "$additional_libdir/lib$name.la"; then
17338 found_la="$additional_libdir/lib$name.la"
17339 fi
17340 fi
17341 fi
17342 fi
17343 if test "X$found_dir" = "X"; then
17344 for x in $LDFLAGS $LTLIBBABELTRACE; do
17345
17346 acl_save_prefix="$prefix"
17347 prefix="$acl_final_prefix"
17348 acl_save_exec_prefix="$exec_prefix"
17349 exec_prefix="$acl_final_exec_prefix"
17350 eval x=\"$x\"
17351 exec_prefix="$acl_save_exec_prefix"
17352 prefix="$acl_save_prefix"
17353
17354 case "$x" in
17355 -L*)
17356 dir=`echo "X$x" | sed -e 's/^X-L//'`
17357 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
17358 found_dir="$dir"
17359 found_so="$dir/lib$name.$shlibext"
17360 if test -f "$dir/lib$name.la"; then
17361 found_la="$dir/lib$name.la"
17362 fi
17363 else
17364 if test -f "$dir/lib$name.$libext"; then
17365 found_dir="$dir"
17366 found_a="$dir/lib$name.$libext"
17367 if test -f "$dir/lib$name.la"; then
17368 found_la="$dir/lib$name.la"
17369 fi
17370 fi
17371 fi
17372 ;;
17373 esac
17374 if test "X$found_dir" != "X"; then
17375 break
17376 fi
17377 done
17378 fi
17379 if test "X$found_dir" != "X"; then
17380 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
17381 if test "X$found_so" != "X"; then
17382 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17383 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17384 else
17385 haveit=
17386 for x in $ltrpathdirs; do
17387 if test "X$x" = "X$found_dir"; then
17388 haveit=yes
17389 break
17390 fi
17391 done
17392 if test -z "$haveit"; then
17393 ltrpathdirs="$ltrpathdirs $found_dir"
17394 fi
17395 if test "$hardcode_direct" = yes; then
17396 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17397 else
17398 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17399 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17400 haveit=
17401 for x in $rpathdirs; do
17402 if test "X$x" = "X$found_dir"; then
17403 haveit=yes
17404 break
17405 fi
17406 done
17407 if test -z "$haveit"; then
17408 rpathdirs="$rpathdirs $found_dir"
17409 fi
17410 else
17411 haveit=
17412 for x in $LDFLAGS $LIBBABELTRACE; do
17413
17414 acl_save_prefix="$prefix"
17415 prefix="$acl_final_prefix"
17416 acl_save_exec_prefix="$exec_prefix"
17417 exec_prefix="$acl_final_exec_prefix"
17418 eval x=\"$x\"
17419 exec_prefix="$acl_save_exec_prefix"
17420 prefix="$acl_save_prefix"
17421
17422 if test "X$x" = "X-L$found_dir"; then
17423 haveit=yes
17424 break
17425 fi
17426 done
17427 if test -z "$haveit"; then
17428 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
17429 fi
17430 if test "$hardcode_minus_L" != no; then
17431 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17432 else
17433 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17434 fi
17435 fi
17436 fi
17437 fi
17438 else
17439 if test "X$found_a" != "X"; then
17440 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
17441 else
17442 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
17443 fi
17444 fi
17445 additional_includedir=
17446 case "$found_dir" in
17447 */lib | */lib/)
17448 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17449 additional_includedir="$basedir/include"
17450 ;;
17451 esac
17452 if test "X$additional_includedir" != "X"; then
17453 if test "X$additional_includedir" != "X/usr/include"; then
17454 haveit=
17455 if test "X$additional_includedir" = "X/usr/local/include"; then
17456 if test -n "$GCC"; then
17457 case $host_os in
17458 linux*) haveit=yes;;
17459 esac
17460 fi
17461 fi
17462 if test -z "$haveit"; then
17463 for x in $CPPFLAGS $INCBABELTRACE; do
17464
17465 acl_save_prefix="$prefix"
17466 prefix="$acl_final_prefix"
17467 acl_save_exec_prefix="$exec_prefix"
17468 exec_prefix="$acl_final_exec_prefix"
17469 eval x=\"$x\"
17470 exec_prefix="$acl_save_exec_prefix"
17471 prefix="$acl_save_prefix"
17472
17473 if test "X$x" = "X-I$additional_includedir"; then
17474 haveit=yes
17475 break
17476 fi
17477 done
17478 if test -z "$haveit"; then
17479 if test -d "$additional_includedir"; then
17480 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
17481 fi
17482 fi
17483 fi
17484 fi
17485 fi
17486 if test -n "$found_la"; then
17487 save_libdir="$libdir"
17488 case "$found_la" in
17489 */* | *\\*) . "$found_la" ;;
17490 *) . "./$found_la" ;;
17491 esac
17492 libdir="$save_libdir"
17493 for dep in $dependency_libs; do
17494 case "$dep" in
17495 -L*)
17496 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17497 if test "X$additional_libdir" != "X/usr/lib"; then
17498 haveit=
17499 if test "X$additional_libdir" = "X/usr/local/lib"; then
17500 if test -n "$GCC"; then
17501 case $host_os in
17502 linux*) haveit=yes;;
17503 esac
17504 fi
17505 fi
17506 if test -z "$haveit"; then
17507 haveit=
17508 for x in $LDFLAGS $LIBBABELTRACE; do
17509
17510 acl_save_prefix="$prefix"
17511 prefix="$acl_final_prefix"
17512 acl_save_exec_prefix="$exec_prefix"
17513 exec_prefix="$acl_final_exec_prefix"
17514 eval x=\"$x\"
17515 exec_prefix="$acl_save_exec_prefix"
17516 prefix="$acl_save_prefix"
17517
17518 if test "X$x" = "X-L$additional_libdir"; then
17519 haveit=yes
17520 break
17521 fi
17522 done
17523 if test -z "$haveit"; then
17524 if test -d "$additional_libdir"; then
17525 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
17526 fi
17527 fi
17528 haveit=
17529 for x in $LDFLAGS $LTLIBBABELTRACE; do
17530
17531 acl_save_prefix="$prefix"
17532 prefix="$acl_final_prefix"
17533 acl_save_exec_prefix="$exec_prefix"
17534 exec_prefix="$acl_final_exec_prefix"
17535 eval x=\"$x\"
17536 exec_prefix="$acl_save_exec_prefix"
17537 prefix="$acl_save_prefix"
17538
17539 if test "X$x" = "X-L$additional_libdir"; then
17540 haveit=yes
17541 break
17542 fi
17543 done
17544 if test -z "$haveit"; then
17545 if test -d "$additional_libdir"; then
17546 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
17547 fi
17548 fi
17549 fi
17550 fi
17551 ;;
17552 -R*)
17553 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17554 if test "$enable_rpath" != no; then
17555 haveit=
17556 for x in $rpathdirs; do
17557 if test "X$x" = "X$dir"; then
17558 haveit=yes
17559 break
17560 fi
17561 done
17562 if test -z "$haveit"; then
17563 rpathdirs="$rpathdirs $dir"
17564 fi
17565 haveit=
17566 for x in $ltrpathdirs; do
17567 if test "X$x" = "X$dir"; then
17568 haveit=yes
17569 break
17570 fi
17571 done
17572 if test -z "$haveit"; then
17573 ltrpathdirs="$ltrpathdirs $dir"
17574 fi
17575 fi
17576 ;;
17577 -l*)
17578 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17579 ;;
17580 *.la)
17581 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17582 ;;
17583 *)
17584 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
17585 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
17586 ;;
17587 esac
17588 done
17589 fi
17590 else
17591 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17592 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
17593 fi
17594 fi
17595 fi
17596 done
17597 done
17598 if test "X$rpathdirs" != "X"; then
17599 if test -n "$hardcode_libdir_separator"; then
17600 alldirs=
17601 for found_dir in $rpathdirs; do
17602 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17603 done
17604 acl_save_libdir="$libdir"
17605 libdir="$alldirs"
17606 eval flag=\"$hardcode_libdir_flag_spec\"
17607 libdir="$acl_save_libdir"
17608 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17609 else
17610 for found_dir in $rpathdirs; do
17611 acl_save_libdir="$libdir"
17612 libdir="$found_dir"
17613 eval flag=\"$hardcode_libdir_flag_spec\"
17614 libdir="$acl_save_libdir"
17615 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17616 done
17617 fi
17618 fi
17619 if test "X$ltrpathdirs" != "X"; then
17620 for found_dir in $ltrpathdirs; do
17621 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
17622 done
17623 fi
17624
17625
17626 ac_save_CPPFLAGS="$CPPFLAGS"
17627
17628 for element in $INCBABELTRACE; do
17629 haveit=
17630 for x in $CPPFLAGS; do
17631
17632 acl_save_prefix="$prefix"
17633 prefix="$acl_final_prefix"
17634 acl_save_exec_prefix="$exec_prefix"
17635 exec_prefix="$acl_final_exec_prefix"
17636 eval x=\"$x\"
17637 exec_prefix="$acl_save_exec_prefix"
17638 prefix="$acl_save_prefix"
17639
17640 if test "X$x" = "X$element"; then
17641 haveit=yes
17642 break
17643 fi
17644 done
17645 if test -z "$haveit"; then
17646 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17647 fi
17648 done
17649
17650
17651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
17652$as_echo_n "checking for libbabeltrace... " >&6; }
d0ac1c44 17653if ${ac_cv_libbabeltrace+:} false; then :
393fd4c3
YQ
17654 $as_echo_n "(cached) " >&6
17655else
17656
17657 ac_save_LIBS="$LIBS"
17658 LIBS="$LIBS $LIBBABELTRACE"
17659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17660/* end confdefs.h. */
17661#include <babeltrace/babeltrace.h>
17662 #include <babeltrace/ctf/events.h>
17663 #include <babeltrace/ctf/iterator.h>
17664int
17665main ()
17666{
17667struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
17668 struct bt_ctf_event *event = NULL;
17669 const struct bt_definition *scope;
17670
13cdc2af 17671 pos->type = BT_SEEK_BEGIN;
65c749e7 17672 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
17673 scope = bt_ctf_get_top_level_scope (event,
17674 BT_STREAM_EVENT_HEADER);
17675 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
17676
17677 ;
17678 return 0;
17679}
17680_ACEOF
17681if ac_fn_c_try_link "$LINENO"; then :
17682 ac_cv_libbabeltrace=yes
17683else
17684 ac_cv_libbabeltrace=no
17685fi
17686rm -f core conftest.err conftest.$ac_objext \
17687 conftest$ac_exeext conftest.$ac_ext
17688 LIBS="$ac_save_LIBS"
17689
17690fi
17691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
17692$as_echo "$ac_cv_libbabeltrace" >&6; }
17693 if test "$ac_cv_libbabeltrace" = yes; then
17694 HAVE_LIBBABELTRACE=yes
17695
17696$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
17697
17698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
17699$as_echo_n "checking how to link with libbabeltrace... " >&6; }
17700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
17701$as_echo "$LIBBABELTRACE" >&6; }
17702 else
17703 HAVE_LIBBABELTRACE=no
17704 CPPFLAGS="$ac_save_CPPFLAGS"
17705 LIBBABELTRACE=
17706 LTLIBBABELTRACE=
17707 fi
17708
17709
17710
17711
17712
17713
17714 CFLAGS=$saved_CFLAGS
17715
17716 if test "$HAVE_LIBBABELTRACE" != yes; then
17717 if test "$with_babeltrace" = yes; then
d0ac1c44 17718 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
393fd4c3
YQ
17719 else
17720 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
17721$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
17722 fi
17723 fi
17724fi
17725
21ea5acd
SDJ
17726# If nativefile (NAT_FILE) is not set in configure.nat, we link to an
17727# empty version.
c906108c
SS
17728
17729files=
17730links=
5a2402b8 17731
c906108c
SS
17732rm -f nm.h
17733if test "${nativefile}" != ""; then
0f475e27
AC
17734 case "${nativefile}" in
17735 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
17736 * ) GDB_NM_FILE="${nativefile}"
17737 esac
5a2402b8
AC
17738 files="${files} ${GDB_NM_FILE}"
17739 links="${links} nm.h"
60ca704f
SE
17740
17741cat >>confdefs.h <<_ACEOF
b78960be 17742#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 17743_ACEOF
5a2402b8 17744
c906108c 17745fi
5a2402b8
AC
17746
17747
e3487908
GKB
17748for ac_prog in xsltproc
17749do
17750 # Extract the first word of "$ac_prog", so it can be a program name with args.
17751set dummy $ac_prog; ac_word=$2
17752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17753$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 17754if ${ac_cv_path_XSLTPROC+:} false; then :
e3487908
GKB
17755 $as_echo_n "(cached) " >&6
17756else
17757 case $XSLTPROC in
17758 [\\/]* | ?:[\\/]*)
17759 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
17760 ;;
17761 *)
17762 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17763for as_dir in $PATH
17764do
17765 IFS=$as_save_IFS
17766 test -z "$as_dir" && as_dir=.
17767 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 17768 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e3487908
GKB
17769 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
17770 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17771 break 2
17772 fi
17773done
17774 done
17775IFS=$as_save_IFS
17776
17777 ;;
17778esac
17779fi
17780XSLTPROC=$ac_cv_path_XSLTPROC
17781if test -n "$XSLTPROC"; then
17782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
17783$as_echo "$XSLTPROC" >&6; }
17784else
17785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17786$as_echo "no" >&6; }
17787fi
17788
17789
17790 test -n "$XSLTPROC" && break
17791done
17792test -n "$XSLTPROC" || XSLTPROC="missing"
17793
17794if test "x$USE_MAINTAINER_MODE" = xyes; then
17795 if test "${XSLTPROC}" = missing; then
d0ac1c44 17796 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
e3487908
GKB
17797 fi
17798fi
17799
17800
bec39cab
AC
17801ac_sources="$files"
17802ac_dests="$links"
17803while test -n "$ac_sources"; do
17804 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
17805 set $ac_sources; ac_source=$1; shift; ac_sources=$*
17806 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
17807done
81ecdfbb 17808ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
17809
17810
c906108c
SS
17811
17812
c906108c 17813
81ecdfbb 17814$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 17815
bec39cab 17816
8ecfd7bd
SDJ
17817
17818# Check whether we will enable the inclusion of unit tests when
17819# compiling GDB.
17820#
17821# The default value of this option changes depending whether we're on
17822# development mode (in which case it's "true") or not (in which case
17823# it's "false").
17824# Check whether --enable-unit-tests was given.
17825if test "${enable_unit_tests+set}" = set; then :
17826 enableval=$enable_unit_tests; case "${enableval}" in
17827 yes) enable_unittests=true ;;
17828 no) enable_unittests=false ;;
17829 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
17830esac
17831else
17832 enable_unittests=$development
17833fi
17834
17835
17836if $enable_unittests; then
dcd1f979
TT
17837
17838$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
17839
8ecfd7bd 17840
b5884fa7 17841 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS) common/selftest.o selftest-arch.o"
1e5ded6c 17842 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS) common/selftest.c selftest-arch.c"
8ecfd7bd 17843
dcd1f979
TT
17844fi
17845
b292c783 17846
8ecfd7bd 17847
f6a88844
JM
17848 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17849 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
17850 if test "x$GDB_TRANSFORM_NAME" = x; then
17851 GDB_TRANSFORM_NAME=gdb
17852 fi
17853
17854
17855
17856 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17857 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
17858 if test "x$GCORE_TRANSFORM_NAME" = x; then
17859 GCORE_TRANSFORM_NAME=gcore
17860 fi
17861
b292c783
JK
17862
17863ac_config_files="$ac_config_files gcore"
17864
141ec9f6 17865ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
81ecdfbb 17866
89a34d1b 17867
bec39cab
AC
17868cat >confcache <<\_ACEOF
17869# This file is a shell script that caches the results of configure
17870# tests run on this system so they can be shared between configure
17871# scripts and configure runs, see configure's option --config-cache.
17872# It is not useful on other systems. If it contains results you don't
17873# want to keep, you may remove or edit it.
17874#
17875# config.status only pays attention to the cache file if you give it
17876# the --recheck option to rerun configure.
17877#
17878# `ac_cv_env_foo' variables (set or unset) will be overridden when
17879# loading this file, other *unset* `ac_cv_foo' will be assigned the
17880# following values.
17881
17882_ACEOF
17883
17884# The following way of writing the cache mishandles newlines in values,
17885# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 17886# So, we kill variables containing newlines.
bec39cab
AC
17887# Ultrix sh set writes to stderr and can't be redirected directly,
17888# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
17889(
17890 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17891 eval ac_val=\$$ac_var
17892 case $ac_val in #(
17893 *${as_nl}*)
17894 case $ac_var in #(
17895 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17896$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
17897 esac
17898 case $ac_var in #(
17899 _ | IFS | as_nl) ;; #(
17900 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17901 *) { eval $ac_var=; unset $ac_var;} ;;
17902 esac ;;
17903 esac
17904 done
17905
bec39cab 17906 (set) 2>&1 |
81ecdfbb
RW
17907 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17908 *${as_nl}ac_space=\ *)
17909 # `set' does not quote correctly, so add quotes: double-quote
17910 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
17911 sed -n \
17912 "s/'/'\\\\''/g;
17913 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 17914 ;; #(
bec39cab
AC
17915 *)
17916 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 17917 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 17918 ;;
81ecdfbb
RW
17919 esac |
17920 sort
17921) |
bec39cab 17922 sed '
81ecdfbb 17923 /^ac_cv_env_/b end
bec39cab 17924 t clear
81ecdfbb 17925 :clear
bec39cab
AC
17926 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17927 t end
81ecdfbb
RW
17928 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17929 :end' >>confcache
17930if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17931 if test -w "$cache_file"; then
d0ac1c44 17932 if test "x$cache_file" != "x/dev/null"; then
81ecdfbb
RW
17933 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17934$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
17935 if test ! -f "$cache_file" || test -h "$cache_file"; then
17936 cat confcache >"$cache_file"
17937 else
17938 case $cache_file in #(
17939 */* | ?:*)
17940 mv -f confcache "$cache_file"$$ &&
17941 mv -f "$cache_file"$$ "$cache_file" ;; #(
17942 *)
17943 mv -f confcache "$cache_file" ;;
17944 esac
17945 fi
17946 fi
bec39cab 17947 else
81ecdfbb
RW
17948 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17949$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
17950 fi
17951fi
17952rm -f confcache
17953
17954test "x$prefix" = xNONE && prefix=$ac_default_prefix
17955# Let make expand exec_prefix.
17956test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17957
bec39cab
AC
17958DEFS=-DHAVE_CONFIG_H
17959
17960ac_libobjs=
17961ac_ltlibobjs=
d0ac1c44 17962U=
bec39cab
AC
17963for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17964 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
17965 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
17966 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
17967 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17968 # will be set to the directory where LIBOBJS objects are built.
17969 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17970 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
17971done
17972LIBOBJS=$ac_libobjs
17973
17974LTLIBOBJS=$ac_ltlibobjs
17975
17976
85981d60 17977if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 17978 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
81ecdfbb 17979Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 17980fi
4df42755 17981if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
d0ac1c44 17982 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
4df42755
DE
17983Usually this means the macro was only invoked conditionally." "$LINENO" 5
17984fi
17985if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
d0ac1c44 17986 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
4df42755
DE
17987Usually this means the macro was only invoked conditionally." "$LINENO" 5
17988fi
81ecdfbb
RW
17989
17990
d0ac1c44 17991: "${CONFIG_STATUS=./config.status}"
81ecdfbb 17992ac_write_fail=0
bec39cab
AC
17993ac_clean_files_save=$ac_clean_files
17994ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
17995{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17996$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17997as_write_fail=0
17998cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
17999#! $SHELL
18000# Generated by $as_me.
18001# Run this file to recreate the current configuration.
18002# Compiler output produced by configure, useful for debugging
18003# configure, is in config.log if it exists.
18004
18005debug=false
18006ac_cs_recheck=false
18007ac_cs_silent=false
bec39cab 18008
81ecdfbb
RW
18009SHELL=\${CONFIG_SHELL-$SHELL}
18010export SHELL
18011_ASEOF
18012cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
18013## -------------------- ##
18014## M4sh Initialization. ##
18015## -------------------- ##
18016
18017# Be more Bourne compatible
18018DUALCASE=1; export DUALCASE # for MKS sh
18019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18020 emulate sh
18021 NULLCMD=:
81ecdfbb 18022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
18023 # is contrary to our usage. Disable this feature.
18024 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
18025 setopt NO_GLOB_SUBST
18026else
18027 case `(set -o) 2>/dev/null` in #(
18028 *posix*) :
18029 set -o posix ;; #(
18030 *) :
18031 ;;
18032esac
bec39cab 18033fi
bec39cab 18034
81ecdfbb
RW
18035
18036as_nl='
18037'
18038export as_nl
18039# Printing a long string crashes Solaris 7 /usr/bin/printf.
18040as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
18041as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
18042as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
18043# Prefer a ksh shell builtin over an external printf program on Solaris,
18044# but without wasting forks for bash or zsh.
18045if test -z "$BASH_VERSION$ZSH_VERSION" \
18046 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
18047 as_echo='print -r --'
18048 as_echo_n='print -rn --'
18049elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
18050 as_echo='printf %s\n'
18051 as_echo_n='printf %s'
18052else
18053 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
18054 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
18055 as_echo_n='/usr/ucb/echo -n'
18056 else
18057 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
18058 as_echo_n_body='eval
18059 arg=$1;
18060 case $arg in #(
18061 *"$as_nl"*)
18062 expr "X$arg" : "X\\(.*\\)$as_nl";
18063 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
18064 esac;
18065 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
18066 '
18067 export as_echo_n_body
18068 as_echo_n='sh -c $as_echo_n_body as_echo'
18069 fi
18070 export as_echo_body
18071 as_echo='sh -c $as_echo_body as_echo'
18072fi
18073
18074# The user is always right.
18075if test "${PATH_SEPARATOR+set}" != set; then
18076 PATH_SEPARATOR=:
18077 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
18078 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
18079 PATH_SEPARATOR=';'
18080 }
bec39cab
AC
18081fi
18082
18083
81ecdfbb
RW
18084# IFS
18085# We need space, tab and new line, in precisely that order. Quoting is
18086# there to prevent editors from complaining about space-tab.
18087# (If _AS_PATH_WALK were called with IFS unset, it would disable word
18088# splitting by setting IFS to empty value.)
18089IFS=" "" $as_nl"
18090
18091# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 18092as_myself=
81ecdfbb
RW
18093case $0 in #((
18094 *[\\/]* ) as_myself=$0 ;;
18095 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18096for as_dir in $PATH
18097do
18098 IFS=$as_save_IFS
18099 test -z "$as_dir" && as_dir=.
18100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18101 done
18102IFS=$as_save_IFS
18103
18104 ;;
18105esac
18106# We did not find ourselves, most probably we were run as `sh COMMAND'
18107# in which case we are not to be found in the path.
18108if test "x$as_myself" = x; then
18109 as_myself=$0
18110fi
18111if test ! -f "$as_myself"; then
18112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
18113 exit 1
18114fi
18115
18116# Unset variables that we do not need and which cause bugs (e.g. in
18117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
18118# suppresses any "Segmentation fault" message there. '((' could
18119# trigger a bug in pdksh 5.2.14.
18120for as_var in BASH_ENV ENV MAIL MAILPATH
18121do eval test x\${$as_var+set} = xset \
18122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
18123done
bec39cab
AC
18124PS1='$ '
18125PS2='> '
18126PS4='+ '
18127
18128# NLS nuisances.
81ecdfbb
RW
18129LC_ALL=C
18130export LC_ALL
18131LANGUAGE=C
18132export LANGUAGE
18133
18134# CDPATH.
18135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
18136
18137
d0ac1c44
SM
18138# as_fn_error STATUS ERROR [LINENO LOG_FD]
18139# ----------------------------------------
81ecdfbb
RW
18140# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
18141# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 18142# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
18143as_fn_error ()
18144{
d0ac1c44
SM
18145 as_status=$1; test $as_status -eq 0 && as_status=1
18146 if test "$4"; then
18147 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18148 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 18149 fi
d0ac1c44 18150 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
18151 as_fn_exit $as_status
18152} # as_fn_error
18153
18154
18155# as_fn_set_status STATUS
18156# -----------------------
18157# Set $? to STATUS, without forking.
18158as_fn_set_status ()
18159{
18160 return $1
18161} # as_fn_set_status
18162
18163# as_fn_exit STATUS
18164# -----------------
18165# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
18166as_fn_exit ()
18167{
18168 set +e
18169 as_fn_set_status $1
18170 exit $1
18171} # as_fn_exit
18172
18173# as_fn_unset VAR
18174# ---------------
18175# Portably unset VAR.
18176as_fn_unset ()
18177{
18178 { eval $1=; unset $1;}
18179}
18180as_unset=as_fn_unset
18181# as_fn_append VAR VALUE
18182# ----------------------
18183# Append the text in VALUE to the end of the definition contained in VAR. Take
18184# advantage of any shell optimizations that allow amortized linear growth over
18185# repeated appends, instead of the typical quadratic growth present in naive
18186# implementations.
18187if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
18188 eval 'as_fn_append ()
18189 {
18190 eval $1+=\$2
18191 }'
18192else
18193 as_fn_append ()
18194 {
18195 eval $1=\$$1\$2
18196 }
18197fi # as_fn_append
18198
18199# as_fn_arith ARG...
18200# ------------------
18201# Perform arithmetic evaluation on the ARGs, and store the result in the
18202# global $as_val. Take advantage of shells that can avoid forks. The arguments
18203# must be portable across $(()) and expr.
18204if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
18205 eval 'as_fn_arith ()
18206 {
18207 as_val=$(( $* ))
18208 }'
18209else
18210 as_fn_arith ()
18211 {
18212 as_val=`expr "$@" || test $? -eq 1`
18213 }
18214fi # as_fn_arith
bec39cab 18215
81ecdfbb
RW
18216
18217if expr a : '\(a\)' >/dev/null 2>&1 &&
18218 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
18219 as_expr=expr
18220else
18221 as_expr=false
18222fi
18223
81ecdfbb 18224if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
18225 as_basename=basename
18226else
18227 as_basename=false
18228fi
18229
81ecdfbb
RW
18230if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18231 as_dirname=dirname
18232else
18233 as_dirname=false
18234fi
bec39cab 18235
81ecdfbb 18236as_me=`$as_basename -- "$0" ||
bec39cab
AC
18237$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18238 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
18239 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
18240$as_echo X/"$0" |
18241 sed '/^.*\/\([^/][^/]*\)\/*$/{
18242 s//\1/
18243 q
18244 }
18245 /^X\/\(\/\/\)$/{
18246 s//\1/
18247 q
18248 }
18249 /^X\/\(\/\).*/{
18250 s//\1/
18251 q
18252 }
18253 s/.*/./; q'`
b4e70030 18254
b4e70030
JB
18255# Avoid depending upon Character Ranges.
18256as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18257as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18258as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18259as_cr_digits='0123456789'
18260as_cr_alnum=$as_cr_Letters$as_cr_digits
18261
81ecdfbb
RW
18262ECHO_C= ECHO_N= ECHO_T=
18263case `echo -n x` in #(((((
18264-n*)
18265 case `echo 'xy\c'` in
18266 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
18267 xy) ECHO_C='\c';;
18268 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18269 ECHO_T=' ';;
18270 esac;;
18271*)
18272 ECHO_N='-n';;
bec39cab
AC
18273esac
18274
81ecdfbb
RW
18275rm -f conf$$ conf$$.exe conf$$.file
18276if test -d conf$$.dir; then
18277 rm -f conf$$.dir/conf$$.file
bec39cab 18278else
81ecdfbb
RW
18279 rm -f conf$$.dir
18280 mkdir conf$$.dir 2>/dev/null
bec39cab 18281fi
81ecdfbb
RW
18282if (echo >conf$$.file) 2>/dev/null; then
18283 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 18284 as_ln_s='ln -s'
81ecdfbb
RW
18285 # ... but there are two gotchas:
18286 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18287 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 18288 # In both cases, we have to default to `cp -pR'.
81ecdfbb 18289 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 18290 as_ln_s='cp -pR'
81ecdfbb
RW
18291 elif ln conf$$.file conf$$ 2>/dev/null; then
18292 as_ln_s=ln
18293 else
d0ac1c44 18294 as_ln_s='cp -pR'
b4e70030 18295 fi
bec39cab 18296else
d0ac1c44 18297 as_ln_s='cp -pR'
bec39cab 18298fi
81ecdfbb
RW
18299rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18300rmdir conf$$.dir 2>/dev/null
18301
18302
18303# as_fn_mkdir_p
18304# -------------
18305# Create "$as_dir" as a directory, including parents if necessary.
18306as_fn_mkdir_p ()
18307{
18308
18309 case $as_dir in #(
18310 -*) as_dir=./$as_dir;;
18311 esac
18312 test -d "$as_dir" || eval $as_mkdir_p || {
18313 as_dirs=
18314 while :; do
18315 case $as_dir in #(
18316 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18317 *) as_qdir=$as_dir;;
18318 esac
18319 as_dirs="'$as_qdir' $as_dirs"
18320 as_dir=`$as_dirname -- "$as_dir" ||
18321$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18322 X"$as_dir" : 'X\(//\)[^/]' \| \
18323 X"$as_dir" : 'X\(//\)$' \| \
18324 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18325$as_echo X"$as_dir" |
18326 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18327 s//\1/
18328 q
18329 }
18330 /^X\(\/\/\)[^/].*/{
18331 s//\1/
18332 q
18333 }
18334 /^X\(\/\/\)$/{
18335 s//\1/
18336 q
18337 }
18338 /^X\(\/\).*/{
18339 s//\1/
18340 q
18341 }
18342 s/.*/./; q'`
18343 test -d "$as_dir" && break
18344 done
18345 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 18346 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb 18347
bec39cab 18348
81ecdfbb 18349} # as_fn_mkdir_p
bec39cab 18350if mkdir -p . 2>/dev/null; then
81ecdfbb 18351 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
18352else
18353 test -d ./-p && rmdir ./-p
18354 as_mkdir_p=false
18355fi
18356
d0ac1c44
SM
18357
18358# as_fn_executable_p FILE
18359# -----------------------
18360# Test if FILE is an executable regular file.
18361as_fn_executable_p ()
18362{
18363 test -f "$1" && test -x "$1"
18364} # as_fn_executable_p
18365as_test_x='test -x'
18366as_executable_p=as_fn_executable_p
bec39cab
AC
18367
18368# Sed expression to map a string onto a valid CPP name.
18369as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
18370
18371# Sed expression to map a string onto a valid variable name.
18372as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
18373
18374
bec39cab 18375exec 6>&1
81ecdfbb
RW
18376## ----------------------------------- ##
18377## Main body of $CONFIG_STATUS script. ##
18378## ----------------------------------- ##
18379_ASEOF
18380test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
18381
18382cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18383# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 18384# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
18385# values after options handling.
18386ac_log="
bec39cab 18387This file was extended by $as_me, which was
d0ac1c44 18388generated by GNU Autoconf 2.69. Invocation command line was
bec39cab
AC
18389
18390 CONFIG_FILES = $CONFIG_FILES
18391 CONFIG_HEADERS = $CONFIG_HEADERS
18392 CONFIG_LINKS = $CONFIG_LINKS
18393 CONFIG_COMMANDS = $CONFIG_COMMANDS
18394 $ $0 $@
18395
81ecdfbb
RW
18396on `(hostname || uname -n) 2>/dev/null | sed 1q`
18397"
18398
bec39cab
AC
18399_ACEOF
18400
81ecdfbb
RW
18401case $ac_config_files in *"
18402"*) set x $ac_config_files; shift; ac_config_files=$*;;
18403esac
234b45d4 18404
81ecdfbb
RW
18405case $ac_config_headers in *"
18406"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18407esac
b4e70030 18408
b4e70030 18409
81ecdfbb
RW
18410cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18411# Files that config.status was made for.
18412config_files="$ac_config_files"
18413config_headers="$ac_config_headers"
18414config_links="$ac_config_links"
18415config_commands="$ac_config_commands"
234b45d4 18416
81ecdfbb 18417_ACEOF
b4e70030 18418
81ecdfbb 18419cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 18420ac_cs_usage="\
81ecdfbb
RW
18421\`$as_me' instantiates files and other configuration actions
18422from templates according to the current configuration. Unless the files
18423and actions are specified as TAGs, all are instantiated by default.
234b45d4 18424
81ecdfbb 18425Usage: $0 [OPTION]... [TAG]...
234b45d4 18426
bec39cab 18427 -h, --help print this help, then exit
81ecdfbb 18428 -V, --version print version number and configuration settings, then exit
d0ac1c44 18429 --config print configuration, then exit
81ecdfbb
RW
18430 -q, --quiet, --silent
18431 do not print progress messages
bec39cab
AC
18432 -d, --debug don't remove temporary files
18433 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
18434 --file=FILE[:TEMPLATE]
18435 instantiate the configuration file FILE
18436 --header=FILE[:TEMPLATE]
18437 instantiate the configuration header FILE
234b45d4 18438
bec39cab
AC
18439Configuration files:
18440$config_files
234b45d4 18441
bec39cab
AC
18442Configuration headers:
18443$config_headers
234b45d4 18444
bec39cab
AC
18445Configuration links:
18446$config_links
234b45d4 18447
bec39cab
AC
18448Configuration commands:
18449$config_commands
18450
81ecdfbb 18451Report bugs to the package provider."
b4e70030 18452
81ecdfbb
RW
18453_ACEOF
18454cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 18455ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
bec39cab
AC
18456ac_cs_version="\\
18457config.status
d0ac1c44
SM
18458configured by $0, generated by GNU Autoconf 2.69,
18459 with options \\"\$ac_cs_config\\"
bec39cab 18460
d0ac1c44 18461Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
18462This config.status script is free software; the Free Software Foundation
18463gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
18464
18465ac_pwd='$ac_pwd'
18466srcdir='$srcdir'
18467INSTALL='$INSTALL'
81ecdfbb
RW
18468AWK='$AWK'
18469test -n "\$AWK" || AWK=awk
bec39cab
AC
18470_ACEOF
18471
81ecdfbb
RW
18472cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18473# The default lists apply if the user does not specify any file.
bec39cab
AC
18474ac_need_defaults=:
18475while test $# != 0
18476do
18477 case $1 in
d0ac1c44 18478 --*=?*)
81ecdfbb
RW
18479 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18480 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 18481 ac_shift=:
c906108c 18482 ;;
d0ac1c44
SM
18483 --*=)
18484 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18485 ac_optarg=
18486 ac_shift=:
18487 ;;
81ecdfbb 18488 *)
bec39cab
AC
18489 ac_option=$1
18490 ac_optarg=$2
18491 ac_shift=shift
c906108c 18492 ;;
bec39cab 18493 esac
c906108c 18494
bec39cab
AC
18495 case $ac_option in
18496 # Handling of the options.
bec39cab
AC
18497 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18498 ac_cs_recheck=: ;;
81ecdfbb
RW
18499 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
18500 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
18501 --config | --confi | --conf | --con | --co | --c )
18502 $as_echo "$ac_cs_config"; exit ;;
81ecdfbb 18503 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
18504 debug=: ;;
18505 --file | --fil | --fi | --f )
18506 $ac_shift
81ecdfbb
RW
18507 case $ac_optarg in
18508 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 18509 '') as_fn_error $? "missing file argument" ;;
81ecdfbb
RW
18510 esac
18511 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
18512 ac_need_defaults=false;;
18513 --header | --heade | --head | --hea )
18514 $ac_shift
81ecdfbb
RW
18515 case $ac_optarg in
18516 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18517 esac
18518 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 18519 ac_need_defaults=false;;
81ecdfbb
RW
18520 --he | --h)
18521 # Conflict between --help and --header
d0ac1c44 18522 as_fn_error $? "ambiguous option: \`$1'
81ecdfbb
RW
18523Try \`$0 --help' for more information.";;
18524 --help | --hel | -h )
18525 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
18526 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18527 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18528 ac_cs_silent=: ;;
c906108c 18529
bec39cab 18530 # This is an error.
d0ac1c44 18531 -*) as_fn_error $? "unrecognized option: \`$1'
81ecdfbb 18532Try \`$0 --help' for more information." ;;
c906108c 18533
81ecdfbb
RW
18534 *) as_fn_append ac_config_targets " $1"
18535 ac_need_defaults=false ;;
c906108c 18536
bec39cab
AC
18537 esac
18538 shift
18539done
c906108c 18540
bec39cab 18541ac_configure_extra_args=
c906108c 18542
bec39cab
AC
18543if $ac_cs_silent; then
18544 exec 6>/dev/null
18545 ac_configure_extra_args="$ac_configure_extra_args --silent"
18546fi
c906108c 18547
bec39cab 18548_ACEOF
81ecdfbb 18549cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 18550if \$ac_cs_recheck; then
d0ac1c44 18551 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
81ecdfbb
RW
18552 shift
18553 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18554 CONFIG_SHELL='$SHELL'
18555 export CONFIG_SHELL
18556 exec "\$@"
bec39cab
AC
18557fi
18558
18559_ACEOF
81ecdfbb
RW
18560cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18561exec 5>>config.log
18562{
18563 echo
18564 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18565## Running $as_me. ##
18566_ASBOX
18567 $as_echo "$ac_log"
18568} >&5
bec39cab 18569
81ecdfbb
RW
18570_ACEOF
18571cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 18572#
81ecdfbb 18573# INIT-COMMANDS
c906108c 18574#
a417dc56 18575ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 18576
bec39cab
AC
18577_ACEOF
18578
81ecdfbb 18579cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 18580
81ecdfbb 18581# Handling of arguments.
bec39cab 18582for ac_config_target in $ac_config_targets
c906108c 18583do
81ecdfbb
RW
18584 case $ac_config_target in
18585 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
18586 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 18587 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 18588 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 18589 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 18590 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 18591 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
141ec9f6 18592 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
5ae98d25 18593 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 18594 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb 18595
d0ac1c44 18596 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
18597 esac
18598done
18599
81ecdfbb 18600
bec39cab
AC
18601# If the user did not use the arguments to specify the items to instantiate,
18602# then the envvar interface is used. Set only those that are not.
18603# We use the long form for the default assignment because of an extremely
18604# bizarre bug on SunOS 4.1.3.
18605if $ac_need_defaults; then
18606 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18607 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18608 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
18609 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18610fi
18611
b4e70030 18612# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 18613# simply because there is no reason against having it here, and in addition,
b4e70030 18614# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
18615# Hook for its removal unless debugging.
18616# Note that there is a small window in which the directory will not be cleaned:
18617# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
18618$debug ||
18619{
d0ac1c44 18620 tmp= ac_tmp=
81ecdfbb 18621 trap 'exit_status=$?
d0ac1c44
SM
18622 : "${ac_tmp:=$tmp}"
18623 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
81ecdfbb
RW
18624' 0
18625 trap 'as_fn_exit 1' 1 2 13 15
18626}
18627# Create a (secure) tmp directory for tmp files.
18628
18629{
18630 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 18631 test -d "$tmp"
81ecdfbb
RW
18632} ||
18633{
18634 tmp=./conf$$-$RANDOM
18635 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
18636} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
18637ac_tmp=$tmp
81ecdfbb
RW
18638
18639# Set up the scripts for CONFIG_FILES section.
18640# No need to generate them if there are no CONFIG_FILES.
18641# This happens for instance with `./config.status config.h'.
18642if test -n "$CONFIG_FILES"; then
18643
18644if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
18645 ac_cs_awk_getline=:
18646 ac_cs_awk_pipe_init=
18647 ac_cs_awk_read_file='
18648 while ((getline aline < (F[key])) > 0)
18649 print(aline)
18650 close(F[key])'
18651 ac_cs_awk_pipe_fini=
18652else
18653 ac_cs_awk_getline=false
18654 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
18655 ac_cs_awk_read_file='
18656 print "|#_!!_#|"
18657 print "cat " F[key] " &&"
18658 '$ac_cs_awk_pipe_init
18659 # The final `:' finishes the AND list.
18660 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
18661fi
18662ac_cr=`echo X | tr X '\015'`
18663# On cygwin, bash can eat \r inside `` if the user requested igncr.
18664# But we know of no other shell where ac_cr would be empty at this
18665# point, so we can use a bashism as a fallback.
18666if test "x$ac_cr" = x; then
18667 eval ac_cr=\$\'\\r\'
18668fi
18669ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18670if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 18671 ac_cs_awk_cr='\\r'
81ecdfbb
RW
18672else
18673 ac_cs_awk_cr=$ac_cr
18674fi
18675
d0ac1c44 18676echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
81ecdfbb
RW
18677_ACEOF
18678
18679# Create commands to substitute file output variables.
18680{
18681 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
d0ac1c44 18682 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
81ecdfbb
RW
18683 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
18684 echo "_ACAWK" &&
18685 echo "_ACEOF"
18686} >conf$$files.sh &&
18687. ./conf$$files.sh ||
d0ac1c44 18688 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
18689rm -f conf$$files.sh
18690
18691{
18692 echo "cat >conf$$subs.awk <<_ACEOF" &&
18693 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18694 echo "_ACEOF"
18695} >conf$$subs.sh ||
d0ac1c44
SM
18696 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18697ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
81ecdfbb
RW
18698ac_delim='%!_!# '
18699for ac_last_try in false false false false false :; do
18700 . ./conf$$subs.sh ||
d0ac1c44 18701 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
18702
18703 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18704 if test $ac_delim_n = $ac_delim_num; then
18705 break
18706 elif $ac_last_try; then
d0ac1c44 18707 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
18708 else
18709 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18710 fi
18711done
18712rm -f conf$$subs.sh
18713
18714cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 18715cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
81ecdfbb
RW
18716_ACEOF
18717sed -n '
18718h
18719s/^/S["/; s/!.*/"]=/
18720p
18721g
18722s/^[^!]*!//
18723:repl
18724t repl
18725s/'"$ac_delim"'$//
18726t delim
18727:nl
18728h
d0ac1c44 18729s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
18730t more1
18731s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18732p
18733n
18734b repl
18735:more1
18736s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18737p
18738g
18739s/.\{148\}//
18740t nl
18741:delim
18742h
d0ac1c44 18743s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
18744t more2
18745s/["\\]/\\&/g; s/^/"/; s/$/"/
18746p
18747b
18748:more2
18749s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18750p
18751g
18752s/.\{148\}//
18753t delim
18754' <conf$$subs.awk | sed '
18755/^[^""]/{
18756 N
18757 s/\n//
18758}
18759' >>$CONFIG_STATUS || ac_write_fail=1
18760rm -f conf$$subs.awk
18761cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18762_ACAWK
d0ac1c44 18763cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
81ecdfbb
RW
18764 for (key in S) S_is_set[key] = 1
18765 FS = "\a"
18766 \$ac_cs_awk_pipe_init
18767}
18768{
18769 line = $ 0
18770 nfields = split(line, field, "@")
18771 substed = 0
18772 len = length(field[1])
18773 for (i = 2; i < nfields; i++) {
18774 key = field[i]
18775 keylen = length(key)
18776 if (S_is_set[key]) {
18777 value = S[key]
18778 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18779 len += length(value) + length(field[++i])
18780 substed = 1
18781 } else
18782 len += 1 + keylen
18783 }
18784 if (nfields == 3 && !substed) {
18785 key = field[2]
18786 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
18787 \$ac_cs_awk_read_file
18788 next
18789 }
18790 }
18791 print line
b4e70030 18792}
81ecdfbb
RW
18793\$ac_cs_awk_pipe_fini
18794_ACAWK
18795_ACEOF
18796cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18797if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18798 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18799else
18800 cat
d0ac1c44
SM
18801fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
18802 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
81ecdfbb
RW
18803_ACEOF
18804
d0ac1c44
SM
18805# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18806# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
81ecdfbb
RW
18807# trailing colons and then remove the whole line if VPATH becomes empty
18808# (actually we leave an empty line to preserve line numbers).
18809if test "x$srcdir" = x.; then
d0ac1c44
SM
18810 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18811h
18812s///
18813s/^/:/
18814s/[ ]*$/:/
18815s/:\$(srcdir):/:/g
18816s/:\${srcdir}:/:/g
18817s/:@srcdir@:/:/g
18818s/^:*//
81ecdfbb 18819s/:*$//
d0ac1c44
SM
18820x
18821s/\(=[ ]*\).*/\1/
18822G
18823s/\n//
81ecdfbb
RW
18824s/^[^=]*=[ ]*$//
18825}'
18826fi
18827
18828cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18829fi # test -n "$CONFIG_FILES"
18830
18831# Set up the scripts for CONFIG_HEADERS section.
18832# No need to generate them if there are no CONFIG_HEADERS.
18833# This happens for instance with `./config.status Makefile'.
18834if test -n "$CONFIG_HEADERS"; then
d0ac1c44 18835cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
81ecdfbb
RW
18836BEGIN {
18837_ACEOF
18838
18839# Transform confdefs.h into an awk script `defines.awk', embedded as
18840# here-document in config.status, that substitutes the proper values into
18841# config.h.in to produce config.h.
4e8d927d 18842
81ecdfbb
RW
18843# Create a delimiter string that does not exist in confdefs.h, to ease
18844# handling of long lines.
18845ac_delim='%!_!# '
18846for ac_last_try in false false :; do
d0ac1c44
SM
18847 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18848 if test -z "$ac_tt"; then
81ecdfbb
RW
18849 break
18850 elif $ac_last_try; then
d0ac1c44 18851 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
81ecdfbb
RW
18852 else
18853 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18854 fi
18855done
4e8d927d 18856
81ecdfbb
RW
18857# For the awk script, D is an array of macro values keyed by name,
18858# likewise P contains macro parameters if any. Preserve backslash
18859# newline sequences.
18860
18861ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18862sed -n '
18863s/.\{148\}/&'"$ac_delim"'/g
18864t rset
18865:rset
18866s/^[ ]*#[ ]*define[ ][ ]*/ /
18867t def
18868d
18869:def
18870s/\\$//
18871t bsnl
18872s/["\\]/\\&/g
18873s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18874D["\1"]=" \3"/p
18875s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18876d
18877:bsnl
18878s/["\\]/\\&/g
18879s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18880D["\1"]=" \3\\\\\\n"\\/p
18881t cont
18882s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18883t cont
18884d
18885:cont
18886n
18887s/.\{148\}/&'"$ac_delim"'/g
18888t clear
18889:clear
18890s/\\$//
18891t bsnlc
18892s/["\\]/\\&/g; s/^/"/; s/$/"/p
18893d
18894:bsnlc
18895s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18896b cont
18897' <confdefs.h | sed '
18898s/'"$ac_delim"'/"\\\
18899"/g' >>$CONFIG_STATUS || ac_write_fail=1
18900
18901cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18902 for (key in D) D_is_set[key] = 1
18903 FS = "\a"
18904}
18905/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18906 line = \$ 0
18907 split(line, arg, " ")
18908 if (arg[1] == "#") {
18909 defundef = arg[2]
18910 mac1 = arg[3]
18911 } else {
18912 defundef = substr(arg[1], 2)
18913 mac1 = arg[2]
18914 }
18915 split(mac1, mac2, "(") #)
18916 macro = mac2[1]
18917 prefix = substr(line, 1, index(line, defundef) - 1)
18918 if (D_is_set[macro]) {
18919 # Preserve the white space surrounding the "#".
18920 print prefix "define", macro P[macro] D[macro]
18921 next
18922 } else {
18923 # Replace #undef with comments. This is necessary, for example,
18924 # in the case of _POSIX_SOURCE, which is predefined and required
18925 # on some systems where configure will not decide to define it.
18926 if (defundef == "undef") {
18927 print "/*", prefix defundef, macro, "*/"
18928 next
18929 }
18930 }
b4e70030 18931}
81ecdfbb
RW
18932{ print }
18933_ACAWK
b4e70030 18934_ACEOF
81ecdfbb 18935cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 18936 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
81ecdfbb 18937fi # test -n "$CONFIG_HEADERS"
4e8d927d 18938
4e8d927d 18939
81ecdfbb
RW
18940eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
18941shift
18942for ac_tag
18943do
18944 case $ac_tag in
18945 :[FHLC]) ac_mode=$ac_tag; continue;;
18946 esac
18947 case $ac_mode$ac_tag in
18948 :[FHL]*:*);;
d0ac1c44 18949 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
81ecdfbb
RW
18950 :[FH]-) ac_tag=-:-;;
18951 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18952 esac
18953 ac_save_IFS=$IFS
18954 IFS=:
18955 set x $ac_tag
18956 IFS=$ac_save_IFS
18957 shift
18958 ac_file=$1
18959 shift
4e8d927d 18960
81ecdfbb
RW
18961 case $ac_mode in
18962 :L) ac_source=$1;;
18963 :[FH])
18964 ac_file_inputs=
18965 for ac_f
18966 do
18967 case $ac_f in
d0ac1c44 18968 -) ac_f="$ac_tmp/stdin";;
81ecdfbb
RW
18969 *) # Look for the file first in the build tree, then in the source tree
18970 # (if the path is not absolute). The absolute path cannot be DOS-style,
18971 # because $ac_f cannot contain `:'.
18972 test -f "$ac_f" ||
18973 case $ac_f in
18974 [\\/$]*) false;;
18975 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18976 esac ||
d0ac1c44 18977 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
81ecdfbb
RW
18978 esac
18979 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18980 as_fn_append ac_file_inputs " '$ac_f'"
18981 done
18982
18983 # Let's still pretend it is `configure' which instantiates (i.e., don't
18984 # use $as_me), people would be surprised to read:
18985 # /* config.h. Generated by config.status. */
18986 configure_input='Generated from '`
18987 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18988 `' by configure.'
18989 if test x"$ac_file" != x-; then
18990 configure_input="$ac_file. $configure_input"
18991 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18992$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 18993 fi
81ecdfbb
RW
18994 # Neutralize special characters interpreted by sed in replacement strings.
18995 case $configure_input in #(
18996 *\&* | *\|* | *\\* )
18997 ac_sed_conf_input=`$as_echo "$configure_input" |
18998 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18999 *) ac_sed_conf_input=$configure_input;;
19000 esac
4e8d927d 19001
81ecdfbb 19002 case $ac_tag in
d0ac1c44
SM
19003 *:-:* | *:-) cat >"$ac_tmp/stdin" \
19004 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
81ecdfbb
RW
19005 esac
19006 ;;
c906108c
SS
19007 esac
19008
81ecdfbb 19009 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
19010$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19011 X"$ac_file" : 'X\(//\)[^/]' \| \
19012 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
19013 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
19014$as_echo X"$ac_file" |
19015 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19016 s//\1/
19017 q
19018 }
19019 /^X\(\/\/\)[^/].*/{
19020 s//\1/
19021 q
19022 }
19023 /^X\(\/\/\)$/{
19024 s//\1/
19025 q
19026 }
19027 /^X\(\/\).*/{
19028 s//\1/
19029 q
19030 }
19031 s/.*/./; q'`
19032 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
19033 ac_builddir=.
19034
81ecdfbb
RW
19035case "$ac_dir" in
19036.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19037*)
19038 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19039 # A ".." for each directory in $ac_dir_suffix.
19040 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19041 case $ac_top_builddir_sub in
19042 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19043 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19044 esac ;;
19045esac
19046ac_abs_top_builddir=$ac_pwd
19047ac_abs_builddir=$ac_pwd$ac_dir_suffix
19048# for backward compatibility:
19049ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
19050
19051case $srcdir in
81ecdfbb 19052 .) # We are building in place.
bec39cab 19053 ac_srcdir=.
81ecdfbb
RW
19054 ac_top_srcdir=$ac_top_builddir_sub
19055 ac_abs_top_srcdir=$ac_pwd ;;
19056 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 19057 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
19058 ac_top_srcdir=$srcdir
19059 ac_abs_top_srcdir=$srcdir ;;
19060 *) # Relative name.
19061 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19062 ac_top_srcdir=$ac_top_build_prefix$srcdir
19063 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 19064esac
81ecdfbb 19065ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 19066
c906108c 19067
81ecdfbb
RW
19068 case $ac_mode in
19069 :F)
19070 #
19071 # CONFIG_FILE
19072 #
c906108c 19073
bec39cab
AC
19074 case $INSTALL in
19075 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 19076 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 19077 esac
81ecdfbb 19078_ACEOF
121ce6e5 19079
81ecdfbb
RW
19080cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19081# If the template does not know about datarootdir, expand it.
19082# FIXME: This hack should be removed a few years after 2.60.
19083ac_datarootdir_hack=; ac_datarootdir_seen=
19084ac_sed_dataroot='
19085/datarootdir/ {
19086 p
19087 q
19088}
19089/@datadir@/p
19090/@docdir@/p
19091/@infodir@/p
19092/@localedir@/p
19093/@mandir@/p'
19094case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
19095*datarootdir*) ac_datarootdir_seen=yes;;
19096*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
19097 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
19098$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
19099_ACEOF
19100cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19101 ac_datarootdir_hack='
19102 s&@datadir@&$datadir&g
19103 s&@docdir@&$docdir&g
19104 s&@infodir@&$infodir&g
19105 s&@localedir@&$localedir&g
19106 s&@mandir@&$mandir&g
19107 s&\\\${datarootdir}&$datarootdir&g' ;;
19108esac
4e8d927d 19109_ACEOF
81ecdfbb
RW
19110
19111# Neutralize VPATH when `$srcdir' = `.'.
19112# Shell code in configure.ac might set extrasub.
19113# FIXME: do we really want to maintain this feature?
19114cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19115ac_sed_extra="$ac_vpsub
bec39cab
AC
19116$extrasub
19117_ACEOF
81ecdfbb 19118cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
19119:t
19120/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
19121s|@configure_input@|$ac_sed_conf_input|;t t
19122s&@top_builddir@&$ac_top_builddir_sub&;t t
19123s&@top_build_prefix@&$ac_top_build_prefix&;t t
19124s&@srcdir@&$ac_srcdir&;t t
19125s&@abs_srcdir@&$ac_abs_srcdir&;t t
19126s&@top_srcdir@&$ac_top_srcdir&;t t
19127s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
19128s&@builddir@&$ac_builddir&;t t
19129s&@abs_builddir@&$ac_abs_builddir&;t t
19130s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
19131s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
19132$ac_datarootdir_hack
19133"
19134eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
19135if $ac_cs_awk_getline; then
d0ac1c44 19136 $AWK -f "$ac_tmp/subs.awk"
81ecdfbb 19137else
d0ac1c44
SM
19138 $AWK -f "$ac_tmp/subs.awk" | $SHELL
19139fi \
19140 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
19141
19142test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
19143 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
19144 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
19145 "$ac_tmp/out"`; test -z "$ac_out"; } &&
81ecdfbb 19146 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 19147which seems to be undefined. Please make sure it is defined" >&5
81ecdfbb 19148$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 19149which seems to be undefined. Please make sure it is defined" >&2;}
81ecdfbb 19150
d0ac1c44 19151 rm -f "$ac_tmp/stdin"
bec39cab 19152 case $ac_file in
d0ac1c44
SM
19153 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
19154 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
81ecdfbb 19155 esac \
d0ac1c44 19156 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
19157 ;;
19158 :H)
19159 #
19160 # CONFIG_HEADER
19161 #
bec39cab 19162 if test x"$ac_file" != x-; then
81ecdfbb
RW
19163 {
19164 $as_echo "/* $configure_input */" \
d0ac1c44
SM
19165 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
19166 } >"$ac_tmp/config.h" \
19167 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19168 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
81ecdfbb
RW
19169 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
19170$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 19171 else
81ecdfbb 19172 rm -f "$ac_file"
d0ac1c44
SM
19173 mv "$ac_tmp/config.h" "$ac_file" \
19174 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
bec39cab
AC
19175 fi
19176 else
81ecdfbb 19177 $as_echo "/* $configure_input */" \
d0ac1c44
SM
19178 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
19179 || as_fn_error $? "could not create -" "$LINENO" 5
bec39cab 19180 fi
81ecdfbb
RW
19181 ;;
19182 :L)
19183 #
19184 # CONFIG_LINK
19185 #
c906108c 19186
81ecdfbb
RW
19187 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
19188 :
b4e70030 19189 else
81ecdfbb
RW
19190 # Prefer the file from the source tree if names are identical.
19191 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
19192 ac_source=$srcdir/$ac_source
19193 fi
b4e70030 19194
81ecdfbb
RW
19195 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
19196$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 19197
81ecdfbb 19198 if test ! -r "$ac_source"; then
d0ac1c44 19199 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
81ecdfbb
RW
19200 fi
19201 rm -f "$ac_file"
bec39cab 19202
81ecdfbb 19203 # Try a relative symlink, then a hard link, then a copy.
d0ac1c44 19204 case $ac_source in
81ecdfbb
RW
19205 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
19206 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
19207 esac
19208 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
19209 ln "$ac_source" "$ac_file" 2>/dev/null ||
19210 cp -p "$ac_source" "$ac_file" ||
d0ac1c44 19211 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
81ecdfbb
RW
19212 fi
19213 ;;
19214 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
19215$as_echo "$as_me: executing $ac_file commands" >&6;}
19216 ;;
c906108c 19217 esac
b4e70030 19218
bec39cab 19219
81ecdfbb
RW
19220 case $ac_file$ac_mode in
19221 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 19222 "gcore":F) chmod +x gcore ;;
1e94266c
SM
19223 "Makefile":F)
19224case x$CONFIG_HEADERS in
19225xconfig.h:config.in)
19226echo > stamp-h ;;
19227esac
19228 ;;
19229 "gdb-gdb.gdb":F)
19230case x$CONFIG_HEADERS in
19231xconfig.h:config.in)
19232echo > stamp-h ;;
141ec9f6
SM
19233esac
19234 ;;
19235 "gdb-gdb.py":F)
19236case x$CONFIG_HEADERS in
19237xconfig.h:config.in)
19238echo > stamp-h ;;
1e94266c
SM
19239esac
19240 ;;
19241 "doc/Makefile":F)
19242case x$CONFIG_HEADERS in
19243xconfig.h:config.in)
19244echo > stamp-h ;;
19245esac
19246 ;;
19247 "data-directory/Makefile":F)
c906108c
SS
19248case x$CONFIG_HEADERS in
19249xconfig.h:config.in)
19250echo > stamp-h ;;
19251esac
bec39cab 19252 ;;
81ecdfbb 19253
bec39cab 19254 esac
81ecdfbb 19255done # for ac_tag
c906108c 19256
bec39cab 19257
81ecdfbb 19258as_fn_exit 0
bec39cab 19259_ACEOF
bec39cab
AC
19260ac_clean_files=$ac_clean_files_save
19261
81ecdfbb 19262test $ac_write_fail = 0 ||
d0ac1c44 19263 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
81ecdfbb 19264
bec39cab
AC
19265
19266# configure is writing to config.log, and then calls config.status.
19267# config.status does its own redirection, appending to config.log.
19268# Unfortunately, on DOS this fails, as config.log is still kept open
19269# by configure, so config.status won't be able to write to it; its
19270# output is simply discarded. So we exec the FD to /dev/null,
19271# effectively closing config.log, so it can be properly (re)opened and
19272# appended to by config.status. When coming back to configure, we
19273# need to make the FD available again.
19274if test "$no_create" != yes; then
19275 ac_cs_success=:
19276 ac_config_status_args=
19277 test "$silent" = yes &&
19278 ac_config_status_args="$ac_config_status_args --quiet"
19279 exec 5>/dev/null
19280 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
19281 exec 5>>config.log
19282 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19283 # would make configure fail if this is the last instruction.
d0ac1c44 19284 $ac_cs_success || as_fn_exit 1
bec39cab 19285fi
c906108c 19286
bec39cab 19287#
81ecdfbb 19288# CONFIG_SUBDIRS section.
bec39cab 19289#
c906108c
SS
19290if test "$no_recursion" != yes; then
19291
81ecdfbb
RW
19292 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
19293 # so they do not pile up.
c906108c
SS
19294 ac_sub_configure_args=
19295 ac_prev=
fdc59709
PB
19296 eval "set x $ac_configure_args"
19297 shift
19298 for ac_arg
19299 do
c906108c
SS
19300 if test -n "$ac_prev"; then
19301 ac_prev=
19302 continue
19303 fi
bec39cab 19304 case $ac_arg in
c906108c
SS
19305 -cache-file | --cache-file | --cache-fil | --cache-fi \
19306 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
19307 ac_prev=cache_file ;;
19308 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
19309 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
19310 | --c=*)
19311 ;;
19312 --config-cache | -C)
c906108c
SS
19313 ;;
19314 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
19315 ac_prev=srcdir ;;
19316 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
19317 ;;
bec39cab
AC
19318 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
19319 ac_prev=prefix ;;
19320 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
19321 ;;
81ecdfbb
RW
19322 --disable-option-checking)
19323 ;;
fdc59709
PB
19324 *)
19325 case $ac_arg in
81ecdfbb 19326 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 19327 esac
81ecdfbb 19328 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
19329 esac
19330 done
19331
bec39cab
AC
19332 # Always prepend --prefix to ensure using the same prefix
19333 # in subdir configurations.
fdc59709
PB
19334 ac_arg="--prefix=$prefix"
19335 case $ac_arg in
81ecdfbb 19336 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 19337 esac
81ecdfbb
RW
19338 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
19339
19340 # Pass --silent
19341 if test "$silent" = yes; then
19342 ac_sub_configure_args="--silent $ac_sub_configure_args"
19343 fi
19344
19345 # Always prepend --disable-option-checking to silence warnings, since
19346 # different subdirs can have different --enable and --with options.
19347 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 19348
b4e70030 19349 ac_popdir=`pwd`
bec39cab 19350 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
19351
19352 # Do not complain, so a configure script can configure whichever
19353 # parts of a large source tree are present.
fdc59709 19354 test -d "$srcdir/$ac_dir" || continue
c906108c 19355
81ecdfbb
RW
19356 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
19357 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
19358 $as_echo "$ac_msg" >&6
19359 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
19360 ac_builddir=.
19361
81ecdfbb
RW
19362case "$ac_dir" in
19363.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19364*)
19365 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19366 # A ".." for each directory in $ac_dir_suffix.
19367 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19368 case $ac_top_builddir_sub in
19369 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19370 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19371 esac ;;
19372esac
19373ac_abs_top_builddir=$ac_pwd
19374ac_abs_builddir=$ac_pwd$ac_dir_suffix
19375# for backward compatibility:
19376ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
19377
19378case $srcdir in
81ecdfbb 19379 .) # We are building in place.
bec39cab 19380 ac_srcdir=.
81ecdfbb
RW
19381 ac_top_srcdir=$ac_top_builddir_sub
19382 ac_abs_top_srcdir=$ac_pwd ;;
19383 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 19384 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
19385 ac_top_srcdir=$srcdir
19386 ac_abs_top_srcdir=$srcdir ;;
19387 *) # Relative name.
19388 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19389 ac_top_srcdir=$ac_top_build_prefix$srcdir
19390 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 19391esac
81ecdfbb 19392ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 19393
c906108c 19394
fdc59709 19395 cd "$ac_dir"
c906108c
SS
19396
19397 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
19398 if test -f "$ac_srcdir/configure.gnu"; then
19399 ac_sub_configure=$ac_srcdir/configure.gnu
19400 elif test -f "$ac_srcdir/configure"; then
19401 ac_sub_configure=$ac_srcdir/configure
19402 elif test -f "$ac_srcdir/configure.in"; then
19403 # This should be Cygnus configure.
19404 ac_sub_configure=$ac_aux_dir/configure
c906108c 19405 else
81ecdfbb
RW
19406 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
19407$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
19408 ac_sub_configure=
19409 fi
19410
19411 # The recursion is here.
19412 if test -n "$ac_sub_configure"; then
c906108c 19413 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
19414 case $cache_file in
19415 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
19416 *) # Relative name.
19417 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 19418 esac
c906108c 19419
81ecdfbb
RW
19420 { $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
19421$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 19422 # The eval makes quoting arguments work.
fdc59709
PB
19423 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
19424 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 19425 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
19426 fi
19427
fdc59709 19428 cd "$ac_popdir"
c906108c
SS
19429 done
19430fi
81ecdfbb
RW
19431if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19432 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19433$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
19434fi
c906108c 19435