]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/configure
Fix creation of nm.h when configure is changed
[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
a0a461e5 629NM_H
81ecdfbb 630GDB_NM_FILE
393fd4c3
YQ
631LTLIBBABELTRACE
632LIBBABELTRACE
633HAVE_LIBBABELTRACE
21ea5acd
SDJ
634HAVE_NATIVE_GCORE_HOST
635NAT_GENERATED_FILES
636XM_CLIBS
637MH_CFLAGS
638LOADLIBES
639NAT_CDEPS
640NATDEPFILES
641NAT_FILE
81ecdfbb
RW
642target_subdir
643CONFIG_UNINSTALL
644CONFIG_INSTALL
645CONFIG_CLEAN
646CONFIG_ALL
647CONFIG_SRCS
648CONFIG_DEPS
649CONFIG_OBS
650PROFILE_CFLAGS
651ENABLE_CFLAGS
652SIM_OBS
653SIM
654XMKMF
655GDBTK_SRC_DIR
656GDBTK_CFLAGS
657GDBTKLIBS
658X_LIBS
659X_LDFLAGS
660X_CFLAGS
661TK_XINCLUDES
662TK_DEPS
663TK_LIBRARY
664TK_INCLUDE
665TK_STUB_LIB_SPEC
666TK_STUB_LIB_FLAG
667TK_STUB_LIB_FILE
668TK_LIB_SPEC
669TK_LIB_FLAG
670TK_LIB_FILE
671TK_SRC_DIR
672TK_BIN_DIR
673TK_VERSION
674TCL_DEPS
675TCL_LIBRARY
676TCL_INCLUDE
677TCL_STUB_LIB_SPEC
678TCL_STUB_LIB_FLAG
679TCL_STUB_LIB_FILE
680TCL_LIB_SPEC
681TCL_LIB_FLAG
682TCL_LIB_FILE
683TCL_SRC_DIR
684TCL_BIN_DIR
685TCL_PATCH_LEVEL
686TCL_VERSION
687WIN32LDAPP
688GUI_CFLAGS_X
689LIBGUI
608e2dbb
TT
690LTLIBLZMA
691LIBLZMA
692HAVE_LIBLZMA
81ecdfbb
RW
693WIN32LIBS
694SER_HARDWIRE
695WERROR_CFLAGS
696WARN_CFLAGS
697SYSTEM_GDBINIT
81ecdfbb
RW
698TARGET_SYSTEM_ROOT
699CONFIG_LDFLAGS
f6528abd 700RDYNAMIC
81ecdfbb 701ALLOCA
58bfce93
MM
702LTLIBIPT
703LIBIPT
704HAVE_LIBIPT
62f29fda
TT
705SRCHIGH_CFLAGS
706SRCHIGH_LIBS
4df42755
DE
707HAVE_GUILE_FALSE
708HAVE_GUILE_TRUE
ed3ef339
DE
709GUILE_LIBS
710GUILE_CPPFLAGS
e76c5d17
DE
711GUILD_TARGET_FLAG
712GUILD
ed3ef339 713pkg_config_prog_path
4df42755
DE
714HAVE_PYTHON_FALSE
715HAVE_PYTHON_TRUE
ac534cba
JB
716PYTHON_LIBS
717PYTHON_CPPFLAGS
81ecdfbb 718PYTHON_CFLAGS
ec685c5e 719python_prog_path
2400729e
UW
720LTLIBMPFR
721LIBMPFR
722HAVE_LIBMPFR
81ecdfbb
RW
723LTLIBEXPAT
724LIBEXPAT
725HAVE_LIBEXPAT
b8e0a31c 726JIT_READER_DIR
f997c383 727TARGET_PTR
39037522 728READLINE_TEXI_INCFLAG
81ecdfbb
RW
729READLINE_CFLAGS
730READLINE_DEPS
731READLINE
016a3251
DD
732LTLIBICONV
733LIBICONV
711a72d3
L
734zlibinc
735zlibdir
81ecdfbb
RW
736MIG
737WINDRES
738DLLTOOL
c971b7fa 739AR
81ecdfbb
RW
740YFLAGS
741YACC
c971b7fa 742RANLIB
81ecdfbb 743LN_S
c971b7fa
PA
744INSTALL_DATA
745INSTALL_SCRIPT
746INSTALL_PROGRAM
747AWK
81ecdfbb
RW
748REPORT_BUGS_TEXI
749REPORT_BUGS_TO
750PKGVERSION
44cee4fd 751CODESIGN_CERT
b292c783 752HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
753TARGET_OBS
754subdirs
755GDB_DATADIR
756DEBUGDIR
5048e516
JK
757MAKEINFO_EXTRA_FLAGS
758MAKEINFOFLAGS
759MAKEINFO
81ecdfbb 760PACKAGE
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
58bfce93
MM
883with_intel_pt
884with_libipt_prefix
81ecdfbb
RW
885with_included_regex
886with_sysroot
887with_system_gdbinit
888enable_werror
889enable_build_warnings
890enable_gdb_build_warnings
f35d5ade 891enable_ubsan
608e2dbb
TT
892with_lzma
893with_liblzma_prefix
81ecdfbb
RW
894with_tcl
895with_tk
896with_x
897enable_sim
496c0e1b 898enable_gdbserver
393fd4c3
YQ
899with_babeltrace
900with_libbabeltrace_prefix
8ecfd7bd 901enable_unit_tests
81ecdfbb
RW
902'
903 ac_precious_vars='build_alias
904host_alias
905target_alias
906CC
907CFLAGS
908LDFLAGS
909LIBS
910CPPFLAGS
3bc3d82a
PA
911CXX
912CXXFLAGS
913CCC
81ecdfbb 914CPP
f06e05e0
JK
915MAKEINFO
916MAKEINFOFLAGS
81ecdfbb
RW
917YACC
918YFLAGS
919XMKMF'
5ae98d25 920ac_subdirs_all='testsuite
81ecdfbb 921gdbtk
81ecdfbb 922gdbserver'
c906108c
SS
923
924# Initialize some variables set by options.
bec39cab
AC
925ac_init_help=
926ac_init_version=false
81ecdfbb
RW
927ac_unrecognized_opts=
928ac_unrecognized_sep=
c906108c
SS
929# The variables have the same names as the options, with
930# dashes changed to underlines.
bec39cab 931cache_file=/dev/null
c906108c 932exec_prefix=NONE
c906108c 933no_create=
c906108c
SS
934no_recursion=
935prefix=NONE
936program_prefix=NONE
937program_suffix=NONE
938program_transform_name=s,x,x,
939silent=
940site=
941srcdir=
c906108c
SS
942verbose=
943x_includes=NONE
944x_libraries=NONE
bec39cab
AC
945
946# Installation directory options.
947# These are left unexpanded so users can "make install exec_prefix=/foo"
948# and all the variables that are supposed to be based on exec_prefix
949# by default will actually change.
950# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 951# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
952bindir='${exec_prefix}/bin'
953sbindir='${exec_prefix}/sbin'
954libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
955datarootdir='${prefix}/share'
956datadir='${datarootdir}'
c906108c
SS
957sysconfdir='${prefix}/etc'
958sharedstatedir='${prefix}/com'
959localstatedir='${prefix}/var'
c906108c
SS
960includedir='${prefix}/include'
961oldincludedir='/usr/include'
81ecdfbb
RW
962docdir='${datarootdir}/doc/${PACKAGE}'
963infodir='${datarootdir}/info'
964htmldir='${docdir}'
965dvidir='${docdir}'
966pdfdir='${docdir}'
967psdir='${docdir}'
968libdir='${exec_prefix}/lib'
969localedir='${datarootdir}/locale'
970mandir='${datarootdir}/man'
c906108c 971
c906108c 972ac_prev=
81ecdfbb 973ac_dashdash=
c906108c
SS
974for ac_option
975do
c906108c
SS
976 # If the previous option needs an argument, assign it.
977 if test -n "$ac_prev"; then
81ecdfbb 978 eval $ac_prev=\$ac_option
c906108c
SS
979 ac_prev=
980 continue
981 fi
982
81ecdfbb 983 case $ac_option in
d0ac1c44
SM
984 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
985 *=) ac_optarg= ;;
986 *) ac_optarg=yes ;;
81ecdfbb 987 esac
c906108c
SS
988
989 # Accept the important Cygnus configure options, so we can diagnose typos.
990
81ecdfbb
RW
991 case $ac_dashdash$ac_option in
992 --)
993 ac_dashdash=yes ;;
c906108c
SS
994
995 -bindir | --bindir | --bindi | --bind | --bin | --bi)
996 ac_prev=bindir ;;
997 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 998 bindir=$ac_optarg ;;
c906108c
SS
999
1000 -build | --build | --buil | --bui | --bu)
bec39cab 1001 ac_prev=build_alias ;;
c906108c 1002 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1003 build_alias=$ac_optarg ;;
c906108c
SS
1004
1005 -cache-file | --cache-file | --cache-fil | --cache-fi \
1006 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1007 ac_prev=cache_file ;;
1008 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1009 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1010 cache_file=$ac_optarg ;;
1011
1012 --config-cache | -C)
1013 cache_file=config.cache ;;
c906108c 1014
81ecdfbb 1015 -datadir | --datadir | --datadi | --datad)
c906108c 1016 ac_prev=datadir ;;
81ecdfbb 1017 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1018 datadir=$ac_optarg ;;
c906108c 1019
81ecdfbb
RW
1020 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1021 | --dataroo | --dataro | --datar)
1022 ac_prev=datarootdir ;;
1023 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1024 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1025 datarootdir=$ac_optarg ;;
1026
c906108c 1027 -disable-* | --disable-*)
81ecdfbb 1028 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1029 # Reject names that are not valid shell variable names.
81ecdfbb 1030 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1031 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1032 ac_useropt_orig=$ac_useropt
1033 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1034 case $ac_user_opts in
1035 *"
1036"enable_$ac_useropt"
1037"*) ;;
1038 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1039 ac_unrecognized_sep=', ';;
1040 esac
1041 eval enable_$ac_useropt=no ;;
1042
1043 -docdir | --docdir | --docdi | --doc | --do)
1044 ac_prev=docdir ;;
1045 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1046 docdir=$ac_optarg ;;
1047
1048 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1049 ac_prev=dvidir ;;
1050 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1051 dvidir=$ac_optarg ;;
c906108c
SS
1052
1053 -enable-* | --enable-*)
81ecdfbb 1054 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1055 # Reject names that are not valid shell variable names.
81ecdfbb 1056 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1057 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1058 ac_useropt_orig=$ac_useropt
1059 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1060 case $ac_user_opts in
1061 *"
1062"enable_$ac_useropt"
1063"*) ;;
1064 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1065 ac_unrecognized_sep=', ';;
b4e70030 1066 esac
81ecdfbb 1067 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1068
1069 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1070 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1071 | --exec | --exe | --ex)
1072 ac_prev=exec_prefix ;;
1073 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1074 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1075 | --exec=* | --exe=* | --ex=*)
bec39cab 1076 exec_prefix=$ac_optarg ;;
c906108c
SS
1077
1078 -gas | --gas | --ga | --g)
1079 # Obsolete; use --with-gas.
1080 with_gas=yes ;;
1081
bec39cab
AC
1082 -help | --help | --hel | --he | -h)
1083 ac_init_help=long ;;
1084 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1085 ac_init_help=recursive ;;
1086 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1087 ac_init_help=short ;;
c906108c
SS
1088
1089 -host | --host | --hos | --ho)
bec39cab 1090 ac_prev=host_alias ;;
c906108c 1091 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1092 host_alias=$ac_optarg ;;
c906108c 1093
81ecdfbb
RW
1094 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1095 ac_prev=htmldir ;;
1096 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1097 | --ht=*)
1098 htmldir=$ac_optarg ;;
1099
c906108c
SS
1100 -includedir | --includedir | --includedi | --included | --include \
1101 | --includ | --inclu | --incl | --inc)
1102 ac_prev=includedir ;;
1103 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1104 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1105 includedir=$ac_optarg ;;
c906108c
SS
1106
1107 -infodir | --infodir | --infodi | --infod | --info | --inf)
1108 ac_prev=infodir ;;
1109 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1110 infodir=$ac_optarg ;;
c906108c
SS
1111
1112 -libdir | --libdir | --libdi | --libd)
1113 ac_prev=libdir ;;
1114 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1115 libdir=$ac_optarg ;;
c906108c
SS
1116
1117 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1118 | --libexe | --libex | --libe)
1119 ac_prev=libexecdir ;;
1120 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1121 | --libexe=* | --libex=* | --libe=*)
bec39cab 1122 libexecdir=$ac_optarg ;;
c906108c 1123
81ecdfbb
RW
1124 -localedir | --localedir | --localedi | --localed | --locale)
1125 ac_prev=localedir ;;
1126 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1127 localedir=$ac_optarg ;;
1128
c906108c 1129 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1130 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1131 ac_prev=localstatedir ;;
1132 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1133 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1134 localstatedir=$ac_optarg ;;
c906108c
SS
1135
1136 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1137 ac_prev=mandir ;;
1138 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1139 mandir=$ac_optarg ;;
c906108c
SS
1140
1141 -nfp | --nfp | --nf)
1142 # Obsolete; use --without-fp.
1143 with_fp=no ;;
1144
1145 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1146 | --no-cr | --no-c | -n)
c906108c
SS
1147 no_create=yes ;;
1148
1149 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1150 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1151 no_recursion=yes ;;
1152
1153 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1154 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1155 | --oldin | --oldi | --old | --ol | --o)
1156 ac_prev=oldincludedir ;;
1157 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1158 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1159 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1160 oldincludedir=$ac_optarg ;;
c906108c
SS
1161
1162 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1163 ac_prev=prefix ;;
1164 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1165 prefix=$ac_optarg ;;
c906108c
SS
1166
1167 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1168 | --program-pre | --program-pr | --program-p)
1169 ac_prev=program_prefix ;;
1170 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1171 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1172 program_prefix=$ac_optarg ;;
c906108c
SS
1173
1174 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1175 | --program-suf | --program-su | --program-s)
1176 ac_prev=program_suffix ;;
1177 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1178 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1179 program_suffix=$ac_optarg ;;
c906108c
SS
1180
1181 -program-transform-name | --program-transform-name \
1182 | --program-transform-nam | --program-transform-na \
1183 | --program-transform-n | --program-transform- \
1184 | --program-transform | --program-transfor \
1185 | --program-transfo | --program-transf \
1186 | --program-trans | --program-tran \
1187 | --progr-tra | --program-tr | --program-t)
1188 ac_prev=program_transform_name ;;
1189 -program-transform-name=* | --program-transform-name=* \
1190 | --program-transform-nam=* | --program-transform-na=* \
1191 | --program-transform-n=* | --program-transform-=* \
1192 | --program-transform=* | --program-transfor=* \
1193 | --program-transfo=* | --program-transf=* \
1194 | --program-trans=* | --program-tran=* \
1195 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1196 program_transform_name=$ac_optarg ;;
c906108c 1197
81ecdfbb
RW
1198 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1199 ac_prev=pdfdir ;;
1200 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1201 pdfdir=$ac_optarg ;;
1202
1203 -psdir | --psdir | --psdi | --psd | --ps)
1204 ac_prev=psdir ;;
1205 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1206 psdir=$ac_optarg ;;
1207
c906108c
SS
1208 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1209 | -silent | --silent | --silen | --sile | --sil)
1210 silent=yes ;;
1211
1212 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1213 ac_prev=sbindir ;;
1214 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1215 | --sbi=* | --sb=*)
bec39cab 1216 sbindir=$ac_optarg ;;
c906108c
SS
1217
1218 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1219 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1220 | --sharedst | --shareds | --shared | --share | --shar \
1221 | --sha | --sh)
1222 ac_prev=sharedstatedir ;;
1223 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1224 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1225 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1226 | --sha=* | --sh=*)
bec39cab 1227 sharedstatedir=$ac_optarg ;;
c906108c
SS
1228
1229 -site | --site | --sit)
1230 ac_prev=site ;;
1231 -site=* | --site=* | --sit=*)
bec39cab 1232 site=$ac_optarg ;;
3ace7edb 1233
c906108c
SS
1234 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1235 ac_prev=srcdir ;;
1236 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1237 srcdir=$ac_optarg ;;
c906108c
SS
1238
1239 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1240 | --syscon | --sysco | --sysc | --sys | --sy)
1241 ac_prev=sysconfdir ;;
1242 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1243 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1244 sysconfdir=$ac_optarg ;;
c906108c
SS
1245
1246 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1247 ac_prev=target_alias ;;
c906108c 1248 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1249 target_alias=$ac_optarg ;;
c906108c
SS
1250
1251 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1252 verbose=yes ;;
1253
bec39cab
AC
1254 -version | --version | --versio | --versi | --vers | -V)
1255 ac_init_version=: ;;
c906108c
SS
1256
1257 -with-* | --with-*)
81ecdfbb 1258 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1259 # Reject names that are not valid shell variable names.
81ecdfbb 1260 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1261 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1262 ac_useropt_orig=$ac_useropt
1263 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1264 case $ac_user_opts in
1265 *"
1266"with_$ac_useropt"
1267"*) ;;
1268 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1269 ac_unrecognized_sep=', ';;
b4e70030 1270 esac
81ecdfbb 1271 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1272
1273 -without-* | --without-*)
81ecdfbb 1274 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1275 # Reject names that are not valid shell variable names.
81ecdfbb 1276 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1277 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1278 ac_useropt_orig=$ac_useropt
1279 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1280 case $ac_user_opts in
1281 *"
1282"with_$ac_useropt"
1283"*) ;;
1284 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1285 ac_unrecognized_sep=', ';;
1286 esac
1287 eval with_$ac_useropt=no ;;
c906108c
SS
1288
1289 --x)
1290 # Obsolete; use --with-x.
1291 with_x=yes ;;
1292
1293 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1294 | --x-incl | --x-inc | --x-in | --x-i)
1295 ac_prev=x_includes ;;
1296 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1297 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1298 x_includes=$ac_optarg ;;
c906108c
SS
1299
1300 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1301 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1302 ac_prev=x_libraries ;;
1303 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1304 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1305 x_libraries=$ac_optarg ;;
c906108c 1306
d0ac1c44
SM
1307 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1308Try \`$0 --help' for more information"
c906108c
SS
1309 ;;
1310
bec39cab
AC
1311 *=*)
1312 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1313 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1314 case $ac_envvar in #(
1315 '' | [0-9]* | *[!_$as_cr_alnum]* )
d0ac1c44 1316 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
81ecdfbb
RW
1317 esac
1318 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1319 export $ac_envvar ;;
1320
c906108c 1321 *)
bec39cab 1322 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1323 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1324 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1325 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
d0ac1c44 1326 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
c906108c
SS
1327 ;;
1328
1329 esac
1330done
1331
1332if test -n "$ac_prev"; then
bec39cab 1333 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
d0ac1c44 1334 as_fn_error $? "missing argument to $ac_option"
c906108c 1335fi
c906108c 1336
81ecdfbb
RW
1337if test -n "$ac_unrecognized_opts"; then
1338 case $enable_option_checking in
1339 no) ;;
d0ac1c44 1340 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
81ecdfbb 1341 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1342 esac
81ecdfbb 1343fi
b4e70030 1344
81ecdfbb
RW
1345# Check all directory arguments for consistency.
1346for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1347 datadir sysconfdir sharedstatedir localstatedir includedir \
1348 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1349 libdir localedir mandir
b4e70030 1350do
81ecdfbb
RW
1351 eval ac_val=\$$ac_var
1352 # Remove trailing slashes.
1353 case $ac_val in
1354 */ )
1355 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1356 eval $ac_var=\$ac_val;;
1357 esac
1358 # Be sure to have absolute directory names.
b4e70030 1359 case $ac_val in
81ecdfbb
RW
1360 [\\/$]* | ?:[\\/]* ) continue;;
1361 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1362 esac
d0ac1c44 1363 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1364done
1365
bec39cab
AC
1366# There might be people who depend on the old broken behavior: `$host'
1367# used to hold the argument of --host etc.
1368# FIXME: To remove some day.
1369build=$build_alias
1370host=$host_alias
1371target=$target_alias
1372
1373# FIXME: To remove some day.
1374if test "x$host_alias" != x; then
1375 if test "x$build_alias" = x; then
1376 cross_compiling=maybe
bec39cab
AC
1377 elif test "x$build_alias" != "x$host_alias"; then
1378 cross_compiling=yes
1379 fi
1380fi
c906108c 1381
bec39cab
AC
1382ac_tool_prefix=
1383test -n "$host_alias" && ac_tool_prefix=$host_alias-
1384
1385test "$silent" = yes && exec 6>/dev/null
c906108c 1386
c906108c 1387
81ecdfbb
RW
1388ac_pwd=`pwd` && test -n "$ac_pwd" &&
1389ac_ls_di=`ls -di .` &&
1390ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
d0ac1c44 1391 as_fn_error $? "working directory cannot be determined"
81ecdfbb 1392test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
d0ac1c44 1393 as_fn_error $? "pwd does not report name of working directory"
81ecdfbb
RW
1394
1395
c906108c
SS
1396# Find the source files, if location was not specified.
1397if test -z "$srcdir"; then
1398 ac_srcdir_defaulted=yes
81ecdfbb
RW
1399 # Try the directory containing this script, then the parent directory.
1400 ac_confdir=`$as_dirname -- "$as_myself" ||
1401$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1402 X"$as_myself" : 'X\(//\)[^/]' \| \
1403 X"$as_myself" : 'X\(//\)$' \| \
1404 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1405$as_echo X"$as_myself" |
1406 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1407 s//\1/
1408 q
1409 }
1410 /^X\(\/\/\)[^/].*/{
1411 s//\1/
1412 q
1413 }
1414 /^X\(\/\/\)$/{
1415 s//\1/
1416 q
1417 }
1418 /^X\(\/\).*/{
1419 s//\1/
1420 q
1421 }
1422 s/.*/./; q'`
c906108c 1423 srcdir=$ac_confdir
81ecdfbb 1424 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1425 srcdir=..
1426 fi
1427else
1428 ac_srcdir_defaulted=no
1429fi
81ecdfbb
RW
1430if test ! -r "$srcdir/$ac_unique_file"; then
1431 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
d0ac1c44 1432 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
81ecdfbb
RW
1433fi
1434ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1435ac_abs_confdir=`(
d0ac1c44 1436 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
81ecdfbb
RW
1437 pwd)`
1438# When building in place, set srcdir=.
1439if test "$ac_abs_confdir" = "$ac_pwd"; then
1440 srcdir=.
1441fi
1442# Remove unnecessary trailing slashes from srcdir.
1443# Double slashes in file names in object file debugging info
1444# mess up M-x gdb in Emacs.
1445case $srcdir in
1446*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1447esac
1448for ac_var in $ac_precious_vars; do
1449 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1450 eval ac_env_${ac_var}_value=\$${ac_var}
1451 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1452 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1453done
c906108c 1454
bec39cab
AC
1455#
1456# Report the --help message.
1457#
1458if test "$ac_init_help" = "long"; then
1459 # Omit some internal or obsolete options to make the list less imposing.
1460 # This message is too long to be a string in the A/UX 3.1 sh.
1461 cat <<_ACEOF
1462\`configure' configures this package to adapt to many kinds of systems.
1463
1464Usage: $0 [OPTION]... [VAR=VALUE]...
1465
1466To assign environment variables (e.g., CC, CFLAGS...), specify them as
1467VAR=VALUE. See below for descriptions of some of the useful variables.
1468
1469Defaults for the options are specified in brackets.
1470
1471Configuration:
1472 -h, --help display this help and exit
1473 --help=short display options specific to this package
1474 --help=recursive display the short help of all the included packages
1475 -V, --version display version information and exit
d0ac1c44 1476 -q, --quiet, --silent do not print \`checking ...' messages
bec39cab
AC
1477 --cache-file=FILE cache test results in FILE [disabled]
1478 -C, --config-cache alias for \`--cache-file=config.cache'
1479 -n, --no-create do not create output files
1480 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1481
bec39cab
AC
1482Installation directories:
1483 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1484 [$ac_default_prefix]
bec39cab 1485 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1486 [PREFIX]
bec39cab
AC
1487
1488By default, \`make install' will install all the files in
1489\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1490an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1491for instance \`--prefix=\$HOME'.
1492
1493For better control, use the options below.
1494
1495Fine tuning of the installation directories:
81ecdfbb
RW
1496 --bindir=DIR user executables [EPREFIX/bin]
1497 --sbindir=DIR system admin executables [EPREFIX/sbin]
1498 --libexecdir=DIR program executables [EPREFIX/libexec]
1499 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1500 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1501 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1502 --libdir=DIR object code libraries [EPREFIX/lib]
1503 --includedir=DIR C header files [PREFIX/include]
1504 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1505 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1506 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1507 --infodir=DIR info documentation [DATAROOTDIR/info]
1508 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1509 --mandir=DIR man documentation [DATAROOTDIR/man]
1510 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1511 --htmldir=DIR html documentation [DOCDIR]
1512 --dvidir=DIR dvi documentation [DOCDIR]
1513 --pdfdir=DIR pdf documentation [DOCDIR]
1514 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1515_ACEOF
1516
1517 cat <<\_ACEOF
1518
9009e1ae
MR
1519Program names:
1520 --program-prefix=PREFIX prepend PREFIX to installed program names
1521 --program-suffix=SUFFIX append SUFFIX to installed program names
1522 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1523
bec39cab
AC
1524X features:
1525 --x-includes=DIR X include files are in DIR
1526 --x-libraries=DIR X library files are in DIR
1527
1528System types:
1529 --build=BUILD configure for building on BUILD [guessed]
1530 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1531 --target=TARGET configure for building compilers for TARGET [HOST]
1532_ACEOF
1533fi
1534
1535if test -n "$ac_init_help"; then
1536
1537 cat <<\_ACEOF
1538
1539Optional Features:
81ecdfbb 1540 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1541 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1542 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
d0ac1c44
SM
1543 --enable-maintainer-mode
1544 enable make rules and dependencies not useful (and
1545 sometimes confusing) to the casual installer
2974be62 1546 --enable-plugins Enable support for plugins
da2f07f1 1547 --disable-largefile omit support for large files
a1220294
TT
1548 --enable-targets=TARGETS
1549 alternative target configurations
c0993dbe 1550 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1551 --disable-gdbmi disable machine-interface (MI)
1552 --enable-tui enable full-screen terminal user interface (TUI)
1553 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1554 --enable-profiling enable profiling of GDB
44cee4fd 1555 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
3841debe 1556 --disable-rpath do not hardcode runtime library paths
189b8c2e
ST
1557 --enable-source-highlight
1558 enable source-highlight for source listings
a1220294 1559 --enable-werror treat compile warnings as errors
32c1c914 1560 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1561 --enable-gdb-build-warnings
32c1c914 1562 enable GDB specific build-time compiler warnings if
a1220294 1563 gcc is used
f35d5ade 1564 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
32c1c914 1565 --enable-sim link gdb with simulator
496c0e1b
JB
1566 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1567 is auto)
8ecfd7bd
SDJ
1568 --enable-unit-tests Enable the inclusion of unit tests when compiling
1569 GDB
bec39cab
AC
1570
1571Optional Packages:
1572 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1573 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1574 --with-separate-debug-dir=PATH
32c1c914 1575 look for global separate debug info in this path
62e4f60c 1576 [LIBDIR/debug]
b14b1491
TT
1577 --with-gdb-datadir=PATH look for global separate data files in this path
1578 [DATADIR/gdb]
29b0e8a2 1579 --with-relocated-sources=PATH
32c1c914 1580 automatically relocate this path for source files
7349ff92 1581 --with-auto-load-dir=PATH
aff139ff 1582 directories from which to load auto-loaded scripts
1564a261 1583 [$debugdir:$datadir/auto-load]
bccbefd2 1584 --with-auto-load-safe-path=PATH
aff139ff 1585 directories safe to hold auto-loaded files
7349ff92 1586 [--with-auto-load-dir]
bccbefd2
JK
1587 --without-auto-load-safe-path
1588 do not restrict auto-loaded files locations
05e7c244 1589 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1590 --with-curses use the curses library instead of the termcap
1591 library
c16158bc
JM
1592 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1593 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1594 --with-system-zlib use installed libz
016a3251
DD
1595 --with-gnu-ld assume the C compiler uses GNU ld default=no
1596 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1597 --without-libiconv-prefix don't search for libiconv in includedir and libdir
478aac75 1598 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1599 --with-system-readline use installed readline library
b8e0a31c
SD
1600 --with-jit-reader-dir=PATH
1601 directory to load the JIT readers from
5c39566f 1602 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1603 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1604 --without-libexpat-prefix don't search for libexpat in includedir and libdir
2400729e
UW
1605 --with-mpfr include MPFR support (auto/yes/no)
1606 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1607 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
0c4a4063
DE
1608 --with-python[=PYTHON] include python support
1609 (auto/yes/no/<python-program>)
ed3ef339
DE
1610 --with-guile[=GUILE] include guile support
1611 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1612 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1613 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1614 --without-libipt-prefix don't search for libipt in includedir and libdir
a1220294
TT
1615 --without-included-regex
1616 don't use included regex; this is the default on
1617 systems with version 2 of the GNU C library (use
1618 with caution on other system)
81ecdfbb 1619 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1620 --with-system-gdbinit=PATH
32c1c914 1621 automatically load a system-wide gdbinit file
608e2dbb
TT
1622 --with-lzma support lzma compression (auto/yes/no)
1623 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1624 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1625 --with-tcl directory containing tcl configuration (tclConfig.sh)
1626 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1627 --with-x use the X Window System
393fd4c3
YQ
1628 --with-babeltrace include babeltrace support (auto/yes/no)
1629 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1630 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1631
1632Some influential environment variables:
1633 CC C compiler command
1634 CFLAGS C compiler flags
1635 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1636 nonstandard directory <lib dir>
81ecdfbb 1637 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 1638 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
81ecdfbb 1639 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1640 CXX C++ compiler command
1641 CXXFLAGS C++ compiler flags
bec39cab 1642 CPP C preprocessor
f06e05e0
JK
1643 MAKEINFO Parent configure detects if it is of sufficient version.
1644 MAKEINFOFLAGS
1645 Parameters for MAKEINFO.
d0ac1c44
SM
1646 YACC The `Yet Another Compiler Compiler' implementation to use.
1647 Defaults to the first program found out of: `bison -y', `byacc',
1648 `yacc'.
81ecdfbb
RW
1649 YFLAGS The list of arguments that will be passed by default to $YACC.
1650 This script will default YFLAGS to the empty string to avoid a
1651 default value of `-d' given by some make applications.
1652 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1653
1654Use these variables to override the choices made by `configure' or to help
1655it to find libraries and programs with nonstandard names/locations.
1656
81ecdfbb 1657Report bugs to the package provider.
bec39cab 1658_ACEOF
81ecdfbb 1659ac_status=$?
bec39cab
AC
1660fi
1661
1662if test "$ac_init_help" = "recursive"; then
1663 # If there are subdirs, report their specific --help.
bec39cab 1664 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1665 test -d "$ac_dir" ||
1666 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1667 continue
bec39cab
AC
1668 ac_builddir=.
1669
81ecdfbb
RW
1670case "$ac_dir" in
1671.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1672*)
1673 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1674 # A ".." for each directory in $ac_dir_suffix.
1675 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1676 case $ac_top_builddir_sub in
1677 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1678 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1679 esac ;;
1680esac
1681ac_abs_top_builddir=$ac_pwd
1682ac_abs_builddir=$ac_pwd$ac_dir_suffix
1683# for backward compatibility:
1684ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1685
1686case $srcdir in
81ecdfbb 1687 .) # We are building in place.
bec39cab 1688 ac_srcdir=.
81ecdfbb
RW
1689 ac_top_srcdir=$ac_top_builddir_sub
1690 ac_abs_top_srcdir=$ac_pwd ;;
1691 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1692 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1693 ac_top_srcdir=$srcdir
1694 ac_abs_top_srcdir=$srcdir ;;
1695 *) # Relative name.
1696 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1697 ac_top_srcdir=$ac_top_build_prefix$srcdir
1698 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1699esac
81ecdfbb 1700ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1701
81ecdfbb
RW
1702 cd "$ac_dir" || { ac_status=$?; continue; }
1703 # Check for guested configure.
1704 if test -f "$ac_srcdir/configure.gnu"; then
1705 echo &&
1706 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1707 elif test -f "$ac_srcdir/configure"; then
1708 echo &&
1709 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1710 else
81ecdfbb
RW
1711 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1712 fi || ac_status=$?
1713 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1714 done
1715fi
1716
81ecdfbb 1717test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1718if $ac_init_version; then
1719 cat <<\_ACEOF
81ecdfbb 1720configure
d0ac1c44 1721generated by GNU Autoconf 2.69
bec39cab 1722
d0ac1c44 1723Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
1724This configure script is free software; the Free Software Foundation
1725gives unlimited permission to copy, distribute and modify it.
1726_ACEOF
81ecdfbb 1727 exit
bec39cab 1728fi
bec39cab 1729
81ecdfbb
RW
1730## ------------------------ ##
1731## Autoconf initialization. ##
1732## ------------------------ ##
bec39cab 1733
81ecdfbb
RW
1734# ac_fn_c_try_compile LINENO
1735# --------------------------
1736# Try to compile conftest.$ac_ext, and return whether this succeeded.
1737ac_fn_c_try_compile ()
1738{
1739 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1740 rm -f conftest.$ac_objext
1741 if { { ac_try="$ac_compile"
1742case "(($ac_try" in
1743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1744 *) ac_try_echo=$ac_try;;
1745esac
1746eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1747$as_echo "$ac_try_echo"; } >&5
1748 (eval "$ac_compile") 2>conftest.err
1749 ac_status=$?
1750 if test -s conftest.err; then
1751 grep -v '^ *+' conftest.err >conftest.er1
1752 cat conftest.er1 >&5
1753 mv -f conftest.er1 conftest.err
1754 fi
1755 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1756 test $ac_status = 0; } && {
1757 test -z "$ac_c_werror_flag" ||
1758 test ! -s conftest.err
1759 } && test -s conftest.$ac_objext; then :
1760 ac_retval=0
1761else
1762 $as_echo "$as_me: failed program was:" >&5
1763sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1764
81ecdfbb
RW
1765 ac_retval=1
1766fi
d0ac1c44
SM
1767 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1768 as_fn_set_status $ac_retval
81ecdfbb
RW
1769
1770} # ac_fn_c_try_compile
1771
3bc3d82a
PA
1772# ac_fn_cxx_try_compile LINENO
1773# ----------------------------
1774# Try to compile conftest.$ac_ext, and return whether this succeeded.
1775ac_fn_cxx_try_compile ()
1776{
1777 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1778 rm -f conftest.$ac_objext
1779 if { { ac_try="$ac_compile"
1780case "(($ac_try" in
1781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1782 *) ac_try_echo=$ac_try;;
1783esac
1784eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1785$as_echo "$ac_try_echo"; } >&5
1786 (eval "$ac_compile") 2>conftest.err
1787 ac_status=$?
1788 if test -s conftest.err; then
1789 grep -v '^ *+' conftest.err >conftest.er1
1790 cat conftest.er1 >&5
1791 mv -f conftest.er1 conftest.err
1792 fi
1793 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1794 test $ac_status = 0; } && {
1795 test -z "$ac_cxx_werror_flag" ||
1796 test ! -s conftest.err
1797 } && test -s conftest.$ac_objext; then :
1798 ac_retval=0
1799else
1800 $as_echo "$as_me: failed program was:" >&5
1801sed 's/^/| /' conftest.$ac_ext >&5
1802
1803 ac_retval=1
1804fi
d0ac1c44
SM
1805 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1806 as_fn_set_status $ac_retval
3bc3d82a
PA
1807
1808} # ac_fn_cxx_try_compile
1809
81ecdfbb
RW
1810# ac_fn_c_try_cpp LINENO
1811# ----------------------
1812# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1813ac_fn_c_try_cpp ()
bec39cab 1814{
81ecdfbb
RW
1815 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1816 if { { ac_try="$ac_cpp conftest.$ac_ext"
1817case "(($ac_try" in
1818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1819 *) ac_try_echo=$ac_try;;
1820esac
1821eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1822$as_echo "$ac_try_echo"; } >&5
1823 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1824 ac_status=$?
1825 if test -s conftest.err; then
1826 grep -v '^ *+' conftest.err >conftest.er1
1827 cat conftest.er1 >&5
1828 mv -f conftest.er1 conftest.err
1829 fi
1830 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 1831 test $ac_status = 0; } > conftest.i && {
81ecdfbb
RW
1832 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1833 test ! -s conftest.err
1834 }; then :
1835 ac_retval=0
1836else
1837 $as_echo "$as_me: failed program was:" >&5
1838sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1839
81ecdfbb
RW
1840 ac_retval=1
1841fi
d0ac1c44
SM
1842 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1843 as_fn_set_status $ac_retval
bec39cab 1844
81ecdfbb 1845} # ac_fn_c_try_cpp
bec39cab 1846
81ecdfbb
RW
1847# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1848# -------------------------------------------------------
1849# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1850# the include files in INCLUDES and setting the cache variable VAR
1851# accordingly.
1852ac_fn_c_check_header_mongrel ()
1853{
1854 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 1855 if eval \${$3+:} false; then :
81ecdfbb
RW
1856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1857$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1858if eval \${$3+:} false; then :
81ecdfbb
RW
1859 $as_echo_n "(cached) " >&6
1860fi
1861eval ac_res=\$$3
1862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1863$as_echo "$ac_res" >&6; }
1864else
1865 # Is the header compilable?
1866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1867$as_echo_n "checking $2 usability... " >&6; }
1868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1869/* end confdefs.h. */
1870$4
1871#include <$2>
1872_ACEOF
1873if ac_fn_c_try_compile "$LINENO"; then :
1874 ac_header_compiler=yes
1875else
1876 ac_header_compiler=no
1877fi
1878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1880$as_echo "$ac_header_compiler" >&6; }
bec39cab 1881
81ecdfbb
RW
1882# Is the header present?
1883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1884$as_echo_n "checking $2 presence... " >&6; }
1885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1886/* end confdefs.h. */
1887#include <$2>
1888_ACEOF
1889if ac_fn_c_try_cpp "$LINENO"; then :
1890 ac_header_preproc=yes
1891else
1892 ac_header_preproc=no
1893fi
d0ac1c44 1894rm -f conftest.err conftest.i conftest.$ac_ext
81ecdfbb
RW
1895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1896$as_echo "$ac_header_preproc" >&6; }
bec39cab 1897
81ecdfbb
RW
1898# So? What about this header?
1899case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1900 yes:no: )
1901 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1902$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1903 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1904$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1905 ;;
1906 no:yes:* )
1907 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1908$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1909 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1910$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1911 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1912$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1913 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1914$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1915 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1916$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1917 ;;
1918esac
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1920$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1921if eval \${$3+:} false; then :
81ecdfbb
RW
1922 $as_echo_n "(cached) " >&6
1923else
1924 eval "$3=\$ac_header_compiler"
1925fi
1926eval ac_res=\$$3
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1928$as_echo "$ac_res" >&6; }
1929fi
d0ac1c44 1930 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 1931
81ecdfbb 1932} # ac_fn_c_check_header_mongrel
bec39cab 1933
81ecdfbb
RW
1934# ac_fn_c_try_run LINENO
1935# ----------------------
1936# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1937# that executables *can* be run.
1938ac_fn_c_try_run ()
1939{
1940 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1941 if { { ac_try="$ac_link"
1942case "(($ac_try" in
1943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1944 *) ac_try_echo=$ac_try;;
1945esac
1946eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1947$as_echo "$ac_try_echo"; } >&5
1948 (eval "$ac_link") 2>&5
1949 ac_status=$?
1950 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1951 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1952 { { case "(($ac_try" in
1953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1954 *) ac_try_echo=$ac_try;;
1955esac
1956eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1957$as_echo "$ac_try_echo"; } >&5
1958 (eval "$ac_try") 2>&5
1959 ac_status=$?
1960 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1961 test $ac_status = 0; }; }; then :
1962 ac_retval=0
1963else
1964 $as_echo "$as_me: program exited with status $ac_status" >&5
1965 $as_echo "$as_me: failed program was:" >&5
1966sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1967
81ecdfbb
RW
1968 ac_retval=$ac_status
1969fi
1970 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
1971 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1972 as_fn_set_status $ac_retval
bec39cab 1973
81ecdfbb 1974} # ac_fn_c_try_run
bec39cab 1975
81ecdfbb
RW
1976# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1977# -------------------------------------------------------
1978# Tests whether HEADER exists and can be compiled using the include files in
1979# INCLUDES, setting the cache variable VAR accordingly.
1980ac_fn_c_check_header_compile ()
1981{
1982 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1984$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1985if eval \${$3+:} false; then :
81ecdfbb
RW
1986 $as_echo_n "(cached) " >&6
1987else
1988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1989/* end confdefs.h. */
1990$4
1991#include <$2>
bec39cab 1992_ACEOF
81ecdfbb
RW
1993if ac_fn_c_try_compile "$LINENO"; then :
1994 eval "$3=yes"
1995else
1996 eval "$3=no"
1997fi
1998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1999fi
2000eval ac_res=\$$3
2001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2002$as_echo "$ac_res" >&6; }
d0ac1c44 2003 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 2004
81ecdfbb 2005} # ac_fn_c_check_header_compile
bec39cab 2006
2974be62
AM
2007# ac_fn_c_try_link LINENO
2008# -----------------------
2009# Try to link conftest.$ac_ext, and return whether this succeeded.
2010ac_fn_c_try_link ()
2011{
2012 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2013 rm -f conftest.$ac_objext conftest$ac_exeext
2014 if { { ac_try="$ac_link"
2015case "(($ac_try" in
2016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2017 *) ac_try_echo=$ac_try;;
2018esac
2019eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2020$as_echo "$ac_try_echo"; } >&5
2021 (eval "$ac_link") 2>conftest.err
2022 ac_status=$?
2023 if test -s conftest.err; then
2024 grep -v '^ *+' conftest.err >conftest.er1
2025 cat conftest.er1 >&5
2026 mv -f conftest.er1 conftest.err
2027 fi
2028 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2029 test $ac_status = 0; } && {
2030 test -z "$ac_c_werror_flag" ||
2031 test ! -s conftest.err
2032 } && test -s conftest$ac_exeext && {
2033 test "$cross_compiling" = yes ||
d0ac1c44 2034 test -x conftest$ac_exeext
2974be62
AM
2035 }; then :
2036 ac_retval=0
2037else
2038 $as_echo "$as_me: failed program was:" >&5
2039sed 's/^/| /' conftest.$ac_ext >&5
2040
2041 ac_retval=1
2042fi
2043 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2044 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2045 # interfere with the next link command; also delete a directory that is
2046 # left behind by Apple's compiler. We do this before executing the actions.
2047 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2048 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2049 as_fn_set_status $ac_retval
2974be62
AM
2050
2051} # ac_fn_c_try_link
2052
81ecdfbb
RW
2053# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2054# --------------------------------------------
2055# Tries to find the compile-time value of EXPR in a program that includes
2056# INCLUDES, setting VAR accordingly. Returns whether the value could be
2057# computed
2058ac_fn_c_compute_int ()
2059{
2060 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2061 if test "$cross_compiling" = yes; then
2062 # Depending upon the size, compute the lo and hi bounds.
2063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2064/* end confdefs.h. */
2065$4
2066int
2067main ()
2068{
2069static int test_array [1 - 2 * !(($2) >= 0)];
d0ac1c44
SM
2070test_array [0] = 0;
2071return test_array [0];
bec39cab 2072
81ecdfbb
RW
2073 ;
2074 return 0;
2075}
2076_ACEOF
2077if ac_fn_c_try_compile "$LINENO"; then :
2078 ac_lo=0 ac_mid=0
2079 while :; do
2080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2081/* end confdefs.h. */
2082$4
2083int
2084main ()
2085{
2086static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2087test_array [0] = 0;
2088return test_array [0];
bec39cab 2089
81ecdfbb
RW
2090 ;
2091 return 0;
2092}
2093_ACEOF
2094if ac_fn_c_try_compile "$LINENO"; then :
2095 ac_hi=$ac_mid; break
2096else
2097 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2098 if test $ac_lo -le $ac_mid; then
2099 ac_lo= ac_hi=
2100 break
2101 fi
2102 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2103fi
81ecdfbb
RW
2104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2105 done
c906108c 2106else
81ecdfbb
RW
2107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2108/* end confdefs.h. */
2109$4
2110int
2111main ()
2112{
2113static int test_array [1 - 2 * !(($2) < 0)];
d0ac1c44
SM
2114test_array [0] = 0;
2115return test_array [0];
bec39cab 2116
81ecdfbb
RW
2117 ;
2118 return 0;
2119}
2120_ACEOF
2121if ac_fn_c_try_compile "$LINENO"; then :
2122 ac_hi=-1 ac_mid=-1
2123 while :; do
2124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2125/* end confdefs.h. */
2126$4
2127int
2128main ()
2129{
2130static int test_array [1 - 2 * !(($2) >= $ac_mid)];
d0ac1c44
SM
2131test_array [0] = 0;
2132return test_array [0];
bec39cab 2133
81ecdfbb
RW
2134 ;
2135 return 0;
2136}
2137_ACEOF
2138if ac_fn_c_try_compile "$LINENO"; then :
2139 ac_lo=$ac_mid; break
2140else
2141 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2142 if test $ac_mid -le $ac_hi; then
2143 ac_lo= ac_hi=
2144 break
2145 fi
2146 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2147fi
2148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2149 done
2150else
2151 ac_lo= ac_hi=
2152fi
2153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2154fi
2155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2156# Binary search between lo and hi bounds.
2157while test "x$ac_lo" != "x$ac_hi"; do
2158 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2160/* end confdefs.h. */
2161$4
2162int
2163main ()
2164{
2165static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2166test_array [0] = 0;
2167return test_array [0];
bec39cab 2168
81ecdfbb
RW
2169 ;
2170 return 0;
2171}
2172_ACEOF
2173if ac_fn_c_try_compile "$LINENO"; then :
2174 ac_hi=$ac_mid
2175else
2176 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2177fi
2178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2179done
2180case $ac_lo in #((
2181?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2182'') ac_retval=1 ;;
2183esac
2184 else
2185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2186/* end confdefs.h. */
2187$4
2188static long int longval () { return $2; }
2189static unsigned long int ulongval () { return $2; }
2190#include <stdio.h>
2191#include <stdlib.h>
2192int
2193main ()
2194{
bec39cab 2195
81ecdfbb
RW
2196 FILE *f = fopen ("conftest.val", "w");
2197 if (! f)
2198 return 1;
2199 if (($2) < 0)
2200 {
2201 long int i = longval ();
2202 if (i != ($2))
2203 return 1;
2204 fprintf (f, "%ld", i);
2205 }
2206 else
2207 {
2208 unsigned long int i = ulongval ();
2209 if (i != ($2))
2210 return 1;
2211 fprintf (f, "%lu", i);
2212 }
2213 /* Do not output a trailing newline, as this causes \r\n confusion
2214 on some platforms. */
2215 return ferror (f) || fclose (f) != 0;
bec39cab 2216
81ecdfbb
RW
2217 ;
2218 return 0;
2219}
2220_ACEOF
2221if ac_fn_c_try_run "$LINENO"; then :
2222 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2223else
2224 ac_retval=1
2225fi
2226rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2227 conftest.$ac_objext conftest.beam conftest.$ac_ext
2228rm -f conftest.val
bec39cab 2229
81ecdfbb 2230 fi
d0ac1c44
SM
2231 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2232 as_fn_set_status $ac_retval
bec39cab 2233
81ecdfbb 2234} # ac_fn_c_compute_int
bec39cab 2235
55a8c076
YQ
2236# ac_fn_c_check_func LINENO FUNC VAR
2237# ----------------------------------
2238# Tests whether FUNC exists, setting the cache variable VAR accordingly
2239ac_fn_c_check_func ()
81ecdfbb
RW
2240{
2241 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2243$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2244if eval \${$3+:} false; then :
81ecdfbb
RW
2245 $as_echo_n "(cached) " >&6
2246else
81ecdfbb
RW
2247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2248/* end confdefs.h. */
55a8c076
YQ
2249/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2250 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2251#define $2 innocuous_$2
2252
2253/* System header to define __stub macros and hopefully few prototypes,
2254 which can conflict with char $2 (); below.
2255 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2256 <limits.h> exists even on freestanding compilers. */
2257
2258#ifdef __STDC__
2259# include <limits.h>
2260#else
2261# include <assert.h>
2262#endif
2263
2264#undef $2
2265
2266/* Override any GCC internal prototype to avoid an error.
2267 Use char because int might match the return type of a GCC
2268 builtin and then its argument prototype would still apply. */
2269#ifdef __cplusplus
2270extern "C"
2271#endif
2272char $2 ();
2273/* The GNU C library defines this for functions which it implements
2274 to always fail with ENOSYS. Some functions are actually named
2275 something starting with __ and the normal name is an alias. */
2276#if defined __stub_$2 || defined __stub___$2
2277choke me
2278#endif
2279
2280int
2281main ()
2282{
2283return $2 ();
2284 ;
2285 return 0;
2286}
2287_ACEOF
2288if ac_fn_c_try_link "$LINENO"; then :
2289 eval "$3=yes"
2290else
2291 eval "$3=no"
2292fi
2293rm -f core conftest.err conftest.$ac_objext \
2294 conftest$ac_exeext conftest.$ac_ext
2295fi
2296eval ac_res=\$$3
2297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2298$as_echo "$ac_res" >&6; }
d0ac1c44 2299 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
55a8c076
YQ
2300
2301} # ac_fn_c_check_func
2302
c56ccc05
MM
2303# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2304# ----------------------------------------------------
2305# Tries to find if the field MEMBER exists in type AGGR, after including
2306# INCLUDES, setting cache variable VAR accordingly.
2307ac_fn_c_check_member ()
2308{
2309 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2311$as_echo_n "checking for $2.$3... " >&6; }
d0ac1c44 2312if eval \${$4+:} false; then :
c56ccc05
MM
2313 $as_echo_n "(cached) " >&6
2314else
2315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2316/* end confdefs.h. */
2317$5
2318int
2319main ()
2320{
2321static $2 ac_aggr;
2322if (ac_aggr.$3)
2323return 0;
2324 ;
2325 return 0;
2326}
2327_ACEOF
2328if ac_fn_c_try_compile "$LINENO"; then :
2329 eval "$4=yes"
2330else
2331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2332/* end confdefs.h. */
2333$5
2334int
2335main ()
2336{
2337static $2 ac_aggr;
2338if (sizeof ac_aggr.$3)
2339return 0;
2340 ;
2341 return 0;
2342}
2343_ACEOF
2344if ac_fn_c_try_compile "$LINENO"; then :
2345 eval "$4=yes"
2346else
2347 eval "$4=no"
2348fi
2349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2350fi
2351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2352fi
2353eval ac_res=\$$4
2354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2355$as_echo "$ac_res" >&6; }
d0ac1c44 2356 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
c56ccc05
MM
2357
2358} # ac_fn_c_check_member
2359
07697489
PA
2360# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2361# -------------------------------------------
2362# Tests whether TYPE exists after having included INCLUDES, setting cache
2363# variable VAR accordingly.
2364ac_fn_c_check_type ()
2365{
2366 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2368$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2369if eval \${$3+:} false; then :
07697489
PA
2370 $as_echo_n "(cached) " >&6
2371else
2372 eval "$3=no"
2373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2374/* end confdefs.h. */
2375$4
2376int
2377main ()
2378{
2379if (sizeof ($2))
2380 return 0;
2381 ;
2382 return 0;
2383}
2384_ACEOF
2385if ac_fn_c_try_compile "$LINENO"; then :
2386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2387/* end confdefs.h. */
2388$4
2389int
2390main ()
2391{
2392if (sizeof (($2)))
2393 return 0;
2394 ;
2395 return 0;
2396}
2397_ACEOF
2398if ac_fn_c_try_compile "$LINENO"; then :
2399
2400else
2401 eval "$3=yes"
2402fi
2403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2404fi
2405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2406fi
2407eval ac_res=\$$3
2408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2409$as_echo "$ac_res" >&6; }
d0ac1c44 2410 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
07697489
PA
2411
2412} # ac_fn_c_check_type
2413
d0ac1c44
SM
2414# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2415# ---------------------------------------------
2416# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2417# accordingly.
770d76d7
PA
2418ac_fn_c_check_decl ()
2419{
2420 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2421 as_decl_name=`echo $2|sed 's/ *(.*//'`
2422 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2424$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
d0ac1c44 2425if eval \${$3+:} false; then :
770d76d7
PA
2426 $as_echo_n "(cached) " >&6
2427else
2428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2429/* end confdefs.h. */
2430$4
2431int
2432main ()
2433{
2434#ifndef $as_decl_name
2435#ifdef __cplusplus
2436 (void) $as_decl_use;
2437#else
2438 (void) $as_decl_name;
2439#endif
2440#endif
2441
2442 ;
2443 return 0;
2444}
2445_ACEOF
2446if ac_fn_c_try_compile "$LINENO"; then :
2447 eval "$3=yes"
2448else
2449 eval "$3=no"
2450fi
2451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2452fi
2453eval ac_res=\$$3
2454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2455$as_echo "$ac_res" >&6; }
d0ac1c44 2456 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
770d76d7
PA
2457
2458} # ac_fn_c_check_decl
f35d5ade
TT
2459
2460# ac_fn_cxx_try_link LINENO
2461# -------------------------
2462# Try to link conftest.$ac_ext, and return whether this succeeded.
2463ac_fn_cxx_try_link ()
2464{
2465 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2466 rm -f conftest.$ac_objext conftest$ac_exeext
2467 if { { ac_try="$ac_link"
2468case "(($ac_try" in
2469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2470 *) ac_try_echo=$ac_try;;
2471esac
2472eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2473$as_echo "$ac_try_echo"; } >&5
2474 (eval "$ac_link") 2>conftest.err
2475 ac_status=$?
2476 if test -s conftest.err; then
2477 grep -v '^ *+' conftest.err >conftest.er1
2478 cat conftest.er1 >&5
2479 mv -f conftest.er1 conftest.err
2480 fi
2481 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2482 test $ac_status = 0; } && {
2483 test -z "$ac_cxx_werror_flag" ||
2484 test ! -s conftest.err
2485 } && test -s conftest$ac_exeext && {
2486 test "$cross_compiling" = yes ||
2487 test -x conftest$ac_exeext
2488 }; then :
2489 ac_retval=0
2490else
2491 $as_echo "$as_me: failed program was:" >&5
2492sed 's/^/| /' conftest.$ac_ext >&5
2493
2494 ac_retval=1
2495fi
2496 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2497 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2498 # interfere with the next link command; also delete a directory that is
2499 # left behind by Apple's compiler. We do this before executing the actions.
2500 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2501 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2502 as_fn_set_status $ac_retval
2503
2504} # ac_fn_cxx_try_link
81ecdfbb
RW
2505cat >config.log <<_ACEOF
2506This file contains any messages produced by compilers while
2507running configure, to aid debugging if configure makes a mistake.
d5af19ba 2508
81ecdfbb 2509It was created by $as_me, which was
d0ac1c44 2510generated by GNU Autoconf 2.69. Invocation command line was
b4e70030 2511
81ecdfbb 2512 $ $0 $@
413ccac7 2513
81ecdfbb
RW
2514_ACEOF
2515exec 5>>config.log
2516{
2517cat <<_ASUNAME
2518## --------- ##
2519## Platform. ##
2520## --------- ##
413ccac7 2521
81ecdfbb
RW
2522hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2523uname -m = `(uname -m) 2>/dev/null || echo unknown`
2524uname -r = `(uname -r) 2>/dev/null || echo unknown`
2525uname -s = `(uname -s) 2>/dev/null || echo unknown`
2526uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2527
81ecdfbb
RW
2528/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2529/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2530
81ecdfbb
RW
2531/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2532/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2533/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2534/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2535/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2536/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2537/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2538
81ecdfbb 2539_ASUNAME
bec39cab 2540
bec39cab
AC
2541as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2542for as_dir in $PATH
2543do
2544 IFS=$as_save_IFS
2545 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2546 $as_echo "PATH: $as_dir"
2547 done
2548IFS=$as_save_IFS
bec39cab 2549
81ecdfbb 2550} >&5
bec39cab 2551
81ecdfbb 2552cat >&5 <<_ACEOF
bec39cab 2553
bec39cab 2554
81ecdfbb
RW
2555## ----------- ##
2556## Core tests. ##
2557## ----------- ##
2558
2559_ACEOF
2560
2561
2562# Keep a trace of the command line.
2563# Strip out --no-create and --no-recursion so they do not pile up.
2564# Strip out --silent because we don't want to record it for future runs.
2565# Also quote any args containing shell meta-characters.
2566# Make two passes to allow for proper duplicate-argument suppression.
2567ac_configure_args=
2568ac_configure_args0=
2569ac_configure_args1=
2570ac_must_keep_next=false
2571for ac_pass in 1 2
2572do
2573 for ac_arg
2574 do
2575 case $ac_arg in
2576 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2577 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2578 | -silent | --silent | --silen | --sile | --sil)
2579 continue ;;
2580 *\'*)
2581 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2582 esac
2583 case $ac_pass in
2584 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2585 2)
2586 as_fn_append ac_configure_args1 " '$ac_arg'"
2587 if test $ac_must_keep_next = true; then
2588 ac_must_keep_next=false # Got value, back to normal.
2589 else
2590 case $ac_arg in
2591 *=* | --config-cache | -C | -disable-* | --disable-* \
2592 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2593 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2594 | -with-* | --with-* | -without-* | --without-* | --x)
2595 case "$ac_configure_args0 " in
2596 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2597 esac
2598 ;;
2599 -* ) ac_must_keep_next=true ;;
2600 esac
2601 fi
2602 as_fn_append ac_configure_args " '$ac_arg'"
2603 ;;
2604 esac
2605 done
2606done
2607{ ac_configure_args0=; unset ac_configure_args0;}
2608{ ac_configure_args1=; unset ac_configure_args1;}
2609
2610# When interrupted or exit'd, cleanup temporary files, and complete
2611# config.log. We remove comments because anyway the quotes in there
2612# would cause problems or look ugly.
2613# WARNING: Use '\'' to represent an apostrophe within the trap.
2614# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2615trap 'exit_status=$?
2616 # Save into config.log some information that might help in debugging.
2617 {
2618 echo
2619
d0ac1c44 2620 $as_echo "## ---------------- ##
81ecdfbb 2621## Cache variables. ##
d0ac1c44 2622## ---------------- ##"
81ecdfbb
RW
2623 echo
2624 # The following way of writing the cache mishandles newlines in values,
2625(
2626 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2627 eval ac_val=\$$ac_var
2628 case $ac_val in #(
2629 *${as_nl}*)
2630 case $ac_var in #(
2631 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2632$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2633 esac
2634 case $ac_var in #(
2635 _ | IFS | as_nl) ;; #(
2636 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2637 *) { eval $ac_var=; unset $ac_var;} ;;
2638 esac ;;
2639 esac
2640 done
2641 (set) 2>&1 |
2642 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2643 *${as_nl}ac_space=\ *)
2644 sed -n \
2645 "s/'\''/'\''\\\\'\'''\''/g;
2646 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2647 ;; #(
2648 *)
2649 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2650 ;;
2651 esac |
2652 sort
2653)
2654 echo
2655
d0ac1c44 2656 $as_echo "## ----------------- ##
81ecdfbb 2657## Output variables. ##
d0ac1c44 2658## ----------------- ##"
81ecdfbb
RW
2659 echo
2660 for ac_var in $ac_subst_vars
2661 do
2662 eval ac_val=\$$ac_var
2663 case $ac_val in
2664 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2665 esac
2666 $as_echo "$ac_var='\''$ac_val'\''"
2667 done | sort
2668 echo
2669
2670 if test -n "$ac_subst_files"; then
d0ac1c44 2671 $as_echo "## ------------------- ##
81ecdfbb 2672## File substitutions. ##
d0ac1c44 2673## ------------------- ##"
81ecdfbb
RW
2674 echo
2675 for ac_var in $ac_subst_files
2676 do
2677 eval ac_val=\$$ac_var
2678 case $ac_val in
2679 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2680 esac
2681 $as_echo "$ac_var='\''$ac_val'\''"
2682 done | sort
2683 echo
2684 fi
2685
2686 if test -s confdefs.h; then
d0ac1c44 2687 $as_echo "## ----------- ##
81ecdfbb 2688## confdefs.h. ##
d0ac1c44 2689## ----------- ##"
81ecdfbb
RW
2690 echo
2691 cat confdefs.h
2692 echo
2693 fi
2694 test "$ac_signal" != 0 &&
2695 $as_echo "$as_me: caught signal $ac_signal"
2696 $as_echo "$as_me: exit $exit_status"
2697 } >&5
2698 rm -f core *.core core.conftest.* &&
2699 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2700 exit $exit_status
2701' 0
2702for ac_signal in 1 2 13 15; do
2703 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2704done
2705ac_signal=0
2706
2707# confdefs.h avoids OS command line length limits that DEFS can exceed.
2708rm -f -r conftest* confdefs.h
2709
2710$as_echo "/* confdefs.h */" > confdefs.h
2711
2712# Predefined preprocessor variables.
2713
2714cat >>confdefs.h <<_ACEOF
2715#define PACKAGE_NAME "$PACKAGE_NAME"
2716_ACEOF
2717
2718cat >>confdefs.h <<_ACEOF
2719#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2720_ACEOF
2721
2722cat >>confdefs.h <<_ACEOF
2723#define PACKAGE_VERSION "$PACKAGE_VERSION"
2724_ACEOF
2725
2726cat >>confdefs.h <<_ACEOF
2727#define PACKAGE_STRING "$PACKAGE_STRING"
2728_ACEOF
2729
2730cat >>confdefs.h <<_ACEOF
2731#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2732_ACEOF
2733
2734cat >>confdefs.h <<_ACEOF
2735#define PACKAGE_URL "$PACKAGE_URL"
2736_ACEOF
2737
2738
2739# Let the site file select an alternate cache file if it wants to.
2740# Prefer an explicitly selected file to automatically selected ones.
2741ac_site_file1=NONE
2742ac_site_file2=NONE
2743if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
2744 # We do not want a PATH search for config.site.
2745 case $CONFIG_SITE in #((
2746 -*) ac_site_file1=./$CONFIG_SITE;;
2747 */*) ac_site_file1=$CONFIG_SITE;;
2748 *) ac_site_file1=./$CONFIG_SITE;;
2749 esac
81ecdfbb
RW
2750elif test "x$prefix" != xNONE; then
2751 ac_site_file1=$prefix/share/config.site
2752 ac_site_file2=$prefix/etc/config.site
2753else
2754 ac_site_file1=$ac_default_prefix/share/config.site
2755 ac_site_file2=$ac_default_prefix/etc/config.site
2756fi
2757for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2758do
2759 test "x$ac_site_file" = xNONE && continue
d0ac1c44 2760 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
81ecdfbb
RW
2761 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2762$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2763 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
2764 . "$ac_site_file" \
2765 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2766$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2767as_fn_error $? "failed to load site script $ac_site_file
2768See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
2769 fi
2770done
2771
2772if test -r "$cache_file"; then
d0ac1c44
SM
2773 # Some versions of bash will fail to source /dev/null (special files
2774 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2775 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
81ecdfbb
RW
2776 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2777$as_echo "$as_me: loading cache $cache_file" >&6;}
2778 case $cache_file in
2779 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2780 *) . "./$cache_file";;
2781 esac
2782 fi
2783else
2784 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2785$as_echo "$as_me: creating cache $cache_file" >&6;}
2786 >$cache_file
bec39cab
AC
2787fi
2788
d0ac1c44
SM
2789as_fn_append ac_header_list " stdlib.h"
2790as_fn_append ac_header_list " unistd.h"
2791as_fn_append ac_header_list " sys/param.h"
81ecdfbb
RW
2792# Check that the precious variables saved in the cache have kept the same
2793# value.
2794ac_cache_corrupted=false
2795for ac_var in $ac_precious_vars; do
2796 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2797 eval ac_new_set=\$ac_env_${ac_var}_set
2798 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2799 eval ac_new_val=\$ac_env_${ac_var}_value
2800 case $ac_old_set,$ac_new_set in
2801 set,)
2802 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2803$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2804 ac_cache_corrupted=: ;;
2805 ,set)
2806 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2807$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2808 ac_cache_corrupted=: ;;
2809 ,);;
2810 *)
2811 if test "x$ac_old_val" != "x$ac_new_val"; then
2812 # differences in whitespace do not lead to failure.
2813 ac_old_val_w=`echo x $ac_old_val`
2814 ac_new_val_w=`echo x $ac_new_val`
2815 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2816 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2817$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2818 ac_cache_corrupted=:
2819 else
2820 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2821$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2822 eval $ac_var=\$ac_old_val
2823 fi
2824 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2825$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2826 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2827$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2828 fi;;
2829 esac
2830 # Pass precious variables to config.status.
2831 if test "$ac_new_set" = set; then
2832 case $ac_new_val in
2833 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2834 *) ac_arg=$ac_var=$ac_new_val ;;
2835 esac
2836 case " $ac_configure_args " in
2837 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2838 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2839 esac
2840 fi
2841done
2842if $ac_cache_corrupted; then
2843 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2844$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2845 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2846$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 2847 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
81ecdfbb
RW
2848fi
2849## -------------------- ##
2850## Main body of script. ##
2851## -------------------- ##
2852
2853ac_ext=c
2854ac_cpp='$CPP $CPPFLAGS'
2855ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2856ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2857ac_compiler_gnu=$ac_cv_c_compiler_gnu
2858
2859
2860
2861
2862
2863ac_config_headers="$ac_config_headers config.h:config.in"
2864
2865
2866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2867$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2868 # Check whether --enable-maintainer-mode was given.
2869if test "${enable_maintainer_mode+set}" = set; then :
2870 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2871else
2872 USE_MAINTAINER_MODE=no
2873fi
2874
2875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2876$as_echo "$USE_MAINTAINER_MODE" >&6; }
2877 if test $USE_MAINTAINER_MODE = yes; then
2878 MAINTAINER_MODE_TRUE=
2879 MAINTAINER_MODE_FALSE='#'
2880else
2881 MAINTAINER_MODE_TRUE='#'
2882 MAINTAINER_MODE_FALSE=
2883fi
2884
2885 MAINT=$MAINTAINER_MODE_TRUE
2886
2887
2888
17ef446e 2889# Set the 'development' global.
270c9937 2890. $srcdir/../bfd/development.sh
f5f1cdb6 2891
81ecdfbb
RW
2892ac_ext=c
2893ac_cpp='$CPP $CPPFLAGS'
2894ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2895ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2896ac_compiler_gnu=$ac_cv_c_compiler_gnu
2897if test -n "$ac_tool_prefix"; then
2898 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2899set dummy ${ac_tool_prefix}gcc; ac_word=$2
2900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2901$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2902if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2903 $as_echo_n "(cached) " >&6
c906108c
SS
2904else
2905 if test -n "$CC"; then
2906 ac_cv_prog_CC="$CC" # Let the user override the test.
2907else
bec39cab
AC
2908as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2909for as_dir in $PATH
2910do
2911 IFS=$as_save_IFS
2912 test -z "$as_dir" && as_dir=.
81ecdfbb 2913 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2914 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2915 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2916 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2917 break 2
2918 fi
2919done
81ecdfbb
RW
2920 done
2921IFS=$as_save_IFS
bec39cab 2922
c906108c
SS
2923fi
2924fi
bec39cab 2925CC=$ac_cv_prog_CC
c906108c 2926if test -n "$CC"; then
81ecdfbb
RW
2927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2928$as_echo "$CC" >&6; }
c906108c 2929else
81ecdfbb
RW
2930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2931$as_echo "no" >&6; }
c906108c
SS
2932fi
2933
81ecdfbb 2934
b4e70030
JB
2935fi
2936if test -z "$ac_cv_prog_CC"; then
2937 ac_ct_CC=$CC
81ecdfbb
RW
2938 # Extract the first word of "gcc", so it can be a program name with args.
2939set dummy gcc; ac_word=$2
2940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2941$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2942if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 2943 $as_echo_n "(cached) " >&6
b4e70030
JB
2944else
2945 if test -n "$ac_ct_CC"; then
2946 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2947else
2948as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2949for as_dir in $PATH
2950do
2951 IFS=$as_save_IFS
2952 test -z "$as_dir" && as_dir=.
81ecdfbb 2953 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2954 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2955 ac_cv_prog_ac_ct_CC="gcc"
2956 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2957 break 2
4e8d927d 2958 fi
b4e70030 2959done
81ecdfbb
RW
2960 done
2961IFS=$as_save_IFS
b4e70030
JB
2962
2963fi
2964fi
2965ac_ct_CC=$ac_cv_prog_ac_ct_CC
2966if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2968$as_echo "$ac_ct_CC" >&6; }
b4e70030 2969else
81ecdfbb
RW
2970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2971$as_echo "no" >&6; }
b4e70030
JB
2972fi
2973
81ecdfbb
RW
2974 if test "x$ac_ct_CC" = x; then
2975 CC=""
2976 else
2977 case $cross_compiling:$ac_tool_warned in
2978yes:)
2979{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2980$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2981ac_tool_warned=yes ;;
2982esac
2983 CC=$ac_ct_CC
2984 fi
b4e70030
JB
2985else
2986 CC="$ac_cv_prog_CC"
2987fi
2988
c906108c 2989if test -z "$CC"; then
81ecdfbb
RW
2990 if test -n "$ac_tool_prefix"; then
2991 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2992set dummy ${ac_tool_prefix}cc; ac_word=$2
2993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2994$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2995if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2996 $as_echo_n "(cached) " >&6
c906108c
SS
2997else
2998 if test -n "$CC"; then
2999 ac_cv_prog_CC="$CC" # Let the user override the test.
3000else
bec39cab
AC
3001as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3002for as_dir in $PATH
3003do
3004 IFS=$as_save_IFS
3005 test -z "$as_dir" && as_dir=.
81ecdfbb 3006 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3007 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3008 ac_cv_prog_CC="${ac_tool_prefix}cc"
3009 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3010 break 2
3011 fi
3012done
81ecdfbb
RW
3013 done
3014IFS=$as_save_IFS
3015
3016fi
3017fi
3018CC=$ac_cv_prog_CC
3019if test -n "$CC"; then
3020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3021$as_echo "$CC" >&6; }
3022else
3023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3024$as_echo "no" >&6; }
3025fi
3026
3027
3028 fi
3029fi
3030if test -z "$CC"; then
3031 # Extract the first word of "cc", so it can be a program name with args.
3032set dummy cc; ac_word=$2
3033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3034$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3035if ${ac_cv_prog_CC+:} false; then :
81ecdfbb
RW
3036 $as_echo_n "(cached) " >&6
3037else
3038 if test -n "$CC"; then
3039 ac_cv_prog_CC="$CC" # Let the user override the test.
3040else
3041 ac_prog_rejected=no
3042as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3043for as_dir in $PATH
3044do
3045 IFS=$as_save_IFS
3046 test -z "$as_dir" && as_dir=.
3047 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3048 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3049 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3050 ac_prog_rejected=yes
3051 continue
3052 fi
3053 ac_cv_prog_CC="cc"
3054 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3055 break 2
3056 fi
3057done
3058 done
3059IFS=$as_save_IFS
bec39cab 3060
c906108c
SS
3061if test $ac_prog_rejected = yes; then
3062 # We found a bogon in the path, so make sure we never use it.
3063 set dummy $ac_cv_prog_CC
3064 shift
bec39cab 3065 if test $# != 0; then
c906108c
SS
3066 # We chose a different compiler from the bogus one.
3067 # However, it has the same basename, so the bogon will be chosen
3068 # first if we set CC to just the basename; use the full file name.
3069 shift
bec39cab 3070 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3071 fi
3072fi
3073fi
3074fi
bec39cab 3075CC=$ac_cv_prog_CC
c906108c 3076if test -n "$CC"; then
81ecdfbb
RW
3077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3078$as_echo "$CC" >&6; }
c906108c 3079else
81ecdfbb
RW
3080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3081$as_echo "no" >&6; }
c906108c
SS
3082fi
3083
81ecdfbb 3084
bec39cab
AC
3085fi
3086if test -z "$CC"; then
3087 if test -n "$ac_tool_prefix"; then
81ecdfbb 3088 for ac_prog in cl.exe
bec39cab
AC
3089 do
3090 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3091set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3093$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3094if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3095 $as_echo_n "(cached) " >&6
c906108c
SS
3096else
3097 if test -n "$CC"; then
3098 ac_cv_prog_CC="$CC" # Let the user override the test.
3099else
bec39cab
AC
3100as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3101for as_dir in $PATH
3102do
3103 IFS=$as_save_IFS
3104 test -z "$as_dir" && as_dir=.
81ecdfbb 3105 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3106 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3107 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3108 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3109 break 2
3110 fi
3111done
81ecdfbb
RW
3112 done
3113IFS=$as_save_IFS
bec39cab 3114
c906108c
SS
3115fi
3116fi
bec39cab 3117CC=$ac_cv_prog_CC
c906108c 3118if test -n "$CC"; then
81ecdfbb
RW
3119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3120$as_echo "$CC" >&6; }
c906108c 3121else
81ecdfbb
RW
3122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3123$as_echo "no" >&6; }
c906108c 3124fi
bec39cab 3125
81ecdfbb 3126
bec39cab
AC
3127 test -n "$CC" && break
3128 done
3129fi
3130if test -z "$CC"; then
3131 ac_ct_CC=$CC
81ecdfbb 3132 for ac_prog in cl.exe
bec39cab
AC
3133do
3134 # Extract the first word of "$ac_prog", so it can be a program name with args.
3135set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3137$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3138if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3139 $as_echo_n "(cached) " >&6
bec39cab
AC
3140else
3141 if test -n "$ac_ct_CC"; then
3142 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3143else
3144as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3145for as_dir in $PATH
3146do
3147 IFS=$as_save_IFS
3148 test -z "$as_dir" && as_dir=.
81ecdfbb 3149 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3150 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3151 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3152 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3153 break 2
c906108c 3154 fi
bec39cab 3155done
81ecdfbb
RW
3156 done
3157IFS=$as_save_IFS
bec39cab
AC
3158
3159fi
3160fi
3161ac_ct_CC=$ac_cv_prog_ac_ct_CC
3162if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3164$as_echo "$ac_ct_CC" >&6; }
bec39cab 3165else
81ecdfbb
RW
3166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3167$as_echo "no" >&6; }
c906108c
SS
3168fi
3169
81ecdfbb 3170
bec39cab
AC
3171 test -n "$ac_ct_CC" && break
3172done
c906108c 3173
81ecdfbb
RW
3174 if test "x$ac_ct_CC" = x; then
3175 CC=""
3176 else
3177 case $cross_compiling:$ac_tool_warned in
3178yes:)
3179{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3180$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3181ac_tool_warned=yes ;;
3182esac
3183 CC=$ac_ct_CC
3184 fi
bec39cab
AC
3185fi
3186
3187fi
3188
3189
81ecdfbb
RW
3190test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3191$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3192as_fn_error $? "no acceptable C compiler found in \$PATH
3193See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3194
3195# Provide some information about the compiler.
81ecdfbb
RW
3196$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3197set X $ac_compile
3198ac_compiler=$2
3199for ac_option in --version -v -V -qversion; do
3200 { { ac_try="$ac_compiler $ac_option >&5"
3201case "(($ac_try" in
3202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3203 *) ac_try_echo=$ac_try;;
3204esac
3205eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3206$as_echo "$ac_try_echo"; } >&5
3207 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3208 ac_status=$?
81ecdfbb
RW
3209 if test -s conftest.err; then
3210 sed '10a\
3211... rest of stderr output deleted ...
3212 10q' conftest.err >conftest.er1
3213 cat conftest.er1 >&5
81ecdfbb 3214 fi
d0ac1c44 3215 rm -f conftest.er1 conftest.err
81ecdfbb
RW
3216 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3217 test $ac_status = 0; }
3218done
bec39cab 3219
81ecdfbb 3220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3221/* end confdefs.h. */
3222
3223int
3224main ()
3225{
3226
3227 ;
3228 return 0;
3229}
3230_ACEOF
3231ac_clean_files_save=$ac_clean_files
d0ac1c44 3232ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
bec39cab
AC
3233# Try to create an executable without -o first, disregard a.out.
3234# It will help us diagnose broken compilers, and finding out an intuition
3235# of exeext.
d0ac1c44
SM
3236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3237$as_echo_n "checking whether the C compiler works... " >&6; }
81ecdfbb
RW
3238ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3239
3240# The possible output files:
3241ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3242
3243ac_rmfiles=
3244for ac_file in $ac_files
3245do
3246 case $ac_file in
3247 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3248 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3249 esac
3250done
3251rm -f $ac_rmfiles
3252
3253if { { ac_try="$ac_link_default"
3254case "(($ac_try" in
3255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3256 *) ac_try_echo=$ac_try;;
3257esac
3258eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3259$as_echo "$ac_try_echo"; } >&5
3260 (eval "$ac_link_default") 2>&5
3261 ac_status=$?
3262 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3263 test $ac_status = 0; }; then :
3264 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3265# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3266# in a Makefile. We should not override ac_cv_exeext if it was cached,
3267# so that the user can short-circuit this test for compilers unknown to
3268# Autoconf.
3269for ac_file in $ac_files ''
bec39cab
AC
3270do
3271 test -f "$ac_file" || continue
3272 case $ac_file in
81ecdfbb 3273 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3274 ;;
3275 [ab].out )
3276 # We found the default executable, but exeext='' is most
3277 # certainly right.
3278 break;;
3279 *.* )
81ecdfbb
RW
3280 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3281 then :; else
3282 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3283 fi
3284 # We set ac_cv_exeext here because the later test for it is not
3285 # safe: cross compilers may not add the suffix if given an `-o'
3286 # argument, so we may need to know it at that point already.
3287 # Even if this section looks crufty: it has the advantage of
3288 # actually working.
b4e70030
JB
3289 break;;
3290 * )
3291 break;;
bec39cab
AC
3292 esac
3293done
81ecdfbb
RW
3294test "$ac_cv_exeext" = no && ac_cv_exeext=
3295
bec39cab 3296else
81ecdfbb
RW
3297 ac_file=''
3298fi
81ecdfbb 3299if test -z "$ac_file"; then :
d0ac1c44
SM
3300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3301$as_echo "no" >&6; }
3302$as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3303sed 's/^/| /' conftest.$ac_ext >&5
3304
81ecdfbb
RW
3305{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3306$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3307as_fn_error 77 "C compiler cannot create executables
3308See \`config.log' for more details" "$LINENO" 5; }
3309else
3310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3311$as_echo "yes" >&6; }
bec39cab 3312fi
d0ac1c44
SM
3313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3314$as_echo_n "checking for C compiler default output file name... " >&6; }
3315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3316$as_echo "$ac_file" >&6; }
b4e70030 3317ac_exeext=$ac_cv_exeext
b4e70030 3318
d0ac1c44 3319rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
b4e70030 3320ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3322$as_echo_n "checking for suffix of executables... " >&6; }
3323if { { ac_try="$ac_link"
3324case "(($ac_try" in
3325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3326 *) ac_try_echo=$ac_try;;
3327esac
3328eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3329$as_echo "$ac_try_echo"; } >&5
3330 (eval "$ac_link") 2>&5
bec39cab 3331 ac_status=$?
81ecdfbb
RW
3332 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3333 test $ac_status = 0; }; then :
b4e70030
JB
3334 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3335# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3336# work properly (i.e., refer to `conftest.exe'), while it won't with
3337# `rm'.
3338for ac_file in conftest.exe conftest conftest.*; do
3339 test -f "$ac_file" || continue
3340 case $ac_file in
81ecdfbb 3341 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3342 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3343 break;;
3344 * ) break;;
3345 esac
3346done
c906108c 3347else
81ecdfbb
RW
3348 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3349$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3350as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3351See \`config.log' for more details" "$LINENO" 5; }
c906108c 3352fi
d0ac1c44 3353rm -f conftest conftest$ac_cv_exeext
81ecdfbb
RW
3354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3355$as_echo "$ac_cv_exeext" >&6; }
c906108c 3356
b4e70030 3357rm -f conftest.$ac_ext
bec39cab
AC
3358EXEEXT=$ac_cv_exeext
3359ac_exeext=$EXEEXT
d0ac1c44
SM
3360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3361/* end confdefs.h. */
3362#include <stdio.h>
3363int
3364main ()
3365{
3366FILE *f = fopen ("conftest.out", "w");
3367 return ferror (f) || fclose (f) != 0;
3368
3369 ;
3370 return 0;
3371}
3372_ACEOF
3373ac_clean_files="$ac_clean_files conftest.out"
3374# Check that the compiler produces executables we can run. If not, either
3375# the compiler is broken, or we cross compile.
3376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3377$as_echo_n "checking whether we are cross compiling... " >&6; }
3378if test "$cross_compiling" != yes; then
3379 { { ac_try="$ac_link"
3380case "(($ac_try" in
3381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3382 *) ac_try_echo=$ac_try;;
3383esac
3384eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3385$as_echo "$ac_try_echo"; } >&5
3386 (eval "$ac_link") 2>&5
3387 ac_status=$?
3388 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3389 test $ac_status = 0; }
3390 if { ac_try='./conftest$ac_cv_exeext'
3391 { { case "(($ac_try" in
3392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3393 *) ac_try_echo=$ac_try;;
3394esac
3395eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3396$as_echo "$ac_try_echo"; } >&5
3397 (eval "$ac_try") 2>&5
3398 ac_status=$?
3399 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3400 test $ac_status = 0; }; }; then
3401 cross_compiling=no
3402 else
3403 if test "$cross_compiling" = maybe; then
3404 cross_compiling=yes
3405 else
3406 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3407$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3408as_fn_error $? "cannot run C compiled programs.
3409If you meant to cross compile, use \`--host'.
3410See \`config.log' for more details" "$LINENO" 5; }
3411 fi
3412 fi
3413fi
3414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3415$as_echo "$cross_compiling" >&6; }
3416
3417rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3418ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3420$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 3421if ${ac_cv_objext+:} false; then :
81ecdfbb 3422 $as_echo_n "(cached) " >&6
bec39cab 3423else
81ecdfbb 3424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3425/* end confdefs.h. */
3426
3427int
3428main ()
3429{
3430
3431 ;
3432 return 0;
3433}
3434_ACEOF
3435rm -f conftest.o conftest.obj
81ecdfbb
RW
3436if { { ac_try="$ac_compile"
3437case "(($ac_try" in
3438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3439 *) ac_try_echo=$ac_try;;
3440esac
3441eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3442$as_echo "$ac_try_echo"; } >&5
3443 (eval "$ac_compile") 2>&5
3444 ac_status=$?
3445 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3446 test $ac_status = 0; }; then :
3447 for ac_file in conftest.o conftest.obj conftest.*; do
3448 test -f "$ac_file" || continue;
bec39cab 3449 case $ac_file in
81ecdfbb 3450 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3451 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3452 break;;
3453 esac
3454done
c906108c 3455else
81ecdfbb 3456 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3457sed 's/^/| /' conftest.$ac_ext >&5
3458
81ecdfbb
RW
3459{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3460$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3461as_fn_error $? "cannot compute suffix of object files: cannot compile
3462See \`config.log' for more details" "$LINENO" 5; }
c906108c 3463fi
b4e70030 3464rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3465fi
81ecdfbb
RW
3466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3467$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3468OBJEXT=$ac_cv_objext
3469ac_objext=$OBJEXT
81ecdfbb
RW
3470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3471$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 3472if ${ac_cv_c_compiler_gnu+:} false; then :
81ecdfbb 3473 $as_echo_n "(cached) " >&6
c906108c 3474else
81ecdfbb 3475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3476/* end confdefs.h. */
3477
3478int
3479main ()
3480{
3481#ifndef __GNUC__
3482 choke me
3483#endif
3484
3485 ;
3486 return 0;
3487}
3488_ACEOF
81ecdfbb 3489if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3490 ac_compiler_gnu=yes
3491else
81ecdfbb 3492 ac_compiler_gnu=no
bec39cab 3493fi
81ecdfbb 3494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3495ac_cv_c_compiler_gnu=$ac_compiler_gnu
3496
3497fi
81ecdfbb
RW
3498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3499$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3500if test $ac_compiler_gnu = yes; then
3501 GCC=yes
3502else
3503 GCC=
3504fi
bec39cab
AC
3505ac_test_CFLAGS=${CFLAGS+set}
3506ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3508$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 3509if ${ac_cv_prog_cc_g+:} false; then :
81ecdfbb 3510 $as_echo_n "(cached) " >&6
bec39cab 3511else
81ecdfbb
RW
3512 ac_save_c_werror_flag=$ac_c_werror_flag
3513 ac_c_werror_flag=yes
3514 ac_cv_prog_cc_g=no
3515 CFLAGS="-g"
3516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3517/* end confdefs.h. */
3518
3519int
3520main ()
3521{
3522
3523 ;
3524 return 0;
3525}
3526_ACEOF
81ecdfbb 3527if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3528 ac_cv_prog_cc_g=yes
3529else
81ecdfbb
RW
3530 CFLAGS=""
3531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3532/* end confdefs.h. */
3533
3534int
3535main ()
3536{
3537
3538 ;
3539 return 0;
3540}
3541_ACEOF
3542if ac_fn_c_try_compile "$LINENO"; then :
3543
3544else
3545 ac_c_werror_flag=$ac_save_c_werror_flag
3546 CFLAGS="-g"
3547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3548/* end confdefs.h. */
3549
3550int
3551main ()
3552{
c906108c 3553
81ecdfbb
RW
3554 ;
3555 return 0;
3556}
3557_ACEOF
3558if ac_fn_c_try_compile "$LINENO"; then :
3559 ac_cv_prog_cc_g=yes
3560fi
3561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3562fi
3563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3564fi
81ecdfbb
RW
3565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3566 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3567fi
81ecdfbb
RW
3568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3569$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3570if test "$ac_test_CFLAGS" = set; then
bec39cab 3571 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3572elif test $ac_cv_prog_cc_g = yes; then
3573 if test "$GCC" = yes; then
3574 CFLAGS="-g -O2"
3575 else
3576 CFLAGS="-g"
3577 fi
3578else
3579 if test "$GCC" = yes; then
3580 CFLAGS="-O2"
3581 else
3582 CFLAGS=
3583 fi
3584fi
81ecdfbb
RW
3585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3586$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
d0ac1c44 3587if ${ac_cv_prog_cc_c89+:} false; then :
81ecdfbb 3588 $as_echo_n "(cached) " >&6
bec39cab 3589else
81ecdfbb 3590 ac_cv_prog_cc_c89=no
bec39cab 3591ac_save_CC=$CC
81ecdfbb 3592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3593/* end confdefs.h. */
c906108c
SS
3594#include <stdarg.h>
3595#include <stdio.h>
d0ac1c44 3596struct stat;
c906108c
SS
3597/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3598struct buf { int x; };
3599FILE * (*rcsopen) (struct buf *, struct stat *, int);
3600static char *e (p, i)
3601 char **p;
3602 int i;
3603{
3604 return p[i];
3605}
3606static char *f (char * (*g) (char **, int), char **p, ...)
3607{
3608 char *s;
3609 va_list v;
3610 va_start (v,p);
3611 s = g (p, va_arg (v,int));
3612 va_end (v);
3613 return s;
3614}
bec39cab
AC
3615
3616/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3617 function prototypes and stuff, but not '\xHH' hex character constants.
3618 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3619 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3620 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3621 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3622 that's true only with -std. */
bec39cab
AC
3623int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3624
81ecdfbb
RW
3625/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3626 inside strings and character constants. */
3627#define FOO(x) 'x'
3628int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3629
c906108c
SS
3630int test (int i, double x);
3631struct s1 {int (*f) (int a);};
3632struct s2 {int (*f) (double a);};
3633int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3634int argc;
3635char **argv;
bec39cab
AC
3636int
3637main ()
3638{
c906108c 3639return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3640 ;
3641 return 0;
3642}
3643_ACEOF
81ecdfbb
RW
3644for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3645 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3646do
3647 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3648 if ac_fn_c_try_compile "$LINENO"; then :
3649 ac_cv_prog_cc_c89=$ac_arg
c906108c 3650fi
81ecdfbb
RW
3651rm -f core conftest.err conftest.$ac_objext
3652 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3653done
81ecdfbb 3654rm -f conftest.$ac_ext
bec39cab 3655CC=$ac_save_CC
c906108c
SS
3656
3657fi
81ecdfbb
RW
3658# AC_CACHE_VAL
3659case "x$ac_cv_prog_cc_c89" in
3660 x)
3661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3662$as_echo "none needed" >&6; } ;;
3663 xno)
3664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3665$as_echo "unsupported" >&6; } ;;
bec39cab 3666 *)
81ecdfbb
RW
3667 CC="$CC $ac_cv_prog_cc_c89"
3668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3669$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3670esac
81ecdfbb 3671if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3672
b4e70030
JB
3673fi
3674
bec39cab
AC
3675ac_ext=c
3676ac_cpp='$CPP $CPPFLAGS'
3677ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3678ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3679ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3680
3bc3d82a
PA
3681ac_ext=cpp
3682ac_cpp='$CXXCPP $CPPFLAGS'
3683ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3684ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3685ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3686if test -z "$CXX"; then
3687 if test -n "$CCC"; then
3688 CXX=$CCC
3689 else
3690 if test -n "$ac_tool_prefix"; then
3691 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3692 do
3693 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3694set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3696$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3697if ${ac_cv_prog_CXX+:} false; then :
3bc3d82a
PA
3698 $as_echo_n "(cached) " >&6
3699else
3700 if test -n "$CXX"; then
3701 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3702else
3703as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3704for as_dir in $PATH
3705do
3706 IFS=$as_save_IFS
3707 test -z "$as_dir" && as_dir=.
3708 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3709 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3710 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3711 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3712 break 2
3713 fi
3714done
3715 done
3716IFS=$as_save_IFS
3717
3718fi
3719fi
3720CXX=$ac_cv_prog_CXX
3721if test -n "$CXX"; then
3722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3723$as_echo "$CXX" >&6; }
3724else
3725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3726$as_echo "no" >&6; }
3727fi
3728
3729
3730 test -n "$CXX" && break
3731 done
3732fi
3733if test -z "$CXX"; then
3734 ac_ct_CXX=$CXX
3735 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3736do
3737 # Extract the first word of "$ac_prog", so it can be a program name with args.
3738set dummy $ac_prog; ac_word=$2
3739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3740$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3741if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3bc3d82a
PA
3742 $as_echo_n "(cached) " >&6
3743else
3744 if test -n "$ac_ct_CXX"; then
3745 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3746else
3747as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3748for as_dir in $PATH
3749do
3750 IFS=$as_save_IFS
3751 test -z "$as_dir" && as_dir=.
3752 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3753 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3754 ac_cv_prog_ac_ct_CXX="$ac_prog"
3755 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3756 break 2
3757 fi
3758done
3759 done
3760IFS=$as_save_IFS
3761
3762fi
3763fi
3764ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3765if test -n "$ac_ct_CXX"; then
3766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3767$as_echo "$ac_ct_CXX" >&6; }
3768else
3769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3770$as_echo "no" >&6; }
3771fi
3772
3773
3774 test -n "$ac_ct_CXX" && break
3775done
3776
3777 if test "x$ac_ct_CXX" = x; then
3778 CXX="g++"
3779 else
3780 case $cross_compiling:$ac_tool_warned in
3781yes:)
3782{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3783$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3784ac_tool_warned=yes ;;
3785esac
3786 CXX=$ac_ct_CXX
3787 fi
3788fi
3789
3790 fi
3791fi
3792# Provide some information about the compiler.
3793$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3794set X $ac_compile
3795ac_compiler=$2
3796for ac_option in --version -v -V -qversion; do
3797 { { ac_try="$ac_compiler $ac_option >&5"
3798case "(($ac_try" in
3799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3800 *) ac_try_echo=$ac_try;;
3801esac
3802eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3803$as_echo "$ac_try_echo"; } >&5
3804 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3805 ac_status=$?
3806 if test -s conftest.err; then
3807 sed '10a\
3808... rest of stderr output deleted ...
3809 10q' conftest.err >conftest.er1
3810 cat conftest.er1 >&5
3bc3d82a 3811 fi
d0ac1c44 3812 rm -f conftest.er1 conftest.err
3bc3d82a
PA
3813 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3814 test $ac_status = 0; }
3815done
3816
3817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3818$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
d0ac1c44 3819if ${ac_cv_cxx_compiler_gnu+:} false; then :
3bc3d82a
PA
3820 $as_echo_n "(cached) " >&6
3821else
3822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3823/* end confdefs.h. */
3824
3825int
3826main ()
3827{
3828#ifndef __GNUC__
3829 choke me
3830#endif
3831
3832 ;
3833 return 0;
3834}
3835_ACEOF
3836if ac_fn_cxx_try_compile "$LINENO"; then :
3837 ac_compiler_gnu=yes
3838else
3839 ac_compiler_gnu=no
3840fi
3841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3842ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3843
3844fi
3845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3846$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3847if test $ac_compiler_gnu = yes; then
3848 GXX=yes
3849else
3850 GXX=
3851fi
3852ac_test_CXXFLAGS=${CXXFLAGS+set}
3853ac_save_CXXFLAGS=$CXXFLAGS
3854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3855$as_echo_n "checking whether $CXX accepts -g... " >&6; }
d0ac1c44 3856if ${ac_cv_prog_cxx_g+:} false; then :
3bc3d82a
PA
3857 $as_echo_n "(cached) " >&6
3858else
3859 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3860 ac_cxx_werror_flag=yes
3861 ac_cv_prog_cxx_g=no
3862 CXXFLAGS="-g"
3863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3864/* end confdefs.h. */
3865
3866int
3867main ()
3868{
3869
3870 ;
3871 return 0;
3872}
3873_ACEOF
3874if ac_fn_cxx_try_compile "$LINENO"; then :
3875 ac_cv_prog_cxx_g=yes
3876else
3877 CXXFLAGS=""
3878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3879/* end confdefs.h. */
3880
3881int
3882main ()
3883{
3884
3885 ;
3886 return 0;
3887}
3888_ACEOF
3889if ac_fn_cxx_try_compile "$LINENO"; then :
3890
3891else
3892 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3893 CXXFLAGS="-g"
3894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3895/* end confdefs.h. */
3896
3897int
3898main ()
3899{
3900
3901 ;
3902 return 0;
3903}
3904_ACEOF
3905if ac_fn_cxx_try_compile "$LINENO"; then :
3906 ac_cv_prog_cxx_g=yes
3907fi
3908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3909fi
3910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3911fi
3912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3913 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3914fi
3915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3916$as_echo "$ac_cv_prog_cxx_g" >&6; }
3917if test "$ac_test_CXXFLAGS" = set; then
3918 CXXFLAGS=$ac_save_CXXFLAGS
3919elif test $ac_cv_prog_cxx_g = yes; then
3920 if test "$GXX" = yes; then
3921 CXXFLAGS="-g -O2"
3922 else
3923 CXXFLAGS="-g"
3924 fi
3925else
3926 if test "$GXX" = yes; then
3927 CXXFLAGS="-O2"
3928 else
3929 CXXFLAGS=
3930 fi
3931fi
3932ac_ext=c
3933ac_cpp='$CPP $CPPFLAGS'
3934ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3935ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3936ac_compiler_gnu=$ac_cv_c_compiler_gnu
3937
3938
60ca704f 3939
bec39cab
AC
3940ac_ext=c
3941ac_cpp='$CPP $CPPFLAGS'
3942ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3943ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3944ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3946$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3947# On Suns, sometimes $CPP names a directory.
3948if test -n "$CPP" && test -d "$CPP"; then
3949 CPP=
8bb2c122 3950fi
bec39cab 3951if test -z "$CPP"; then
d0ac1c44 3952 if ${ac_cv_prog_CPP+:} false; then :
81ecdfbb 3953 $as_echo_n "(cached) " >&6
bec39cab
AC
3954else
3955 # Double quotes because CPP needs to be expanded
3956 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3957 do
3958 ac_preproc_ok=false
3959for ac_c_preproc_warn_flag in '' yes
3960do
3961 # Use a header file that comes with gcc, so configuring glibc
3962 # with a fresh cross-compiler works.
3963 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3964 # <limits.h> exists even on freestanding compilers.
3965 # On the NeXT, cc -E runs the code through the compiler's parser,
3966 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3968/* end confdefs.h. */
3969#ifdef __STDC__
3970# include <limits.h>
3971#else
3972# include <assert.h>
3973#endif
3974 Syntax error
3975_ACEOF
81ecdfbb 3976if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3977
81ecdfbb 3978else
bec39cab
AC
3979 # Broken: fails on valid input.
3980continue
3981fi
d0ac1c44 3982rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 3983
81ecdfbb 3984 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3985 # can be detected and how.
81ecdfbb 3986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3987/* end confdefs.h. */
3988#include <ac_nonexistent.h>
3989_ACEOF
81ecdfbb 3990if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3991 # Broken: success on invalid input.
3992continue
8bb2c122 3993else
bec39cab
AC
3994 # Passes both tests.
3995ac_preproc_ok=:
3996break
8bb2c122 3997fi
d0ac1c44 3998rm -f conftest.err conftest.i conftest.$ac_ext
8bb2c122 3999
bec39cab
AC
4000done
4001# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4002rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb 4003if $ac_preproc_ok; then :
bec39cab
AC
4004 break
4005fi
8bb2c122 4006
bec39cab
AC
4007 done
4008 ac_cv_prog_CPP=$CPP
ddc9cd0f 4009
c906108c 4010fi
bec39cab
AC
4011 CPP=$ac_cv_prog_CPP
4012else
4013 ac_cv_prog_CPP=$CPP
c906108c 4014fi
81ecdfbb
RW
4015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4016$as_echo "$CPP" >&6; }
bec39cab
AC
4017ac_preproc_ok=false
4018for ac_c_preproc_warn_flag in '' yes
4019do
4020 # Use a header file that comes with gcc, so configuring glibc
4021 # with a fresh cross-compiler works.
4022 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4023 # <limits.h> exists even on freestanding compilers.
4024 # On the NeXT, cc -E runs the code through the compiler's parser,
4025 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4027/* end confdefs.h. */
4028#ifdef __STDC__
4029# include <limits.h>
4030#else
4031# include <assert.h>
4032#endif
4033 Syntax error
4034_ACEOF
81ecdfbb 4035if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4036
81ecdfbb 4037else
bec39cab
AC
4038 # Broken: fails on valid input.
4039continue
4040fi
d0ac1c44 4041rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4042
81ecdfbb 4043 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4044 # can be detected and how.
81ecdfbb 4045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4046/* end confdefs.h. */
4047#include <ac_nonexistent.h>
4048_ACEOF
81ecdfbb 4049if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4050 # Broken: success on invalid input.
4051continue
c906108c 4052else
bec39cab
AC
4053 # Passes both tests.
4054ac_preproc_ok=:
4055break
c906108c 4056fi
d0ac1c44 4057rm -f conftest.err conftest.i conftest.$ac_ext
c906108c 4058
bec39cab
AC
4059done
4060# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4061rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb
RW
4062if $ac_preproc_ok; then :
4063
c906108c 4064else
81ecdfbb
RW
4065 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4066$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4067as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4068See \`config.log' for more details" "$LINENO" 5; }
c906108c 4069fi
c906108c 4070
bec39cab
AC
4071ac_ext=c
4072ac_cpp='$CPP $CPPFLAGS'
4073ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4074ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4075ac_compiler_gnu=$ac_cv_c_compiler_gnu
4076
4077
81ecdfbb
RW
4078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4079$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 4080if ${ac_cv_path_GREP+:} false; then :
81ecdfbb 4081 $as_echo_n "(cached) " >&6
4e8d927d 4082else
81ecdfbb
RW
4083 if test -z "$GREP"; then
4084 ac_path_GREP_found=false
4085 # Loop through the user's path and test for each of PROGNAME-LIST
4086 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4087for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4088do
4089 IFS=$as_save_IFS
4090 test -z "$as_dir" && as_dir=.
4091 for ac_prog in grep ggrep; do
4092 for ac_exec_ext in '' $ac_executable_extensions; do
4093 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4094 as_fn_executable_p "$ac_path_GREP" || continue
81ecdfbb
RW
4095# Check for GNU ac_path_GREP and select it if it is found.
4096 # Check for GNU $ac_path_GREP
4097case `"$ac_path_GREP" --version 2>&1` in
4098*GNU*)
4099 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4100*)
4101 ac_count=0
4102 $as_echo_n 0123456789 >"conftest.in"
4103 while :
4104 do
4105 cat "conftest.in" "conftest.in" >"conftest.tmp"
4106 mv "conftest.tmp" "conftest.in"
4107 cp "conftest.in" "conftest.nl"
4108 $as_echo 'GREP' >> "conftest.nl"
4109 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4110 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4111 as_fn_arith $ac_count + 1 && ac_count=$as_val
4112 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4113 # Best one so far, save it but keep looking for a better one
4114 ac_cv_path_GREP="$ac_path_GREP"
4115 ac_path_GREP_max=$ac_count
bec39cab 4116 fi
81ecdfbb
RW
4117 # 10*(2^10) chars as input seems more than enough
4118 test $ac_count -gt 10 && break
4119 done
4120 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4121esac
bec39cab 4122
81ecdfbb
RW
4123 $ac_path_GREP_found && break 3
4124 done
4125 done
4126 done
4127IFS=$as_save_IFS
4128 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 4129 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
81ecdfbb 4130 fi
c906108c 4131else
81ecdfbb 4132 ac_cv_path_GREP=$GREP
c906108c 4133fi
c906108c 4134
81ecdfbb
RW
4135fi
4136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4137$as_echo "$ac_cv_path_GREP" >&6; }
4138 GREP="$ac_cv_path_GREP"
c906108c 4139
c906108c 4140
81ecdfbb
RW
4141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4142$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 4143if ${ac_cv_path_EGREP+:} false; then :
81ecdfbb 4144 $as_echo_n "(cached) " >&6
783e057b 4145else
81ecdfbb
RW
4146 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4147 then ac_cv_path_EGREP="$GREP -E"
4148 else
4149 if test -z "$EGREP"; then
4150 ac_path_EGREP_found=false
4151 # Loop through the user's path and test for each of PROGNAME-LIST
4152 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4153for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4154do
4155 IFS=$as_save_IFS
4156 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4157 for ac_prog in egrep; do
4158 for ac_exec_ext in '' $ac_executable_extensions; do
4159 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4160 as_fn_executable_p "$ac_path_EGREP" || continue
81ecdfbb
RW
4161# Check for GNU ac_path_EGREP and select it if it is found.
4162 # Check for GNU $ac_path_EGREP
4163case `"$ac_path_EGREP" --version 2>&1` in
4164*GNU*)
4165 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4166*)
4167 ac_count=0
4168 $as_echo_n 0123456789 >"conftest.in"
4169 while :
4170 do
4171 cat "conftest.in" "conftest.in" >"conftest.tmp"
4172 mv "conftest.tmp" "conftest.in"
4173 cp "conftest.in" "conftest.nl"
4174 $as_echo 'EGREP' >> "conftest.nl"
4175 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4176 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4177 as_fn_arith $ac_count + 1 && ac_count=$as_val
4178 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4179 # Best one so far, save it but keep looking for a better one
4180 ac_cv_path_EGREP="$ac_path_EGREP"
4181 ac_path_EGREP_max=$ac_count
4182 fi
4183 # 10*(2^10) chars as input seems more than enough
4184 test $ac_count -gt 10 && break
4185 done
4186 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4187esac
bec39cab 4188
81ecdfbb
RW
4189 $ac_path_EGREP_found && break 3
4190 done
4191 done
4192 done
4193IFS=$as_save_IFS
4194 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4195 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4196 fi
783e057b 4197else
81ecdfbb 4198 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4199fi
4200
81ecdfbb 4201 fi
783e057b 4202fi
81ecdfbb
RW
4203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4204$as_echo "$ac_cv_path_EGREP" >&6; }
4205 EGREP="$ac_cv_path_EGREP"
4206
783e057b 4207
81ecdfbb
RW
4208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4209$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4210if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 4211 $as_echo_n "(cached) " >&6
783e057b 4212else
81ecdfbb 4213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4214/* end confdefs.h. */
783e057b 4215#include <stdlib.h>
bec39cab 4216#include <stdarg.h>
783e057b
DJ
4217#include <string.h>
4218#include <float.h>
c906108c 4219
bec39cab
AC
4220int
4221main ()
4222{
c906108c 4223
bec39cab
AC
4224 ;
4225 return 0;
4226}
4227_ACEOF
81ecdfbb 4228if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4229 ac_cv_header_stdc=yes
c906108c 4230else
81ecdfbb 4231 ac_cv_header_stdc=no
c906108c 4232fi
81ecdfbb 4233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4234
783e057b
DJ
4235if test $ac_cv_header_stdc = yes; then
4236 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4238/* end confdefs.h. */
4239#include <string.h>
c906108c 4240
783e057b
DJ
4241_ACEOF
4242if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4243 $EGREP "memchr" >/dev/null 2>&1; then :
4244
c906108c 4245else
783e057b 4246 ac_cv_header_stdc=no
c906108c 4247fi
783e057b 4248rm -f conftest*
c906108c
SS
4249
4250fi
4251
783e057b
DJ
4252if test $ac_cv_header_stdc = yes; then
4253 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4255/* end confdefs.h. */
4256#include <stdlib.h>
bec39cab 4257
783e057b
DJ
4258_ACEOF
4259if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4260 $EGREP "free" >/dev/null 2>&1; then :
4261
bec39cab 4262else
783e057b 4263 ac_cv_header_stdc=no
bec39cab 4264fi
783e057b 4265rm -f conftest*
bec39cab
AC
4266
4267fi
bec39cab 4268
783e057b
DJ
4269if test $ac_cv_header_stdc = yes; then
4270 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4271 if test "$cross_compiling" = yes; then :
783e057b 4272 :
bec39cab 4273else
81ecdfbb 4274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4275/* end confdefs.h. */
4276#include <ctype.h>
81ecdfbb 4277#include <stdlib.h>
783e057b
DJ
4278#if ((' ' & 0x0FF) == 0x020)
4279# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4280# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4281#else
4282# define ISLOWER(c) \
4283 (('a' <= (c) && (c) <= 'i') \
4284 || ('j' <= (c) && (c) <= 'r') \
4285 || ('s' <= (c) && (c) <= 'z'))
4286# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4287#endif
4288
4289#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4290int
4291main ()
4292{
4293 int i;
4294 for (i = 0; i < 256; i++)
4295 if (XOR (islower (i), ISLOWER (i))
4296 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4297 return 2;
4298 return 0;
783e057b
DJ
4299}
4300_ACEOF
81ecdfbb 4301if ac_fn_c_try_run "$LINENO"; then :
783e057b 4302
81ecdfbb
RW
4303else
4304 ac_cv_header_stdc=no
783e057b 4305fi
81ecdfbb
RW
4306rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4307 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4308fi
81ecdfbb 4309
783e057b
DJ
4310fi
4311fi
81ecdfbb
RW
4312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4313$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4314if test $ac_cv_header_stdc = yes; then
4315
81ecdfbb 4316$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4317
4318fi
4319
4320# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4321for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4322 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4323do :
4324 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4325ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4326"
d0ac1c44 4327if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
783e057b 4328 cat >>confdefs.h <<_ACEOF
81ecdfbb 4329#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4330_ACEOF
4331
4332fi
4333
4334done
4335
4336
4337
81ecdfbb 4338 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4339if test "x$ac_cv_header_minix_config_h" = xyes; then :
783e057b
DJ
4340 MINIX=yes
4341else
4342 MINIX=
4343fi
4344
4345
4346 if test "$MINIX" = yes; then
4347
81ecdfbb 4348$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4349
4350
81ecdfbb 4351$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4352
4353
81ecdfbb 4354$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4355
4356 fi
4357
4358
81ecdfbb
RW
4359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4360$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4361if ${ac_cv_safe_to_define___extensions__+:} false; then :
81ecdfbb 4362 $as_echo_n "(cached) " >&6
783e057b 4363else
81ecdfbb 4364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4365/* end confdefs.h. */
4366
d0ac1c44
SM
4367# define __EXTENSIONS__ 1
4368 $ac_includes_default
783e057b
DJ
4369int
4370main ()
4371{
4372
4373 ;
4374 return 0;
4375}
4376_ACEOF
81ecdfbb 4377if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4378 ac_cv_safe_to_define___extensions__=yes
4379else
81ecdfbb 4380 ac_cv_safe_to_define___extensions__=no
783e057b 4381fi
81ecdfbb 4382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4383fi
81ecdfbb
RW
4384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4385$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4386 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4387 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4388
81ecdfbb 4389 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4390
81ecdfbb 4391 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4392
81ecdfbb 4393 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4394
81ecdfbb 4395 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4396
4397
c971b7fa
PA
4398ac_aux_dir=
4399for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
d0ac1c44
SM
4400 if test -f "$ac_dir/install-sh"; then
4401 ac_aux_dir=$ac_dir
4402 ac_install_sh="$ac_aux_dir/install-sh -c"
4403 break
4404 elif test -f "$ac_dir/install.sh"; then
4405 ac_aux_dir=$ac_dir
4406 ac_install_sh="$ac_aux_dir/install.sh -c"
4407 break
4408 elif test -f "$ac_dir/shtool"; then
4409 ac_aux_dir=$ac_dir
4410 ac_install_sh="$ac_aux_dir/shtool install -c"
4411 break
4412 fi
c971b7fa
PA
4413done
4414if test -z "$ac_aux_dir"; then
d0ac1c44 4415 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
c971b7fa 4416fi
770d76d7 4417
c971b7fa
PA
4418# These three variables are undocumented and unsupported,
4419# and are intended to be withdrawn in a future Autoconf release.
4420# They can cause serious problems if a builder's source tree is in a directory
4421# whose full name contains unusual characters.
4422ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4423ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4424ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4425
770d76d7 4426
c971b7fa
PA
4427# Make sure we can run config.sub.
4428$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 4429 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4430
c971b7fa
PA
4431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4432$as_echo_n "checking build system type... " >&6; }
d0ac1c44 4433if ${ac_cv_build+:} false; then :
c971b7fa 4434 $as_echo_n "(cached) " >&6
770d76d7 4435else
c971b7fa
PA
4436 ac_build_alias=$build_alias
4437test "x$ac_build_alias" = x &&
4438 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4439test "x$ac_build_alias" = x &&
d0ac1c44 4440 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
c971b7fa 4441ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 4442 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
c971b7fa 4443
770d76d7 4444fi
c971b7fa
PA
4445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4446$as_echo "$ac_cv_build" >&6; }
4447case $ac_cv_build in
4448*-*-*) ;;
d0ac1c44 4449*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4450esac
c971b7fa
PA
4451build=$ac_cv_build
4452ac_save_IFS=$IFS; IFS='-'
4453set x $ac_cv_build
4454shift
4455build_cpu=$1
4456build_vendor=$2
4457shift; shift
4458# Remember, the first character of IFS is used to create $*,
4459# except with old shells:
4460build_os=$*
4461IFS=$ac_save_IFS
4462case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4463
4464
c971b7fa
PA
4465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4466$as_echo_n "checking host system type... " >&6; }
d0ac1c44 4467if ${ac_cv_host+:} false; then :
81ecdfbb
RW
4468 $as_echo_n "(cached) " >&6
4469else
c971b7fa
PA
4470 if test "x$host_alias" = x; then
4471 ac_cv_host=$ac_cv_build
81ecdfbb 4472else
c971b7fa 4473 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 4474 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4475fi
81ecdfbb
RW
4476
4477fi
c971b7fa
PA
4478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4479$as_echo "$ac_cv_host" >&6; }
4480case $ac_cv_host in
4481*-*-*) ;;
d0ac1c44 4482*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4483esac
c971b7fa
PA
4484host=$ac_cv_host
4485ac_save_IFS=$IFS; IFS='-'
4486set x $ac_cv_host
4487shift
4488host_cpu=$1
4489host_vendor=$2
4490shift; shift
4491# Remember, the first character of IFS is used to create $*,
4492# except with old shells:
4493host_os=$*
4494IFS=$ac_save_IFS
4495case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4496
4497
4498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4499$as_echo_n "checking target system type... " >&6; }
d0ac1c44 4500if ${ac_cv_target+:} false; then :
3388710e
JM
4501 $as_echo_n "(cached) " >&6
4502else
4503 if test "x$target_alias" = x; then
4504 ac_cv_target=$ac_cv_host
4505else
4506 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
d0ac1c44 4507 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
3388710e
JM
4508fi
4509
4510fi
4511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4512$as_echo "$ac_cv_target" >&6; }
4513case $ac_cv_target in
4514*-*-*) ;;
d0ac1c44 4515*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
3388710e
JM
4516esac
4517target=$ac_cv_target
4518ac_save_IFS=$IFS; IFS='-'
4519set x $ac_cv_target
4520shift
4521target_cpu=$1
4522target_vendor=$2
4523shift; shift
4524# Remember, the first character of IFS is used to create $*,
4525# except with old shells:
4526target_os=$*
4527IFS=$ac_save_IFS
4528case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4529
4530
4531# The aliases save the names the user supplied, while $host etc.
4532# will get canonicalized.
4533test -n "$target_alias" &&
4534 test "$program_prefix$program_suffix$program_transform_name" = \
4535 NONENONEs,x,x, &&
4536 program_prefix=${target_alias}-
4537
4538# The tests for host and target for $enable_largefile require
4539# canonical names.
4540
4541
81ecdfbb 4542
da2f07f1
JK
4543# As the $enable_largefile decision depends on --enable-plugins we must set it
4544# even in directories otherwise not depending on the $plugins option.
4545
4546
2974be62
AM
4547 maybe_plugins=no
4548 for ac_header in dlfcn.h
4549do :
4550 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4551"
d0ac1c44 4552if test "x$ac_cv_header_dlfcn_h" = xyes; then :
2974be62
AM
4553 cat >>confdefs.h <<_ACEOF
4554#define HAVE_DLFCN_H 1
4555_ACEOF
4556 maybe_plugins=yes
4557fi
4558
4559done
4560
4561 for ac_header in windows.h
4562do :
4563 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4564"
d0ac1c44 4565if test "x$ac_cv_header_windows_h" = xyes; then :
2974be62
AM
4566 cat >>confdefs.h <<_ACEOF
4567#define HAVE_WINDOWS_H 1
4568_ACEOF
4569 maybe_plugins=yes
4570fi
4571
4572done
4573
4574
4575 # Check whether --enable-plugins was given.
da2f07f1
JK
4576if test "${enable_plugins+set}" = set; then :
4577 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4578 no) plugins=no ;;
4579 *) plugins=yes
4580 if test "$maybe_plugins" != "yes" ; then
d0ac1c44 4581 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
2974be62
AM
4582 fi ;;
4583 esac
da2f07f1 4584else
2974be62
AM
4585 plugins=$maybe_plugins
4586
da2f07f1
JK
4587fi
4588
2974be62 4589 if test "$plugins" = "yes"; then
458412c3
TT
4590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4591$as_echo_n "checking for library containing dlsym... " >&6; }
d0ac1c44 4592if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4593 $as_echo_n "(cached) " >&6
4594else
4595 ac_func_search_save_LIBS=$LIBS
4596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4597/* end confdefs.h. */
4598
4599/* Override any GCC internal prototype to avoid an error.
4600 Use char because int might match the return type of a GCC
4601 builtin and then its argument prototype would still apply. */
4602#ifdef __cplusplus
4603extern "C"
4604#endif
458412c3 4605char dlsym ();
2974be62
AM
4606int
4607main ()
4608{
458412c3 4609return dlsym ();
2974be62
AM
4610 ;
4611 return 0;
4612}
4613_ACEOF
4614for ac_lib in '' dl; do
4615 if test -z "$ac_lib"; then
4616 ac_res="none required"
4617 else
4618 ac_res=-l$ac_lib
4619 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4620 fi
4621 if ac_fn_c_try_link "$LINENO"; then :
458412c3 4622 ac_cv_search_dlsym=$ac_res
2974be62
AM
4623fi
4624rm -f core conftest.err conftest.$ac_objext \
4625 conftest$ac_exeext
d0ac1c44 4626 if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4627 break
4628fi
4629done
d0ac1c44 4630if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4631
4632else
458412c3 4633 ac_cv_search_dlsym=no
2974be62
AM
4634fi
4635rm conftest.$ac_ext
4636LIBS=$ac_func_search_save_LIBS
4637fi
458412c3
TT
4638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4639$as_echo "$ac_cv_search_dlsym" >&6; }
4640ac_res=$ac_cv_search_dlsym
2974be62
AM
4641if test "$ac_res" != no; then :
4642 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4643
4644fi
4645
4646 fi
da2f07f1
JK
4647
4648
4649case "${host}" in
4650 sparc-*-solaris*|i[3-7]86-*-solaris*)
4651 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4652 # are mutually exclusive; and without procfs support, the bfd/ elf module
4653 # cannot provide certain routines such as elfcore_write_prpsinfo
4654 # or elfcore_write_prstatus. So unless the user explicitly requested
4655 # large-file support through the --enable-largefile switch, disable
4656 # large-file support in favor of procfs support.
4657 test "${target}" = "${host}" -a "x$plugins" = xno \
4658 && : ${enable_largefile="no"}
4659 ;;
4660esac
4661
4662# Check whether --enable-largefile was given.
4663if test "${enable_largefile+set}" = set; then :
4664 enableval=$enable_largefile;
4665fi
4666
4667if test "$enable_largefile" != no; then
4668
4669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4670$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 4671if ${ac_cv_sys_largefile_CC+:} false; then :
da2f07f1
JK
4672 $as_echo_n "(cached) " >&6
4673else
4674 ac_cv_sys_largefile_CC=no
4675 if test "$GCC" != yes; then
4676 ac_save_CC=$CC
4677 while :; do
4678 # IRIX 6.2 and later do not support large files by default,
4679 # so use the C compiler's -n32 option if that helps.
4680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4681/* end confdefs.h. */
4682#include <sys/types.h>
4683 /* Check that off_t can represent 2**63 - 1 correctly.
4684 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4685 since some C++ compilers masquerading as C compilers
4686 incorrectly reject 9223372036854775807. */
4687#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4688 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4689 && LARGE_OFF_T % 2147483647 == 1)
4690 ? 1 : -1];
4691int
4692main ()
4693{
4694
4695 ;
4696 return 0;
4697}
4698_ACEOF
4699 if ac_fn_c_try_compile "$LINENO"; then :
4700 break
4701fi
4702rm -f core conftest.err conftest.$ac_objext
4703 CC="$CC -n32"
4704 if ac_fn_c_try_compile "$LINENO"; then :
4705 ac_cv_sys_largefile_CC=' -n32'; break
4706fi
4707rm -f core conftest.err conftest.$ac_objext
4708 break
4709 done
4710 CC=$ac_save_CC
4711 rm -f conftest.$ac_ext
4712 fi
4713fi
4714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4715$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4716 if test "$ac_cv_sys_largefile_CC" != no; then
4717 CC=$CC$ac_cv_sys_largefile_CC
4718 fi
4719
4720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4721$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 4722if ${ac_cv_sys_file_offset_bits+:} false; then :
da2f07f1
JK
4723 $as_echo_n "(cached) " >&6
4724else
4725 while :; do
4726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4727/* end confdefs.h. */
4728#include <sys/types.h>
4729 /* Check that off_t can represent 2**63 - 1 correctly.
4730 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4731 since some C++ compilers masquerading as C compilers
4732 incorrectly reject 9223372036854775807. */
4733#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4734 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4735 && LARGE_OFF_T % 2147483647 == 1)
4736 ? 1 : -1];
4737int
4738main ()
4739{
4740
4741 ;
4742 return 0;
4743}
4744_ACEOF
4745if ac_fn_c_try_compile "$LINENO"; then :
4746 ac_cv_sys_file_offset_bits=no; break
4747fi
4748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4750/* end confdefs.h. */
4751#define _FILE_OFFSET_BITS 64
4752#include <sys/types.h>
4753 /* Check that off_t can represent 2**63 - 1 correctly.
4754 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4755 since some C++ compilers masquerading as C compilers
4756 incorrectly reject 9223372036854775807. */
4757#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4758 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4759 && LARGE_OFF_T % 2147483647 == 1)
4760 ? 1 : -1];
4761int
4762main ()
4763{
4764
4765 ;
4766 return 0;
4767}
4768_ACEOF
4769if ac_fn_c_try_compile "$LINENO"; then :
4770 ac_cv_sys_file_offset_bits=64; break
4771fi
4772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4773 ac_cv_sys_file_offset_bits=unknown
4774 break
4775done
4776fi
4777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4778$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4779case $ac_cv_sys_file_offset_bits in #(
4780 no | unknown) ;;
4781 *)
4782cat >>confdefs.h <<_ACEOF
4783#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4784_ACEOF
4785;;
4786esac
4787rm -rf conftest*
4788 if test $ac_cv_sys_file_offset_bits = unknown; then
4789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4790$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 4791if ${ac_cv_sys_large_files+:} false; then :
da2f07f1
JK
4792 $as_echo_n "(cached) " >&6
4793else
4794 while :; do
4795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4796/* end confdefs.h. */
4797#include <sys/types.h>
4798 /* Check that off_t can represent 2**63 - 1 correctly.
4799 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4800 since some C++ compilers masquerading as C compilers
4801 incorrectly reject 9223372036854775807. */
4802#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4803 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4804 && LARGE_OFF_T % 2147483647 == 1)
4805 ? 1 : -1];
4806int
4807main ()
4808{
4809
4810 ;
4811 return 0;
4812}
4813_ACEOF
4814if ac_fn_c_try_compile "$LINENO"; then :
4815 ac_cv_sys_large_files=no; break
4816fi
4817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4819/* end confdefs.h. */
4820#define _LARGE_FILES 1
4821#include <sys/types.h>
4822 /* Check that off_t can represent 2**63 - 1 correctly.
4823 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4824 since some C++ compilers masquerading as C compilers
4825 incorrectly reject 9223372036854775807. */
4826#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4827 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4828 && LARGE_OFF_T % 2147483647 == 1)
4829 ? 1 : -1];
4830int
4831main ()
4832{
4833
4834 ;
4835 return 0;
4836}
4837_ACEOF
4838if ac_fn_c_try_compile "$LINENO"; then :
4839 ac_cv_sys_large_files=1; break
4840fi
4841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4842 ac_cv_sys_large_files=unknown
4843 break
4844done
4845fi
4846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4847$as_echo "$ac_cv_sys_large_files" >&6; }
4848case $ac_cv_sys_large_files in #(
4849 no | unknown) ;;
4850 *)
4851cat >>confdefs.h <<_ACEOF
4852#define _LARGE_FILES $ac_cv_sys_large_files
4853_ACEOF
4854;;
4855esac
4856rm -rf conftest*
4857 fi
d0ac1c44
SM
4858
4859
da2f07f1
JK
4860fi
4861
4862
4863
81ecdfbb
RW
4864
4865
4866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4867$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
d0ac1c44 4868if ${am_cv_prog_cc_stdc+:} false; then :
81ecdfbb
RW
4869 $as_echo_n "(cached) " >&6
4870else
4871 am_cv_prog_cc_stdc=no
4872ac_save_CC="$CC"
4873# Don't try gcc -ansi; that turns off useful extensions and
4874# breaks some systems' header files.
4875# AIX -qlanglvl=ansi
4876# Ultrix and OSF/1 -std1
4877# HP-UX 10.20 and later -Ae
4878# HP-UX older versions -Aa -D_HPUX_SOURCE
4879# SVR4 -Xc -D__EXTENSIONS__
4880for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4881do
783e057b 4882 CC="$ac_save_CC $ac_arg"
81ecdfbb 4883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4884/* end confdefs.h. */
4885#include <stdarg.h>
4886#include <stdio.h>
4887#include <sys/types.h>
4888#include <sys/stat.h>
4889/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4890struct buf { int x; };
4891FILE * (*rcsopen) (struct buf *, struct stat *, int);
4892static char *e (p, i)
4893 char **p;
4894 int i;
4895{
4896 return p[i];
4897}
4898static char *f (char * (*g) (char **, int), char **p, ...)
4899{
4900 char *s;
4901 va_list v;
4902 va_start (v,p);
4903 s = g (p, va_arg (v,int));
4904 va_end (v);
4905 return s;
4906}
4907int test (int i, double x);
4908struct s1 {int (*f) (int a);};
4909struct s2 {int (*f) (double a);};
4910int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4911int argc;
4912char **argv;
4913
4914int
4915main ()
4916{
4917
4918return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4919
4920 ;
4921 return 0;
4922}
4923_ACEOF
81ecdfbb 4924if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4925 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4926fi
81ecdfbb 4927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4928done
4929CC="$ac_save_CC"
4930
4931fi
4932
4933if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4935$as_echo "none needed" >&6; }
783e057b 4936else
81ecdfbb
RW
4937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4938$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4939fi
4940case "x$am_cv_prog_cc_stdc" in
4941 x|xno) ;;
4942 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4943esac
4944
d0ac1c44
SM
4945# Expand $ac_aux_dir to an absolute path.
4946am_aux_dir=`cd "$ac_aux_dir" && pwd`
4869db5e 4947
d0ac1c44 4948if test x"${install_sh+set}" != xset; then
4869db5e
RM
4949 case $am_aux_dir in
4950 *\ * | *\ *)
4951 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4952 *)
4953 install_sh="\${SHELL} $am_aux_dir/install-sh"
4954 esac
4955fi
4956
d0ac1c44
SM
4957# Installed binaries are usually stripped using 'strip' when the user
4958# run "make install-strip". However 'strip' might not be the right
4869db5e 4959# tool to use in cross-compilation environments, therefore Automake
d0ac1c44 4960# will honor the 'STRIP' environment variable to overrule this program.
4869db5e
RM
4961if test "$cross_compiling" != no; then
4962 if test -n "$ac_tool_prefix"; then
4963 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4964set dummy ${ac_tool_prefix}strip; ac_word=$2
4965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4966$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4967if ${ac_cv_prog_STRIP+:} false; then :
4869db5e
RM
4968 $as_echo_n "(cached) " >&6
4969else
4970 if test -n "$STRIP"; then
4971 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4972else
4973as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4974for as_dir in $PATH
4975do
4976 IFS=$as_save_IFS
4977 test -z "$as_dir" && as_dir=.
4978 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4979 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
4980 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4981 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4982 break 2
4983 fi
4984done
4985 done
4986IFS=$as_save_IFS
4987
4988fi
4989fi
4990STRIP=$ac_cv_prog_STRIP
4991if test -n "$STRIP"; then
4992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4993$as_echo "$STRIP" >&6; }
4994else
4995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4996$as_echo "no" >&6; }
4997fi
4998
4999
5000fi
5001if test -z "$ac_cv_prog_STRIP"; then
5002 ac_ct_STRIP=$STRIP
5003 # Extract the first word of "strip", so it can be a program name with args.
5004set dummy strip; ac_word=$2
5005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5006$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5007if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4869db5e
RM
5008 $as_echo_n "(cached) " >&6
5009else
5010 if test -n "$ac_ct_STRIP"; then
5011 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5012else
5013as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5014for as_dir in $PATH
5015do
5016 IFS=$as_save_IFS
5017 test -z "$as_dir" && as_dir=.
5018 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5019 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5020 ac_cv_prog_ac_ct_STRIP="strip"
5021 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5022 break 2
5023 fi
5024done
5025 done
5026IFS=$as_save_IFS
5027
5028fi
5029fi
5030ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5031if test -n "$ac_ct_STRIP"; then
5032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5033$as_echo "$ac_ct_STRIP" >&6; }
5034else
5035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5036$as_echo "no" >&6; }
5037fi
5038
5039 if test "x$ac_ct_STRIP" = x; then
5040 STRIP=":"
5041 else
5042 case $cross_compiling:$ac_tool_warned in
5043yes:)
5044{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5045$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5046ac_tool_warned=yes ;;
5047esac
5048 STRIP=$ac_ct_STRIP
5049 fi
5050else
5051 STRIP="$ac_cv_prog_STRIP"
5052fi
5053
5054fi
5055INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5056
783e057b
DJ
5057
5058ac_aux_dir=
81ecdfbb 5059for ac_dir in .. "$srcdir"/..; do
d0ac1c44
SM
5060 if test -f "$ac_dir/install-sh"; then
5061 ac_aux_dir=$ac_dir
5062 ac_install_sh="$ac_aux_dir/install-sh -c"
5063 break
5064 elif test -f "$ac_dir/install.sh"; then
5065 ac_aux_dir=$ac_dir
5066 ac_install_sh="$ac_aux_dir/install.sh -c"
5067 break
5068 elif test -f "$ac_dir/shtool"; then
5069 ac_aux_dir=$ac_dir
5070 ac_install_sh="$ac_aux_dir/shtool install -c"
5071 break
5072 fi
783e057b
DJ
5073done
5074if test -z "$ac_aux_dir"; then
d0ac1c44 5075 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 5076fi
81ecdfbb
RW
5077
5078# These three variables are undocumented and unsupported,
5079# and are intended to be withdrawn in a future Autoconf release.
5080# They can cause serious problems if a builder's source tree is in a directory
5081# whose full name contains unusual characters.
5082ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5083ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5084ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5085
783e057b 5086
783e057b 5087
9009e1ae
MR
5088test "$program_prefix" != NONE &&
5089 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5090# Use a double $ so make ignores it.
5091test "$program_suffix" != NONE &&
5092 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5093# Double any \ or $.
5094# By default was `s,x,x', remove it if useless.
5095ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5096program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5097
81ecdfbb 5098
0bcda685
PA
5099# We require a C++11 compiler. Check if one is available, and if
5100# necessary, set CXX_DIALECT to some -std=xxx switch.
5101
41260ac2 5102 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
0bcda685
PA
5103 ac_ext=cpp
5104ac_cpp='$CXXCPP $CPPFLAGS'
5105ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5106ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5107ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5108 CXX_DIALECT=""
5109 ac_success=no
5110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5111$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
d0ac1c44 5112if ${ax_cv_cxx_compile_cxx11+:} false; then :
0bcda685
PA
5113 $as_echo_n "(cached) " >&6
5114else
5115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5116/* end confdefs.h. */
5117
5118
5119// If the compiler admits that it is not ready for C++11, why torture it?
5120// Hopefully, this will speed up the test.
5121
5122#ifndef __cplusplus
5123
5124#error "This is not a C++ compiler"
5125
5126#elif __cplusplus < 201103L
5127
5128#error "This is not a C++11 compiler"
5129
5130#else
5131
5132namespace cxx11
5133{
5134
5135 namespace test_static_assert
5136 {
5137
5138 template <typename T>
5139 struct check
5140 {
5141 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5142 };
5143
5144 }
5145
5146 namespace test_final_override
5147 {
5148
5149 struct Base
5150 {
5151 virtual void f() {}
5152 };
5153
5154 struct Derived : public Base
5155 {
5156 virtual void f() override {}
5157 };
5158
5159 }
5160
5161 namespace test_double_right_angle_brackets
5162 {
5163
5164 template < typename T >
5165 struct check {};
5166
5167 typedef check<void> single_type;
5168 typedef check<check<void>> double_type;
5169 typedef check<check<check<void>>> triple_type;
5170 typedef check<check<check<check<void>>>> quadruple_type;
5171
5172 }
5173
5174 namespace test_decltype
5175 {
5176
5177 int
5178 f()
5179 {
5180 int a = 1;
5181 decltype(a) b = 2;
5182 return a + b;
5183 }
5184
5185 }
5186
5187 namespace test_type_deduction
5188 {
5189
5190 template < typename T1, typename T2 >
5191 struct is_same
5192 {
5193 static const bool value = false;
5194 };
5195
5196 template < typename T >
5197 struct is_same<T, T>
5198 {
5199 static const bool value = true;
5200 };
5201
5202 template < typename T1, typename T2 >
5203 auto
5204 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5205 {
5206 return a1 + a2;
5207 }
5208
5209 int
5210 test(const int c, volatile int v)
5211 {
5212 static_assert(is_same<int, decltype(0)>::value == true, "");
5213 static_assert(is_same<int, decltype(c)>::value == false, "");
5214 static_assert(is_same<int, decltype(v)>::value == false, "");
5215 auto ac = c;
5216 auto av = v;
5217 auto sumi = ac + av + 'x';
5218 auto sumf = ac + av + 1.0;
5219 static_assert(is_same<int, decltype(ac)>::value == true, "");
5220 static_assert(is_same<int, decltype(av)>::value == true, "");
5221 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5222 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5223 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5224 return (sumf > 0.0) ? sumi : add(c, v);
5225 }
5226
5227 }
5228
5229 namespace test_noexcept
5230 {
5231
5232 int f() { return 0; }
5233 int g() noexcept { return 0; }
5234
5235 static_assert(noexcept(f()) == false, "");
5236 static_assert(noexcept(g()) == true, "");
5237
5238 }
5239
5240 namespace test_constexpr
5241 {
5242
5243 template < typename CharT >
5244 unsigned long constexpr
5245 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5246 {
5247 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5248 }
5249
5250 template < typename CharT >
5251 unsigned long constexpr
5252 strlen_c(const CharT *const s) noexcept
5253 {
5254 return strlen_c_r(s, 0UL);
5255 }
5256
5257 static_assert(strlen_c("") == 0UL, "");
5258 static_assert(strlen_c("1") == 1UL, "");
5259 static_assert(strlen_c("example") == 7UL, "");
5260 static_assert(strlen_c("another\0example") == 7UL, "");
5261
5262 }
5263
5264 namespace test_rvalue_references
5265 {
5266
5267 template < int N >
5268 struct answer
5269 {
5270 static constexpr int value = N;
5271 };
5272
5273 answer<1> f(int&) { return answer<1>(); }
5274 answer<2> f(const int&) { return answer<2>(); }
5275 answer<3> f(int&&) { return answer<3>(); }
5276
5277 void
5278 test()
5279 {
5280 int i = 0;
5281 const int c = 0;
5282 static_assert(decltype(f(i))::value == 1, "");
5283 static_assert(decltype(f(c))::value == 2, "");
5284 static_assert(decltype(f(0))::value == 3, "");
5285 }
5286
5287 }
5288
5289 namespace test_uniform_initialization
5290 {
5291
5292 struct test
5293 {
5294 static const int zero {};
5295 static const int one {1};
5296 };
5297
5298 static_assert(test::zero == 0, "");
5299 static_assert(test::one == 1, "");
5300
5301 }
5302
5303 namespace test_lambdas
5304 {
5305
5306 void
5307 test1()
5308 {
5309 auto lambda1 = [](){};
5310 auto lambda2 = lambda1;
5311 lambda1();
5312 lambda2();
5313 }
5314
5315 int
5316 test2()
5317 {
5318 auto a = [](int i, int j){ return i + j; }(1, 2);
5319 auto b = []() -> int { return '0'; }();
5320 auto c = [=](){ return a + b; }();
5321 auto d = [&](){ return c; }();
5322 auto e = [a, &b](int x) mutable {
5323 const auto identity = [](int y){ return y; };
5324 for (auto i = 0; i < a; ++i)
5325 a += b--;
5326 return x + identity(a + b);
5327 }(0);
5328 return a + b + c + d + e;
5329 }
5330
5331 int
5332 test3()
5333 {
5334 const auto nullary = [](){ return 0; };
5335 const auto unary = [](int x){ return x; };
5336 using nullary_t = decltype(nullary);
5337 using unary_t = decltype(unary);
5338 const auto higher1st = [](nullary_t f){ return f(); };
5339 const auto higher2nd = [unary](nullary_t f1){
5340 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5341 };
5342 return higher1st(nullary) + higher2nd(nullary)(unary);
5343 }
5344
5345 }
5346
5347 namespace test_variadic_templates
5348 {
5349
5350 template <int...>
5351 struct sum;
5352
5353 template <int N0, int... N1toN>
5354 struct sum<N0, N1toN...>
5355 {
5356 static constexpr auto value = N0 + sum<N1toN...>::value;
5357 };
5358
5359 template <>
5360 struct sum<>
5361 {
5362 static constexpr auto value = 0;
5363 };
5364
5365 static_assert(sum<>::value == 0, "");
5366 static_assert(sum<1>::value == 1, "");
5367 static_assert(sum<23>::value == 23, "");
5368 static_assert(sum<1, 2>::value == 3, "");
5369 static_assert(sum<5, 5, 11>::value == 21, "");
5370 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5371
5372 }
5373
5374 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5375 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5376 // because of this.
5377 namespace test_template_alias_sfinae
5378 {
5379
5380 struct foo {};
5381
5382 template<typename T>
5383 using member = typename T::member_type;
5384
5385 template<typename T>
5386 void func(...) {}
5387
5388 template<typename T>
5389 void func(member<T>*) {}
5390
5391 void test();
5392
5393 void test() { func<foo>(0); }
5394
5395 }
5396
5397} // namespace cxx11
5398
5399#endif // __cplusplus >= 201103L
5400
5401
5402
5403_ACEOF
5404if ac_fn_cxx_try_compile "$LINENO"; then :
5405 ax_cv_cxx_compile_cxx11=yes
5406else
5407 ax_cv_cxx_compile_cxx11=no
5408fi
5409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5410fi
5411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5412$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5413 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5414 ac_success=yes
5415 fi
5416
5417 if test x$ac_success = xno; then
41260ac2
SM
5418 for alternative in ${ax_cxx_compile_alternatives}; do
5419 switch="-std=gnu++${alternative}"
0bcda685
PA
5420 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5422$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5423if eval \${$cachevar+:} false; then :
0bcda685
PA
5424 $as_echo_n "(cached) " >&6
5425else
5426 ac_save_CXX="$CXX"
5427 CXX="$CXX $switch"
5428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5429/* end confdefs.h. */
5430
5431
5432// If the compiler admits that it is not ready for C++11, why torture it?
5433// Hopefully, this will speed up the test.
5434
5435#ifndef __cplusplus
5436
5437#error "This is not a C++ compiler"
5438
5439#elif __cplusplus < 201103L
5440
5441#error "This is not a C++11 compiler"
5442
5443#else
5444
5445namespace cxx11
5446{
5447
5448 namespace test_static_assert
5449 {
5450
5451 template <typename T>
5452 struct check
5453 {
5454 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5455 };
5456
5457 }
5458
5459 namespace test_final_override
5460 {
5461
5462 struct Base
5463 {
5464 virtual void f() {}
5465 };
5466
5467 struct Derived : public Base
5468 {
5469 virtual void f() override {}
5470 };
5471
5472 }
5473
5474 namespace test_double_right_angle_brackets
5475 {
5476
5477 template < typename T >
5478 struct check {};
5479
5480 typedef check<void> single_type;
5481 typedef check<check<void>> double_type;
5482 typedef check<check<check<void>>> triple_type;
5483 typedef check<check<check<check<void>>>> quadruple_type;
5484
5485 }
5486
5487 namespace test_decltype
5488 {
5489
5490 int
5491 f()
5492 {
5493 int a = 1;
5494 decltype(a) b = 2;
5495 return a + b;
5496 }
5497
5498 }
5499
5500 namespace test_type_deduction
5501 {
5502
5503 template < typename T1, typename T2 >
5504 struct is_same
5505 {
5506 static const bool value = false;
5507 };
5508
5509 template < typename T >
5510 struct is_same<T, T>
5511 {
5512 static const bool value = true;
5513 };
5514
5515 template < typename T1, typename T2 >
5516 auto
5517 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5518 {
5519 return a1 + a2;
5520 }
5521
5522 int
5523 test(const int c, volatile int v)
5524 {
5525 static_assert(is_same<int, decltype(0)>::value == true, "");
5526 static_assert(is_same<int, decltype(c)>::value == false, "");
5527 static_assert(is_same<int, decltype(v)>::value == false, "");
5528 auto ac = c;
5529 auto av = v;
5530 auto sumi = ac + av + 'x';
5531 auto sumf = ac + av + 1.0;
5532 static_assert(is_same<int, decltype(ac)>::value == true, "");
5533 static_assert(is_same<int, decltype(av)>::value == true, "");
5534 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5535 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5536 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5537 return (sumf > 0.0) ? sumi : add(c, v);
5538 }
5539
5540 }
5541
5542 namespace test_noexcept
5543 {
5544
5545 int f() { return 0; }
5546 int g() noexcept { return 0; }
5547
5548 static_assert(noexcept(f()) == false, "");
5549 static_assert(noexcept(g()) == true, "");
5550
5551 }
5552
5553 namespace test_constexpr
5554 {
5555
5556 template < typename CharT >
5557 unsigned long constexpr
5558 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5559 {
5560 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5561 }
5562
5563 template < typename CharT >
5564 unsigned long constexpr
5565 strlen_c(const CharT *const s) noexcept
5566 {
5567 return strlen_c_r(s, 0UL);
5568 }
5569
5570 static_assert(strlen_c("") == 0UL, "");
5571 static_assert(strlen_c("1") == 1UL, "");
5572 static_assert(strlen_c("example") == 7UL, "");
5573 static_assert(strlen_c("another\0example") == 7UL, "");
5574
5575 }
5576
5577 namespace test_rvalue_references
5578 {
5579
5580 template < int N >
5581 struct answer
5582 {
5583 static constexpr int value = N;
5584 };
5585
5586 answer<1> f(int&) { return answer<1>(); }
5587 answer<2> f(const int&) { return answer<2>(); }
5588 answer<3> f(int&&) { return answer<3>(); }
5589
5590 void
5591 test()
5592 {
5593 int i = 0;
5594 const int c = 0;
5595 static_assert(decltype(f(i))::value == 1, "");
5596 static_assert(decltype(f(c))::value == 2, "");
5597 static_assert(decltype(f(0))::value == 3, "");
5598 }
5599
5600 }
5601
5602 namespace test_uniform_initialization
5603 {
5604
5605 struct test
5606 {
5607 static const int zero {};
5608 static const int one {1};
5609 };
5610
5611 static_assert(test::zero == 0, "");
5612 static_assert(test::one == 1, "");
5613
5614 }
5615
5616 namespace test_lambdas
5617 {
5618
5619 void
5620 test1()
5621 {
5622 auto lambda1 = [](){};
5623 auto lambda2 = lambda1;
5624 lambda1();
5625 lambda2();
5626 }
5627
5628 int
5629 test2()
5630 {
5631 auto a = [](int i, int j){ return i + j; }(1, 2);
5632 auto b = []() -> int { return '0'; }();
5633 auto c = [=](){ return a + b; }();
5634 auto d = [&](){ return c; }();
5635 auto e = [a, &b](int x) mutable {
5636 const auto identity = [](int y){ return y; };
5637 for (auto i = 0; i < a; ++i)
5638 a += b--;
5639 return x + identity(a + b);
5640 }(0);
5641 return a + b + c + d + e;
5642 }
5643
5644 int
5645 test3()
5646 {
5647 const auto nullary = [](){ return 0; };
5648 const auto unary = [](int x){ return x; };
5649 using nullary_t = decltype(nullary);
5650 using unary_t = decltype(unary);
5651 const auto higher1st = [](nullary_t f){ return f(); };
5652 const auto higher2nd = [unary](nullary_t f1){
5653 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5654 };
5655 return higher1st(nullary) + higher2nd(nullary)(unary);
5656 }
5657
5658 }
5659
5660 namespace test_variadic_templates
5661 {
5662
5663 template <int...>
5664 struct sum;
5665
5666 template <int N0, int... N1toN>
5667 struct sum<N0, N1toN...>
5668 {
5669 static constexpr auto value = N0 + sum<N1toN...>::value;
5670 };
5671
5672 template <>
5673 struct sum<>
5674 {
5675 static constexpr auto value = 0;
5676 };
5677
5678 static_assert(sum<>::value == 0, "");
5679 static_assert(sum<1>::value == 1, "");
5680 static_assert(sum<23>::value == 23, "");
5681 static_assert(sum<1, 2>::value == 3, "");
5682 static_assert(sum<5, 5, 11>::value == 21, "");
5683 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5684
5685 }
5686
5687 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5688 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5689 // because of this.
5690 namespace test_template_alias_sfinae
5691 {
5692
5693 struct foo {};
5694
5695 template<typename T>
5696 using member = typename T::member_type;
5697
5698 template<typename T>
5699 void func(...) {}
5700
5701 template<typename T>
5702 void func(member<T>*) {}
5703
5704 void test();
5705
5706 void test() { func<foo>(0); }
5707
5708 }
5709
5710} // namespace cxx11
5711
5712#endif // __cplusplus >= 201103L
5713
5714
5715
5716_ACEOF
5717if ac_fn_cxx_try_compile "$LINENO"; then :
5718 eval $cachevar=yes
5719else
5720 eval $cachevar=no
5721fi
5722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5723 CXX="$ac_save_CXX"
5724fi
5725eval ac_res=\$$cachevar
5726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5727$as_echo "$ac_res" >&6; }
5728 if eval test x\$$cachevar = xyes; then
5729 CXX_DIALECT="$switch"
5730 ac_success=yes
5731 break
5732 fi
5733 done
5734 fi
5735
5736 if test x$ac_success = xno; then
41260ac2
SM
5737 for alternative in ${ax_cxx_compile_alternatives}; do
5738 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5739 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
0bcda685 5741$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5742if eval \${$cachevar+:} false; then :
0bcda685
PA
5743 $as_echo_n "(cached) " >&6
5744else
5745 ac_save_CXX="$CXX"
41260ac2
SM
5746 CXX="$CXX $switch"
5747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0bcda685
PA
5748/* end confdefs.h. */
5749
5750
5751// If the compiler admits that it is not ready for C++11, why torture it?
5752// Hopefully, this will speed up the test.
5753
5754#ifndef __cplusplus
5755
5756#error "This is not a C++ compiler"
5757
5758#elif __cplusplus < 201103L
5759
5760#error "This is not a C++11 compiler"
5761
5762#else
5763
5764namespace cxx11
5765{
5766
5767 namespace test_static_assert
5768 {
5769
5770 template <typename T>
5771 struct check
5772 {
5773 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5774 };
5775
5776 }
5777
5778 namespace test_final_override
5779 {
5780
5781 struct Base
5782 {
5783 virtual void f() {}
5784 };
5785
5786 struct Derived : public Base
5787 {
5788 virtual void f() override {}
5789 };
5790
5791 }
5792
5793 namespace test_double_right_angle_brackets
5794 {
5795
5796 template < typename T >
5797 struct check {};
5798
5799 typedef check<void> single_type;
5800 typedef check<check<void>> double_type;
5801 typedef check<check<check<void>>> triple_type;
5802 typedef check<check<check<check<void>>>> quadruple_type;
5803
5804 }
5805
5806 namespace test_decltype
5807 {
5808
5809 int
5810 f()
5811 {
5812 int a = 1;
5813 decltype(a) b = 2;
5814 return a + b;
5815 }
5816
5817 }
5818
5819 namespace test_type_deduction
5820 {
5821
5822 template < typename T1, typename T2 >
5823 struct is_same
5824 {
5825 static const bool value = false;
5826 };
5827
5828 template < typename T >
5829 struct is_same<T, T>
5830 {
5831 static const bool value = true;
5832 };
5833
5834 template < typename T1, typename T2 >
5835 auto
5836 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5837 {
5838 return a1 + a2;
5839 }
5840
5841 int
5842 test(const int c, volatile int v)
5843 {
5844 static_assert(is_same<int, decltype(0)>::value == true, "");
5845 static_assert(is_same<int, decltype(c)>::value == false, "");
5846 static_assert(is_same<int, decltype(v)>::value == false, "");
5847 auto ac = c;
5848 auto av = v;
5849 auto sumi = ac + av + 'x';
5850 auto sumf = ac + av + 1.0;
5851 static_assert(is_same<int, decltype(ac)>::value == true, "");
5852 static_assert(is_same<int, decltype(av)>::value == true, "");
5853 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5854 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5855 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5856 return (sumf > 0.0) ? sumi : add(c, v);
5857 }
5858
5859 }
5860
5861 namespace test_noexcept
5862 {
5863
5864 int f() { return 0; }
5865 int g() noexcept { return 0; }
5866
5867 static_assert(noexcept(f()) == false, "");
5868 static_assert(noexcept(g()) == true, "");
5869
5870 }
5871
5872 namespace test_constexpr
5873 {
5874
5875 template < typename CharT >
5876 unsigned long constexpr
5877 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5878 {
5879 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5880 }
5881
5882 template < typename CharT >
5883 unsigned long constexpr
5884 strlen_c(const CharT *const s) noexcept
5885 {
5886 return strlen_c_r(s, 0UL);
5887 }
5888
5889 static_assert(strlen_c("") == 0UL, "");
5890 static_assert(strlen_c("1") == 1UL, "");
5891 static_assert(strlen_c("example") == 7UL, "");
5892 static_assert(strlen_c("another\0example") == 7UL, "");
5893
5894 }
5895
5896 namespace test_rvalue_references
5897 {
5898
5899 template < int N >
5900 struct answer
5901 {
5902 static constexpr int value = N;
5903 };
5904
5905 answer<1> f(int&) { return answer<1>(); }
5906 answer<2> f(const int&) { return answer<2>(); }
5907 answer<3> f(int&&) { return answer<3>(); }
5908
5909 void
5910 test()
5911 {
5912 int i = 0;
5913 const int c = 0;
5914 static_assert(decltype(f(i))::value == 1, "");
5915 static_assert(decltype(f(c))::value == 2, "");
5916 static_assert(decltype(f(0))::value == 3, "");
5917 }
5918
5919 }
5920
5921 namespace test_uniform_initialization
5922 {
5923
5924 struct test
5925 {
5926 static const int zero {};
5927 static const int one {1};
5928 };
5929
5930 static_assert(test::zero == 0, "");
5931 static_assert(test::one == 1, "");
5932
5933 }
5934
5935 namespace test_lambdas
5936 {
5937
5938 void
5939 test1()
5940 {
5941 auto lambda1 = [](){};
5942 auto lambda2 = lambda1;
5943 lambda1();
5944 lambda2();
5945 }
5946
5947 int
5948 test2()
5949 {
5950 auto a = [](int i, int j){ return i + j; }(1, 2);
5951 auto b = []() -> int { return '0'; }();
5952 auto c = [=](){ return a + b; }();
5953 auto d = [&](){ return c; }();
5954 auto e = [a, &b](int x) mutable {
5955 const auto identity = [](int y){ return y; };
5956 for (auto i = 0; i < a; ++i)
5957 a += b--;
5958 return x + identity(a + b);
5959 }(0);
5960 return a + b + c + d + e;
5961 }
5962
5963 int
5964 test3()
5965 {
5966 const auto nullary = [](){ return 0; };
5967 const auto unary = [](int x){ return x; };
5968 using nullary_t = decltype(nullary);
5969 using unary_t = decltype(unary);
5970 const auto higher1st = [](nullary_t f){ return f(); };
5971 const auto higher2nd = [unary](nullary_t f1){
5972 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5973 };
5974 return higher1st(nullary) + higher2nd(nullary)(unary);
5975 }
5976
5977 }
5978
5979 namespace test_variadic_templates
5980 {
5981
5982 template <int...>
5983 struct sum;
5984
5985 template <int N0, int... N1toN>
5986 struct sum<N0, N1toN...>
5987 {
5988 static constexpr auto value = N0 + sum<N1toN...>::value;
5989 };
5990
5991 template <>
5992 struct sum<>
5993 {
5994 static constexpr auto value = 0;
5995 };
5996
5997 static_assert(sum<>::value == 0, "");
5998 static_assert(sum<1>::value == 1, "");
5999 static_assert(sum<23>::value == 23, "");
6000 static_assert(sum<1, 2>::value == 3, "");
6001 static_assert(sum<5, 5, 11>::value == 21, "");
6002 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6003
6004 }
6005
6006 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6007 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6008 // because of this.
6009 namespace test_template_alias_sfinae
6010 {
6011
6012 struct foo {};
6013
6014 template<typename T>
6015 using member = typename T::member_type;
6016
6017 template<typename T>
6018 void func(...) {}
6019
6020 template<typename T>
6021 void func(member<T>*) {}
6022
6023 void test();
6024
6025 void test() { func<foo>(0); }
6026
6027 }
6028
6029} // namespace cxx11
6030
6031#endif // __cplusplus >= 201103L
6032
6033
6034
6035_ACEOF
6036if ac_fn_cxx_try_compile "$LINENO"; then :
6037 eval $cachevar=yes
6038else
6039 eval $cachevar=no
6040fi
6041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41260ac2 6042 CXX="$ac_save_CXX"
0bcda685
PA
6043fi
6044eval ac_res=\$$cachevar
6045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6046$as_echo "$ac_res" >&6; }
41260ac2
SM
6047 if eval test x\$$cachevar = xyes; then
6048 CXX_DIALECT="$switch"
6049 ac_success=yes
6050 break
6051 fi
6052 done
6053 if test x$ac_success = xyes; then
0bcda685
PA
6054 break
6055 fi
6056 done
6057 fi
6058 ac_ext=c
6059ac_cpp='$CPP $CPPFLAGS'
6060ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6061ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6062ac_compiler_gnu=$ac_cv_c_compiler_gnu
6063
6064 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6065 if test x$ac_success = xno; then
d0ac1c44 6066 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
0bcda685
PA
6067 fi
6068 fi
6069 if test x$ac_success = xno; then
6070 HAVE_CXX11=0
6071 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6072$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6073 else
6074 HAVE_CXX11=1
6075
6076$as_echo "#define HAVE_CXX11 1" >>confdefs.h
6077
6078 fi
6079
6080
6081
6082
a417dc56
RW
6083# Dependency checking.
6084rm -rf .tst 2>/dev/null
6085mkdir .tst 2>/dev/null
6086if test -d .tst; then
6087 am__leading_dot=.
6088else
6089 am__leading_dot=_
6090fi
6091rmdir .tst 2>/dev/null
6092
6093DEPDIR="${am__leading_dot}deps"
6094
81ecdfbb 6095ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
6096
6097
6098depcc="$CC" am_compiler_list=
6099
6100am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
6101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6102$as_echo_n "checking dependency style of $depcc... " >&6; }
d0ac1c44 6103if ${am_cv_CC_dependencies_compiler_type+:} false; then :
81ecdfbb 6104 $as_echo_n "(cached) " >&6
a417dc56
RW
6105else
6106 if test -f "$am_depcomp"; then
6107 # We make a subdir and do the tests there. Otherwise we can end up
6108 # making bogus files that we don't know about and never remove. For
6109 # instance it was reported that on HP-UX the gcc test will end up
6110 # making a dummy file named `D' -- because `-MD' means `put the output
6111 # in D'.
6112 mkdir conftest.dir
6113 # Copy depcomp to subdir because otherwise we won't find it if we're
6114 # using a relative directory.
6115 cp "$am_depcomp" conftest.dir
6116 cd conftest.dir
6117 # We will build objects and dependencies in a subdirectory because
6118 # it helps to detect inapplicable dependency modes. For instance
6119 # both Tru64's cc and ICC support -MD to output dependencies as a
6120 # side effect of compilation, but ICC will put the dependencies in
6121 # the current directory while Tru64 will put them in the object
6122 # directory.
6123 mkdir sub
6124
6125 am_cv_CC_dependencies_compiler_type=none
6126 if test "$am_compiler_list" = ""; then
6127 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6128 fi
6129 for depmode in $am_compiler_list; do
6130 if test $depmode = none; then break; fi
6131
81ecdfbb 6132 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
6133 # Setup a source with many dependencies, because some compilers
6134 # like to wrap large dependency lists on column 80 (with \), and
6135 # we should not choose a depcomp mode which is confused by this.
6136 #
6137 # We need to recreate these files for each test, as the compiler may
6138 # overwrite some of them when testing with obscure command lines.
6139 # This happens at least with the AIX C compiler.
6140 : > sub/conftest.c
6141 for i in 1 2 3 4 5 6; do
6142 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6143 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6144 # Solaris 8's {/usr,}/bin/sh.
6145 touch sub/conftst$i.h
6146 done
6147 echo "include sub/conftest.Po" > confmf
6148
6149 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6150 # mode. It turns out that the SunPro C++ compiler does not properly
6151 # handle `-M -o', and we need to detect this.
6152 depcmd="depmode=$depmode \
6153 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6154 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6155 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6156 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6157 if env $depcmd > conftest.err 2>&1 &&
6158 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6159 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6160 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6161 # icc doesn't choke on unknown options, it will just issue warnings
6162 # or remarks (even with -Werror). So we grep stderr for any message
6163 # that says an option was ignored or not supported.
6164 # When given -MP, icc 7.0 and 7.1 complain thusly:
6165 # icc: Command line warning: ignoring option '-M'; no argument required
6166 # The diagnosis changed in icc 8.0:
6167 # icc: Command line remark: option '-MP' not supported
6168 if (grep 'ignoring option' conftest.err ||
6169 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6170 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 6171 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
6172 break
6173 fi
6174 fi
81ecdfbb 6175 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
6176 sed -e 's/^/| /' < conftest.err >&5
6177 done
6178
6179 cd ..
6180 rm -rf conftest.dir
6181else
6182 am_cv_CC_dependencies_compiler_type=none
6183fi
6184
6185fi
81ecdfbb
RW
6186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6187$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 6188if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
d0ac1c44 6189then as_fn_error $? "no usable dependency style found" "$LINENO" 5
a417dc56
RW
6190else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6191
6192fi
6193
6194
c971b7fa
PA
6195
6196CONFIG_OBS=
6197CONFIG_DEPS=
6198CONFIG_SRCS=
6199ENABLE_CFLAGS=
6200
6201CONFIG_ALL=
6202CONFIG_CLEAN=
6203CONFIG_INSTALL=
6204CONFIG_UNINSTALL=
6205
6206# If we haven't got the data from the intl directory,
6207# assume NLS is disabled.
6208USE_NLS=no
6209LIBINTL=
6210LIBINTL_DEP=
6211INCINTL=
6212XGETTEXT=
6213GMSGFMT=
6214POSUB=
783e057b
DJ
6215
6216if test -f ../intl/config.intl; then
6217 . ../intl/config.intl
6218fi
81ecdfbb
RW
6219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6220$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 6221if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
6222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6223$as_echo "no" >&6; }
783e057b 6224else
81ecdfbb
RW
6225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6226$as_echo "yes" >&6; }
783e057b 6227
81ecdfbb 6228$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
6229
6230
81ecdfbb
RW
6231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6232$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
6233 # Look for .po and .gmo files in the source directory.
6234 CATALOGS=
6235 XLINGUAS=
6236 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6237 # If there aren't any .gmo files the shell will give us the
6238 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6239 # weeded out.
6240 case "$cat" in *\**)
6241 continue;;
6242 esac
6243 # The quadruple backslash is collapsed to a double backslash
6244 # by the backticks, then collapsed again by the double quotes,
6245 # leaving us with one backslash in the sed expression (right
6246 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
6247 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6248 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6249 # The user is allowed to set LINGUAS to a list of languages to
6250 # install catalogs for. If it's empty that means "all of them."
6251 if test "x$LINGUAS" = x; then
6252 CATALOGS="$CATALOGS $cat"
6253 XLINGUAS="$XLINGUAS $lang"
6254 else
6255 case "$LINGUAS" in *$lang*)
6256 CATALOGS="$CATALOGS $cat"
6257 XLINGUAS="$XLINGUAS $lang"
6258 ;;
6259 esac
e28b3332
DJ
6260 fi
6261 done
c971b7fa
PA
6262 LINGUAS="$XLINGUAS"
6263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6264$as_echo "$LINGUAS" >&6; }
6265
6266
6267 DATADIRNAME=share
6268
6269 INSTOBJEXT=.mo
6270
6271 GENCAT=gencat
6272
6273 CATOBJEXT=.gmo
e28b3332 6274
e28b3332
DJ
6275fi
6276
c971b7fa
PA
6277localedir='${datadir}/locale'
6278
6279
6280if test x"$USE_NLS" = xyes; then
6281 CONFIG_ALL="$CONFIG_ALL all-po"
6282 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6283 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6284 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 6285fi
e28b3332 6286
c971b7fa
PA
6287PACKAGE=gdb
6288
6289cat >>confdefs.h <<_ACEOF
6290#define PACKAGE "$PACKAGE"
6291_ACEOF
6292
6293
6294
6295# We never need to detect it in this sub-configure.
6296# But preserve it for config.status --recheck.
6297
6298
6299
6300MAKEINFO_EXTRA_FLAGS=""
6301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6302$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
d0ac1c44 6303if ${gdb_cv_have_makeinfo_click+:} false; then :
c971b7fa
PA
6304 $as_echo_n "(cached) " >&6
6305else
6306 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6307 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6308 gdb_cv_have_makeinfo_click=yes
6309 else
6310 gdb_cv_have_makeinfo_click=no
6311 fi
6312fi
6313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6314$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6315if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6316 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6317fi
e28b3332
DJ
6318
6319
bec39cab
AC
6320
6321
81ecdfbb
RW
6322# Check whether --with-separate-debug-dir was given.
6323if test "${with_separate_debug_dir+set}" = set; then :
6324 withval=$with_separate_debug_dir;
b14b1491
TT
6325 DEBUGDIR=$withval
6326else
6327 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
6328fi
6329
20e95c23 6330
783e057b
DJ
6331 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6332 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 6333 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 6334 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 6335
783e057b
DJ
6336cat >>confdefs.h <<_ACEOF
6337#define DEBUGDIR "$ac_define_dir"
20e95c23 6338_ACEOF
20e95c23 6339
20e95c23 6340
20e95c23 6341
0c4a4063 6342
b14b1491
TT
6343 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6344 if test "x$prefix" = xNONE; then
6345 test_prefix=/usr/local
6346 else
6347 test_prefix=$prefix
6348 fi
783e057b 6349 else
b14b1491 6350 test_prefix=$exec_prefix
783e057b 6351 fi
b14b1491
TT
6352 value=0
6353 case ${ac_define_dir} in
6354 "${test_prefix}"|"${test_prefix}/"*|\
6355 '${exec_prefix}'|'${exec_prefix}/'*)
6356 value=1
6357 ;;
6358 esac
6359
6360cat >>confdefs.h <<_ACEOF
6361#define DEBUGDIR_RELOCATABLE $value
6362_ACEOF
6363
6364
6365
0c4a4063 6366
f83d8a90
DE
6367# We can't pass paths as command line arguments.
6368# Mingw32 tries to be clever and will convert the paths for us.
6369# For example -DBINDIR="/usr/local/bin" passed on the command line may get
6370# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6371# This breaks GDB's relocatable path conversions since paths passed in
6372# config.h would not get so translated, the path prefixes no longer match.
6373
6374 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6375 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6376 ac_define_dir=`eval echo $bindir`
6377 ac_define_dir=`eval echo $ac_define_dir`
6378
6379cat >>confdefs.h <<_ACEOF
6380#define BINDIR "$ac_define_dir"
6381_ACEOF
6382
6383
6384
b14b1491
TT
6385# GDB's datadir relocation
6386
6387
6388
81ecdfbb
RW
6389# Check whether --with-gdb-datadir was given.
6390if test "${with_gdb_datadir+set}" = set; then :
6391 withval=$with_gdb_datadir;
b14b1491 6392 GDB_DATADIR=$withval
20e95c23 6393else
b14b1491 6394 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
6395fi
6396
20e95c23 6397
b14b1491
TT
6398 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6399 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6400 ac_define_dir=`eval echo $GDB_DATADIR`
6401 ac_define_dir=`eval echo $ac_define_dir`
6402
6403cat >>confdefs.h <<_ACEOF
6404#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
6405_ACEOF
6406
b14b1491
TT
6407
6408
0c4a4063 6409
b14b1491
TT
6410 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6411 if test "x$prefix" = xNONE; then
6412 test_prefix=/usr/local
6413 else
6414 test_prefix=$prefix
6415 fi
6416 else
6417 test_prefix=$exec_prefix
6418 fi
6419 value=0
6420 case ${ac_define_dir} in
6421 "${test_prefix}"|"${test_prefix}/"*|\
6422 '${exec_prefix}'|'${exec_prefix}/'*)
6423 value=1
6424 ;;
6425 esac
6426
6427cat >>confdefs.h <<_ACEOF
6428#define GDB_DATADIR_RELOCATABLE $value
6429_ACEOF
6430
6431
783e057b 6432
20e95c23 6433
0c4a4063 6434
81ecdfbb
RW
6435# Check whether --with-relocated-sources was given.
6436if test "${with_relocated_sources+set}" = set; then :
6437 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
6438
6439 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6440 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6441 ac_define_dir=`eval echo $reloc_srcdir`
6442 ac_define_dir=`eval echo $ac_define_dir`
6443
6444cat >>confdefs.h <<_ACEOF
6445#define RELOC_SRCDIR "$ac_define_dir"
6446_ACEOF
6447
6448
6449
81ecdfbb
RW
6450fi
6451
29b0e8a2 6452
7349ff92
JK
6453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6454$as_echo_n "checking for default auto-load directory... " >&6; }
6455
6456# Check whether --with-auto-load-dir was given.
6457if test "${with_auto_load_dir+set}" = set; then :
6458 withval=$with_auto_load_dir;
6459else
1564a261 6460 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
6461fi
6462
2861ee4f 6463escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
6464
6465 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6466 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6467 ac_define_dir=`eval echo $escape_dir`
6468 ac_define_dir=`eval echo $ac_define_dir`
6469
6470cat >>confdefs.h <<_ACEOF
6471#define AUTO_LOAD_DIR "$ac_define_dir"
6472_ACEOF
6473
6474
6475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6476$as_echo "$with_auto_load_dir" >&6; }
6477
bccbefd2
JK
6478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6479$as_echo_n "checking for default auto-load safe-path... " >&6; }
6480
6481# Check whether --with-auto-load-safe-path was given.
6482if test "${with_auto_load_safe_path+set}" = set; then :
6483 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
6484 with_auto_load_safe_path="/"
6485 fi
bccbefd2 6486else
7349ff92 6487 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
6488fi
6489
2861ee4f 6490escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
6491
6492 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6493 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 6494 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
6495 ac_define_dir=`eval echo $ac_define_dir`
6496
6497cat >>confdefs.h <<_ACEOF
6dea1fbd 6498#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
6499_ACEOF
6500
6501
6502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6503$as_echo "$with_auto_load_safe_path" >&6; }
6504
29b0e8a2 6505
20e95c23 6506
5ae98d25 6507subdirs="$subdirs testsuite"
20e95c23
DJ
6508
6509
783e057b 6510# Check whether to support alternative target configurations
81ecdfbb
RW
6511# Check whether --enable-targets was given.
6512if test "${enable_targets+set}" = set; then :
6513 enableval=$enable_targets; case "${enableval}" in
d0ac1c44 6514 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
6515 ;;
6516 no) enable_targets= ;;
6517 *) enable_targets=$enableval ;;
6518esac
81ecdfbb
RW
6519fi
6520
20e95c23 6521
783e057b 6522# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
6523# Check whether --enable-64-bit-bfd was given.
6524if test "${enable_64_bit_bfd+set}" = set; then :
6525 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
6526 yes) want64=true ;;
6527 no) want64=false ;;
d0ac1c44 6528 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
6529esac
6530else
6531 want64=false
81ecdfbb
RW
6532fi
6533
783e057b
DJ
6534# Provide defaults for some variables set by the per-host and per-target
6535# configuration.
6536gdb_host_obs=posix-hdep.o
20e95c23 6537
783e057b
DJ
6538if test "${target}" = "${host}"; then
6539 gdb_native=yes
6540else
6541 gdb_native=no
6542fi
20e95c23 6543
783e057b 6544. $srcdir/configure.host
20e95c23 6545
fb23d554 6546# Add in the common host objects.
268a13a5 6547. $srcdir/gdbsupport/common.host
fb23d554
SDJ
6548gdb_host_obs="$gdb_host_obs $common_host_obs"
6549
783e057b 6550# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 6551
783e057b
DJ
6552TARGET_OBS=
6553all_targets=
b292c783 6554HAVE_NATIVE_GCORE_TARGET=
20e95c23 6555
783e057b 6556for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 6557do
783e057b
DJ
6558 if test "$targ_alias" = "all"; then
6559 all_targets=true
6560 else
6561 # Canonicalize the secondary target names.
6562 result=`$ac_config_sub $targ_alias 2>/dev/null`
6563 if test -n "$result"; then
6564 targ=$result
6565 else
6566 targ=$targ_alias
6567 fi
20e95c23 6568
783e057b 6569 . ${srcdir}/configure.tgt
20e95c23 6570
bf307134 6571 if test -z "${gdb_target_obs}"; then :
d0ac1c44 6572 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
bf307134
JB
6573fi
6574
783e057b
DJ
6575 # Target-specific object files
6576 for i in ${gdb_target_obs}; do
6577 case " $TARGET_OBS " in
6578 *" ${i} "*) ;;
6579 *)
6580 TARGET_OBS="$TARGET_OBS ${i}"
6581 ;;
6582 esac
6583 done
20e95c23 6584
783e057b
DJ
6585 # Check whether this target needs 64-bit CORE_ADDR
6586 if test x${want64} = xfalse; then
6587 . ${srcdir}/../bfd/config.bfd
6588 fi
b292c783
JK
6589
6590 # Check whether this target is native and supports gcore.
6591 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6592 && $gdb_have_gcore; then
6593 HAVE_NATIVE_GCORE_TARGET=1
6594 fi
783e057b 6595 fi
20e95c23
DJ
6596done
6597
783e057b
DJ
6598if test x${all_targets} = xtrue; then
6599
6600 # We want all 64-bit targets if we either:
6601 # - run on a 64-bit host or
6602 # - already require 64-bit support for some other target or
6603 # - the --enable-64-bit-bfd option was supplied
6604 # Otherwise we only support all 32-bit targets.
6605 #
6606 # NOTE: This test must be in sync with the corresponding
6607 # tests in BFD!
20e95c23 6608
783e057b 6609 if test x${want64} = xfalse; then
81ecdfbb
RW
6610 # The cast to long int works around a bug in the HP C Compiler
6611# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6612# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6613# This bug is HP SR number 8606223364.
6614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6615$as_echo_n "checking size of long... " >&6; }
d0ac1c44 6616if ${ac_cv_sizeof_long+:} false; then :
81ecdfbb 6617 $as_echo_n "(cached) " >&6
c0993dbe 6618else
81ecdfbb 6619 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 6620
81ecdfbb
RW
6621else
6622 if test "$ac_cv_type_long" = yes; then
6623 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6624$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
6625as_fn_error 77 "cannot compute sizeof (long)
6626See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
6627 else
6628 ac_cv_sizeof_long=0
6629 fi
c0993dbe 6630fi
81ecdfbb 6631
c0993dbe 6632fi
81ecdfbb
RW
6633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6634$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 6635
c0993dbe 6636
c0993dbe 6637
c0993dbe
UW
6638cat >>confdefs.h <<_ACEOF
6639#define SIZEOF_LONG $ac_cv_sizeof_long
6640_ACEOF
6641
6642
6643 if test "x${ac_cv_sizeof_long}" = "x8"; then
6644 want64=true
6645 fi
6646 fi
6647 if test x${want64} = xtrue; then
6648 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6649 else
6650 TARGET_OBS='$(ALL_TARGET_OBS)'
6651 fi
6652fi
6653
6654
6655
b292c783 6656
c0993dbe
UW
6657# For other settings, only the main target counts.
6658gdb_sim=
6659gdb_osabi=
6660build_gdbserver=
6661targ=$target; . ${srcdir}/configure.tgt
6662
6663# Fetch the default architecture and default target vector from BFD.
6664targ=$target; . $srcdir/../bfd/config.bfd
6665
6666# We only want the first architecture, so strip off the others if
6667# there is more than one.
6668targ_archs=`echo $targ_archs | sed 's/ .*//'`
6669
6670if test "x$targ_archs" != x; then
6671
6672cat >>confdefs.h <<_ACEOF
6673#define DEFAULT_BFD_ARCH $targ_archs
6674_ACEOF
6675
6676fi
6677if test "x$targ_defvec" != x; then
6678
6679cat >>confdefs.h <<_ACEOF
6680#define DEFAULT_BFD_VEC $targ_defvec
6681_ACEOF
6682
6683fi
6684
c0993dbe 6685# Enable MI.
81ecdfbb
RW
6686# Check whether --enable-gdbmi was given.
6687if test "${enable_gdbmi+set}" = set; then :
6688 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
6689 yes | no)
6690 ;;
6691 *)
d0ac1c44 6692 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
6693 esac
6694else
6695 enable_gdbmi=yes
81ecdfbb
RW
6696fi
6697
c0993dbe
UW
6698if test x"$enable_gdbmi" = xyes; then
6699 if test -d $srcdir/mi; then
6700 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6701 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6702 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6703 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6704 fi
6705fi
6706
6707# Enable TUI.
81ecdfbb
RW
6708# Check whether --enable-tui was given.
6709if test "${enable_tui+set}" = set; then :
6710 enableval=$enable_tui; case $enableval in
3ca64bd3 6711 yes | no | auto)
c0993dbe
UW
6712 ;;
6713 *)
d0ac1c44 6714 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
6715 esac
6716else
3ca64bd3 6717 enable_tui=auto
81ecdfbb
RW
6718fi
6719
c0993dbe
UW
6720
6721# Enable gdbtk.
81ecdfbb
RW
6722# Check whether --enable-gdbtk was given.
6723if test "${enable_gdbtk+set}" = set; then :
6724 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
6725 yes | no)
6726 ;;
6727 *)
d0ac1c44 6728 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
6729 esac
6730else
5062cc19 6731 if test -d $srcdir/gdbtk; then
c0993dbe
UW
6732 enable_gdbtk=yes
6733 else
6734 enable_gdbtk=no
6735 fi
81ecdfbb
RW
6736fi
6737
c0993dbe
UW
6738# We unconditionally disable gdbtk tests on selected platforms.
6739case $host_os in
6740 go32* | windows*)
81ecdfbb
RW
6741 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6742$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
6743 enable_gdbtk=no ;;
6744esac
6745
05e7c244 6746# Libunwind support for ia64.
bec39cab 6747
05e7c244
JK
6748
6749# Check whether --with-libunwind-ia64 was given.
6750if test "${with_libunwind_ia64+set}" = set; then :
6751 withval=$with_libunwind_ia64;
bec39cab 6752else
05e7c244
JK
6753 with_libunwind_ia64=auto
6754fi
bec39cab 6755
05e7c244
JK
6756
6757# Backward compatibility option.
6758if test "${with_libunwind+set}" = set; then
6759 if test x"$with_libunwind_ia64" != xauto; then
d0ac1c44 6760 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
05e7c244
JK
6761 fi
6762 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6763$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6764 with_libunwind_ia64="$with_libunwind"
6765fi
6766
6767case "$with_libunwind_ia64" in
6768 yes | no)
6769 ;;
6770 auto)
6771 for ac_header in libunwind-ia64.h
81ecdfbb 6772do :
b54a8fd7 6773 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 6774if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6775 cat >>confdefs.h <<_ACEOF
b54a8fd7 6776#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6777_ACEOF
6778
6779fi
6780
6781done
6782
05e7c244
JK
6783 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6784 ;;
6785 *)
d0ac1c44 6786 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
05e7c244
JK
6787 ;;
6788esac
bec39cab 6789
05e7c244 6790if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 6791 for ac_header in libunwind-ia64.h
81ecdfbb 6792do :
b54a8fd7 6793 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 6794if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6795 cat >>confdefs.h <<_ACEOF
b54a8fd7 6796#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6797_ACEOF
6798
6799fi
6800
6801done
6802
05e7c244 6803 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
d0ac1c44 6804 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
05e7c244
JK
6805 fi
6806 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6807 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6808 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
6809fi
6810
cb01cfba
JB
6811opt_curses=no
6812
81ecdfbb
RW
6813# Check whether --with-curses was given.
6814if test "${with_curses+set}" = set; then :
6815 withval=$with_curses; opt_curses=$withval
6816fi
6817
cb01cfba 6818
76a39ba7 6819prefer_curses=no
cb01cfba 6820if test "$opt_curses" = "yes"; then
76a39ba7 6821 prefer_curses=yes
cb01cfba
JB
6822fi
6823
a9322a30 6824# Profiling support.
81ecdfbb
RW
6825# Check whether --enable-profiling was given.
6826if test "${enable_profiling+set}" = set; then :
6827 enableval=$enable_profiling; case $enableval in
a9322a30
TT
6828 yes | no)
6829 ;;
6830 *)
d0ac1c44 6831 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
6832 esac
6833else
6834 enable_profiling=no
81ecdfbb 6835fi
bec39cab 6836
a9322a30
TT
6837
6838for ac_func in monstartup _mcleanup
81ecdfbb
RW
6839do :
6840 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6841ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 6842if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
81ecdfbb
RW
6843 cat >>confdefs.h <<_ACEOF
6844#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 6845_ACEOF
a9322a30 6846
81ecdfbb
RW
6847fi
6848done
a9322a30 6849
81ecdfbb
RW
6850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6851$as_echo_n "checking for _etext... " >&6; }
d0ac1c44 6852if ${ac_cv_var__etext+:} false; then :
81ecdfbb
RW
6853 $as_echo_n "(cached) " >&6
6854else
6855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6856/* end confdefs.h. */
6857#include <stdlib.h>
6858extern char _etext;
a9322a30
TT
6859
6860int
6861main ()
6862{
6863free (&_etext);
6864 ;
6865 return 0;
6866}
bec39cab 6867_ACEOF
81ecdfbb 6868if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6869 ac_cv_var__etext=yes
bec39cab 6870else
81ecdfbb 6871 ac_cv_var__etext=no
bec39cab 6872fi
81ecdfbb
RW
6873rm -f core conftest.err conftest.$ac_objext \
6874 conftest$ac_exeext conftest.$ac_ext
bec39cab 6875fi
81ecdfbb
RW
6876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6877$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 6878if test $ac_cv_var__etext = yes; then
60ca704f 6879
81ecdfbb 6880$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 6881
bec39cab 6882fi
81ecdfbb
RW
6883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6884$as_echo_n "checking for etext... " >&6; }
d0ac1c44 6885if ${ac_cv_var_etext+:} false; then :
81ecdfbb 6886 $as_echo_n "(cached) " >&6
bec39cab 6887else
81ecdfbb 6888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6889/* end confdefs.h. */
a9322a30
TT
6890#include <stdlib.h>
6891extern char etext;
bec39cab
AC
6892
6893int
6894main ()
6895{
a9322a30 6896free (&etext);
bec39cab
AC
6897 ;
6898 return 0;
6899}
6900_ACEOF
81ecdfbb 6901if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6902 ac_cv_var_etext=yes
bec39cab 6903else
81ecdfbb 6904 ac_cv_var_etext=no
bec39cab 6905fi
81ecdfbb
RW
6906rm -f core conftest.err conftest.$ac_objext \
6907 conftest$ac_exeext conftest.$ac_ext
bec39cab 6908fi
81ecdfbb
RW
6909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
6910$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
6911if test $ac_cv_var_etext = yes; then
6912
81ecdfbb 6913$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
6914
6915fi
a9322a30
TT
6916if test "$enable_profiling" = yes ; then
6917 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
d0ac1c44 6918 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
6919 fi
6920 PROFILE_CFLAGS=-pg
6921 OLD_CFLAGS="$CFLAGS"
6922 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 6923
81ecdfbb
RW
6924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
6925$as_echo_n "checking whether $CC supports -pg... " >&6; }
d0ac1c44 6926if ${ac_cv_cc_supports_pg+:} false; then :
81ecdfbb 6927 $as_echo_n "(cached) " >&6
bec39cab 6928else
81ecdfbb 6929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6930/* end confdefs.h. */
bec39cab
AC
6931
6932int
6933main ()
6934{
a9322a30 6935int x;
bec39cab
AC
6936 ;
6937 return 0;
6938}
6939_ACEOF
81ecdfbb 6940if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 6941 ac_cv_cc_supports_pg=yes
bec39cab 6942else
81ecdfbb 6943 ac_cv_cc_supports_pg=no
bec39cab 6944fi
81ecdfbb 6945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 6946fi
81ecdfbb
RW
6947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
6948$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 6949
a9322a30 6950 if test $ac_cv_cc_supports_pg = no; then
d0ac1c44 6951 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 6952 fi
bec39cab 6953
a9322a30 6954 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
6955fi
6956
44cee4fd
TT
6957CODESIGN_CERT=
6958# Check whether --enable-codesign was given.
6959if test "${enable_codesign+set}" = set; then :
6960 enableval=$enable_codesign; CODESIGN_CERT=$enableval
6961fi
6962
6963
6964
c16158bc
JM
6965
6966
81ecdfbb
RW
6967# Check whether --with-pkgversion was given.
6968if test "${with_pkgversion+set}" = set; then :
6969 withval=$with_pkgversion; case "$withval" in
d0ac1c44 6970 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
6971 no) PKGVERSION= ;;
6972 *) PKGVERSION="($withval) " ;;
6973 esac
6974else
6975 PKGVERSION="(GDB) "
6976
81ecdfbb 6977fi
c16158bc
JM
6978
6979
6980
6981
81ecdfbb
RW
6982
6983# Check whether --with-bugurl was given.
6984if test "${with_bugurl+set}" = set; then :
6985 withval=$with_bugurl; case "$withval" in
d0ac1c44 6986 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
6987 no) BUGURL=
6988 ;;
6989 *) BUGURL="$withval"
6990 ;;
6991 esac
6992else
6993 BUGURL="http://www.gnu.org/software/gdb/bugs/"
6994
81ecdfbb
RW
6995fi
6996
c16158bc
JM
6997 case ${BUGURL} in
6998 "")
6999 REPORT_BUGS_TO=
7000 REPORT_BUGS_TEXI=
7001 ;;
7002 *)
7003 REPORT_BUGS_TO="<$BUGURL>"
7004 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7005 ;;
7006 esac;
7007
7008
7009
7010
7011cat >>confdefs.h <<_ACEOF
7012#define PKGVERSION "$PKGVERSION"
7013_ACEOF
7014
7015
7016cat >>confdefs.h <<_ACEOF
7017#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7018_ACEOF
7019
7020
bec39cab
AC
7021# --------------------- #
7022# Checks for programs. #
7023# --------------------- #
7024
7025for ac_prog in gawk mawk nawk awk
7026do
7027 # Extract the first word of "$ac_prog", so it can be a program name with args.
7028set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7030$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7031if ${ac_cv_prog_AWK+:} false; then :
81ecdfbb 7032 $as_echo_n "(cached) " >&6
bec39cab
AC
7033else
7034 if test -n "$AWK"; then
7035 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7036else
7037as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7038for as_dir in $PATH
7039do
7040 IFS=$as_save_IFS
7041 test -z "$as_dir" && as_dir=.
81ecdfbb 7042 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7043 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7044 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7045 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7046 break 2
7047 fi
7048done
81ecdfbb
RW
7049 done
7050IFS=$as_save_IFS
bec39cab
AC
7051
7052fi
7053fi
7054AWK=$ac_cv_prog_AWK
7055if test -n "$AWK"; then
81ecdfbb
RW
7056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7057$as_echo "$AWK" >&6; }
bec39cab 7058else
81ecdfbb
RW
7059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7060$as_echo "no" >&6; }
bec39cab
AC
7061fi
7062
bec39cab 7063
81ecdfbb 7064 test -n "$AWK" && break
bec39cab
AC
7065done
7066
c971b7fa
PA
7067# Find a good install program. We prefer a C program (faster),
7068# so one script is as good as another. But avoid the broken or
7069# incompatible versions:
7070# SysV /etc/install, /usr/sbin/install
7071# SunOS /usr/etc/install
7072# IRIX /sbin/install
7073# AIX /bin/install
7074# AmigaOS /C/install, which installs bootblocks on floppy discs
7075# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7076# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7077# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7078# OS/2's system install, which has a completely different semantic
7079# ./install, which can be erroneously created by make from ./install.sh.
7080# Reject install programs that cannot install multiple files.
7081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7082$as_echo_n "checking for a BSD-compatible install... " >&6; }
7083if test -z "$INSTALL"; then
d0ac1c44 7084if ${ac_cv_path_install+:} false; then :
c971b7fa
PA
7085 $as_echo_n "(cached) " >&6
7086else
7087 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7088for as_dir in $PATH
7089do
7090 IFS=$as_save_IFS
7091 test -z "$as_dir" && as_dir=.
7092 # Account for people who put trailing slashes in PATH elements.
7093case $as_dir/ in #((
7094 ./ | .// | /[cC]/* | \
7095 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7096 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7097 /usr/ucb/* ) ;;
7098 *)
7099 # OSF1 and SCO ODT 3.0 have their own names for install.
7100 # Don't use installbsd from OSF since it installs stuff as root
7101 # by default.
7102 for ac_prog in ginstall scoinst install; do
7103 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7104 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
c971b7fa
PA
7105 if test $ac_prog = install &&
7106 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7107 # AIX install. It has an incompatible calling convention.
7108 :
7109 elif test $ac_prog = install &&
7110 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7111 # program-specific install script used by HP pwplus--don't use.
7112 :
7113 else
7114 rm -rf conftest.one conftest.two conftest.dir
7115 echo one > conftest.one
7116 echo two > conftest.two
7117 mkdir conftest.dir
7118 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7119 test -s conftest.one && test -s conftest.two &&
7120 test -s conftest.dir/conftest.one &&
7121 test -s conftest.dir/conftest.two
7122 then
7123 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7124 break 3
7125 fi
7126 fi
7127 fi
7128 done
7129 done
7130 ;;
7131esac
7132
7133 done
7134IFS=$as_save_IFS
7135
7136rm -rf conftest.one conftest.two conftest.dir
7137
7138fi
7139 if test "${ac_cv_path_install+set}" = set; then
7140 INSTALL=$ac_cv_path_install
7141 else
7142 # As a last resort, use the slow shell script. Don't cache a
7143 # value for INSTALL within a source directory, because that will
7144 # break other packages using the cache if that directory is
7145 # removed, or if the value is a relative name.
7146 INSTALL=$ac_install_sh
7147 fi
7148fi
7149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7150$as_echo "$INSTALL" >&6; }
7151
7152# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7153# It thinks the first close brace ends the variable substitution.
7154test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7155
7156test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7157
7158test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 7159
81ecdfbb
RW
7160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7161$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
7162LN_S=$as_ln_s
7163if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
7164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7165$as_echo "yes" >&6; }
bec39cab 7166else
81ecdfbb
RW
7167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7168$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
7169fi
7170
7171if test -n "$ac_tool_prefix"; then
7172 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7173set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
7174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7175$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7176if ${ac_cv_prog_RANLIB+:} false; then :
81ecdfbb 7177 $as_echo_n "(cached) " >&6
bec39cab
AC
7178else
7179 if test -n "$RANLIB"; then
7180 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7181else
7182as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7183for as_dir in $PATH
7184do
7185 IFS=$as_save_IFS
7186 test -z "$as_dir" && as_dir=.
81ecdfbb 7187 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7188 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7189 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 7190 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7191 break 2
7192 fi
7193done
81ecdfbb
RW
7194 done
7195IFS=$as_save_IFS
bec39cab
AC
7196
7197fi
7198fi
7199RANLIB=$ac_cv_prog_RANLIB
7200if test -n "$RANLIB"; then
81ecdfbb
RW
7201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7202$as_echo "$RANLIB" >&6; }
bec39cab 7203else
81ecdfbb
RW
7204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7205$as_echo "no" >&6; }
bec39cab
AC
7206fi
7207
81ecdfbb 7208
bec39cab
AC
7209fi
7210if test -z "$ac_cv_prog_RANLIB"; then
7211 ac_ct_RANLIB=$RANLIB
7212 # Extract the first word of "ranlib", so it can be a program name with args.
7213set dummy ranlib; ac_word=$2
81ecdfbb
RW
7214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7215$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7216if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
81ecdfbb 7217 $as_echo_n "(cached) " >&6
bec39cab
AC
7218else
7219 if test -n "$ac_ct_RANLIB"; then
7220 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7221else
7222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7223for as_dir in $PATH
7224do
7225 IFS=$as_save_IFS
7226 test -z "$as_dir" && as_dir=.
81ecdfbb 7227 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7228 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7229 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 7230 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7231 break 2
7232 fi
7233done
81ecdfbb
RW
7234 done
7235IFS=$as_save_IFS
bec39cab 7236
bec39cab
AC
7237fi
7238fi
7239ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7240if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
7241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7242$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 7243else
81ecdfbb
RW
7244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7245$as_echo "no" >&6; }
bec39cab
AC
7246fi
7247
81ecdfbb
RW
7248 if test "x$ac_ct_RANLIB" = x; then
7249 RANLIB=":"
7250 else
7251 case $cross_compiling:$ac_tool_warned in
7252yes:)
7253{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7254$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7255ac_tool_warned=yes ;;
7256esac
7257 RANLIB=$ac_ct_RANLIB
7258 fi
bec39cab
AC
7259else
7260 RANLIB="$ac_cv_prog_RANLIB"
7261fi
7262
7263for ac_prog in 'bison -y' byacc
7264do
7265 # Extract the first word of "$ac_prog", so it can be a program name with args.
7266set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7268$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7269if ${ac_cv_prog_YACC+:} false; then :
81ecdfbb 7270 $as_echo_n "(cached) " >&6
bec39cab
AC
7271else
7272 if test -n "$YACC"; then
7273 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7274else
7275as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7276for as_dir in $PATH
7277do
7278 IFS=$as_save_IFS
7279 test -z "$as_dir" && as_dir=.
81ecdfbb 7280 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7281 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7282 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 7283 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7284 break 2
7285 fi
7286done
81ecdfbb
RW
7287 done
7288IFS=$as_save_IFS
bec39cab
AC
7289
7290fi
7291fi
7292YACC=$ac_cv_prog_YACC
7293if test -n "$YACC"; then
81ecdfbb
RW
7294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7295$as_echo "$YACC" >&6; }
bec39cab 7296else
81ecdfbb
RW
7297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7298$as_echo "no" >&6; }
bec39cab
AC
7299fi
7300
81ecdfbb 7301
bec39cab
AC
7302 test -n "$YACC" && break
7303done
7304test -n "$YACC" || YACC="yacc"
7305
7306
7307if test -n "$ac_tool_prefix"; then
7308 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7309set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
7310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7311$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7312if ${ac_cv_prog_AR+:} false; then :
81ecdfbb 7313 $as_echo_n "(cached) " >&6
bec39cab
AC
7314else
7315 if test -n "$AR"; then
7316 ac_cv_prog_AR="$AR" # Let the user override the test.
7317else
7318as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7319for as_dir in $PATH
7320do
7321 IFS=$as_save_IFS
7322 test -z "$as_dir" && as_dir=.
81ecdfbb 7323 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7324 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7325 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 7326 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7327 break 2
7328 fi
7329done
81ecdfbb
RW
7330 done
7331IFS=$as_save_IFS
bec39cab
AC
7332
7333fi
7334fi
7335AR=$ac_cv_prog_AR
7336if test -n "$AR"; then
81ecdfbb
RW
7337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7338$as_echo "$AR" >&6; }
bec39cab 7339else
81ecdfbb
RW
7340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7341$as_echo "no" >&6; }
bec39cab
AC
7342fi
7343
81ecdfbb 7344
bec39cab
AC
7345fi
7346if test -z "$ac_cv_prog_AR"; then
7347 ac_ct_AR=$AR
7348 # Extract the first word of "ar", so it can be a program name with args.
7349set dummy ar; ac_word=$2
81ecdfbb
RW
7350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7351$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7352if ${ac_cv_prog_ac_ct_AR+:} false; then :
81ecdfbb 7353 $as_echo_n "(cached) " >&6
bec39cab
AC
7354else
7355 if test -n "$ac_ct_AR"; then
7356 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7357else
7358as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7359for as_dir in $PATH
7360do
7361 IFS=$as_save_IFS
7362 test -z "$as_dir" && as_dir=.
81ecdfbb 7363 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7364 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7365 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 7366 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7367 break 2
7368 fi
7369done
81ecdfbb
RW
7370 done
7371IFS=$as_save_IFS
bec39cab
AC
7372
7373fi
7374fi
7375ac_ct_AR=$ac_cv_prog_ac_ct_AR
7376if test -n "$ac_ct_AR"; then
81ecdfbb
RW
7377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7378$as_echo "$ac_ct_AR" >&6; }
bec39cab 7379else
81ecdfbb
RW
7380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7381$as_echo "no" >&6; }
bec39cab
AC
7382fi
7383
81ecdfbb
RW
7384 if test "x$ac_ct_AR" = x; then
7385 AR=""
7386 else
7387 case $cross_compiling:$ac_tool_warned in
7388yes:)
7389{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7390$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7391ac_tool_warned=yes ;;
7392esac
7393 AR=$ac_ct_AR
7394 fi
bec39cab
AC
7395else
7396 AR="$ac_cv_prog_AR"
7397fi
7398
7399if test -n "$ac_tool_prefix"; then
7400 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7401set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
7402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7403$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7404if ${ac_cv_prog_DLLTOOL+:} false; then :
81ecdfbb 7405 $as_echo_n "(cached) " >&6
bec39cab
AC
7406else
7407 if test -n "$DLLTOOL"; then
7408 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7409else
7410as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7411for as_dir in $PATH
7412do
7413 IFS=$as_save_IFS
7414 test -z "$as_dir" && as_dir=.
81ecdfbb 7415 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7416 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7417 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 7418 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7419 break 2
7420 fi
7421done
81ecdfbb
RW
7422 done
7423IFS=$as_save_IFS
bec39cab
AC
7424
7425fi
7426fi
7427DLLTOOL=$ac_cv_prog_DLLTOOL
7428if test -n "$DLLTOOL"; then
81ecdfbb
RW
7429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7430$as_echo "$DLLTOOL" >&6; }
bec39cab 7431else
81ecdfbb
RW
7432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7433$as_echo "no" >&6; }
bec39cab
AC
7434fi
7435
81ecdfbb 7436
bec39cab
AC
7437fi
7438if test -z "$ac_cv_prog_DLLTOOL"; then
7439 ac_ct_DLLTOOL=$DLLTOOL
7440 # Extract the first word of "dlltool", so it can be a program name with args.
7441set dummy dlltool; ac_word=$2
81ecdfbb
RW
7442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7443$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7444if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
81ecdfbb 7445 $as_echo_n "(cached) " >&6
bec39cab
AC
7446else
7447 if test -n "$ac_ct_DLLTOOL"; then
7448 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7449else
7450as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7451for as_dir in $PATH
7452do
7453 IFS=$as_save_IFS
7454 test -z "$as_dir" && as_dir=.
81ecdfbb 7455 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7456 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7457 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 7458 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7459 break 2
7460 fi
7461done
81ecdfbb
RW
7462 done
7463IFS=$as_save_IFS
bec39cab
AC
7464
7465fi
7466fi
7467ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7468if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
7469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7470$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 7471else
81ecdfbb
RW
7472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7473$as_echo "no" >&6; }
bec39cab
AC
7474fi
7475
81ecdfbb
RW
7476 if test "x$ac_ct_DLLTOOL" = x; then
7477 DLLTOOL=""
7478 else
7479 case $cross_compiling:$ac_tool_warned in
7480yes:)
7481{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7482$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7483ac_tool_warned=yes ;;
7484esac
7485 DLLTOOL=$ac_ct_DLLTOOL
7486 fi
bec39cab
AC
7487else
7488 DLLTOOL="$ac_cv_prog_DLLTOOL"
7489fi
7490
7491if test -n "$ac_tool_prefix"; then
7492 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7493set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
7494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7495$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7496if ${ac_cv_prog_WINDRES+:} false; then :
81ecdfbb 7497 $as_echo_n "(cached) " >&6
bec39cab
AC
7498else
7499 if test -n "$WINDRES"; then
7500 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7501else
7502as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7503for as_dir in $PATH
7504do
7505 IFS=$as_save_IFS
7506 test -z "$as_dir" && as_dir=.
81ecdfbb 7507 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7508 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7509 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 7510 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7511 break 2
7512 fi
7513done
81ecdfbb
RW
7514 done
7515IFS=$as_save_IFS
bec39cab
AC
7516
7517fi
7518fi
7519WINDRES=$ac_cv_prog_WINDRES
7520if test -n "$WINDRES"; then
81ecdfbb
RW
7521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7522$as_echo "$WINDRES" >&6; }
bec39cab 7523else
81ecdfbb
RW
7524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7525$as_echo "no" >&6; }
bec39cab
AC
7526fi
7527
81ecdfbb 7528
bec39cab
AC
7529fi
7530if test -z "$ac_cv_prog_WINDRES"; then
7531 ac_ct_WINDRES=$WINDRES
7532 # Extract the first word of "windres", so it can be a program name with args.
7533set dummy windres; ac_word=$2
81ecdfbb
RW
7534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7535$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7536if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
81ecdfbb 7537 $as_echo_n "(cached) " >&6
bec39cab
AC
7538else
7539 if test -n "$ac_ct_WINDRES"; then
7540 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7541else
7542as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7543for as_dir in $PATH
7544do
7545 IFS=$as_save_IFS
7546 test -z "$as_dir" && as_dir=.
81ecdfbb 7547 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7548 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7549 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 7550 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7551 break 2
7552 fi
7553done
81ecdfbb
RW
7554 done
7555IFS=$as_save_IFS
bec39cab
AC
7556
7557fi
7558fi
7559ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7560if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
7561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7562$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 7563else
81ecdfbb
RW
7564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7565$as_echo "no" >&6; }
c906108c 7566fi
bec39cab 7567
81ecdfbb
RW
7568 if test "x$ac_ct_WINDRES" = x; then
7569 WINDRES=""
7570 else
7571 case $cross_compiling:$ac_tool_warned in
7572yes:)
7573{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7574$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7575ac_tool_warned=yes ;;
7576esac
7577 WINDRES=$ac_ct_WINDRES
7578 fi
c906108c 7579else
bec39cab 7580 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
7581fi
7582
bec39cab 7583
036c3acb
TS
7584case $host_os in
7585 gnu*)
7586 # Needed for GNU Hurd hosts.
7587 if test -n "$ac_tool_prefix"; then
bec39cab
AC
7588 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7589set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
7590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7591$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7592if ${ac_cv_prog_MIG+:} false; then :
81ecdfbb 7593 $as_echo_n "(cached) " >&6
c906108c 7594else
bec39cab
AC
7595 if test -n "$MIG"; then
7596 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7597else
7598as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7599for as_dir in $PATH
7600do
7601 IFS=$as_save_IFS
7602 test -z "$as_dir" && as_dir=.
81ecdfbb 7603 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7604 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7605 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 7606 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7607 break 2
7608 fi
7609done
81ecdfbb
RW
7610 done
7611IFS=$as_save_IFS
bec39cab 7612
c906108c 7613fi
bec39cab
AC
7614fi
7615MIG=$ac_cv_prog_MIG
7616if test -n "$MIG"; then
81ecdfbb
RW
7617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7618$as_echo "$MIG" >&6; }
c906108c 7619else
81ecdfbb
RW
7620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7621$as_echo "no" >&6; }
c906108c
SS
7622fi
7623
81ecdfbb 7624
bec39cab
AC
7625fi
7626if test -z "$ac_cv_prog_MIG"; then
7627 ac_ct_MIG=$MIG
7628 # Extract the first word of "mig", so it can be a program name with args.
7629set dummy mig; ac_word=$2
81ecdfbb
RW
7630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7631$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7632if ${ac_cv_prog_ac_ct_MIG+:} false; then :
81ecdfbb 7633 $as_echo_n "(cached) " >&6
bec39cab
AC
7634else
7635 if test -n "$ac_ct_MIG"; then
7636 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7637else
7638as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7639for as_dir in $PATH
7640do
7641 IFS=$as_save_IFS
7642 test -z "$as_dir" && as_dir=.
81ecdfbb 7643 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7644 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7645 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 7646 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7647 break 2
7648 fi
7649done
81ecdfbb
RW
7650 done
7651IFS=$as_save_IFS
c906108c 7652
bec39cab
AC
7653fi
7654fi
7655ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7656if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
7657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7658$as_echo "$ac_ct_MIG" >&6; }
bec39cab 7659else
81ecdfbb
RW
7660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7661$as_echo "no" >&6; }
bec39cab 7662fi
c906108c 7663
81ecdfbb
RW
7664 if test "x$ac_ct_MIG" = x; then
7665 MIG=""
7666 else
7667 case $cross_compiling:$ac_tool_warned in
7668yes:)
7669{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7670$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7671ac_tool_warned=yes ;;
7672esac
7673 MIG=$ac_ct_MIG
7674 fi
bec39cab
AC
7675else
7676 MIG="$ac_cv_prog_MIG"
7677fi
c906108c 7678
036c3acb 7679 if test x"$MIG" = x; then
d0ac1c44 7680 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
036c3acb
TS
7681 fi
7682 ;;
7683esac
c906108c 7684
bec39cab
AC
7685# ---------------------- #
7686# Checks for libraries. #
7687# ---------------------- #
c906108c 7688
bec39cab 7689# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
7690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7691$as_echo_n "checking for main in -lm... " >&6; }
d0ac1c44 7692if ${ac_cv_lib_m_main+:} false; then :
81ecdfbb 7693 $as_echo_n "(cached) " >&6
bec39cab
AC
7694else
7695 ac_check_lib_save_LIBS=$LIBS
7696LIBS="-lm $LIBS"
81ecdfbb 7697cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7698/* end confdefs.h. */
c906108c 7699
c906108c 7700
bec39cab
AC
7701int
7702main ()
7703{
81ecdfbb 7704return main ();
bec39cab
AC
7705 ;
7706 return 0;
7707}
7708_ACEOF
81ecdfbb 7709if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
7710 ac_cv_lib_m_main=yes
7711else
81ecdfbb 7712 ac_cv_lib_m_main=no
bec39cab 7713fi
81ecdfbb
RW
7714rm -f core conftest.err conftest.$ac_objext \
7715 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
7716LIBS=$ac_check_lib_save_LIBS
7717fi
81ecdfbb
RW
7718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7719$as_echo "$ac_cv_lib_m_main" >&6; }
d0ac1c44 7720if test "x$ac_cv_lib_m_main" = xyes; then :
bec39cab
AC
7721 cat >>confdefs.h <<_ACEOF
7722#define HAVE_LIBM 1
7723_ACEOF
7724
7725 LIBS="-lm $LIBS"
c906108c 7726
c906108c 7727fi
bec39cab
AC
7728
7729
bec39cab 7730# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
7731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7732$as_echo_n "checking for library containing gethostbyname... " >&6; }
d0ac1c44 7733if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb 7734 $as_echo_n "(cached) " >&6
bec39cab
AC
7735else
7736 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7737cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7738/* end confdefs.h. */
ddc9cd0f 7739
81ecdfbb
RW
7740/* Override any GCC internal prototype to avoid an error.
7741 Use char because int might match the return type of a GCC
7742 builtin and then its argument prototype would still apply. */
bec39cab
AC
7743#ifdef __cplusplus
7744extern "C"
7745#endif
bec39cab
AC
7746char gethostbyname ();
7747int
7748main ()
7749{
81ecdfbb 7750return gethostbyname ();
bec39cab
AC
7751 ;
7752 return 0;
7753}
7754_ACEOF
81ecdfbb
RW
7755for ac_lib in '' nsl; do
7756 if test -z "$ac_lib"; then
7757 ac_res="none required"
7758 else
7759 ac_res=-l$ac_lib
b4e70030 7760 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7761 fi
7762 if ac_fn_c_try_link "$LINENO"; then :
7763 ac_cv_search_gethostbyname=$ac_res
7764fi
7765rm -f core conftest.err conftest.$ac_objext \
7766 conftest$ac_exeext
d0ac1c44 7767 if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb
RW
7768 break
7769fi
7770done
d0ac1c44 7771if ${ac_cv_search_gethostbyname+:} false; then :
ddc9cd0f 7772
bec39cab 7773else
81ecdfbb 7774 ac_cv_search_gethostbyname=no
bec39cab 7775fi
81ecdfbb 7776rm conftest.$ac_ext
bec39cab
AC
7777LIBS=$ac_func_search_save_LIBS
7778fi
81ecdfbb
RW
7779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7780$as_echo "$ac_cv_search_gethostbyname" >&6; }
7781ac_res=$ac_cv_search_gethostbyname
7782if test "$ac_res" != no; then :
7783 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 7784
bec39cab 7785fi
96baa820 7786
c906108c 7787
b4e70030 7788# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
7789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7790$as_echo_n "checking for library containing socketpair... " >&6; }
d0ac1c44 7791if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb 7792 $as_echo_n "(cached) " >&6
b4e70030
JB
7793else
7794 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7796/* end confdefs.h. */
7797
81ecdfbb
RW
7798/* Override any GCC internal prototype to avoid an error.
7799 Use char because int might match the return type of a GCC
7800 builtin and then its argument prototype would still apply. */
b4e70030
JB
7801#ifdef __cplusplus
7802extern "C"
7803#endif
b4e70030
JB
7804char socketpair ();
7805int
7806main ()
7807{
81ecdfbb 7808return socketpair ();
b4e70030
JB
7809 ;
7810 return 0;
7811}
7812_ACEOF
81ecdfbb
RW
7813for ac_lib in '' socket; do
7814 if test -z "$ac_lib"; then
7815 ac_res="none required"
7816 else
7817 ac_res=-l$ac_lib
b4e70030 7818 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7819 fi
7820 if ac_fn_c_try_link "$LINENO"; then :
7821 ac_cv_search_socketpair=$ac_res
7822fi
7823rm -f core conftest.err conftest.$ac_objext \
7824 conftest$ac_exeext
d0ac1c44 7825 if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb
RW
7826 break
7827fi
7828done
d0ac1c44 7829if ${ac_cv_search_socketpair+:} false; then :
b4e70030 7830
b4e70030 7831else
81ecdfbb 7832 ac_cv_search_socketpair=no
b4e70030 7833fi
81ecdfbb 7834rm conftest.$ac_ext
b4e70030
JB
7835LIBS=$ac_func_search_save_LIBS
7836fi
81ecdfbb
RW
7837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7838$as_echo "$ac_cv_search_socketpair" >&6; }
7839ac_res=$ac_cv_search_socketpair
7840if test "$ac_res" != no; then :
7841 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7842
7843fi
7844
7845
233a11ab 7846# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 7847
711a72d3 7848 # Use the system's zlib library.
39f3de7c
L
7849 zlibdir="-L\$(top_builddir)/../zlib"
7850 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 7851
711a72d3
L
7852# Check whether --with-system-zlib was given.
7853if test "${with_system_zlib+set}" = set; then :
afa59b79
L
7854 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7855 zlibdir=
7856 zlibinc=
7857 fi
b040ad30 7858
233a11ab 7859fi
233a11ab 7860
233a11ab 7861
233a11ab 7862
b040ad30 7863
233a11ab 7864
25268153 7865# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
37773e78 7866# On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
25268153
JB
7867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7868$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
d0ac1c44 7869if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7870 $as_echo_n "(cached) " >&6
7871else
7872 ac_func_search_save_LIBS=$LIBS
7873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7874/* end confdefs.h. */
7875
7876/* Override any GCC internal prototype to avoid an error.
7877 Use char because int might match the return type of a GCC
7878 builtin and then its argument prototype would still apply. */
7879#ifdef __cplusplus
7880extern "C"
7881#endif
7882char kinfo_getvmmap ();
7883int
7884main ()
7885{
7886return kinfo_getvmmap ();
7887 ;
7888 return 0;
7889}
7890_ACEOF
37773e78 7891for ac_lib in '' util util-freebsd; do
25268153
JB
7892 if test -z "$ac_lib"; then
7893 ac_res="none required"
7894 else
7895 ac_res=-l$ac_lib
7896 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7897 fi
7898 if ac_fn_c_try_link "$LINENO"; then :
7899 ac_cv_search_kinfo_getvmmap=$ac_res
7900fi
7901rm -f core conftest.err conftest.$ac_objext \
7902 conftest$ac_exeext
d0ac1c44 7903 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7904 break
7905fi
7906done
d0ac1c44 7907if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7908
7909else
7910 ac_cv_search_kinfo_getvmmap=no
7911fi
7912rm conftest.$ac_ext
7913LIBS=$ac_func_search_save_LIBS
7914fi
7915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
7916$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
7917ac_res=$ac_cv_search_kinfo_getvmmap
7918if test "$ac_res" != no; then :
7919 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7920
7921$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
7922
7923fi
7924
7925
92fce24d
JB
7926# fbsd-nat.c can also use kinfo_getfile.
7927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
7928$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
d0ac1c44 7929if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
7930 $as_echo_n "(cached) " >&6
7931else
7932 ac_func_search_save_LIBS=$LIBS
7933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7934/* end confdefs.h. */
7935
7936/* Override any GCC internal prototype to avoid an error.
7937 Use char because int might match the return type of a GCC
7938 builtin and then its argument prototype would still apply. */
7939#ifdef __cplusplus
7940extern "C"
7941#endif
7942char kinfo_getfile ();
7943int
7944main ()
7945{
7946return kinfo_getfile ();
7947 ;
7948 return 0;
7949}
7950_ACEOF
7951for ac_lib in '' util util-freebsd; do
7952 if test -z "$ac_lib"; then
7953 ac_res="none required"
7954 else
7955 ac_res=-l$ac_lib
7956 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7957 fi
7958 if ac_fn_c_try_link "$LINENO"; then :
7959 ac_cv_search_kinfo_getfile=$ac_res
7960fi
7961rm -f core conftest.err conftest.$ac_objext \
7962 conftest$ac_exeext
d0ac1c44 7963 if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
7964 break
7965fi
7966done
d0ac1c44 7967if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
7968
7969else
7970 ac_cv_search_kinfo_getfile=no
7971fi
7972rm conftest.$ac_ext
7973LIBS=$ac_func_search_save_LIBS
7974fi
7975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
7976$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
7977ac_res=$ac_cv_search_kinfo_getfile
7978if test "$ac_res" != no; then :
7979 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7980
7981$as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
7982
7983fi
7984
7985
77f120bf 7986
016a3251
DD
7987 if test "X$prefix" = "XNONE"; then
7988 acl_final_prefix="$ac_default_prefix"
7989 else
7990 acl_final_prefix="$prefix"
7991 fi
7992 if test "X$exec_prefix" = "XNONE"; then
7993 acl_final_exec_prefix='${prefix}'
7994 else
7995 acl_final_exec_prefix="$exec_prefix"
7996 fi
7997 acl_save_prefix="$prefix"
7998 prefix="$acl_final_prefix"
7999 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8000 prefix="$acl_save_prefix"
8001
8002
8003# Check whether --with-gnu-ld was given.
8004if test "${with_gnu_ld+set}" = set; then :
8005 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8006else
8007 with_gnu_ld=no
8008fi
8009
8010# Prepare PATH_SEPARATOR.
8011# The user is always right.
8012if test "${PATH_SEPARATOR+set}" != set; then
8013 echo "#! /bin/sh" >conf$$.sh
8014 echo "exit 0" >>conf$$.sh
8015 chmod +x conf$$.sh
8016 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8017 PATH_SEPARATOR=';'
8018 else
8019 PATH_SEPARATOR=:
8020 fi
8021 rm -f conf$$.sh
8022fi
8023ac_prog=ld
8024if test "$GCC" = yes; then
8025 # Check if gcc -print-prog-name=ld gives a path.
8026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8027$as_echo_n "checking for ld used by GCC... " >&6; }
8028 case $host in
8029 *-*-mingw*)
8030 # gcc leaves a trailing carriage return which upsets mingw
8031 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8032 *)
8033 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8034 esac
8035 case $ac_prog in
8036 # Accept absolute paths.
8037 [\\/]* | [A-Za-z]:[\\/]*)
8038 re_direlt='/[^/][^/]*/\.\./'
8039 # Canonicalize the path of ld
8040 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8041 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8042 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8043 done
8044 test -z "$LD" && LD="$ac_prog"
8045 ;;
8046 "")
8047 # If it fails, then pretend we aren't using GCC.
8048 ac_prog=ld
8049 ;;
8050 *)
8051 # If it is relative, then search for the first ld in PATH.
8052 with_gnu_ld=unknown
8053 ;;
8054 esac
8055elif test "$with_gnu_ld" = yes; then
8056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8057$as_echo_n "checking for GNU ld... " >&6; }
8058else
8059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8060$as_echo_n "checking for non-GNU ld... " >&6; }
8061fi
d0ac1c44 8062if ${acl_cv_path_LD+:} false; then :
016a3251
DD
8063 $as_echo_n "(cached) " >&6
8064else
8065 if test -z "$LD"; then
8066 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8067 for ac_dir in $PATH; do
8068 test -z "$ac_dir" && ac_dir=.
8069 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8070 acl_cv_path_LD="$ac_dir/$ac_prog"
8071 # Check to see if the program is GNU ld. I'd rather use --version,
8072 # but apparently some GNU ld's only accept -v.
8073 # Break only if it was the GNU/non-GNU ld that we prefer.
8074 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8075 test "$with_gnu_ld" != no && break
8076 else
8077 test "$with_gnu_ld" != yes && break
8078 fi
8079 fi
8080 done
8081 IFS="$ac_save_ifs"
8082else
8083 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8084fi
8085fi
8086
8087LD="$acl_cv_path_LD"
8088if test -n "$LD"; then
8089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8090$as_echo "$LD" >&6; }
8091else
8092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8093$as_echo "no" >&6; }
8094fi
d0ac1c44 8095test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
016a3251
DD
8096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8097$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
d0ac1c44 8098if ${acl_cv_prog_gnu_ld+:} false; then :
016a3251
DD
8099 $as_echo_n "(cached) " >&6
8100else
8101 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8102if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8103 acl_cv_prog_gnu_ld=yes
8104else
8105 acl_cv_prog_gnu_ld=no
8106fi
8107fi
8108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8109$as_echo "$acl_cv_prog_gnu_ld" >&6; }
8110with_gnu_ld=$acl_cv_prog_gnu_ld
8111
8112
8113
8114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8115$as_echo_n "checking for shared library run path origin... " >&6; }
d0ac1c44 8116if ${acl_cv_rpath+:} false; then :
016a3251
DD
8117 $as_echo_n "(cached) " >&6
8118else
8119
8120 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8121 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8122 . ./conftest.sh
8123 rm -f ./conftest.sh
8124 acl_cv_rpath=done
8125
8126fi
8127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8128$as_echo "$acl_cv_rpath" >&6; }
8129 wl="$acl_cv_wl"
8130 libext="$acl_cv_libext"
8131 shlibext="$acl_cv_shlibext"
8132 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8133 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8134 hardcode_direct="$acl_cv_hardcode_direct"
8135 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8136 # Check whether --enable-rpath was given.
8137if test "${enable_rpath+set}" = set; then :
8138 enableval=$enable_rpath; :
8139else
8140 enable_rpath=yes
8141fi
8142
8143
8144
8145
8146
8147
8148
8149
8150 use_additional=yes
8151
8152 acl_save_prefix="$prefix"
8153 prefix="$acl_final_prefix"
8154 acl_save_exec_prefix="$exec_prefix"
8155 exec_prefix="$acl_final_exec_prefix"
8156
8157 eval additional_includedir=\"$includedir\"
8158 eval additional_libdir=\"$libdir\"
8159
8160 exec_prefix="$acl_save_exec_prefix"
8161 prefix="$acl_save_prefix"
77f120bf 8162
6c7a06a3 8163
81ecdfbb
RW
8164# Check whether --with-libiconv-prefix was given.
8165if test "${with_libiconv_prefix+set}" = set; then :
8166 withval=$with_libiconv_prefix;
016a3251
DD
8167 if test "X$withval" = "Xno"; then
8168 use_additional=no
8169 else
8170 if test "X$withval" = "X"; then
8171
8172 acl_save_prefix="$prefix"
8173 prefix="$acl_final_prefix"
8174 acl_save_exec_prefix="$exec_prefix"
8175 exec_prefix="$acl_final_exec_prefix"
8176
8177 eval additional_includedir=\"$includedir\"
8178 eval additional_libdir=\"$libdir\"
8179
8180 exec_prefix="$acl_save_exec_prefix"
8181 prefix="$acl_save_prefix"
8182
8183 else
8184 additional_includedir="$withval/include"
8185 additional_libdir="$withval/lib"
8186 fi
8187 fi
6c7a06a3 8188
81ecdfbb
RW
8189fi
8190
016a3251
DD
8191 LIBICONV=
8192 LTLIBICONV=
8193 INCICONV=
8194 rpathdirs=
8195 ltrpathdirs=
8196 names_already_handled=
8197 names_next_round='iconv '
8198 while test -n "$names_next_round"; do
8199 names_this_round="$names_next_round"
8200 names_next_round=
8201 for name in $names_this_round; do
8202 already_handled=
8203 for n in $names_already_handled; do
8204 if test "$n" = "$name"; then
8205 already_handled=yes
8206 break
8207 fi
8208 done
8209 if test -z "$already_handled"; then
8210 names_already_handled="$names_already_handled $name"
8211 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8212 eval value=\"\$HAVE_LIB$uppername\"
8213 if test -n "$value"; then
8214 if test "$value" = yes; then
8215 eval value=\"\$LIB$uppername\"
8216 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8217 eval value=\"\$LTLIB$uppername\"
8218 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8219 else
8220 :
8221 fi
8222 else
8223 found_dir=
8224 found_la=
8225 found_so=
8226 found_a=
8227 if test $use_additional = yes; then
8228 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8229 found_dir="$additional_libdir"
8230 found_so="$additional_libdir/lib$name.$shlibext"
8231 if test -f "$additional_libdir/lib$name.la"; then
8232 found_la="$additional_libdir/lib$name.la"
8233 fi
8234 else
8235 if test -f "$additional_libdir/lib$name.$libext"; then
8236 found_dir="$additional_libdir"
8237 found_a="$additional_libdir/lib$name.$libext"
8238 if test -f "$additional_libdir/lib$name.la"; then
8239 found_la="$additional_libdir/lib$name.la"
8240 fi
8241 fi
8242 fi
8243 fi
8244 if test "X$found_dir" = "X"; then
8245 for x in $LDFLAGS $LTLIBICONV; do
8246
8247 acl_save_prefix="$prefix"
8248 prefix="$acl_final_prefix"
8249 acl_save_exec_prefix="$exec_prefix"
8250 exec_prefix="$acl_final_exec_prefix"
8251 eval x=\"$x\"
8252 exec_prefix="$acl_save_exec_prefix"
8253 prefix="$acl_save_prefix"
8254
8255 case "$x" in
8256 -L*)
8257 dir=`echo "X$x" | sed -e 's/^X-L//'`
8258 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8259 found_dir="$dir"
8260 found_so="$dir/lib$name.$shlibext"
8261 if test -f "$dir/lib$name.la"; then
8262 found_la="$dir/lib$name.la"
8263 fi
8264 else
8265 if test -f "$dir/lib$name.$libext"; then
8266 found_dir="$dir"
8267 found_a="$dir/lib$name.$libext"
8268 if test -f "$dir/lib$name.la"; then
8269 found_la="$dir/lib$name.la"
8270 fi
8271 fi
8272 fi
8273 ;;
8274 esac
8275 if test "X$found_dir" != "X"; then
8276 break
8277 fi
8278 done
8279 fi
8280 if test "X$found_dir" != "X"; then
8281 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8282 if test "X$found_so" != "X"; then
8283 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8284 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8285 else
8286 haveit=
8287 for x in $ltrpathdirs; do
8288 if test "X$x" = "X$found_dir"; then
8289 haveit=yes
8290 break
8291 fi
8292 done
8293 if test -z "$haveit"; then
8294 ltrpathdirs="$ltrpathdirs $found_dir"
8295 fi
8296 if test "$hardcode_direct" = yes; then
8297 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8298 else
8299 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8300 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8301 haveit=
8302 for x in $rpathdirs; do
8303 if test "X$x" = "X$found_dir"; then
8304 haveit=yes
8305 break
8306 fi
8307 done
8308 if test -z "$haveit"; then
8309 rpathdirs="$rpathdirs $found_dir"
8310 fi
8311 else
8312 haveit=
8313 for x in $LDFLAGS $LIBICONV; do
8314
8315 acl_save_prefix="$prefix"
8316 prefix="$acl_final_prefix"
8317 acl_save_exec_prefix="$exec_prefix"
8318 exec_prefix="$acl_final_exec_prefix"
8319 eval x=\"$x\"
8320 exec_prefix="$acl_save_exec_prefix"
8321 prefix="$acl_save_prefix"
8322
8323 if test "X$x" = "X-L$found_dir"; then
8324 haveit=yes
8325 break
8326 fi
8327 done
8328 if test -z "$haveit"; then
8329 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8330 fi
8331 if test "$hardcode_minus_L" != no; then
8332 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8333 else
8334 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8335 fi
8336 fi
8337 fi
8338 fi
8339 else
8340 if test "X$found_a" != "X"; then
8341 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8342 else
8343 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8344 fi
8345 fi
8346 additional_includedir=
8347 case "$found_dir" in
8348 */lib | */lib/)
8349 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8350 additional_includedir="$basedir/include"
8351 ;;
8352 esac
8353 if test "X$additional_includedir" != "X"; then
8354 if test "X$additional_includedir" != "X/usr/include"; then
8355 haveit=
8356 if test "X$additional_includedir" = "X/usr/local/include"; then
8357 if test -n "$GCC"; then
8358 case $host_os in
8359 linux*) haveit=yes;;
8360 esac
8361 fi
8362 fi
8363 if test -z "$haveit"; then
8364 for x in $CPPFLAGS $INCICONV; do
8365
8366 acl_save_prefix="$prefix"
8367 prefix="$acl_final_prefix"
8368 acl_save_exec_prefix="$exec_prefix"
8369 exec_prefix="$acl_final_exec_prefix"
8370 eval x=\"$x\"
8371 exec_prefix="$acl_save_exec_prefix"
8372 prefix="$acl_save_prefix"
8373
8374 if test "X$x" = "X-I$additional_includedir"; then
8375 haveit=yes
8376 break
8377 fi
8378 done
8379 if test -z "$haveit"; then
8380 if test -d "$additional_includedir"; then
8381 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8382 fi
8383 fi
8384 fi
8385 fi
8386 fi
8387 if test -n "$found_la"; then
8388 save_libdir="$libdir"
8389 case "$found_la" in
8390 */* | *\\*) . "$found_la" ;;
8391 *) . "./$found_la" ;;
8392 esac
8393 libdir="$save_libdir"
8394 for dep in $dependency_libs; do
8395 case "$dep" in
8396 -L*)
8397 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8398 if test "X$additional_libdir" != "X/usr/lib"; then
8399 haveit=
8400 if test "X$additional_libdir" = "X/usr/local/lib"; then
8401 if test -n "$GCC"; then
8402 case $host_os in
8403 linux*) haveit=yes;;
8404 esac
8405 fi
8406 fi
8407 if test -z "$haveit"; then
8408 haveit=
8409 for x in $LDFLAGS $LIBICONV; do
8410
8411 acl_save_prefix="$prefix"
8412 prefix="$acl_final_prefix"
8413 acl_save_exec_prefix="$exec_prefix"
8414 exec_prefix="$acl_final_exec_prefix"
8415 eval x=\"$x\"
8416 exec_prefix="$acl_save_exec_prefix"
8417 prefix="$acl_save_prefix"
8418
8419 if test "X$x" = "X-L$additional_libdir"; then
8420 haveit=yes
8421 break
8422 fi
8423 done
8424 if test -z "$haveit"; then
8425 if test -d "$additional_libdir"; then
8426 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8427 fi
8428 fi
8429 haveit=
8430 for x in $LDFLAGS $LTLIBICONV; do
8431
8432 acl_save_prefix="$prefix"
8433 prefix="$acl_final_prefix"
8434 acl_save_exec_prefix="$exec_prefix"
8435 exec_prefix="$acl_final_exec_prefix"
8436 eval x=\"$x\"
8437 exec_prefix="$acl_save_exec_prefix"
8438 prefix="$acl_save_prefix"
8439
8440 if test "X$x" = "X-L$additional_libdir"; then
8441 haveit=yes
8442 break
8443 fi
8444 done
8445 if test -z "$haveit"; then
8446 if test -d "$additional_libdir"; then
8447 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8448 fi
8449 fi
8450 fi
8451 fi
8452 ;;
8453 -R*)
8454 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8455 if test "$enable_rpath" != no; then
8456 haveit=
8457 for x in $rpathdirs; do
8458 if test "X$x" = "X$dir"; then
8459 haveit=yes
8460 break
8461 fi
8462 done
8463 if test -z "$haveit"; then
8464 rpathdirs="$rpathdirs $dir"
8465 fi
8466 haveit=
8467 for x in $ltrpathdirs; do
8468 if test "X$x" = "X$dir"; then
8469 haveit=yes
8470 break
8471 fi
8472 done
8473 if test -z "$haveit"; then
8474 ltrpathdirs="$ltrpathdirs $dir"
8475 fi
8476 fi
8477 ;;
8478 -l*)
8479 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8480 ;;
8481 *.la)
8482 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8483 ;;
8484 *)
8485 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8486 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8487 ;;
8488 esac
8489 done
8490 fi
8491 else
8492 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8493 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8494 fi
8495 fi
8496 fi
8497 done
8498 done
8499 if test "X$rpathdirs" != "X"; then
8500 if test -n "$hardcode_libdir_separator"; then
8501 alldirs=
8502 for found_dir in $rpathdirs; do
8503 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8504 done
8505 acl_save_libdir="$libdir"
8506 libdir="$alldirs"
8507 eval flag=\"$hardcode_libdir_flag_spec\"
8508 libdir="$acl_save_libdir"
8509 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8510 else
8511 for found_dir in $rpathdirs; do
8512 acl_save_libdir="$libdir"
8513 libdir="$found_dir"
8514 eval flag=\"$hardcode_libdir_flag_spec\"
8515 libdir="$acl_save_libdir"
8516 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8517 done
8518 fi
8519 fi
8520 if test "X$ltrpathdirs" != "X"; then
8521 for found_dir in $ltrpathdirs; do
8522 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8523 done
8524 fi
8525
8526
8527
8528
8529
6c7a06a3 8530
6c7a06a3 8531
81ecdfbb
RW
8532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8533$as_echo_n "checking for iconv... " >&6; }
d0ac1c44 8534if ${am_cv_func_iconv+:} false; then :
81ecdfbb 8535 $as_echo_n "(cached) " >&6
d542061a 8536else
6c7a06a3
TT
8537
8538 am_cv_func_iconv="no, consider installing GNU libiconv"
8539 am_cv_lib_iconv=no
016a3251
DD
8540 am_save_CPPFLAGS="$CPPFLAGS"
8541 CPPFLAGS="$CPPFLAGS $INCICONV"
8542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8543/* end confdefs.h. */
6c7a06a3
TT
8544#include <stdlib.h>
8545#include <iconv.h>
d542061a
UW
8546int
8547main ()
8548{
6c7a06a3 8549iconv_t cd = iconv_open("","");
016a3251
DD
8550 iconv(cd,NULL,NULL,NULL,NULL);
8551 iconv_close(cd);
d542061a
UW
8552 ;
8553 return 0;
8554}
8555_ACEOF
81ecdfbb 8556if ac_fn_c_try_link "$LINENO"; then :
016a3251 8557 am_cv_func_iconv=yes
d542061a 8558fi
81ecdfbb
RW
8559rm -f core conftest.err conftest.$ac_objext \
8560 conftest$ac_exeext conftest.$ac_ext
016a3251 8561 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 8562
016a3251
DD
8563 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8564 for _libs in .libs _libs; do
8565 am_save_CPPFLAGS="$CPPFLAGS"
8566 am_save_LIBS="$LIBS"
8567 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8568 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8570/* end confdefs.h. */
6c7a06a3
TT
8571#include <stdlib.h>
8572#include <iconv.h>
d542061a
UW
8573int
8574main ()
8575{
6c7a06a3 8576iconv_t cd = iconv_open("","");
016a3251
DD
8577 iconv(cd,NULL,NULL,NULL,NULL);
8578 iconv_close(cd);
d542061a
UW
8579 ;
8580 return 0;
8581}
8582_ACEOF
81ecdfbb 8583if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
8584 INCICONV="-I../libiconv/include"
8585 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8586 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8587 am_cv_lib_iconv=yes
8588 am_cv_func_iconv=yes
d542061a 8589fi
81ecdfbb
RW
8590rm -f core conftest.err conftest.$ac_objext \
8591 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
8592 CPPFLAGS="$am_save_CPPFLAGS"
8593 LIBS="$am_save_LIBS"
8594 if test "$am_cv_func_iconv" = "yes"; then
8595 break
8596 fi
8597 done
77f120bf 8598 fi
94ae1714 8599
4edb1e84 8600 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 8601 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 8602 am_save_LIBS="$LIBS"
5d762de0 8603 CPPFLAGS="$CPPFLAGS $INCICONV"
016a3251 8604 LIBS="$LIBS $LIBICONV"
81ecdfbb 8605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8606/* end confdefs.h. */
6c7a06a3
TT
8607#include <stdlib.h>
8608#include <iconv.h>
bec39cab
AC
8609int
8610main ()
8611{
6c7a06a3
TT
8612iconv_t cd = iconv_open("","");
8613 iconv(cd,NULL,NULL,NULL,NULL);
8614 iconv_close(cd);
bec39cab
AC
8615 ;
8616 return 0;
8617}
8618_ACEOF
81ecdfbb 8619if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8620 am_cv_lib_iconv=yes
6c7a06a3 8621 am_cv_func_iconv=yes
627af7ea 8622fi
81ecdfbb
RW
8623rm -f core conftest.err conftest.$ac_objext \
8624 conftest$ac_exeext conftest.$ac_ext
fc3b640d 8625 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 8626 LIBS="$am_save_LIBS"
6c7a06a3
TT
8627 fi
8628
8629fi
81ecdfbb
RW
8630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8631$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
8632 if test "$am_cv_func_iconv" = yes; then
8633
8634$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 8635
016a3251 8636 fi
fc3b640d 8637 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
8638
8639 for element in $INCICONV; do
8640 haveit=
8641 for x in $CPPFLAGS; do
8642
8643 acl_save_prefix="$prefix"
8644 prefix="$acl_final_prefix"
8645 acl_save_exec_prefix="$exec_prefix"
8646 exec_prefix="$acl_final_exec_prefix"
8647 eval x=\"$x\"
8648 exec_prefix="$acl_save_exec_prefix"
8649 prefix="$acl_save_prefix"
8650
8651 if test "X$x" = "X$element"; then
8652 haveit=yes
8653 break
8654 fi
8655 done
8656 if test -z "$haveit"; then
8657 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8658 fi
8659 done
8660
8661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8662$as_echo_n "checking how to link with libiconv... " >&6; }
8663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8664$as_echo "$LIBICONV" >&6; }
94ae1714 8665 else
016a3251
DD
8666 LIBICONV=
8667 LTLIBICONV=
fc3b640d 8668 fi
94ae1714 8669
6c7a06a3 8670
6c7a06a3 8671
016a3251 8672 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
8673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8674$as_echo_n "checking for iconv declaration... " >&6; }
d0ac1c44 8675 if ${am_cv_proto_iconv+:} false; then :
81ecdfbb 8676 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8677else
8678
81ecdfbb 8679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8680/* end confdefs.h. */
8681
6c7a06a3
TT
8682#include <stdlib.h>
8683#include <iconv.h>
8684extern
b4e70030 8685#ifdef __cplusplus
6c7a06a3 8686"C"
b4e70030 8687#endif
6c7a06a3
TT
8688#if defined(__STDC__) || defined(__cplusplus)
8689size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8690#else
8691size_t iconv();
8692#endif
8693
b4e70030
JB
8694int
8695main ()
8696{
6c7a06a3 8697
b4e70030
JB
8698 ;
8699 return 0;
8700}
8701_ACEOF
81ecdfbb 8702if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 8703 am_cv_proto_iconv_arg1=""
4e8d927d 8704else
81ecdfbb 8705 am_cv_proto_iconv_arg1="const"
b4e70030 8706fi
81ecdfbb 8707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
8708 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);"
8709fi
8710
8711 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 8712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 8713 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
8714$as_echo "${ac_t:-
8715 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
8716
8717cat >>confdefs.h <<_ACEOF
8718#define ICONV_CONST $am_cv_proto_iconv_arg1
8719_ACEOF
8720
8721 fi
6c7a06a3
TT
8722
8723
478aac75
DE
8724# GDB may fork/exec the iconv program to get the list of supported character
8725# sets. Allow the user to specify where to find it.
8726# There are several factors affecting the choice of option name:
8727# - There is already --with-libiconv-prefix but we can't use it, it specifies
8728# the build-time location of libiconv files.
8729# - The program we need to find is iconv, which comes with glibc. The user
8730# doesn't necessarily have libiconv installed. Therefore naming this
8731# --with-libiconv-foo feels wrong.
8732# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8733# defined to work on directories not files (though it really doesn't know
8734# the difference).
8735# - Calling this --with-iconv-prefix is perceived to cause too much confusion
8736# with --with-libiconv-prefix.
8737# Putting these together is why the option name is --with-iconv-bin.
8738
8739
8740# Check whether --with-iconv-bin was given.
8741if test "${with_iconv_bin+set}" = set; then :
8742 withval=$with_iconv_bin; iconv_bin="${withval}"
8743
8744cat >>confdefs.h <<_ACEOF
8745#define ICONV_BIN "${iconv_bin}"
8746_ACEOF
8747
8748
8749 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8750 if test "x$prefix" = xNONE; then
8751 test_prefix=/usr/local
8752 else
8753 test_prefix=$prefix
8754 fi
8755 else
8756 test_prefix=$exec_prefix
8757 fi
8758 value=0
8759 case ${iconv_bin} in
8760 "${test_prefix}"|"${test_prefix}/"*|\
8761 '${exec_prefix}'|'${exec_prefix}/'*)
8762 value=1
8763 ;;
8764 esac
8765
8766cat >>confdefs.h <<_ACEOF
8767#define ICONV_BIN_RELOCATABLE $value
8768_ACEOF
8769
8770
8771
8772fi
8773
8774
cb01cfba 8775# For the TUI, we need enhanced curses functionality.
bd8a8e1b 8776if test x"$enable_tui" != xno; then
cb01cfba
JB
8777 prefer_curses=yes
8778fi
8779
8780curses_found=no
8781if test x"$prefer_curses" = xyes; then
8782 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8783 # curses library because the latter might not provide all the
8784 # functionality we need. However, this leads to problems on systems
8785 # where the linker searches /usr/local/lib, but the compiler doesn't
8786 # search /usr/local/include, if ncurses is installed in /usr/local. A
8787 # default installation of ncurses on alpha*-dec-osf* will lead to such
8788 # a situation.
81ecdfbb
RW
8789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8790$as_echo_n "checking for library containing waddstr... " >&6; }
d0ac1c44 8791if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8792 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8793else
8794 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8796/* end confdefs.h. */
8797
81ecdfbb
RW
8798/* Override any GCC internal prototype to avoid an error.
8799 Use char because int might match the return type of a GCC
8800 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8801#ifdef __cplusplus
8802extern "C"
8803#endif
6c7a06a3
TT
8804char waddstr ();
8805int
8806main ()
8807{
81ecdfbb 8808return waddstr ();
6c7a06a3
TT
8809 ;
8810 return 0;
8811}
8812_ACEOF
5007d765 8813for ac_lib in '' ncursesw ncurses cursesX curses; do
81ecdfbb
RW
8814 if test -z "$ac_lib"; then
8815 ac_res="none required"
8816 else
8817 ac_res=-l$ac_lib
8818 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8819 fi
8820 if ac_fn_c_try_link "$LINENO"; then :
8821 ac_cv_search_waddstr=$ac_res
8822fi
8823rm -f core conftest.err conftest.$ac_objext \
8824 conftest$ac_exeext
d0ac1c44 8825 if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb
RW
8826 break
8827fi
8828done
d0ac1c44 8829if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8830
6c7a06a3 8831else
81ecdfbb
RW
8832 ac_cv_search_waddstr=no
8833fi
8834rm conftest.$ac_ext
8835LIBS=$ac_func_search_save_LIBS
8836fi
8837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8838$as_echo "$ac_cv_search_waddstr" >&6; }
8839ac_res=$ac_cv_search_waddstr
8840if test "$ac_res" != no; then :
8841 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
8842
8843fi
8844
8845
cb01cfba
JB
8846 if test "$ac_cv_search_waddstr" != no; then
8847 curses_found=yes
8848 fi
8849fi
8850
8851# Check whether we should enable the TUI, but only do so if we really
8852# can.
8853if test x"$enable_tui" != xno; then
8854 if test -d $srcdir/tui; then
8855 if test "$curses_found" != no; then
6c7a06a3
TT
8856 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8857 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8858 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8859 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
8860 else
8861 if test x"$enable_tui" = xyes; then
d0ac1c44 8862 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 8863 else
81ecdfbb
RW
8864 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8865$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
8866 fi
8867 fi
8868 fi
8869fi
8870
8871# Since GDB uses Readline, we need termcap functionality. In many
8872# cases this will be provided by the curses library, but some systems
96fe4562 8873# have a separate termcap library, or no curses library at all.
6c7a06a3
TT
8874
8875case $host_os in
8876 cygwin*)
8877 if test -d $srcdir/libtermcap; then
8878 LIBS="../libtermcap/libtermcap.a $LIBS"
8879 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8880 fi ;;
8881 go32* | *djgpp*)
8882 ac_cv_search_tgetent="none required"
8883 ;;
6c7a06a3
TT
8884esac
8885
8886# These are the libraries checked by Readline.
81ecdfbb
RW
8887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8888$as_echo_n "checking for library containing tgetent... " >&6; }
d0ac1c44 8889if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb 8890 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8891else
8892 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8894/* end confdefs.h. */
8895
81ecdfbb
RW
8896/* Override any GCC internal prototype to avoid an error.
8897 Use char because int might match the return type of a GCC
8898 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8899#ifdef __cplusplus
8900extern "C"
8901#endif
6c7a06a3
TT
8902char tgetent ();
8903int
8904main ()
8905{
81ecdfbb 8906return tgetent ();
6c7a06a3
TT
8907 ;
8908 return 0;
8909}
8910_ACEOF
2578ecb1 8911for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
81ecdfbb
RW
8912 if test -z "$ac_lib"; then
8913 ac_res="none required"
8914 else
8915 ac_res=-l$ac_lib
6c7a06a3 8916 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8917 fi
8918 if ac_fn_c_try_link "$LINENO"; then :
8919 ac_cv_search_tgetent=$ac_res
8920fi
8921rm -f core conftest.err conftest.$ac_objext \
8922 conftest$ac_exeext
d0ac1c44 8923 if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb
RW
8924 break
8925fi
8926done
d0ac1c44 8927if ${ac_cv_search_tgetent+:} false; then :
6c7a06a3 8928
6c7a06a3 8929else
81ecdfbb 8930 ac_cv_search_tgetent=no
6c7a06a3 8931fi
81ecdfbb 8932rm conftest.$ac_ext
6c7a06a3
TT
8933LIBS=$ac_func_search_save_LIBS
8934fi
81ecdfbb
RW
8935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8936$as_echo "$ac_cv_search_tgetent" >&6; }
8937ac_res=$ac_cv_search_tgetent
8938if test "$ac_res" != no; then :
8939 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 8940
06825bd1
MK
8941fi
8942
06825bd1 8943
bec39cab 8944if test "$ac_cv_search_tgetent" = no; then
7a85168d 8945 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
8946fi
8947
3841debe 8948
81ecdfbb
RW
8949# Check whether --with-system-readline was given.
8950if test "${with_system_readline+set}" = set; then :
8951 withval=$with_system_readline;
8952fi
6a30b0a5 8953
6a30b0a5
AS
8954
8955if test "$with_system_readline" = yes; then
86c6b807
TT
8956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
8957$as_echo_n "checking whether system readline is new enough... " >&6; }
8958if ${gdb_cv_readline_ok+:} false; then :
8959 $as_echo_n "(cached) " >&6
8960else
8961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8962/* end confdefs.h. */
8963#include <stdio.h>
8964#include <readline/readline.h>
8965int
8966main ()
8967{
8968#if RL_VERSION_MAJOR < 7
8969# error "readline version 7 required"
8970#endif
8971 ;
8972 return 0;
8973}
8974_ACEOF
8975if ac_fn_c_try_compile "$LINENO"; then :
8976 gdb_cv_readline_ok=yes
8977else
8978 gdb_cv_readline_ok=no
8979fi
8980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8981fi
8982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
8983$as_echo "$gdb_cv_readline_ok" >&6; }
8984 if test "$gdb_cv_readline_ok" != yes; then
8985 as_fn_error $? "system readline is not new enough" "$LINENO" 5
8986 fi
8987
6a30b0a5
AS
8988 READLINE=-lreadline
8989 READLINE_DEPS=
8990 READLINE_CFLAGS=
39037522 8991 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
8992else
8993 READLINE='$(READLINE_DIR)/libreadline.a'
8994 READLINE_DEPS='$(READLINE)'
8995 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 8996 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
8997fi
8998
8999
9000
9001
9002
f997c383
SD
9003# Generate jit-reader.h
9004
9005# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9006TARGET_PTR=
9007
9008# The cast to long int works around a bug in the HP C Compiler
9009# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9010# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9011# This bug is HP SR number 8606223364.
9012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9013$as_echo_n "checking size of unsigned long long... " >&6; }
d0ac1c44 9014if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
f997c383
SD
9015 $as_echo_n "(cached) " >&6
9016else
9017 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9018
9019else
9020 if test "$ac_cv_type_unsigned_long_long" = yes; then
9021 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9022$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9023as_fn_error 77 "cannot compute sizeof (unsigned long long)
9024See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9025 else
9026 ac_cv_sizeof_unsigned_long_long=0
9027 fi
9028fi
9029
9030fi
9031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9032$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9033
9034
9035
9036cat >>confdefs.h <<_ACEOF
9037#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9038_ACEOF
9039
9040
9041# The cast to long int works around a bug in the HP C Compiler
9042# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9043# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9044# This bug is HP SR number 8606223364.
9045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9046$as_echo_n "checking size of unsigned long... " >&6; }
d0ac1c44 9047if ${ac_cv_sizeof_unsigned_long+:} false; then :
f997c383
SD
9048 $as_echo_n "(cached) " >&6
9049else
9050 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9051
9052else
9053 if test "$ac_cv_type_unsigned_long" = yes; then
9054 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9055$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9056as_fn_error 77 "cannot compute sizeof (unsigned long)
9057See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9058 else
9059 ac_cv_sizeof_unsigned_long=0
9060 fi
9061fi
9062
9063fi
9064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9065$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9066
9067
9068
9069cat >>confdefs.h <<_ACEOF
9070#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9071_ACEOF
9072
9073
9074# The cast to long int works around a bug in the HP C Compiler
9075# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9076# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9077# This bug is HP SR number 8606223364.
9078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9079$as_echo_n "checking size of unsigned __int128... " >&6; }
d0ac1c44 9080if ${ac_cv_sizeof_unsigned___int128+:} false; then :
f997c383
SD
9081 $as_echo_n "(cached) " >&6
9082else
9083 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9084
9085else
9086 if test "$ac_cv_type_unsigned___int128" = yes; then
9087 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9088$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9089as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9090See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9091 else
9092 ac_cv_sizeof_unsigned___int128=0
9093 fi
9094fi
9095
9096fi
9097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9098$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9099
9100
9101
9102cat >>confdefs.h <<_ACEOF
9103#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9104_ACEOF
9105
9106
9107
9108if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9109 TARGET_PTR="unsigned long"
9110elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9111 TARGET_PTR="unsigned long long"
9112elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9113 TARGET_PTR="unsigned __int128"
9114else
9115 TARGET_PTR="unsigned long"
9116fi
9117
9118
9119ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9120
9121
a2d08b9e
SD
9122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9123$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 9124if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9125 $as_echo_n "(cached) " >&6
9126else
9127 ac_func_search_save_LIBS=$LIBS
9128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9129/* end confdefs.h. */
9130
9131/* Override any GCC internal prototype to avoid an error.
9132 Use char because int might match the return type of a GCC
9133 builtin and then its argument prototype would still apply. */
9134#ifdef __cplusplus
9135extern "C"
9136#endif
9137char dlopen ();
9138int
9139main ()
9140{
9141return dlopen ();
9142 ;
9143 return 0;
9144}
9145_ACEOF
9146for ac_lib in '' dl; do
9147 if test -z "$ac_lib"; then
9148 ac_res="none required"
9149 else
9150 ac_res=-l$ac_lib
9151 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9152 fi
9153 if ac_fn_c_try_link "$LINENO"; then :
9154 ac_cv_search_dlopen=$ac_res
9155fi
9156rm -f core conftest.err conftest.$ac_objext \
9157 conftest$ac_exeext
d0ac1c44 9158 if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9159 break
9160fi
9161done
d0ac1c44 9162if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9163
9164else
9165 ac_cv_search_dlopen=no
9166fi
9167rm conftest.$ac_ext
9168LIBS=$ac_func_search_save_LIBS
9169fi
9170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9171$as_echo "$ac_cv_search_dlopen" >&6; }
9172ac_res=$ac_cv_search_dlopen
9173if test "$ac_res" != no; then :
9174 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9175
9176fi
9177
9178
39037522 9179
b8e0a31c
SD
9180
9181# Check whether --with-jit-reader-dir was given.
9182if test "${with_jit_reader_dir+set}" = set; then :
9183 withval=$with_jit_reader_dir;
9184 JIT_READER_DIR=$withval
9185else
9186 JIT_READER_DIR=${libdir}/gdb
9187fi
9188
9189
9190 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9191 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9192 ac_define_dir=`eval echo $JIT_READER_DIR`
9193 ac_define_dir=`eval echo $ac_define_dir`
9194
9195cat >>confdefs.h <<_ACEOF
9196#define JIT_READER_DIR "$ac_define_dir"
9197_ACEOF
9198
9199
9200
9201
9202 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9203 if test "x$prefix" = xNONE; then
9204 test_prefix=/usr/local
9205 else
9206 test_prefix=$prefix
9207 fi
9208 else
9209 test_prefix=$exec_prefix
9210 fi
9211 value=0
9212 case ${ac_define_dir} in
9213 "${test_prefix}"|"${test_prefix}/"*|\
9214 '${exec_prefix}'|'${exec_prefix}/'*)
9215 value=1
9216 ;;
9217 esac
9218
9219cat >>confdefs.h <<_ACEOF
9220#define JIT_READER_DIR_RELOCATABLE $value
9221_ACEOF
9222
9223
9224
9225
9226
81ecdfbb
RW
9227# Check whether --with-expat was given.
9228if test "${with_expat+set}" = set; then :
9229 withval=$with_expat;
5c39566f
DJ
9230else
9231 with_expat=auto
81ecdfbb
RW
9232fi
9233
9234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9235$as_echo_n "checking whether to use expat... " >&6; }
9236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9237$as_echo "$with_expat" >&6; }
5c39566f
DJ
9238
9239if test "${with_expat}" = no; then
81ecdfbb
RW
9240 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9241$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9242 HAVE_LIBEXPAT=no
9243else
9244
3841debe
DJ
9245
9246
9247
9248
9249
9250
9251
9252 use_additional=yes
9253
9254 acl_save_prefix="$prefix"
9255 prefix="$acl_final_prefix"
9256 acl_save_exec_prefix="$exec_prefix"
9257 exec_prefix="$acl_final_exec_prefix"
9258
9259 eval additional_includedir=\"$includedir\"
9260 eval additional_libdir=\"$libdir\"
9261
9262 exec_prefix="$acl_save_exec_prefix"
9263 prefix="$acl_save_prefix"
9264
9265
81ecdfbb
RW
9266# Check whether --with-libexpat-prefix was given.
9267if test "${with_libexpat_prefix+set}" = set; then :
9268 withval=$with_libexpat_prefix;
3841debe
DJ
9269 if test "X$withval" = "Xno"; then
9270 use_additional=no
9271 else
9272 if test "X$withval" = "X"; then
9273
9274 acl_save_prefix="$prefix"
9275 prefix="$acl_final_prefix"
9276 acl_save_exec_prefix="$exec_prefix"
9277 exec_prefix="$acl_final_exec_prefix"
9278
9279 eval additional_includedir=\"$includedir\"
9280 eval additional_libdir=\"$libdir\"
9281
9282 exec_prefix="$acl_save_exec_prefix"
9283 prefix="$acl_save_prefix"
9284
9285 else
9286 additional_includedir="$withval/include"
9287 additional_libdir="$withval/lib"
9288 fi
9289 fi
9290
81ecdfbb
RW
9291fi
9292
3841debe
DJ
9293 LIBEXPAT=
9294 LTLIBEXPAT=
9295 INCEXPAT=
9296 rpathdirs=
9297 ltrpathdirs=
9298 names_already_handled=
9299 names_next_round='expat '
9300 while test -n "$names_next_round"; do
9301 names_this_round="$names_next_round"
9302 names_next_round=
9303 for name in $names_this_round; do
9304 already_handled=
9305 for n in $names_already_handled; do
9306 if test "$n" = "$name"; then
9307 already_handled=yes
9308 break
9309 fi
9310 done
9311 if test -z "$already_handled"; then
9312 names_already_handled="$names_already_handled $name"
9313 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9314 eval value=\"\$HAVE_LIB$uppername\"
9315 if test -n "$value"; then
9316 if test "$value" = yes; then
9317 eval value=\"\$LIB$uppername\"
9318 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9319 eval value=\"\$LTLIB$uppername\"
9320 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9321 else
9322 :
9323 fi
9324 else
9325 found_dir=
9326 found_la=
9327 found_so=
9328 found_a=
9329 if test $use_additional = yes; then
9330 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9331 found_dir="$additional_libdir"
9332 found_so="$additional_libdir/lib$name.$shlibext"
9333 if test -f "$additional_libdir/lib$name.la"; then
9334 found_la="$additional_libdir/lib$name.la"
9335 fi
9336 else
9337 if test -f "$additional_libdir/lib$name.$libext"; then
9338 found_dir="$additional_libdir"
9339 found_a="$additional_libdir/lib$name.$libext"
9340 if test -f "$additional_libdir/lib$name.la"; then
9341 found_la="$additional_libdir/lib$name.la"
9342 fi
9343 fi
9344 fi
9345 fi
9346 if test "X$found_dir" = "X"; then
9347 for x in $LDFLAGS $LTLIBEXPAT; do
9348
9349 acl_save_prefix="$prefix"
9350 prefix="$acl_final_prefix"
9351 acl_save_exec_prefix="$exec_prefix"
9352 exec_prefix="$acl_final_exec_prefix"
9353 eval x=\"$x\"
9354 exec_prefix="$acl_save_exec_prefix"
9355 prefix="$acl_save_prefix"
9356
9357 case "$x" in
9358 -L*)
9359 dir=`echo "X$x" | sed -e 's/^X-L//'`
9360 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9361 found_dir="$dir"
9362 found_so="$dir/lib$name.$shlibext"
9363 if test -f "$dir/lib$name.la"; then
9364 found_la="$dir/lib$name.la"
9365 fi
9366 else
9367 if test -f "$dir/lib$name.$libext"; then
9368 found_dir="$dir"
9369 found_a="$dir/lib$name.$libext"
9370 if test -f "$dir/lib$name.la"; then
9371 found_la="$dir/lib$name.la"
9372 fi
9373 fi
9374 fi
9375 ;;
9376 esac
9377 if test "X$found_dir" != "X"; then
9378 break
9379 fi
9380 done
9381 fi
9382 if test "X$found_dir" != "X"; then
9383 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9384 if test "X$found_so" != "X"; then
9385 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9386 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9387 else
9388 haveit=
9389 for x in $ltrpathdirs; do
9390 if test "X$x" = "X$found_dir"; then
9391 haveit=yes
9392 break
9393 fi
9394 done
9395 if test -z "$haveit"; then
9396 ltrpathdirs="$ltrpathdirs $found_dir"
9397 fi
9398 if test "$hardcode_direct" = yes; then
9399 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9400 else
9401 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9402 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9403 haveit=
9404 for x in $rpathdirs; do
9405 if test "X$x" = "X$found_dir"; then
9406 haveit=yes
9407 break
9408 fi
9409 done
9410 if test -z "$haveit"; then
9411 rpathdirs="$rpathdirs $found_dir"
9412 fi
9413 else
9414 haveit=
9415 for x in $LDFLAGS $LIBEXPAT; do
9416
9417 acl_save_prefix="$prefix"
9418 prefix="$acl_final_prefix"
9419 acl_save_exec_prefix="$exec_prefix"
9420 exec_prefix="$acl_final_exec_prefix"
9421 eval x=\"$x\"
9422 exec_prefix="$acl_save_exec_prefix"
9423 prefix="$acl_save_prefix"
9424
9425 if test "X$x" = "X-L$found_dir"; then
9426 haveit=yes
9427 break
9428 fi
9429 done
9430 if test -z "$haveit"; then
9431 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9432 fi
9433 if test "$hardcode_minus_L" != no; then
9434 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9435 else
9436 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9437 fi
9438 fi
9439 fi
9440 fi
9441 else
9442 if test "X$found_a" != "X"; then
9443 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9444 else
9445 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9446 fi
9447 fi
9448 additional_includedir=
9449 case "$found_dir" in
9450 */lib | */lib/)
9451 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9452 additional_includedir="$basedir/include"
9453 ;;
9454 esac
9455 if test "X$additional_includedir" != "X"; then
9456 if test "X$additional_includedir" != "X/usr/include"; then
9457 haveit=
9458 if test "X$additional_includedir" = "X/usr/local/include"; then
9459 if test -n "$GCC"; then
9460 case $host_os in
9461 linux*) haveit=yes;;
9462 esac
9463 fi
9464 fi
9465 if test -z "$haveit"; then
9466 for x in $CPPFLAGS $INCEXPAT; do
9467
9468 acl_save_prefix="$prefix"
9469 prefix="$acl_final_prefix"
9470 acl_save_exec_prefix="$exec_prefix"
9471 exec_prefix="$acl_final_exec_prefix"
9472 eval x=\"$x\"
9473 exec_prefix="$acl_save_exec_prefix"
9474 prefix="$acl_save_prefix"
9475
9476 if test "X$x" = "X-I$additional_includedir"; then
9477 haveit=yes
9478 break
9479 fi
9480 done
9481 if test -z "$haveit"; then
9482 if test -d "$additional_includedir"; then
9483 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9484 fi
9485 fi
9486 fi
9487 fi
9488 fi
9489 if test -n "$found_la"; then
9490 save_libdir="$libdir"
9491 case "$found_la" in
9492 */* | *\\*) . "$found_la" ;;
9493 *) . "./$found_la" ;;
9494 esac
9495 libdir="$save_libdir"
9496 for dep in $dependency_libs; do
9497 case "$dep" in
9498 -L*)
9499 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9500 if test "X$additional_libdir" != "X/usr/lib"; then
9501 haveit=
9502 if test "X$additional_libdir" = "X/usr/local/lib"; then
9503 if test -n "$GCC"; then
9504 case $host_os in
9505 linux*) haveit=yes;;
9506 esac
9507 fi
9508 fi
9509 if test -z "$haveit"; then
9510 haveit=
9511 for x in $LDFLAGS $LIBEXPAT; do
9512
9513 acl_save_prefix="$prefix"
9514 prefix="$acl_final_prefix"
9515 acl_save_exec_prefix="$exec_prefix"
9516 exec_prefix="$acl_final_exec_prefix"
9517 eval x=\"$x\"
9518 exec_prefix="$acl_save_exec_prefix"
9519 prefix="$acl_save_prefix"
9520
9521 if test "X$x" = "X-L$additional_libdir"; then
9522 haveit=yes
9523 break
9524 fi
9525 done
9526 if test -z "$haveit"; then
9527 if test -d "$additional_libdir"; then
9528 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9529 fi
9530 fi
9531 haveit=
9532 for x in $LDFLAGS $LTLIBEXPAT; do
9533
9534 acl_save_prefix="$prefix"
9535 prefix="$acl_final_prefix"
9536 acl_save_exec_prefix="$exec_prefix"
9537 exec_prefix="$acl_final_exec_prefix"
9538 eval x=\"$x\"
9539 exec_prefix="$acl_save_exec_prefix"
9540 prefix="$acl_save_prefix"
9541
9542 if test "X$x" = "X-L$additional_libdir"; then
9543 haveit=yes
9544 break
9545 fi
9546 done
9547 if test -z "$haveit"; then
9548 if test -d "$additional_libdir"; then
9549 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9550 fi
9551 fi
9552 fi
9553 fi
9554 ;;
9555 -R*)
9556 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9557 if test "$enable_rpath" != no; then
9558 haveit=
9559 for x in $rpathdirs; do
9560 if test "X$x" = "X$dir"; then
9561 haveit=yes
9562 break
9563 fi
9564 done
9565 if test -z "$haveit"; then
9566 rpathdirs="$rpathdirs $dir"
9567 fi
9568 haveit=
9569 for x in $ltrpathdirs; do
9570 if test "X$x" = "X$dir"; then
9571 haveit=yes
9572 break
9573 fi
9574 done
9575 if test -z "$haveit"; then
9576 ltrpathdirs="$ltrpathdirs $dir"
9577 fi
9578 fi
9579 ;;
9580 -l*)
9581 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9582 ;;
9583 *.la)
9584 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9585 ;;
9586 *)
9587 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9588 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9589 ;;
81ecdfbb
RW
9590 esac
9591 done
9592 fi
9593 else
9594 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9595 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9596 fi
9597 fi
9598 fi
9599 done
9600 done
9601 if test "X$rpathdirs" != "X"; then
9602 if test -n "$hardcode_libdir_separator"; then
9603 alldirs=
9604 for found_dir in $rpathdirs; do
9605 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9606 done
9607 acl_save_libdir="$libdir"
9608 libdir="$alldirs"
9609 eval flag=\"$hardcode_libdir_flag_spec\"
9610 libdir="$acl_save_libdir"
9611 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9612 else
9613 for found_dir in $rpathdirs; do
9614 acl_save_libdir="$libdir"
9615 libdir="$found_dir"
9616 eval flag=\"$hardcode_libdir_flag_spec\"
9617 libdir="$acl_save_libdir"
9618 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9619 done
9620 fi
9621 fi
9622 if test "X$ltrpathdirs" != "X"; then
9623 for found_dir in $ltrpathdirs; do
9624 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9625 done
9626 fi
a9322a30
TT
9627
9628
81ecdfbb 9629 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 9630
81ecdfbb
RW
9631 for element in $INCEXPAT; do
9632 haveit=
9633 for x in $CPPFLAGS; do
a9322a30 9634
81ecdfbb
RW
9635 acl_save_prefix="$prefix"
9636 prefix="$acl_final_prefix"
9637 acl_save_exec_prefix="$exec_prefix"
9638 exec_prefix="$acl_final_exec_prefix"
9639 eval x=\"$x\"
9640 exec_prefix="$acl_save_exec_prefix"
9641 prefix="$acl_save_prefix"
a8111142 9642
81ecdfbb
RW
9643 if test "X$x" = "X$element"; then
9644 haveit=yes
9645 break
9646 fi
9647 done
9648 if test -z "$haveit"; then
9649 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9650 fi
9651 done
a9322a30
TT
9652
9653
81ecdfbb
RW
9654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9655$as_echo_n "checking for libexpat... " >&6; }
d0ac1c44 9656if ${ac_cv_libexpat+:} false; then :
81ecdfbb 9657 $as_echo_n "(cached) " >&6
bec39cab 9658else
bec39cab 9659
81ecdfbb
RW
9660 ac_save_LIBS="$LIBS"
9661 LIBS="$LIBS $LIBEXPAT"
9662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9663/* end confdefs.h. */
81ecdfbb
RW
9664#include "expat.h"
9665int
9666main ()
9667{
9668XML_Parser p = XML_ParserCreate (0);
9669 ;
9670 return 0;
9671}
bec39cab 9672_ACEOF
81ecdfbb
RW
9673if ac_fn_c_try_link "$LINENO"; then :
9674 ac_cv_libexpat=yes
c906108c 9675else
81ecdfbb 9676 ac_cv_libexpat=no
bec39cab 9677fi
81ecdfbb
RW
9678rm -f core conftest.err conftest.$ac_objext \
9679 conftest$ac_exeext conftest.$ac_ext
9680 LIBS="$ac_save_LIBS"
c906108c 9681
95ca63c4 9682fi
81ecdfbb
RW
9683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9684$as_echo "$ac_cv_libexpat" >&6; }
9685 if test "$ac_cv_libexpat" = yes; then
9686 HAVE_LIBEXPAT=yes
bec39cab 9687
81ecdfbb 9688$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 9689
81ecdfbb
RW
9690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9691$as_echo_n "checking how to link with libexpat... " >&6; }
9692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9693$as_echo "$LIBEXPAT" >&6; }
9694 else
9695 HAVE_LIBEXPAT=no
9696 CPPFLAGS="$ac_save_CPPFLAGS"
9697 LIBEXPAT=
9698 LTLIBEXPAT=
9699 fi
95ca63c4
CF
9700
9701
9702
7cb9022a
MK
9703
9704
bec39cab 9705
81ecdfbb
RW
9706 if test "$HAVE_LIBEXPAT" != yes; then
9707 if test "$with_expat" = yes; then
d0ac1c44 9708 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
81ecdfbb
RW
9709 else
9710 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9711$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9712 fi
9713 else
9714 save_LIBS=$LIBS
9715 LIBS="$LIBS $LIBEXPAT"
9716 for ac_func in XML_StopParser
9717do :
9718 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
d0ac1c44 9719if test "x$ac_cv_func_XML_StopParser" = xyes; then :
bec39cab 9720 cat >>confdefs.h <<_ACEOF
81ecdfbb 9721#define HAVE_XML_STOPPARSER 1
bec39cab 9722_ACEOF
95ca63c4 9723
bec39cab 9724fi
bec39cab 9725done
95ca63c4 9726
81ecdfbb
RW
9727 LIBS=$save_LIBS
9728 fi
a9322a30
TT
9729fi
9730
2400729e
UW
9731
9732# Check whether --with-mpfr was given.
9733if test "${with_mpfr+set}" = set; then :
9734 withval=$with_mpfr;
9735else
9736 with_mpfr=auto
9737fi
9738
9739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
9740$as_echo_n "checking whether to use MPFR... " >&6; }
9741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
9742$as_echo "$with_mpfr" >&6; }
9743
9744if test "${with_mpfr}" = no; then
9745 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
9746$as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
9747 HAVE_LIBMPFR=no
9748else
9749
9750
9751
9752
9753
9754
9755
9756
9757 use_additional=yes
9758
9759 acl_save_prefix="$prefix"
9760 prefix="$acl_final_prefix"
9761 acl_save_exec_prefix="$exec_prefix"
9762 exec_prefix="$acl_final_exec_prefix"
9763
9764 eval additional_includedir=\"$includedir\"
9765 eval additional_libdir=\"$libdir\"
9766
9767 exec_prefix="$acl_save_exec_prefix"
9768 prefix="$acl_save_prefix"
9769
9770
9771# Check whether --with-libmpfr-prefix was given.
9772if test "${with_libmpfr_prefix+set}" = set; then :
9773 withval=$with_libmpfr_prefix;
9774 if test "X$withval" = "Xno"; then
9775 use_additional=no
9776 else
9777 if test "X$withval" = "X"; then
9778
9779 acl_save_prefix="$prefix"
9780 prefix="$acl_final_prefix"
9781 acl_save_exec_prefix="$exec_prefix"
9782 exec_prefix="$acl_final_exec_prefix"
9783
9784 eval additional_includedir=\"$includedir\"
9785 eval additional_libdir=\"$libdir\"
9786
9787 exec_prefix="$acl_save_exec_prefix"
9788 prefix="$acl_save_prefix"
9789
9790 else
9791 additional_includedir="$withval/include"
9792 additional_libdir="$withval/lib"
9793 fi
9794 fi
9795
9796fi
9797
9798 LIBMPFR=
9799 LTLIBMPFR=
9800 INCMPFR=
9801 rpathdirs=
9802 ltrpathdirs=
9803 names_already_handled=
da658607 9804 names_next_round='mpfr gmp'
2400729e
UW
9805 while test -n "$names_next_round"; do
9806 names_this_round="$names_next_round"
9807 names_next_round=
9808 for name in $names_this_round; do
9809 already_handled=
9810 for n in $names_already_handled; do
9811 if test "$n" = "$name"; then
9812 already_handled=yes
9813 break
9814 fi
9815 done
9816 if test -z "$already_handled"; then
9817 names_already_handled="$names_already_handled $name"
9818 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9819 eval value=\"\$HAVE_LIB$uppername\"
9820 if test -n "$value"; then
9821 if test "$value" = yes; then
9822 eval value=\"\$LIB$uppername\"
9823 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
9824 eval value=\"\$LTLIB$uppername\"
9825 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
9826 else
9827 :
9828 fi
9829 else
9830 found_dir=
9831 found_la=
9832 found_so=
9833 found_a=
9834 if test $use_additional = yes; then
9835 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9836 found_dir="$additional_libdir"
9837 found_so="$additional_libdir/lib$name.$shlibext"
9838 if test -f "$additional_libdir/lib$name.la"; then
9839 found_la="$additional_libdir/lib$name.la"
9840 fi
9841 else
9842 if test -f "$additional_libdir/lib$name.$libext"; then
9843 found_dir="$additional_libdir"
9844 found_a="$additional_libdir/lib$name.$libext"
9845 if test -f "$additional_libdir/lib$name.la"; then
9846 found_la="$additional_libdir/lib$name.la"
9847 fi
9848 fi
9849 fi
9850 fi
9851 if test "X$found_dir" = "X"; then
9852 for x in $LDFLAGS $LTLIBMPFR; do
9853
9854 acl_save_prefix="$prefix"
9855 prefix="$acl_final_prefix"
9856 acl_save_exec_prefix="$exec_prefix"
9857 exec_prefix="$acl_final_exec_prefix"
9858 eval x=\"$x\"
9859 exec_prefix="$acl_save_exec_prefix"
9860 prefix="$acl_save_prefix"
9861
9862 case "$x" in
9863 -L*)
9864 dir=`echo "X$x" | sed -e 's/^X-L//'`
9865 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9866 found_dir="$dir"
9867 found_so="$dir/lib$name.$shlibext"
9868 if test -f "$dir/lib$name.la"; then
9869 found_la="$dir/lib$name.la"
9870 fi
9871 else
9872 if test -f "$dir/lib$name.$libext"; then
9873 found_dir="$dir"
9874 found_a="$dir/lib$name.$libext"
9875 if test -f "$dir/lib$name.la"; then
9876 found_la="$dir/lib$name.la"
9877 fi
9878 fi
9879 fi
9880 ;;
9881 esac
9882 if test "X$found_dir" != "X"; then
9883 break
9884 fi
9885 done
9886 fi
9887 if test "X$found_dir" != "X"; then
9888 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
9889 if test "X$found_so" != "X"; then
9890 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9891 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9892 else
9893 haveit=
9894 for x in $ltrpathdirs; do
9895 if test "X$x" = "X$found_dir"; then
9896 haveit=yes
9897 break
9898 fi
9899 done
9900 if test -z "$haveit"; then
9901 ltrpathdirs="$ltrpathdirs $found_dir"
9902 fi
9903 if test "$hardcode_direct" = yes; then
9904 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9905 else
9906 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9907 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9908 haveit=
9909 for x in $rpathdirs; do
9910 if test "X$x" = "X$found_dir"; then
9911 haveit=yes
9912 break
9913 fi
9914 done
9915 if test -z "$haveit"; then
9916 rpathdirs="$rpathdirs $found_dir"
9917 fi
9918 else
9919 haveit=
9920 for x in $LDFLAGS $LIBMPFR; do
9921
9922 acl_save_prefix="$prefix"
9923 prefix="$acl_final_prefix"
9924 acl_save_exec_prefix="$exec_prefix"
9925 exec_prefix="$acl_final_exec_prefix"
9926 eval x=\"$x\"
9927 exec_prefix="$acl_save_exec_prefix"
9928 prefix="$acl_save_prefix"
9929
9930 if test "X$x" = "X-L$found_dir"; then
9931 haveit=yes
9932 break
9933 fi
9934 done
9935 if test -z "$haveit"; then
9936 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
9937 fi
9938 if test "$hardcode_minus_L" != no; then
9939 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9940 else
9941 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
9942 fi
9943 fi
9944 fi
9945 fi
9946 else
9947 if test "X$found_a" != "X"; then
9948 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
9949 else
9950 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
9951 fi
9952 fi
9953 additional_includedir=
9954 case "$found_dir" in
9955 */lib | */lib/)
9956 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9957 additional_includedir="$basedir/include"
9958 ;;
9959 esac
9960 if test "X$additional_includedir" != "X"; then
9961 if test "X$additional_includedir" != "X/usr/include"; then
9962 haveit=
9963 if test "X$additional_includedir" = "X/usr/local/include"; then
9964 if test -n "$GCC"; then
9965 case $host_os in
9966 linux*) haveit=yes;;
9967 esac
9968 fi
9969 fi
9970 if test -z "$haveit"; then
9971 for x in $CPPFLAGS $INCMPFR; do
9972
9973 acl_save_prefix="$prefix"
9974 prefix="$acl_final_prefix"
9975 acl_save_exec_prefix="$exec_prefix"
9976 exec_prefix="$acl_final_exec_prefix"
9977 eval x=\"$x\"
9978 exec_prefix="$acl_save_exec_prefix"
9979 prefix="$acl_save_prefix"
9980
9981 if test "X$x" = "X-I$additional_includedir"; then
9982 haveit=yes
9983 break
9984 fi
9985 done
9986 if test -z "$haveit"; then
9987 if test -d "$additional_includedir"; then
9988 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
9989 fi
9990 fi
9991 fi
9992 fi
9993 fi
9994 if test -n "$found_la"; then
9995 save_libdir="$libdir"
9996 case "$found_la" in
9997 */* | *\\*) . "$found_la" ;;
9998 *) . "./$found_la" ;;
9999 esac
10000 libdir="$save_libdir"
10001 for dep in $dependency_libs; do
10002 case "$dep" in
10003 -L*)
10004 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10005 if test "X$additional_libdir" != "X/usr/lib"; then
10006 haveit=
10007 if test "X$additional_libdir" = "X/usr/local/lib"; then
10008 if test -n "$GCC"; then
10009 case $host_os in
10010 linux*) haveit=yes;;
10011 esac
10012 fi
10013 fi
10014 if test -z "$haveit"; then
10015 haveit=
10016 for x in $LDFLAGS $LIBMPFR; do
10017
10018 acl_save_prefix="$prefix"
10019 prefix="$acl_final_prefix"
10020 acl_save_exec_prefix="$exec_prefix"
10021 exec_prefix="$acl_final_exec_prefix"
10022 eval x=\"$x\"
10023 exec_prefix="$acl_save_exec_prefix"
10024 prefix="$acl_save_prefix"
10025
10026 if test "X$x" = "X-L$additional_libdir"; then
10027 haveit=yes
10028 break
10029 fi
10030 done
10031 if test -z "$haveit"; then
10032 if test -d "$additional_libdir"; then
10033 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10034 fi
10035 fi
10036 haveit=
10037 for x in $LDFLAGS $LTLIBMPFR; do
10038
10039 acl_save_prefix="$prefix"
10040 prefix="$acl_final_prefix"
10041 acl_save_exec_prefix="$exec_prefix"
10042 exec_prefix="$acl_final_exec_prefix"
10043 eval x=\"$x\"
10044 exec_prefix="$acl_save_exec_prefix"
10045 prefix="$acl_save_prefix"
10046
10047 if test "X$x" = "X-L$additional_libdir"; then
10048 haveit=yes
10049 break
10050 fi
10051 done
10052 if test -z "$haveit"; then
10053 if test -d "$additional_libdir"; then
10054 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10055 fi
10056 fi
10057 fi
10058 fi
10059 ;;
10060 -R*)
10061 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10062 if test "$enable_rpath" != no; then
10063 haveit=
10064 for x in $rpathdirs; do
10065 if test "X$x" = "X$dir"; then
10066 haveit=yes
10067 break
10068 fi
10069 done
10070 if test -z "$haveit"; then
10071 rpathdirs="$rpathdirs $dir"
10072 fi
10073 haveit=
10074 for x in $ltrpathdirs; do
10075 if test "X$x" = "X$dir"; then
10076 haveit=yes
10077 break
10078 fi
10079 done
10080 if test -z "$haveit"; then
10081 ltrpathdirs="$ltrpathdirs $dir"
10082 fi
10083 fi
10084 ;;
10085 -l*)
10086 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10087 ;;
10088 *.la)
10089 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10090 ;;
10091 *)
10092 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10093 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10094 ;;
10095 esac
10096 done
10097 fi
10098 else
10099 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10100 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10101 fi
10102 fi
10103 fi
10104 done
10105 done
10106 if test "X$rpathdirs" != "X"; then
10107 if test -n "$hardcode_libdir_separator"; then
10108 alldirs=
10109 for found_dir in $rpathdirs; do
10110 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10111 done
10112 acl_save_libdir="$libdir"
10113 libdir="$alldirs"
10114 eval flag=\"$hardcode_libdir_flag_spec\"
10115 libdir="$acl_save_libdir"
10116 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10117 else
10118 for found_dir in $rpathdirs; do
10119 acl_save_libdir="$libdir"
10120 libdir="$found_dir"
10121 eval flag=\"$hardcode_libdir_flag_spec\"
10122 libdir="$acl_save_libdir"
10123 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10124 done
10125 fi
10126 fi
10127 if test "X$ltrpathdirs" != "X"; then
10128 for found_dir in $ltrpathdirs; do
10129 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10130 done
10131 fi
10132
10133
10134 ac_save_CPPFLAGS="$CPPFLAGS"
10135
10136 for element in $INCMPFR; do
10137 haveit=
10138 for x in $CPPFLAGS; do
10139
10140 acl_save_prefix="$prefix"
10141 prefix="$acl_final_prefix"
10142 acl_save_exec_prefix="$exec_prefix"
10143 exec_prefix="$acl_final_exec_prefix"
10144 eval x=\"$x\"
10145 exec_prefix="$acl_save_exec_prefix"
10146 prefix="$acl_save_prefix"
10147
10148 if test "X$x" = "X$element"; then
10149 haveit=yes
10150 break
10151 fi
10152 done
10153 if test -z "$haveit"; then
10154 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10155 fi
10156 done
10157
10158
10159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10160$as_echo_n "checking for libmpfr... " >&6; }
d0ac1c44 10161if ${ac_cv_libmpfr+:} false; then :
2400729e
UW
10162 $as_echo_n "(cached) " >&6
10163else
10164
10165 ac_save_LIBS="$LIBS"
10166 LIBS="$LIBS $LIBMPFR"
10167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10168/* end confdefs.h. */
10169#include <mpfr.h>
10170int
10171main ()
10172{
10173mpfr_exp_t exp; mpfr_t x;
10174 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10175 ;
10176 return 0;
10177}
10178_ACEOF
10179if ac_fn_c_try_link "$LINENO"; then :
10180 ac_cv_libmpfr=yes
10181else
10182 ac_cv_libmpfr=no
10183fi
10184rm -f core conftest.err conftest.$ac_objext \
10185 conftest$ac_exeext conftest.$ac_ext
10186 LIBS="$ac_save_LIBS"
10187
10188fi
10189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10190$as_echo "$ac_cv_libmpfr" >&6; }
10191 if test "$ac_cv_libmpfr" = yes; then
10192 HAVE_LIBMPFR=yes
10193
10194$as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10195
10196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10197$as_echo_n "checking how to link with libmpfr... " >&6; }
10198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10199$as_echo "$LIBMPFR" >&6; }
10200 else
10201 HAVE_LIBMPFR=no
10202 CPPFLAGS="$ac_save_CPPFLAGS"
10203 LIBMPFR=
10204 LTLIBMPFR=
10205 fi
10206
10207
10208
10209
10210
10211
10212 if test "$HAVE_LIBMPFR" != yes; then
10213 if test "$with_mpfr" = yes; then
d0ac1c44 10214 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
2400729e
UW
10215 else
10216 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10217$as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10218 fi
10219 fi
10220fi
10221
d344e670
DE
10222# --------------------- #
10223# Check for libpython. #
10224# --------------------- #
10225
a9322a30 10226
a9322a30
TT
10227
10228
ec685c5e 10229
0c4a4063 10230
81ecdfbb
RW
10231# Check whether --with-python was given.
10232if test "${with_python+set}" = set; then :
10233 withval=$with_python;
bec39cab 10234else
81ecdfbb 10235 with_python=auto
bec39cab 10236fi
bec39cab 10237
81ecdfbb
RW
10238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10239$as_echo_n "checking whether to use python... " >&6; }
10240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10241$as_echo "$with_python" >&6; }
9a156167 10242
81ecdfbb
RW
10243if test "${with_python}" = no; then
10244 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10245$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10246 have_libpython=no
bec39cab 10247else
81ecdfbb 10248 case "${with_python}" in
8c85a4e2 10249 [\\/]* | ?:[\\/]*)
ec685c5e
DE
10250 if test -d ${with_python}; then
10251 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10252 python_prog="${with_python}/bin/python"
0c4a4063 10253 python_prefix=
9c4ea6c5
JB
10254 # If python does not exit ${with_python}/bin, then try in
10255 # ${with_python}. On Windows/MinGW, this is where the Python
10256 # executable is.
10257 if test ! -x "${python_prog}"; then
10258 python_prog="${with_python}/python"
10259 python_prefix=
10260 fi
e7a30f46 10261 if test ! -x "${python_prog}"; then
ec685c5e
DE
10262 # Fall back to gdb 7.0/7.1 behaviour.
10263 python_prog=missing
0c4a4063 10264 python_prefix=${with_python}
ec685c5e 10265 fi
e7a30f46 10266 elif test -x "${with_python}"; then
ec685c5e
DE
10267 # While we can't run python compiled for $host (unless host == build),
10268 # the user could write a script that provides the needed information,
10269 # so we support that.
ec685c5e 10270 python_prog=${with_python}
0c4a4063 10271 python_prefix=
ec685c5e 10272 else
d0ac1c44 10273 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
ec685c5e 10274 fi
81ecdfbb 10275 ;;
ec685c5e
DE
10276 */*)
10277 # Disallow --with-python=foo/bar.
d0ac1c44 10278 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
81ecdfbb 10279 ;;
ec685c5e
DE
10280 *)
10281 # The user has either specified auto, yes, or the name of the python
10282 # program assumed to be in $PATH.
10283 python_prefix=
10284 case "${with_python}" in
10285 yes | auto)
10286 if test ${build} = ${host}; then
10287 # Extract the first word of "python", so it can be a program name with args.
10288set dummy python; ac_word=$2
10289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10290$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10291if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10292 $as_echo_n "(cached) " >&6
10293else
10294 case $python_prog_path in
10295 [\\/]* | ?:[\\/]*)
10296 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10297 ;;
10298 *)
10299 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10300for as_dir in $PATH
10301do
10302 IFS=$as_save_IFS
10303 test -z "$as_dir" && as_dir=.
10304 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10305 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10306 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10307 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10308 break 2
10309 fi
10310done
10311 done
10312IFS=$as_save_IFS
10313
10314 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10315 ;;
10316esac
10317fi
10318python_prog_path=$ac_cv_path_python_prog_path
10319if test -n "$python_prog_path"; then
10320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10321$as_echo "$python_prog_path" >&6; }
10322else
10323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10324$as_echo "no" >&6; }
10325fi
10326
10327
10328 if test "${python_prog_path}" = missing; then
10329 python_prog=missing
10330 else
10331 python_prog=${python_prog_path}
10332 fi
10333 else
10334 # Not much we can do except assume the cross-compiler will find the
10335 # right files.
10336 python_prog=missing
10337 fi
10338 ;;
10339 *)
10340 # While we can't run python compiled for $host (unless host == build),
10341 # the user could write a script that provides the needed information,
10342 # so we support that.
10343 python_prog="${with_python}"
10344 # Extract the first word of "${python_prog}", so it can be a program name with args.
10345set dummy ${python_prog}; ac_word=$2
10346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10347$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10348if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10349 $as_echo_n "(cached) " >&6
10350else
10351 case $python_prog_path in
10352 [\\/]* | ?:[\\/]*)
10353 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10354 ;;
10355 *)
10356 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10357for as_dir in $PATH
10358do
10359 IFS=$as_save_IFS
10360 test -z "$as_dir" && as_dir=.
10361 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10362 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10363 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10364 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10365 break 2
10366 fi
10367done
10368 done
10369IFS=$as_save_IFS
10370
10371 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10372 ;;
10373esac
10374fi
10375python_prog_path=$ac_cv_path_python_prog_path
10376if test -n "$python_prog_path"; then
10377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10378$as_echo "$python_prog_path" >&6; }
10379else
10380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10381$as_echo "no" >&6; }
10382fi
10383
10384
10385 if test "${python_prog_path}" = missing; then
d0ac1c44 10386 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
ec685c5e
DE
10387 fi
10388 ;;
10389 esac
81ecdfbb
RW
10390 esac
10391
ec685c5e 10392 if test "${python_prog}" != missing; then
e7a30f46
DE
10393 # We have a python program to use, but it may be too old.
10394 # Don't flag an error for --with-python=auto (the default).
10395 have_python_config=yes
ec685c5e
DE
10396 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10397 if test $? != 0; then
e7a30f46
DE
10398 have_python_config=failed
10399 if test "${with_python}" != auto; then
d0ac1c44 10400 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
e7a30f46 10401 fi
ec685c5e
DE
10402 fi
10403 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10404 if test $? != 0; then
e7a30f46
DE
10405 have_python_config=failed
10406 if test "${with_python}" != auto; then
d0ac1c44 10407 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
e7a30f46 10408 fi
ec685c5e 10409 fi
0c4a4063
DE
10410 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10411 if test $? != 0; then
e7a30f46
DE
10412 have_python_config=failed
10413 if test "${with_python}" != auto; then
d0ac1c44 10414 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
e7a30f46 10415 fi
0c4a4063 10416 fi
ec685c5e 10417 else
ac534cba
JB
10418 # We do not have a python executable we can use to determine where
10419 # to find the Python headers and libs. We cannot guess the include
10420 # path from the python_prefix either, because that include path
10421 # depends on the Python version. So, there is nothing much we can
10422 # do except assume that the compiler will be able to find those files.
10423 python_includes=
10424 python_libs=
0c4a4063 10425 have_python_config=no
ec685c5e 10426 fi
bec39cab 10427
ec685c5e
DE
10428 # If we have python-config, only try the configuration it provides.
10429 # Otherwise fallback on the old way of trying different versions of
10430 # python in turn.
81ecdfbb 10431
ec685c5e
DE
10432 have_libpython=no
10433 if test "${have_python_config}" = yes; then
c1039e3c
JB
10434 # Determine the Python version by extracting "-lpython<version>"
10435 # part of the python_libs. <version> is usually X.Y with X and Y
10436 # being decimal numbers, but can also be XY (seen on Windows).
10437 #
10438 # The extraction is performed using sed with a regular expression.
10439 # Initially, the regexp used was using the '?' quantifier to make
10440 # the dot in the version number optional. Unfortunately, this
10441 # does not work with non-GNU versions of sed because, because of
10442 # what looks like a limitation (the '?' quantifier does not work
10443 # with back-references). We work around this limitation by using
10444 # the '*' quantifier instead. It means that, in theory, we might
10445 # match unexpected version strings such as "-lpython2..7", but
10446 # this seems unlikely in practice. And even if that happens,
10447 # an error will be triggered later on, when checking that version
10448 # number.
ec685c5e 10449 python_version=`echo " ${python_libs} " \
c1039e3c 10450 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
10451 case "${python_version}" in
10452 python*)
ec685c5e
DE
10453
10454 version=${python_version}
10455
10456 new_CPPFLAGS=${python_includes}
10457 new_LIBS=${python_libs}
81ecdfbb
RW
10458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10459$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10460 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10461 save_LIBS=$LIBS
ec685c5e 10462 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10463 LIBS="$new_LIBS $LIBS"
ec685c5e 10464 found_usable_python=no
81ecdfbb 10465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10466/* end confdefs.h. */
ac534cba 10467#include "Python.h"
81ecdfbb
RW
10468int
10469main ()
10470{
10471Py_Initialize ();
10472 ;
10473 return 0;
10474}
bec39cab 10475_ACEOF
81ecdfbb 10476if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10477 have_libpython=${version}
10478 found_usable_python=yes
ac534cba
JB
10479 PYTHON_CPPFLAGS=$new_CPPFLAGS
10480 PYTHON_LIBS=$new_LIBS
9a156167 10481fi
81ecdfbb
RW
10482rm -f core conftest.err conftest.$ac_objext \
10483 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10484 CPPFLAGS=$save_CPPFLAGS
10485 LIBS=$save_LIBS
ec685c5e
DE
10486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10487$as_echo "${found_usable_python}" >&6; }
9a156167 10488
0c4a4063
DE
10489 ;;
10490 *)
d0ac1c44 10491 as_fn_error $? "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
10492 ;;
10493 esac
e7a30f46 10494 elif test "${have_python_config}" != failed; then
ec685c5e 10495 if test "${have_libpython}" = no; then
9a156167 10496
420697bb
TT
10497 version=python2.7
10498
10499 new_CPPFLAGS=${python_includes}
bf27f0e2 10500 new_LIBS="-lpython2.7 ${python_libs}"
420697bb
TT
10501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10502$as_echo_n "checking for ${version}... " >&6; }
10503 save_CPPFLAGS=$CPPFLAGS
10504 save_LIBS=$LIBS
10505 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10506 LIBS="$new_LIBS $LIBS"
420697bb
TT
10507 found_usable_python=no
10508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10509/* end confdefs.h. */
ac534cba 10510#include "Python.h"
420697bb
TT
10511int
10512main ()
10513{
10514Py_Initialize ();
10515 ;
10516 return 0;
10517}
10518_ACEOF
10519if ac_fn_c_try_link "$LINENO"; then :
10520 have_libpython=${version}
10521 found_usable_python=yes
ac534cba
JB
10522 PYTHON_CPPFLAGS=$new_CPPFLAGS
10523 PYTHON_LIBS=$new_LIBS
420697bb
TT
10524fi
10525rm -f core conftest.err conftest.$ac_objext \
10526 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10527 CPPFLAGS=$save_CPPFLAGS
10528 LIBS=$save_LIBS
420697bb
TT
10529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10530$as_echo "${found_usable_python}" >&6; }
10531
10532 fi
10533 if test "${have_libpython}" = no; then
10534
ec685c5e
DE
10535 version=python2.6
10536
10537 new_CPPFLAGS=${python_includes}
bf27f0e2 10538 new_LIBS="-lpython2.6 ${python_libs}"
ec685c5e
DE
10539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10540$as_echo_n "checking for ${version}... " >&6; }
10541 save_CPPFLAGS=$CPPFLAGS
10542 save_LIBS=$LIBS
10543 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10544 LIBS="$new_LIBS $LIBS"
ec685c5e
DE
10545 found_usable_python=no
10546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10547/* end confdefs.h. */
ac534cba 10548#include "Python.h"
ec685c5e
DE
10549int
10550main ()
10551{
10552Py_Initialize ();
10553 ;
10554 return 0;
10555}
10556_ACEOF
10557if ac_fn_c_try_link "$LINENO"; then :
10558 have_libpython=${version}
10559 found_usable_python=yes
ac534cba
JB
10560 PYTHON_CPPFLAGS=$new_CPPFLAGS
10561 PYTHON_LIBS=$new_LIBS
ec685c5e 10562fi
81ecdfbb
RW
10563rm -f core conftest.err conftest.$ac_objext \
10564 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10565 CPPFLAGS=$save_CPPFLAGS
10566 LIBS=$save_LIBS
ec685c5e
DE
10567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10568$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10569
ec685c5e
DE
10570 fi
10571 fi
9c4ea6c5 10572 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
10573
10574$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
10575
9c4ea6c5 10576 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
10577
10578$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
10579
81ecdfbb 10580 fi
ec685c5e
DE
10581
10582 if test "${have_libpython}" = no; then
81ecdfbb
RW
10583 case "${with_python}" in
10584 yes)
d0ac1c44 10585 as_fn_error $? "python is missing or unusable" "$LINENO" 5
81ecdfbb
RW
10586 ;;
10587 auto)
10588 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10589$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10590 ;;
10591 *)
d0ac1c44 10592 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
81ecdfbb
RW
10593 ;;
10594 esac
0c4a4063
DE
10595 else
10596 if test -n "${python_prefix}"; then
10597
10598cat >>confdefs.h <<_ACEOF
10599#define WITH_PYTHON_PATH "${python_prefix}"
10600_ACEOF
10601
10602
10603 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10604 if test "x$prefix" = xNONE; then
10605 test_prefix=/usr/local
10606 else
10607 test_prefix=$prefix
10608 fi
10609 else
10610 test_prefix=$exec_prefix
10611 fi
10612 value=0
10613 case ${python_prefix} in
10614 "${test_prefix}"|"${test_prefix}/"*|\
10615 '${exec_prefix}'|'${exec_prefix}/'*)
10616 value=1
10617 ;;
10618 esac
10619
10620cat >>confdefs.h <<_ACEOF
10621#define PYTHON_PATH_RELOCATABLE $value
10622_ACEOF
10623
10624
10625 fi
81ecdfbb 10626 fi
436868fb 10627fi
436868fb 10628
ec685c5e 10629if test "${have_libpython}" != no; then
436868fb 10630
81ecdfbb 10631$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 10632
81ecdfbb
RW
10633 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10634 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10635 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 10636 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 10637 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 10638
81ecdfbb
RW
10639 # Flags needed to compile Python code (taken from python-config --cflags).
10640 # We cannot call python-config directly because it will output whatever was
10641 # used when compiling the Python interpreter itself, including flags which
10642 # would make the python-related objects be compiled differently from the
10643 # rest of GDB (e.g., -O2 and -fPIC).
10644 if test "${GCC}" = yes; then
ae292b3a
TT
10645 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
10646 # Python headers recommend -DNDEBUG, but it's unclear if that just
10647 # refers to building Python itself. In release mode, though, it
10648 # doesn't hurt for the Python code in gdb to follow.
10649 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
81ecdfbb 10650 fi
436868fb 10651
81ecdfbb
RW
10652 if test "x${tentative_python_cflags}" != x; then
10653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10654$as_echo_n "checking compiler flags for python code... " >&6; }
10655 for flag in ${tentative_python_cflags}; do
10656 # Check that the compiler accepts it
10657 saved_CFLAGS="$CFLAGS"
10658 CFLAGS="$CFLAGS $flag"
10659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10660/* end confdefs.h. */
81ecdfbb 10661
a9322a30
TT
10662int
10663main ()
10664{
a9322a30
TT
10665
10666 ;
10667 return 0;
10668}
bec39cab 10669_ACEOF
81ecdfbb
RW
10670if ac_fn_c_try_compile "$LINENO"; then :
10671 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 10672fi
81ecdfbb
RW
10673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10674 CFLAGS="$saved_CFLAGS"
10675 done
10676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10677$as_echo "${PYTHON_CFLAGS}" >&6; }
10678 fi
043b6510 10679
c83393b9
JB
10680 # On x64 Windows, Python's include headers, and pyconfig.h in
10681 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10682 # version of Windows. Unfortunately, MS_WIN64 is only defined if
10683 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
10684 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10685 # The issue was reported to the Python community, but still isn't
10686 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10687
043b6510 10688 case "$gdb_host" in
c83393b9
JB
10689 mingw64)
10690 if test "${GCC}" = yes; then
10691 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10692 fi
10693 ;;
043b6510 10694 esac
a8db4212
YPK
10695
10696 # Note that "python -m threading" cannot be used to check for
10697 # threading support due to a bug in Python 2.7.3
10698 # (http://bugs.python.org/issue15567).
10699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
10700$as_echo_n "checking whether python supports threads... " >&6; }
10701 saved_CPPFLAGS="${CPPFLAGS}"
10702 CPPFLAGS="${PYTHON_CPPFLAGS}"
10703 # Note that the test is reversed so that python_has_threads=yes on
10704 # unexpected failures.
10705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10706/* end confdefs.h. */
10707
10708#include <Python.h>
10709#ifdef WITH_THREAD
10710# error
10711#endif
10712
10713_ACEOF
10714if ac_fn_c_try_cpp "$LINENO"; then :
10715 python_has_threads=no
10716else
10717 python_has_threads=yes
10718fi
d0ac1c44 10719rm -f conftest.err conftest.i conftest.$ac_ext
a8db4212
YPK
10720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
10721$as_echo "${python_has_threads}" >&6; }
10722 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 10723else
6dddc817
DE
10724 # Even if Python support is not compiled in, we need to have this file
10725 # included so that the "python" command, et.al., still exists.
8fd8d003 10726 CONFIG_OBS="$CONFIG_OBS python/python.o"
6dddc817 10727 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 10728fi
9a156167 10729
a4a1c157
PA
10730# Work around Python http://bugs.python.org/issue10112. See also
10731# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10732# no effect. Note that the only test after this that uses Python is
10733# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10734# run without -export-dynamic too.
10735PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10736
10737
ed3ef339
DE
10738
10739
4df42755
DE
10740 if test "${have_libpython}" != no; then
10741 HAVE_PYTHON_TRUE=
10742 HAVE_PYTHON_FALSE='#'
10743else
10744 HAVE_PYTHON_TRUE='#'
10745 HAVE_PYTHON_FALSE=
10746fi
10747
ed3ef339
DE
10748
10749# -------------------- #
10750# Check for libguile. #
10751# -------------------- #
10752
10753
e1402065
DE
10754
10755
10756
10757
10758# Check whether --with-guile was given.
10759if test "${with_guile+set}" = set; then :
10760 withval=$with_guile;
10761else
10762 with_guile=auto
10763fi
10764
10765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10766$as_echo_n "checking whether to use guile... " >&6; }
10767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10768$as_echo "$with_guile" >&6; }
10769
ed3ef339
DE
10770# Extract the first word of "pkg-config", so it can be a program name with args.
10771set dummy pkg-config; ac_word=$2
10772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10773$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10774if ${ac_cv_path_pkg_config_prog_path+:} false; then :
ed3ef339
DE
10775 $as_echo_n "(cached) " >&6
10776else
10777 case $pkg_config_prog_path in
10778 [\\/]* | ?:[\\/]*)
10779 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10780 ;;
10781 *)
10782 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10783for as_dir in $PATH
10784do
10785 IFS=$as_save_IFS
10786 test -z "$as_dir" && as_dir=.
10787 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10788 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ed3ef339
DE
10789 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10790 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10791 break 2
10792 fi
10793done
10794 done
10795IFS=$as_save_IFS
10796
10797 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10798 ;;
10799esac
10800fi
10801pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10802if test -n "$pkg_config_prog_path"; then
10803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10804$as_echo "$pkg_config_prog_path" >&6; }
10805else
10806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10807$as_echo "no" >&6; }
10808fi
10809
10810
10811
6e66f753 10812try_guile_versions="guile-2.0"
ed3ef339
DE
10813have_libguile=no
10814case "${with_guile}" in
10815no)
10816 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10817$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10818 ;;
10819auto)
e1402065
DE
10820 if test "${pkg_config_prog_path}" = "missing"; then
10821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10822$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10823 else
ed3ef339
DE
10824
10825 pkg_config=${pkg_config_prog_path}
10826 guile_version_list=${try_guile_versions}
10827 flag_errors=no
10828
ed3ef339
DE
10829 found_usable_guile=checking
10830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10831$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10832 for guile_version in ${guile_version_list}; do
10833 ${pkg_config} --exists ${guile_version} 2>/dev/null
10834 if test $? != 0; then
10835 continue
10836 fi
10837 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10838 if test $? != 0; then
d0ac1c44 10839 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
10840 fi
10841 new_LIBS=`${pkg_config} --libs ${guile_version}`
10842 if test $? != 0; then
d0ac1c44 10843 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
10844 fi
10845 found_usable_guile=${guile_version}
10846 break
10847 done
10848 if test "${found_usable_guile}" = "checking"; then
10849 if test "${flag_errors}" = "yes"; then
d0ac1c44 10850 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
10851 else
10852 found_usable_guile=no
10853 fi
10854 fi
10855 if test "${found_usable_guile}" != no; then
10856 save_CPPFLAGS=$CPPFLAGS
10857 save_LIBS=$LIBS
10858 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10859 LIBS="$LIBS $new_LIBS"
10860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10861/* end confdefs.h. */
10862#include "libguile.h"
10863int
10864main ()
10865{
10866scm_init_guile ();
10867 ;
10868 return 0;
10869}
10870_ACEOF
10871if ac_fn_c_try_link "$LINENO"; then :
10872 have_libguile=yes
10873 GUILE_CPPFLAGS=$new_CPPFLAGS
10874 GUILE_LIBS=$new_LIBS
10875else
10876 found_usable_guile=no
10877fi
10878rm -f core conftest.err conftest.$ac_objext \
10879 conftest$ac_exeext conftest.$ac_ext
92fab5a6 10880 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 10881if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
10882
10883$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10884
10885
10886fi
10887
ed3ef339
DE
10888 CPPFLAGS=$save_CPPFLAGS
10889 LIBS=$save_LIBS
10890 if test "${found_usable_guile}" = no; then
10891 if test "${flag_errors}" = yes; then
10892 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10893$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
10894as_fn_error $? "linking guile version ${guile_version} test program failed
10895See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
10896 fi
10897 fi
10898 fi
10899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10900$as_echo "${found_usable_guile}" >&6; }
10901
e1402065 10902 fi
ed3ef339
DE
10903 ;;
10904yes)
e1402065 10905 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 10906 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 10907 fi
ed3ef339
DE
10908
10909 pkg_config=${pkg_config_prog_path}
10910 guile_version_list=${try_guile_versions}
10911 flag_errors=yes
10912
ed3ef339
DE
10913 found_usable_guile=checking
10914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10915$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10916 for guile_version in ${guile_version_list}; do
10917 ${pkg_config} --exists ${guile_version} 2>/dev/null
10918 if test $? != 0; then
10919 continue
10920 fi
10921 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10922 if test $? != 0; then
d0ac1c44 10923 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
10924 fi
10925 new_LIBS=`${pkg_config} --libs ${guile_version}`
10926 if test $? != 0; then
d0ac1c44 10927 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
10928 fi
10929 found_usable_guile=${guile_version}
10930 break
10931 done
10932 if test "${found_usable_guile}" = "checking"; then
10933 if test "${flag_errors}" = "yes"; then
d0ac1c44 10934 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
10935 else
10936 found_usable_guile=no
10937 fi
10938 fi
10939 if test "${found_usable_guile}" != no; then
10940 save_CPPFLAGS=$CPPFLAGS
10941 save_LIBS=$LIBS
10942 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10943 LIBS="$LIBS $new_LIBS"
10944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10945/* end confdefs.h. */
10946#include "libguile.h"
10947int
10948main ()
10949{
10950scm_init_guile ();
10951 ;
10952 return 0;
10953}
10954_ACEOF
10955if ac_fn_c_try_link "$LINENO"; then :
10956 have_libguile=yes
10957 GUILE_CPPFLAGS=$new_CPPFLAGS
10958 GUILE_LIBS=$new_LIBS
10959else
10960 found_usable_guile=no
10961fi
10962rm -f core conftest.err conftest.$ac_objext \
10963 conftest$ac_exeext conftest.$ac_ext
92fab5a6 10964 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 10965if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
10966
10967$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10968
10969
10970fi
10971
ed3ef339
DE
10972 CPPFLAGS=$save_CPPFLAGS
10973 LIBS=$save_LIBS
10974 if test "${found_usable_guile}" = no; then
10975 if test "${flag_errors}" = yes; then
10976 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10977$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
10978as_fn_error $? "linking guile version ${guile_version} test program failed
10979See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
10980 fi
10981 fi
10982 fi
10983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10984$as_echo "${found_usable_guile}" >&6; }
10985
10986 ;;
10987[\\/]* | ?:[\\/]*)
e1402065 10988 if test -x "${with_guile}"; then
ed3ef339
DE
10989
10990 pkg_config=${with_guile}
10991 guile_version_list=${try_guile_versions}
10992 flag_errors=yes
10993
ed3ef339
DE
10994 found_usable_guile=checking
10995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10996$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10997 for guile_version in ${guile_version_list}; do
10998 ${pkg_config} --exists ${guile_version} 2>/dev/null
10999 if test $? != 0; then
11000 continue
11001 fi
11002 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11003 if test $? != 0; then
d0ac1c44 11004 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11005 fi
11006 new_LIBS=`${pkg_config} --libs ${guile_version}`
11007 if test $? != 0; then
d0ac1c44 11008 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11009 fi
11010 found_usable_guile=${guile_version}
11011 break
11012 done
11013 if test "${found_usable_guile}" = "checking"; then
11014 if test "${flag_errors}" = "yes"; then
d0ac1c44 11015 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11016 else
11017 found_usable_guile=no
11018 fi
11019 fi
11020 if test "${found_usable_guile}" != no; then
11021 save_CPPFLAGS=$CPPFLAGS
11022 save_LIBS=$LIBS
11023 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11024 LIBS="$LIBS $new_LIBS"
11025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11026/* end confdefs.h. */
11027#include "libguile.h"
11028int
11029main ()
11030{
11031scm_init_guile ();
11032 ;
11033 return 0;
11034}
11035_ACEOF
11036if ac_fn_c_try_link "$LINENO"; then :
11037 have_libguile=yes
11038 GUILE_CPPFLAGS=$new_CPPFLAGS
11039 GUILE_LIBS=$new_LIBS
11040else
11041 found_usable_guile=no
11042fi
11043rm -f core conftest.err conftest.$ac_objext \
11044 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11045 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11046if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11047
11048$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11049
11050
11051fi
11052
ed3ef339
DE
11053 CPPFLAGS=$save_CPPFLAGS
11054 LIBS=$save_LIBS
11055 if test "${found_usable_guile}" = no; then
11056 if test "${flag_errors}" = yes; then
11057 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11058$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11059as_fn_error $? "linking guile version ${guile_version} test program failed
11060See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11061 fi
11062 fi
11063 fi
11064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11065$as_echo "${found_usable_guile}" >&6; }
11066
e1402065 11067 else
d0ac1c44 11068 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
e1402065 11069 fi
ed3ef339
DE
11070 ;;
11071"" | */*)
11072 # Disallow --with=guile="" and --with-guile=foo/bar.
d0ac1c44 11073 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
ed3ef339
DE
11074 ;;
11075*)
11076 # A space separate list of guile versions to try, in order.
e1402065 11077 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11078 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11079 fi
ed3ef339
DE
11080
11081 pkg_config=${pkg_config_prog_path}
11082 guile_version_list=${with_guile}
11083 flag_errors=yes
11084
ed3ef339
DE
11085 found_usable_guile=checking
11086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11087$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11088 for guile_version in ${guile_version_list}; do
11089 ${pkg_config} --exists ${guile_version} 2>/dev/null
11090 if test $? != 0; then
11091 continue
11092 fi
11093 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11094 if test $? != 0; then
d0ac1c44 11095 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11096 fi
11097 new_LIBS=`${pkg_config} --libs ${guile_version}`
11098 if test $? != 0; then
d0ac1c44 11099 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11100 fi
11101 found_usable_guile=${guile_version}
11102 break
11103 done
11104 if test "${found_usable_guile}" = "checking"; then
11105 if test "${flag_errors}" = "yes"; then
d0ac1c44 11106 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11107 else
11108 found_usable_guile=no
11109 fi
11110 fi
11111 if test "${found_usable_guile}" != no; then
11112 save_CPPFLAGS=$CPPFLAGS
11113 save_LIBS=$LIBS
11114 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11115 LIBS="$LIBS $new_LIBS"
11116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11117/* end confdefs.h. */
11118#include "libguile.h"
11119int
11120main ()
11121{
11122scm_init_guile ();
11123 ;
11124 return 0;
11125}
11126_ACEOF
11127if ac_fn_c_try_link "$LINENO"; then :
11128 have_libguile=yes
11129 GUILE_CPPFLAGS=$new_CPPFLAGS
11130 GUILE_LIBS=$new_LIBS
11131else
11132 found_usable_guile=no
11133fi
11134rm -f core conftest.err conftest.$ac_objext \
11135 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11136 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11137if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11138
11139$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11140
11141
11142fi
11143
ed3ef339
DE
11144 CPPFLAGS=$save_CPPFLAGS
11145 LIBS=$save_LIBS
11146 if test "${found_usable_guile}" = no; then
11147 if test "${flag_errors}" = yes; then
11148 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11149$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11150as_fn_error $? "linking guile version ${guile_version} test program failed
11151See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11152 fi
11153 fi
11154 fi
11155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11156$as_echo "${found_usable_guile}" >&6; }
11157
11158 ;;
11159esac
11160
e76c5d17 11161if test "${have_libguile}" != no; then
d342a0da
DE
11162 case "${with_guile}" in
11163 [\\/]* | ?:[\\/]*)
e76c5d17
DE
11164
11165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11166$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11167if ${ac_cv_guild_program_name+:} false; then :
e76c5d17
DE
11168 $as_echo_n "(cached) " >&6
11169else
d342a0da 11170 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
11171
11172 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11173 # the 'guild' and 'bindir' variables. In that case, try to guess
11174 # what the program name is, at the risk of getting it wrong if
11175 # Guile was configured with '--program-suffix' or similar.
11176 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 11177 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
11178 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11179 fi
11180
11181fi
11182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11183$as_echo "$ac_cv_guild_program_name" >&6; }
11184
11185 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11186 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
e76c5d17
DE
11187 fi
11188
11189 GUILD="$ac_cv_guild_program_name"
11190
11191
d342a0da
DE
11192 ;;
11193 *)
11194
11195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11196$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11197if ${ac_cv_guild_program_name+:} false; then :
d342a0da
DE
11198 $as_echo_n "(cached) " >&6
11199else
11200 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11201
11202 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11203 # the 'guild' and 'bindir' variables. In that case, try to guess
11204 # what the program name is, at the risk of getting it wrong if
11205 # Guile was configured with '--program-suffix' or similar.
11206 if test "x$ac_cv_guild_program_name" = "x"; then
11207 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11208 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11209 fi
11210
11211fi
11212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11213$as_echo "$ac_cv_guild_program_name" >&6; }
11214
11215 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11216 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
d342a0da
DE
11217 fi
11218
11219 GUILD="$ac_cv_guild_program_name"
11220
11221
11222 ;;
11223 esac
e76c5d17
DE
11224
11225
11226 if test "$cross_compiling" = no; then
11227 GUILD_TARGET_FLAG=
11228 else
11229 GUILD_TARGET_FLAG="--target=$host"
11230 fi
11231
11232
11233
11234
11235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11236$as_echo_n "checking whether guild supports this host... " >&6; }
d0ac1c44 11237if ${ac_cv_guild_ok+:} false; then :
e76c5d17
DE
11238 $as_echo_n "(cached) " >&6
11239else
11240 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11241 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11242 ac_cv_guild_ok=yes
11243 else
11244 ac_cv_guild_ok=no
11245 fi
11246fi
11247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11248$as_echo "$ac_cv_guild_ok" >&6; }
11249
11250 if test "$ac_cv_guild_ok" = no; then
11251 have_libguile=no
11252 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11253$as_echo "$as_me: WARNING: disabling guile support" >&2;}
11254 fi
11255fi
11256
ed3ef339
DE
11257if test "${have_libguile}" != no; then
11258
11259$as_echo "#define HAVE_GUILE 1" >>confdefs.h
11260
11261 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11262 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11263 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11264 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11265 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
11266
11267 save_LIBS="$LIBS"
11268 save_CPPFLAGS="$CPPFLAGS"
11269 LIBS="$GUILE_LIBS"
11270 CPPFLAGS="$GUILE_CPPFLAGS"
11271 for ac_func in scm_new_smob
11272do :
11273 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
d0ac1c44 11274if test "x$ac_cv_func_scm_new_smob" = xyes; then :
16954d5d
LC
11275 cat >>confdefs.h <<_ACEOF
11276#define HAVE_SCM_NEW_SMOB 1
11277_ACEOF
11278
11279fi
11280done
11281
11282 LIBS="$save_LIBS"
11283 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
11284else
11285 # Even if Guile support is not compiled in, we need to have these files
11286 # included.
bd810fff 11287 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
ed3ef339
DE
11288 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11289fi
9a156167 11290
ac534cba 11291
4df42755
DE
11292 if test "${have_libguile}" != no; then
11293 HAVE_GUILE_TRUE=
11294 HAVE_GUILE_FALSE='#'
11295else
11296 HAVE_GUILE_TRUE='#'
11297 HAVE_GUILE_FALSE=
11298fi
11299
ac534cba 11300
62f29fda
TT
11301# ---------------------------- #
11302# Check for source highlight. #
11303# ---------------------------- #
11304
11305SRCHIGH_LIBS=
11306SRCHIGH_CFLAGS=
189b8c2e
ST
11307
11308# Check whether --enable-source-highlight was given.
11309if test "${enable_source_highlight+set}" = set; then :
11310 enableval=$enable_source_highlight; case "${enableval}" in
11311 yes) enable_source_highlight=yes ;;
11312 no) enable_source_highlight=no ;;
11313 *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;;
11314esac
11315else
11316 enable_source_highlight=auto
11317fi
11318
11319
11320if test "${enable_source_highlight}" != "no"; then
11321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
6c28e44a 11322$as_echo_n "checking for the source-highlight library... " >&6; }
189b8c2e
ST
11323 if test "${pkg_config_prog_path}" = "missing"; then
11324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
62f29fda 11325$as_echo "no - pkg-config not found" >&6; }
189b8c2e
ST
11326 if test "${enable_source_highlight}" = "yes"; then
11327 as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
11328 fi
11329 else
d806ea2d
TT
11330 case "$LDFLAGS" in
11331 *static-libstdc*)
11332 as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
11333 ;;
11334 esac
11335
189b8c2e 11336 if ${pkg_config_prog_path} --exists source-highlight; then
62f29fda
TT
11337 SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
11338 SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
11339
11340$as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
11341
11342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11343$as_echo "yes" >&6; }
189b8c2e 11344 else
62f29fda
TT
11345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11346$as_echo "no" >&6; }
189b8c2e
ST
11347 if test "${enable_source_highlight}" = "yes"; then
11348 as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
11349 fi
11350 fi
11351 fi
62f29fda
TT
11352fi
11353
11354
11355
58bfce93
MM
11356
11357# Check whether --with-intel_pt was given.
11358if test "${with_intel_pt+set}" = set; then :
11359 withval=$with_intel_pt;
11360else
11361 with_intel_pt=auto
11362fi
11363
11364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
11365$as_echo_n "checking whether to use intel pt... " >&6; }
11366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
11367$as_echo "$with_intel_pt" >&6; }
11368
11369if test "${with_intel_pt}" = no; then
bc504a31
PA
11370 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
11371$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
58bfce93
MM
11372 HAVE_LIBIPT=no
11373else
5599c404
MM
11374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11375/* end confdefs.h. */
11376
11377#include <linux/perf_event.h>
11378#ifndef PERF_ATTR_SIZE_VER5
11379# error
11380#endif
11381
11382_ACEOF
11383if ac_fn_c_try_cpp "$LINENO"; then :
11384 perf_event=yes
11385else
11386 perf_event=no
11387fi
d0ac1c44 11388rm -f conftest.err conftest.i conftest.$ac_ext
5599c404
MM
11389 if test "$perf_event" != yes; then
11390 if test "$with_intel_pt" = yes; then
d0ac1c44 11391 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
5599c404
MM
11392 else
11393 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
11394$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
11395 fi
11396 fi
11397
58bfce93
MM
11398
11399
11400
11401
11402
11403
11404
11405
11406 use_additional=yes
11407
11408 acl_save_prefix="$prefix"
11409 prefix="$acl_final_prefix"
11410 acl_save_exec_prefix="$exec_prefix"
11411 exec_prefix="$acl_final_exec_prefix"
11412
11413 eval additional_includedir=\"$includedir\"
11414 eval additional_libdir=\"$libdir\"
11415
11416 exec_prefix="$acl_save_exec_prefix"
11417 prefix="$acl_save_prefix"
11418
11419
11420# Check whether --with-libipt-prefix was given.
11421if test "${with_libipt_prefix+set}" = set; then :
11422 withval=$with_libipt_prefix;
11423 if test "X$withval" = "Xno"; then
11424 use_additional=no
11425 else
11426 if test "X$withval" = "X"; then
11427
11428 acl_save_prefix="$prefix"
11429 prefix="$acl_final_prefix"
11430 acl_save_exec_prefix="$exec_prefix"
11431 exec_prefix="$acl_final_exec_prefix"
11432
11433 eval additional_includedir=\"$includedir\"
11434 eval additional_libdir=\"$libdir\"
11435
11436 exec_prefix="$acl_save_exec_prefix"
11437 prefix="$acl_save_prefix"
11438
11439 else
11440 additional_includedir="$withval/include"
11441 additional_libdir="$withval/lib"
11442 fi
11443 fi
11444
11445fi
11446
11447 LIBIPT=
11448 LTLIBIPT=
11449 INCIPT=
11450 rpathdirs=
11451 ltrpathdirs=
11452 names_already_handled=
11453 names_next_round='ipt '
11454 while test -n "$names_next_round"; do
11455 names_this_round="$names_next_round"
11456 names_next_round=
11457 for name in $names_this_round; do
11458 already_handled=
11459 for n in $names_already_handled; do
11460 if test "$n" = "$name"; then
11461 already_handled=yes
11462 break
11463 fi
11464 done
11465 if test -z "$already_handled"; then
11466 names_already_handled="$names_already_handled $name"
11467 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11468 eval value=\"\$HAVE_LIB$uppername\"
11469 if test -n "$value"; then
11470 if test "$value" = yes; then
11471 eval value=\"\$LIB$uppername\"
11472 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
11473 eval value=\"\$LTLIB$uppername\"
11474 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
11475 else
11476 :
11477 fi
11478 else
11479 found_dir=
11480 found_la=
11481 found_so=
11482 found_a=
11483 if test $use_additional = yes; then
11484 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11485 found_dir="$additional_libdir"
11486 found_so="$additional_libdir/lib$name.$shlibext"
11487 if test -f "$additional_libdir/lib$name.la"; then
11488 found_la="$additional_libdir/lib$name.la"
11489 fi
11490 else
11491 if test -f "$additional_libdir/lib$name.$libext"; then
11492 found_dir="$additional_libdir"
11493 found_a="$additional_libdir/lib$name.$libext"
11494 if test -f "$additional_libdir/lib$name.la"; then
11495 found_la="$additional_libdir/lib$name.la"
11496 fi
11497 fi
11498 fi
11499 fi
11500 if test "X$found_dir" = "X"; then
11501 for x in $LDFLAGS $LTLIBIPT; do
11502
11503 acl_save_prefix="$prefix"
11504 prefix="$acl_final_prefix"
11505 acl_save_exec_prefix="$exec_prefix"
11506 exec_prefix="$acl_final_exec_prefix"
11507 eval x=\"$x\"
11508 exec_prefix="$acl_save_exec_prefix"
11509 prefix="$acl_save_prefix"
11510
11511 case "$x" in
11512 -L*)
11513 dir=`echo "X$x" | sed -e 's/^X-L//'`
11514 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11515 found_dir="$dir"
11516 found_so="$dir/lib$name.$shlibext"
11517 if test -f "$dir/lib$name.la"; then
11518 found_la="$dir/lib$name.la"
11519 fi
11520 else
11521 if test -f "$dir/lib$name.$libext"; then
11522 found_dir="$dir"
11523 found_a="$dir/lib$name.$libext"
11524 if test -f "$dir/lib$name.la"; then
11525 found_la="$dir/lib$name.la"
11526 fi
11527 fi
11528 fi
11529 ;;
11530 esac
11531 if test "X$found_dir" != "X"; then
11532 break
11533 fi
11534 done
11535 fi
11536 if test "X$found_dir" != "X"; then
11537 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
11538 if test "X$found_so" != "X"; then
11539 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11540 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11541 else
11542 haveit=
11543 for x in $ltrpathdirs; do
11544 if test "X$x" = "X$found_dir"; then
11545 haveit=yes
11546 break
11547 fi
11548 done
11549 if test -z "$haveit"; then
11550 ltrpathdirs="$ltrpathdirs $found_dir"
11551 fi
11552 if test "$hardcode_direct" = yes; then
11553 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11554 else
11555 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11556 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11557 haveit=
11558 for x in $rpathdirs; do
11559 if test "X$x" = "X$found_dir"; then
11560 haveit=yes
11561 break
11562 fi
11563 done
11564 if test -z "$haveit"; then
11565 rpathdirs="$rpathdirs $found_dir"
11566 fi
11567 else
11568 haveit=
11569 for x in $LDFLAGS $LIBIPT; do
11570
11571 acl_save_prefix="$prefix"
11572 prefix="$acl_final_prefix"
11573 acl_save_exec_prefix="$exec_prefix"
11574 exec_prefix="$acl_final_exec_prefix"
11575 eval x=\"$x\"
11576 exec_prefix="$acl_save_exec_prefix"
11577 prefix="$acl_save_prefix"
11578
11579 if test "X$x" = "X-L$found_dir"; then
11580 haveit=yes
11581 break
11582 fi
11583 done
11584 if test -z "$haveit"; then
11585 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
11586 fi
11587 if test "$hardcode_minus_L" != no; then
11588 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11589 else
11590 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11591 fi
11592 fi
11593 fi
11594 fi
11595 else
11596 if test "X$found_a" != "X"; then
11597 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
11598 else
11599 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
11600 fi
11601 fi
11602 additional_includedir=
11603 case "$found_dir" in
11604 */lib | */lib/)
11605 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11606 additional_includedir="$basedir/include"
11607 ;;
11608 esac
11609 if test "X$additional_includedir" != "X"; then
11610 if test "X$additional_includedir" != "X/usr/include"; then
11611 haveit=
11612 if test "X$additional_includedir" = "X/usr/local/include"; then
11613 if test -n "$GCC"; then
11614 case $host_os in
11615 linux*) haveit=yes;;
11616 esac
11617 fi
11618 fi
11619 if test -z "$haveit"; then
11620 for x in $CPPFLAGS $INCIPT; do
11621
11622 acl_save_prefix="$prefix"
11623 prefix="$acl_final_prefix"
11624 acl_save_exec_prefix="$exec_prefix"
11625 exec_prefix="$acl_final_exec_prefix"
11626 eval x=\"$x\"
11627 exec_prefix="$acl_save_exec_prefix"
11628 prefix="$acl_save_prefix"
11629
11630 if test "X$x" = "X-I$additional_includedir"; then
11631 haveit=yes
11632 break
11633 fi
11634 done
11635 if test -z "$haveit"; then
11636 if test -d "$additional_includedir"; then
11637 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
11638 fi
11639 fi
11640 fi
11641 fi
11642 fi
11643 if test -n "$found_la"; then
11644 save_libdir="$libdir"
11645 case "$found_la" in
11646 */* | *\\*) . "$found_la" ;;
11647 *) . "./$found_la" ;;
11648 esac
11649 libdir="$save_libdir"
11650 for dep in $dependency_libs; do
11651 case "$dep" in
11652 -L*)
11653 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11654 if test "X$additional_libdir" != "X/usr/lib"; then
11655 haveit=
11656 if test "X$additional_libdir" = "X/usr/local/lib"; then
11657 if test -n "$GCC"; then
11658 case $host_os in
11659 linux*) haveit=yes;;
11660 esac
11661 fi
11662 fi
11663 if test -z "$haveit"; then
11664 haveit=
11665 for x in $LDFLAGS $LIBIPT; do
11666
11667 acl_save_prefix="$prefix"
11668 prefix="$acl_final_prefix"
11669 acl_save_exec_prefix="$exec_prefix"
11670 exec_prefix="$acl_final_exec_prefix"
11671 eval x=\"$x\"
11672 exec_prefix="$acl_save_exec_prefix"
11673 prefix="$acl_save_prefix"
11674
11675 if test "X$x" = "X-L$additional_libdir"; then
11676 haveit=yes
11677 break
11678 fi
11679 done
11680 if test -z "$haveit"; then
11681 if test -d "$additional_libdir"; then
11682 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
11683 fi
11684 fi
11685 haveit=
11686 for x in $LDFLAGS $LTLIBIPT; do
11687
11688 acl_save_prefix="$prefix"
11689 prefix="$acl_final_prefix"
11690 acl_save_exec_prefix="$exec_prefix"
11691 exec_prefix="$acl_final_exec_prefix"
11692 eval x=\"$x\"
11693 exec_prefix="$acl_save_exec_prefix"
11694 prefix="$acl_save_prefix"
11695
11696 if test "X$x" = "X-L$additional_libdir"; then
11697 haveit=yes
11698 break
11699 fi
11700 done
11701 if test -z "$haveit"; then
11702 if test -d "$additional_libdir"; then
11703 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
11704 fi
11705 fi
11706 fi
11707 fi
11708 ;;
11709 -R*)
11710 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11711 if test "$enable_rpath" != no; then
11712 haveit=
11713 for x in $rpathdirs; do
11714 if test "X$x" = "X$dir"; then
11715 haveit=yes
11716 break
11717 fi
11718 done
11719 if test -z "$haveit"; then
11720 rpathdirs="$rpathdirs $dir"
11721 fi
11722 haveit=
11723 for x in $ltrpathdirs; do
11724 if test "X$x" = "X$dir"; then
11725 haveit=yes
11726 break
11727 fi
11728 done
11729 if test -z "$haveit"; then
11730 ltrpathdirs="$ltrpathdirs $dir"
11731 fi
11732 fi
11733 ;;
11734 -l*)
11735 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11736 ;;
11737 *.la)
11738 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11739 ;;
11740 *)
11741 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
11742 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
11743 ;;
11744 esac
11745 done
11746 fi
11747 else
11748 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11749 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
11750 fi
11751 fi
11752 fi
11753 done
11754 done
11755 if test "X$rpathdirs" != "X"; then
11756 if test -n "$hardcode_libdir_separator"; then
11757 alldirs=
11758 for found_dir in $rpathdirs; do
11759 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11760 done
11761 acl_save_libdir="$libdir"
11762 libdir="$alldirs"
11763 eval flag=\"$hardcode_libdir_flag_spec\"
11764 libdir="$acl_save_libdir"
11765 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11766 else
11767 for found_dir in $rpathdirs; do
11768 acl_save_libdir="$libdir"
11769 libdir="$found_dir"
11770 eval flag=\"$hardcode_libdir_flag_spec\"
11771 libdir="$acl_save_libdir"
11772 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11773 done
11774 fi
11775 fi
11776 if test "X$ltrpathdirs" != "X"; then
11777 for found_dir in $ltrpathdirs; do
11778 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
11779 done
11780 fi
11781
11782
11783 ac_save_CPPFLAGS="$CPPFLAGS"
11784
11785 for element in $INCIPT; do
11786 haveit=
11787 for x in $CPPFLAGS; do
11788
11789 acl_save_prefix="$prefix"
11790 prefix="$acl_final_prefix"
11791 acl_save_exec_prefix="$exec_prefix"
11792 exec_prefix="$acl_final_exec_prefix"
11793 eval x=\"$x\"
11794 exec_prefix="$acl_save_exec_prefix"
11795 prefix="$acl_save_prefix"
11796
11797 if test "X$x" = "X$element"; then
11798 haveit=yes
11799 break
11800 fi
11801 done
11802 if test -z "$haveit"; then
11803 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11804 fi
11805 done
11806
11807
11808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
11809$as_echo_n "checking for libipt... " >&6; }
d0ac1c44 11810if ${ac_cv_libipt+:} false; then :
58bfce93
MM
11811 $as_echo_n "(cached) " >&6
11812else
11813
11814 ac_save_LIBS="$LIBS"
11815 LIBS="$LIBS $LIBIPT"
11816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11817/* end confdefs.h. */
11818#include "intel-pt.h"
11819int
11820main ()
11821{
11822pt_insn_alloc_decoder (0);
11823 ;
11824 return 0;
11825}
11826_ACEOF
11827if ac_fn_c_try_link "$LINENO"; then :
11828 ac_cv_libipt=yes
11829else
11830 ac_cv_libipt=no
11831fi
11832rm -f core conftest.err conftest.$ac_objext \
11833 conftest$ac_exeext conftest.$ac_ext
11834 LIBS="$ac_save_LIBS"
11835
11836fi
11837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
11838$as_echo "$ac_cv_libipt" >&6; }
11839 if test "$ac_cv_libipt" = yes; then
11840 HAVE_LIBIPT=yes
11841
11842$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
11843
11844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
11845$as_echo_n "checking how to link with libipt... " >&6; }
11846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
11847$as_echo "$LIBIPT" >&6; }
11848 else
11849 HAVE_LIBIPT=no
11850 CPPFLAGS="$ac_save_CPPFLAGS"
11851 LIBIPT=
11852 LTLIBIPT=
11853 fi
11854
11855
11856
11857
11858
11859
11860 if test "$HAVE_LIBIPT" != yes; then
11861 if test "$with_intel_pt" = yes; then
d0ac1c44 11862 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
58bfce93
MM
11863 else
11864 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
11865$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
11866 fi
c56ccc05
MM
11867 else
11868 save_LIBS=$LIBS
11869 LIBS="$LIBS $LIBIPT"
11870 for ac_func in pt_insn_event
11871do :
11872 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
d0ac1c44 11873if test "x$ac_cv_func_pt_insn_event" = xyes; then :
c56ccc05
MM
11874 cat >>confdefs.h <<_ACEOF
11875#define HAVE_PT_INSN_EVENT 1
11876_ACEOF
11877
11878fi
11879done
11880
11881 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
11882"
d0ac1c44 11883if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
c56ccc05
MM
11884
11885cat >>confdefs.h <<_ACEOF
11886#define HAVE_STRUCT_PT_INSN_ENABLED 1
11887_ACEOF
11888
11889
11890fi
11891ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
11892"
d0ac1c44 11893if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
c56ccc05
MM
11894
11895cat >>confdefs.h <<_ACEOF
11896#define HAVE_STRUCT_PT_INSN_RESYNCED 1
11897_ACEOF
11898
11899
11900fi
11901
11902 LIBS=$save_LIBS
58bfce93
MM
11903 fi
11904fi
11905
81ecdfbb
RW
11906# ------------------------- #
11907# Checks for header files. #
11908# ------------------------- #
c890192f 11909
81ecdfbb
RW
11910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11911$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 11912if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 11913 $as_echo_n "(cached) " >&6
bec39cab 11914else
81ecdfbb 11915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11916/* end confdefs.h. */
81ecdfbb
RW
11917#include <stdlib.h>
11918#include <stdarg.h>
11919#include <string.h>
11920#include <float.h>
11921
a9322a30
TT
11922int
11923main ()
11924{
a9322a30
TT
11925
11926 ;
11927 return 0;
11928}
bec39cab 11929_ACEOF
81ecdfbb
RW
11930if ac_fn_c_try_compile "$LINENO"; then :
11931 ac_cv_header_stdc=yes
bec39cab 11932else
81ecdfbb 11933 ac_cv_header_stdc=no
a9322a30 11934fi
81ecdfbb 11935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11936
81ecdfbb
RW
11937if test $ac_cv_header_stdc = yes; then
11938 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11940/* end confdefs.h. */
11941#include <string.h>
bec39cab 11942
81ecdfbb
RW
11943_ACEOF
11944if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11945 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 11946
bec39cab 11947else
81ecdfbb
RW
11948 ac_cv_header_stdc=no
11949fi
11950rm -f conftest*
11951
11952fi
11953
11954if test $ac_cv_header_stdc = yes; then
11955 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11957/* end confdefs.h. */
11958#include <stdlib.h>
11959
bec39cab 11960_ACEOF
81ecdfbb
RW
11961if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11962 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 11963
81ecdfbb
RW
11964else
11965 ac_cv_header_stdc=no
11966fi
11967rm -f conftest*
bec39cab 11968
bec39cab 11969fi
81ecdfbb
RW
11970
11971if test $ac_cv_header_stdc = yes; then
11972 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11973 if test "$cross_compiling" = yes; then :
11974 :
bec39cab 11975else
81ecdfbb 11976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11977/* end confdefs.h. */
81ecdfbb
RW
11978#include <ctype.h>
11979#include <stdlib.h>
11980#if ((' ' & 0x0FF) == 0x020)
11981# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11982# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11983#else
11984# define ISLOWER(c) \
11985 (('a' <= (c) && (c) <= 'i') \
11986 || ('j' <= (c) && (c) <= 'r') \
11987 || ('s' <= (c) && (c) <= 'z'))
11988# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11989#endif
11990
11991#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
11992int
11993main ()
11994{
81ecdfbb
RW
11995 int i;
11996 for (i = 0; i < 256; i++)
11997 if (XOR (islower (i), ISLOWER (i))
11998 || toupper (i) != TOUPPER (i))
11999 return 2;
a9322a30
TT
12000 return 0;
12001}
bec39cab 12002_ACEOF
81ecdfbb
RW
12003if ac_fn_c_try_run "$LINENO"; then :
12004
bec39cab 12005else
81ecdfbb
RW
12006 ac_cv_header_stdc=no
12007fi
12008rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12009 conftest.$ac_objext conftest.beam conftest.$ac_ext
12010fi
bec39cab 12011
bec39cab 12012fi
a9322a30 12013fi
81ecdfbb
RW
12014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12015$as_echo "$ac_cv_header_stdc" >&6; }
12016if test $ac_cv_header_stdc = yes; then
bec39cab 12017
81ecdfbb 12018$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 12019
81ecdfbb 12020fi
bec39cab 12021
81ecdfbb 12022# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 12023for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
43b7e92b 12024 thread_db.h linux/elf.h \
81ecdfbb
RW
12025 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12026 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
44122162 12027 sys/reg.h sys/debugreg.h sys/select.h \
2d41fa11 12028 termios.h elf_hp.h
81ecdfbb
RW
12029do :
12030 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12031ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 12032if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12033 cat >>confdefs.h <<_ACEOF
81ecdfbb 12034#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12035_ACEOF
c906108c 12036
bec39cab 12037fi
81ecdfbb
RW
12038
12039done
12040
81ecdfbb
RW
12041for ac_header in sys/user.h
12042do :
12043 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
12044# include <sys/param.h>
a9322a30
TT
12045#endif
12046
81ecdfbb 12047"
d0ac1c44 12048if test "x$ac_cv_header_sys_user_h" = xyes; then :
81ecdfbb
RW
12049 cat >>confdefs.h <<_ACEOF
12050#define HAVE_SYS_USER_H 1
bec39cab 12051_ACEOF
bec39cab 12052
a9322a30 12053fi
bec39cab 12054
81ecdfbb 12055done
5ee754fc 12056
5ee754fc 12057
5007d765 12058for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
81ecdfbb
RW
12059do :
12060 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12061ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 12062if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12063 cat >>confdefs.h <<_ACEOF
81ecdfbb 12064#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12065_ACEOF
5ee754fc
MK
12066
12067fi
12068
81ecdfbb 12069done
bec39cab 12070
81ecdfbb
RW
12071for ac_header in term.h
12072do :
12073 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
12074# include <curses.h>
12075#endif
bec39cab 12076
81ecdfbb 12077"
d0ac1c44 12078if test "x$ac_cv_header_term_h" = xyes; then :
81ecdfbb
RW
12079 cat >>confdefs.h <<_ACEOF
12080#define HAVE_TERM_H 1
a8111142 12081_ACEOF
a8111142 12082
a8111142 12083fi
a8111142 12084
81ecdfbb 12085done
a8111142
TT
12086
12087
81ecdfbb
RW
12088# ------------------------- #
12089# Checks for declarations. #
12090# ------------------------- #
a9322a30 12091
07697489
PA
12092
12093 # Check for presence and size of long long.
12094 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
d0ac1c44 12095if test "x$ac_cv_type_long_long" = xyes; then :
07697489
PA
12096
12097cat >>confdefs.h <<_ACEOF
12098#define HAVE_LONG_LONG 1
12099_ACEOF
12100
12101# The cast to long int works around a bug in the HP C Compiler
12102# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12103# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12104# This bug is HP SR number 8606223364.
12105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
12106$as_echo_n "checking size of long long... " >&6; }
d0ac1c44 12107if ${ac_cv_sizeof_long_long+:} false; then :
07697489
PA
12108 $as_echo_n "(cached) " >&6
12109else
12110 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
12111
12112else
12113 if test "$ac_cv_type_long_long" = yes; then
12114 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12115$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
12116as_fn_error 77 "cannot compute sizeof (long long)
12117See \`config.log' for more details" "$LINENO" 5; }
07697489
PA
12118 else
12119 ac_cv_sizeof_long_long=0
12120 fi
12121fi
12122
12123fi
12124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
12125$as_echo "$ac_cv_sizeof_long_long" >&6; }
12126
12127
12128
12129cat >>confdefs.h <<_ACEOF
12130#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12131_ACEOF
12132
12133
12134fi
12135
12136
d0ac1c44
SM
12137 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
12138ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
12139if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
07697489
PA
12140 ac_have_decl=1
12141else
12142 ac_have_decl=0
12143fi
12144
12145cat >>confdefs.h <<_ACEOF
12146#define HAVE_DECL_BASENAME $ac_have_decl
12147_ACEOF
12148ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
d0ac1c44 12149if test "x$ac_cv_have_decl_ffs" = xyes; then :
07697489
PA
12150 ac_have_decl=1
12151else
12152 ac_have_decl=0
12153fi
12154
12155cat >>confdefs.h <<_ACEOF
12156#define HAVE_DECL_FFS $ac_have_decl
12157_ACEOF
12158ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
d0ac1c44 12159if test "x$ac_cv_have_decl_asprintf" = xyes; then :
07697489
PA
12160 ac_have_decl=1
12161else
12162 ac_have_decl=0
12163fi
12164
12165cat >>confdefs.h <<_ACEOF
12166#define HAVE_DECL_ASPRINTF $ac_have_decl
12167_ACEOF
12168ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
d0ac1c44 12169if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
07697489
PA
12170 ac_have_decl=1
12171else
12172 ac_have_decl=0
12173fi
12174
12175cat >>confdefs.h <<_ACEOF
12176#define HAVE_DECL_VASPRINTF $ac_have_decl
12177_ACEOF
12178ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
d0ac1c44 12179if test "x$ac_cv_have_decl_snprintf" = xyes; then :
07697489
PA
12180 ac_have_decl=1
12181else
12182 ac_have_decl=0
12183fi
12184
12185cat >>confdefs.h <<_ACEOF
12186#define HAVE_DECL_SNPRINTF $ac_have_decl
12187_ACEOF
12188ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
d0ac1c44 12189if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
07697489
PA
12190 ac_have_decl=1
12191else
12192 ac_have_decl=0
12193fi
12194
12195cat >>confdefs.h <<_ACEOF
12196#define HAVE_DECL_VSNPRINTF $ac_have_decl
12197_ACEOF
12198
12199 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
d0ac1c44 12200if test "x$ac_cv_have_decl_strtol" = xyes; then :
07697489
PA
12201 ac_have_decl=1
12202else
12203 ac_have_decl=0
12204fi
12205
12206cat >>confdefs.h <<_ACEOF
12207#define HAVE_DECL_STRTOL $ac_have_decl
12208_ACEOF
12209ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
d0ac1c44 12210if test "x$ac_cv_have_decl_strtoul" = xyes; then :
07697489
PA
12211 ac_have_decl=1
12212else
12213 ac_have_decl=0
12214fi
12215
12216cat >>confdefs.h <<_ACEOF
12217#define HAVE_DECL_STRTOUL $ac_have_decl
12218_ACEOF
12219ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
d0ac1c44 12220if test "x$ac_cv_have_decl_strtoll" = xyes; then :
07697489
PA
12221 ac_have_decl=1
12222else
12223 ac_have_decl=0
12224fi
12225
12226cat >>confdefs.h <<_ACEOF
12227#define HAVE_DECL_STRTOLL $ac_have_decl
12228_ACEOF
12229ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
d0ac1c44 12230if test "x$ac_cv_have_decl_strtoull" = xyes; then :
07697489
PA
12231 ac_have_decl=1
12232else
12233 ac_have_decl=0
12234fi
12235
12236cat >>confdefs.h <<_ACEOF
12237#define HAVE_DECL_STRTOULL $ac_have_decl
12238_ACEOF
12239
12240 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
d0ac1c44 12241if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
07697489
PA
12242 ac_have_decl=1
12243else
12244 ac_have_decl=0
12245fi
12246
12247cat >>confdefs.h <<_ACEOF
12248#define HAVE_DECL_STRVERSCMP $ac_have_decl
12249_ACEOF
12250
12251
12252
81ecdfbb 12253ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
d0ac1c44 12254if test "x$ac_cv_have_decl_snprintf" = xyes; then :
81ecdfbb
RW
12255 ac_have_decl=1
12256else
12257 ac_have_decl=0
5ee754fc 12258fi
81ecdfbb
RW
12259
12260cat >>confdefs.h <<_ACEOF
12261#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 12262_ACEOF
5ee754fc 12263
5ee754fc 12264
81ecdfbb
RW
12265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12266$as_echo_n "checking for LC_MESSAGES... " >&6; }
d0ac1c44 12267if ${am_cv_val_LC_MESSAGES+:} false; then :
81ecdfbb 12268 $as_echo_n "(cached) " >&6
bec39cab 12269else
81ecdfbb 12270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12271/* end confdefs.h. */
81ecdfbb 12272#include <locale.h>
a9322a30
TT
12273int
12274main ()
12275{
81ecdfbb 12276return LC_MESSAGES
a9322a30
TT
12277 ;
12278 return 0;
12279}
bec39cab 12280_ACEOF
81ecdfbb
RW
12281if ac_fn_c_try_link "$LINENO"; then :
12282 am_cv_val_LC_MESSAGES=yes
bec39cab 12283else
81ecdfbb
RW
12284 am_cv_val_LC_MESSAGES=no
12285fi
12286rm -f core conftest.err conftest.$ac_objext \
12287 conftest$ac_exeext conftest.$ac_ext
12288fi
12289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12290$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12291 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 12292
81ecdfbb
RW
12293$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
12294
12295 fi
12296
12297
12298# ----------------------- #
12299# Checks for structures. #
12300# ----------------------- #
12301
12302ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
d0ac1c44 12303if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
81ecdfbb
RW
12304
12305cat >>confdefs.h <<_ACEOF
12306#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 12307_ACEOF
7eb368b3 12308
81ecdfbb 12309
7eb368b3 12310fi
81ecdfbb 12311ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
d0ac1c44 12312if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
7eb368b3 12313
a9322a30
TT
12314cat >>confdefs.h <<_ACEOF
12315#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
12316_ACEOF
12317
a9322a30 12318
7eb368b3
NR
12319fi
12320
7eb368b3 12321
a9322a30
TT
12322# ------------------ #
12323# Checks for types. #
12324# ------------------ #
7eb368b3 12325
81ecdfbb 12326ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
12327#include <sys/socket.h>
12328
81ecdfbb 12329"
d0ac1c44 12330if test "x$ac_cv_type_socklen_t" = xyes; then :
bec39cab 12331
a9322a30
TT
12332cat >>confdefs.h <<_ACEOF
12333#define HAVE_SOCKLEN_T 1
12334_ACEOF
12335
12336
12337fi
12338
12339
12340# ------------------------------------- #
12341# Checks for compiler characteristics. #
12342# ------------------------------------- #
12343
81ecdfbb
RW
12344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12345$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
d0ac1c44 12346if ${ac_cv_c_const+:} false; then :
81ecdfbb 12347 $as_echo_n "(cached) " >&6
a9322a30 12348else
81ecdfbb 12349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12350/* end confdefs.h. */
a9322a30
TT
12351
12352int
12353main ()
12354{
d0ac1c44 12355
a9322a30 12356#ifndef __cplusplus
d0ac1c44 12357 /* Ultrix mips cc rejects this sort of thing. */
a9322a30 12358 typedef int charset[2];
d0ac1c44 12359 const charset cs = { 0, 0 };
a9322a30 12360 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
12361 char const *const *pcpcc;
12362 char **ppc;
a9322a30
TT
12363 /* NEC SVR4.0.2 mips cc rejects this. */
12364 struct point {int x, y;};
12365 static struct point const zero = {0,0};
12366 /* AIX XL C 1.02.0.0 rejects this.
12367 It does not let you subtract one const X* pointer from another in
12368 an arm of an if-expression whose if-part is not a constant
12369 expression */
12370 const char *g = "string";
81ecdfbb 12371 pcpcc = &g + (g ? g-g : 0);
a9322a30 12372 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
12373 ++pcpcc;
12374 ppc = (char**) pcpcc;
12375 pcpcc = (char const *const *) ppc;
d0ac1c44
SM
12376 { /* SCO 3.2v4 cc rejects this sort of thing. */
12377 char tx;
12378 char *t = &tx;
a9322a30
TT
12379 char const *s = 0 ? (char *) 0 : (char const *) 0;
12380
12381 *t++ = 0;
81ecdfbb 12382 if (s) return 0;
a9322a30
TT
12383 }
12384 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12385 int x[] = {25, 17};
12386 const int *foo = &x[0];
12387 ++foo;
12388 }
12389 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12390 typedef const int *iptr;
12391 iptr p = 0;
12392 ++p;
12393 }
d0ac1c44 12394 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
a9322a30 12395 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
d0ac1c44
SM
12396 struct s { int j; const int *ap[3]; } bx;
12397 struct s *b = &bx; b->j = 5;
a9322a30
TT
12398 }
12399 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12400 const int foo = 10;
81ecdfbb 12401 if (!foo) return 0;
a9322a30 12402 }
81ecdfbb 12403 return !cs[0] && !zero.x;
a9322a30
TT
12404#endif
12405
12406 ;
12407 return 0;
12408}
bec39cab 12409_ACEOF
81ecdfbb 12410if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12411 ac_cv_c_const=yes
5ee754fc 12412else
81ecdfbb 12413 ac_cv_c_const=no
5ee754fc 12414fi
81ecdfbb 12415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 12416fi
81ecdfbb
RW
12417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12418$as_echo "$ac_cv_c_const" >&6; }
a9322a30 12419if test $ac_cv_c_const = no; then
bec39cab 12420
81ecdfbb 12421$as_echo "#define const /**/" >>confdefs.h
bec39cab 12422
5ee754fc 12423fi
bec39cab 12424
81ecdfbb
RW
12425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12426$as_echo_n "checking for inline... " >&6; }
d0ac1c44 12427if ${ac_cv_c_inline+:} false; then :
81ecdfbb 12428 $as_echo_n "(cached) " >&6
bec39cab 12429else
a9322a30
TT
12430 ac_cv_c_inline=no
12431for ac_kw in inline __inline__ __inline; do
81ecdfbb 12432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12433/* end confdefs.h. */
a9322a30
TT
12434#ifndef __cplusplus
12435typedef int foo_t;
12436static $ac_kw foo_t static_foo () {return 0; }
12437$ac_kw foo_t foo () {return 0; }
12438#endif
12439
bec39cab 12440_ACEOF
81ecdfbb
RW
12441if ac_fn_c_try_compile "$LINENO"; then :
12442 ac_cv_c_inline=$ac_kw
bec39cab 12443fi
81ecdfbb
RW
12444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12445 test "$ac_cv_c_inline" != no && break
a9322a30 12446done
bec39cab 12447
5ee754fc 12448fi
81ecdfbb
RW
12449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12450$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 12451
a9322a30
TT
12452case $ac_cv_c_inline in
12453 inline | yes) ;;
12454 *)
12455 case $ac_cv_c_inline in
12456 no) ac_val=;;
12457 *) ac_val=$ac_cv_c_inline;;
12458 esac
12459 cat >>confdefs.h <<_ACEOF
12460#ifndef __cplusplus
12461#define inline $ac_val
12462#endif
12463_ACEOF
bec39cab
AC
12464 ;;
12465esac
bec39cab 12466
81ecdfbb
RW
12467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12468$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
d0ac1c44 12469if ${ac_cv_c_bigendian+:} false; then :
81ecdfbb 12470 $as_echo_n "(cached) " >&6
bec39cab 12471else
81ecdfbb
RW
12472 ac_cv_c_bigendian=unknown
12473 # See if we're dealing with a universal compiler.
12474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12475/* end confdefs.h. */
12476#ifndef __APPLE_CC__
12477 not a universal capable compiler
12478 #endif
12479 typedef int dummy;
12480
12481_ACEOF
12482if ac_fn_c_try_compile "$LINENO"; then :
12483
12484 # Check for potential -arch flags. It is not universal unless
12485 # there are at least two -arch flags with different values.
12486 ac_arch=
12487 ac_prev=
12488 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12489 if test -n "$ac_prev"; then
12490 case $ac_word in
12491 i?86 | x86_64 | ppc | ppc64)
12492 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12493 ac_arch=$ac_word
12494 else
12495 ac_cv_c_bigendian=universal
12496 break
12497 fi
12498 ;;
12499 esac
12500 ac_prev=
12501 elif test "x$ac_word" = "x-arch"; then
12502 ac_prev=arch
12503 fi
12504 done
12505fi
12506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12507 if test $ac_cv_c_bigendian = unknown; then
12508 # See if sys/param.h defines the BYTE_ORDER macro.
12509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12510/* end confdefs.h. */
a9322a30 12511#include <sys/types.h>
81ecdfbb 12512 #include <sys/param.h>
a9322a30
TT
12513
12514int
12515main ()
12516{
81ecdfbb
RW
12517#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12518 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12519 && LITTLE_ENDIAN)
12520 bogus endian macros
12521 #endif
a9322a30
TT
12522
12523 ;
12524 return 0;
12525}
bec39cab 12526_ACEOF
81ecdfbb 12527if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12528 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 12529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12530/* end confdefs.h. */
a9322a30 12531#include <sys/types.h>
81ecdfbb 12532 #include <sys/param.h>
a9322a30
TT
12533
12534int
12535main ()
12536{
12537#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
12538 not big endian
12539 #endif
a9322a30
TT
12540
12541 ;
12542 return 0;
12543}
bec39cab 12544_ACEOF
81ecdfbb 12545if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12546 ac_cv_c_bigendian=yes
5ee754fc 12547else
81ecdfbb 12548 ac_cv_c_bigendian=no
5ee754fc 12549fi
81ecdfbb
RW
12550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12551fi
12552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12553 fi
12554 if test $ac_cv_c_bigendian = unknown; then
12555 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12557/* end confdefs.h. */
12558#include <limits.h>
bec39cab 12559
81ecdfbb
RW
12560int
12561main ()
12562{
12563#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12564 bogus endian macros
12565 #endif
12566
12567 ;
12568 return 0;
12569}
7eb368b3 12570_ACEOF
81ecdfbb
RW
12571if ac_fn_c_try_compile "$LINENO"; then :
12572 # It does; now see whether it defined to _BIG_ENDIAN or not.
12573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 12574/* end confdefs.h. */
81ecdfbb
RW
12575#include <limits.h>
12576
7eb368b3
NR
12577int
12578main ()
12579{
81ecdfbb
RW
12580#ifndef _BIG_ENDIAN
12581 not big endian
12582 #endif
12583
7eb368b3
NR
12584 ;
12585 return 0;
12586}
12587_ACEOF
81ecdfbb 12588if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12589 ac_cv_c_bigendian=yes
81ecdfbb
RW
12590else
12591 ac_cv_c_bigendian=no
a9322a30 12592fi
81ecdfbb 12593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 12594fi
81ecdfbb
RW
12595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12596 fi
12597 if test $ac_cv_c_bigendian = unknown; then
12598 # Compile a test program.
12599 if test "$cross_compiling" = yes; then :
12600 # Try to guess by grepping values from an object file.
12601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12602/* end confdefs.h. */
12603short int ascii_mm[] =
12604 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12605 short int ascii_ii[] =
12606 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12607 int use_ascii (int i) {
12608 return ascii_mm[i] + ascii_ii[i];
12609 }
12610 short int ebcdic_ii[] =
12611 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12612 short int ebcdic_mm[] =
12613 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12614 int use_ebcdic (int i) {
12615 return ebcdic_mm[i] + ebcdic_ii[i];
12616 }
12617 extern int foo;
7eb368b3 12618
81ecdfbb
RW
12619int
12620main ()
12621{
12622return use_ascii (foo) == use_ebcdic (foo);
12623 ;
12624 return 0;
12625}
12626_ACEOF
12627if ac_fn_c_try_compile "$LINENO"; then :
12628 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12629 ac_cv_c_bigendian=yes
12630 fi
12631 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12632 if test "$ac_cv_c_bigendian" = unknown; then
12633 ac_cv_c_bigendian=no
12634 else
12635 # finding both strings is unlikely to happen, but who knows?
12636 ac_cv_c_bigendian=unknown
12637 fi
12638 fi
7eb368b3 12639fi
81ecdfbb 12640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12641else
81ecdfbb 12642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12643/* end confdefs.h. */
81ecdfbb 12644$ac_includes_default
d3ea6809
MM
12645int
12646main ()
12647{
81ecdfbb
RW
12648
12649 /* Are we little or big endian? From Harbison&Steele. */
12650 union
12651 {
12652 long int l;
12653 char c[sizeof (long int)];
12654 } u;
12655 u.l = 1;
12656 return u.c[sizeof (long int) - 1] == 1;
12657
12658 ;
12659 return 0;
d3ea6809
MM
12660}
12661_ACEOF
81ecdfbb 12662if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12663 ac_cv_c_bigendian=no
d3ea6809 12664else
81ecdfbb 12665 ac_cv_c_bigendian=yes
d3ea6809 12666fi
81ecdfbb
RW
12667rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12668 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12669fi
a9322a30 12670
81ecdfbb
RW
12671 fi
12672fi
12673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12674$as_echo "$ac_cv_c_bigendian" >&6; }
12675 case $ac_cv_c_bigendian in #(
12676 yes)
12677 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12678;; #(
12679 no)
12680 ;; #(
12681 universal)
12682
12683$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12684
12685 ;; #(
12686 *)
d0ac1c44 12687 as_fn_error $? "unknown endianness
81ecdfbb
RW
12688 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12689 esac
d3ea6809
MM
12690
12691
a9322a30
TT
12692# ------------------------------ #
12693# Checks for library functions. #
12694# ------------------------------ #
d3ea6809 12695
d0ac1c44
SM
12696
12697
12698
12699 for ac_header in $ac_header_list
81ecdfbb
RW
12700do :
12701 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
d0ac1c44
SM
12702ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12703"
12704if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12705 cat >>confdefs.h <<_ACEOF
81ecdfbb 12706#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12707_ACEOF
b757528f 12708
b757528f 12709fi
bec39cab 12710
a9322a30 12711done
a3828db0 12712
d0ac1c44
SM
12713
12714
12715
12716
12717
12718
12719
a9322a30 12720for ac_func in getpagesize
81ecdfbb
RW
12721do :
12722 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
d0ac1c44 12723if test "x$ac_cv_func_getpagesize" = xyes; then :
bec39cab 12724 cat >>confdefs.h <<_ACEOF
81ecdfbb 12725#define HAVE_GETPAGESIZE 1
bec39cab 12726_ACEOF
bcb3dc3d 12727
bcb3dc3d
MK
12728fi
12729done
12730
81ecdfbb
RW
12731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12732$as_echo_n "checking for working mmap... " >&6; }
d0ac1c44 12733if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
81ecdfbb 12734 $as_echo_n "(cached) " >&6
a9322a30 12735else
81ecdfbb 12736 if test "$cross_compiling" = yes; then :
a9322a30 12737 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12738else
81ecdfbb 12739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12740/* end confdefs.h. */
a9322a30
TT
12741$ac_includes_default
12742/* malloc might have been renamed as rpl_malloc. */
12743#undef malloc
bec39cab 12744
a9322a30
TT
12745/* Thanks to Mike Haertel and Jim Avera for this test.
12746 Here is a matrix of mmap possibilities:
12747 mmap private not fixed
12748 mmap private fixed at somewhere currently unmapped
12749 mmap private fixed at somewhere already mapped
12750 mmap shared not fixed
12751 mmap shared fixed at somewhere currently unmapped
12752 mmap shared fixed at somewhere already mapped
12753 For private mappings, we should verify that changes cannot be read()
12754 back from the file, nor mmap's back from the file at a different
12755 address. (There have been systems where private was not correctly
12756 implemented like the infamous i386 svr4.0, and systems where the
12757 VM page cache was not coherent with the file system buffer cache
12758 like early versions of FreeBSD and possibly contemporary NetBSD.)
12759 For shared mappings, we should conversely verify that changes get
12760 propagated back to all the places they're supposed to be.
bec39cab 12761
a9322a30
TT
12762 Grep wants private fixed already mapped.
12763 The main things grep needs to know about mmap are:
12764 * does it exist and is it safe to write into the mmap'd area
12765 * how to use it (BSD variants) */
8b9cf735 12766
a9322a30
TT
12767#include <fcntl.h>
12768#include <sys/mman.h>
8b9cf735 12769
81ecdfbb 12770#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12771char *malloc ();
a3828db0
MK
12772#endif
12773
a9322a30 12774/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12775#ifndef HAVE_GETPAGESIZE
a9322a30
TT
12776# ifdef _SC_PAGESIZE
12777# define getpagesize() sysconf(_SC_PAGESIZE)
12778# else /* no _SC_PAGESIZE */
81ecdfbb 12779# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12780# include <sys/param.h>
12781# ifdef EXEC_PAGESIZE
12782# define getpagesize() EXEC_PAGESIZE
12783# else /* no EXEC_PAGESIZE */
12784# ifdef NBPG
12785# define getpagesize() NBPG * CLSIZE
12786# ifndef CLSIZE
12787# define CLSIZE 1
12788# endif /* no CLSIZE */
12789# else /* no NBPG */
12790# ifdef NBPC
12791# define getpagesize() NBPC
12792# else /* no NBPC */
12793# ifdef PAGESIZE
12794# define getpagesize() PAGESIZE
12795# endif /* PAGESIZE */
12796# endif /* no NBPC */
12797# endif /* no NBPG */
12798# endif /* no EXEC_PAGESIZE */
12799# else /* no HAVE_SYS_PARAM_H */
12800# define getpagesize() 8192 /* punt totally */
12801# endif /* no HAVE_SYS_PARAM_H */
12802# endif /* no _SC_PAGESIZE */
12803
12804#endif /* no HAVE_GETPAGESIZE */
12805
bec39cab
AC
12806int
12807main ()
12808{
a9322a30 12809 char *data, *data2, *data3;
d0ac1c44 12810 const char *cdata2;
a9322a30 12811 int i, pagesize;
d0ac1c44 12812 int fd, fd2;
a9322a30
TT
12813
12814 pagesize = getpagesize ();
12815
12816 /* First, make a file with some known garbage in it. */
12817 data = (char *) malloc (pagesize);
12818 if (!data)
81ecdfbb 12819 return 1;
a9322a30
TT
12820 for (i = 0; i < pagesize; ++i)
12821 *(data + i) = rand ();
12822 umask (0);
12823 fd = creat ("conftest.mmap", 0600);
12824 if (fd < 0)
d0ac1c44 12825 return 2;
a9322a30 12826 if (write (fd, data, pagesize) != pagesize)
d0ac1c44 12827 return 3;
a9322a30
TT
12828 close (fd);
12829
d0ac1c44
SM
12830 /* Next, check that the tail of a page is zero-filled. File must have
12831 non-zero length, otherwise we risk SIGBUS for entire page. */
12832 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
12833 if (fd2 < 0)
12834 return 4;
12835 cdata2 = "";
12836 if (write (fd2, cdata2, 1) != 1)
12837 return 5;
12838 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
12839 if (data2 == MAP_FAILED)
12840 return 6;
12841 for (i = 0; i < pagesize; ++i)
12842 if (*(data2 + i))
12843 return 7;
12844 close (fd2);
12845 if (munmap (data2, pagesize))
12846 return 8;
12847
a9322a30
TT
12848 /* Next, try to mmap the file at a fixed address which already has
12849 something else allocated at it. If we can, also make sure that
12850 we see the same garbage. */
12851 fd = open ("conftest.mmap", O_RDWR);
12852 if (fd < 0)
d0ac1c44 12853 return 9;
a9322a30
TT
12854 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12855 MAP_PRIVATE | MAP_FIXED, fd, 0L))
d0ac1c44 12856 return 10;
a9322a30
TT
12857 for (i = 0; i < pagesize; ++i)
12858 if (*(data + i) != *(data2 + i))
d0ac1c44 12859 return 11;
a9322a30
TT
12860
12861 /* Finally, make sure that changes to the mapped area do not
12862 percolate back to the file as seen by read(). (This is a bug on
12863 some variants of i386 svr4.0.) */
12864 for (i = 0; i < pagesize; ++i)
12865 *(data2 + i) = *(data2 + i) + 1;
12866 data3 = (char *) malloc (pagesize);
12867 if (!data3)
d0ac1c44 12868 return 12;
a9322a30 12869 if (read (fd, data3, pagesize) != pagesize)
d0ac1c44 12870 return 13;
a9322a30
TT
12871 for (i = 0; i < pagesize; ++i)
12872 if (*(data + i) != *(data3 + i))
d0ac1c44 12873 return 14;
a9322a30 12874 close (fd);
81ecdfbb 12875 return 0;
bec39cab
AC
12876}
12877_ACEOF
81ecdfbb 12878if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12879 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 12880else
81ecdfbb 12881 ac_cv_func_mmap_fixed_mapped=no
a3828db0 12882fi
81ecdfbb
RW
12883rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12884 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 12885fi
81ecdfbb 12886
a9322a30 12887fi
81ecdfbb
RW
12888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12889$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
12890if test $ac_cv_func_mmap_fixed_mapped = yes; then
12891
81ecdfbb 12892$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 12893
086ec9eb 12894fi
d0ac1c44 12895rm -f conftest.mmap conftest.txt
a3828db0 12896
81ecdfbb 12897ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
d0ac1c44 12898if test "x$ac_cv_type_pid_t" = xyes; then :
bec39cab 12899
a9322a30
TT
12900else
12901
12902cat >>confdefs.h <<_ACEOF
12903#define pid_t int
bec39cab 12904_ACEOF
086ec9eb
MK
12905
12906fi
12907
81ecdfbb
RW
12908for ac_header in vfork.h
12909do :
12910 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
d0ac1c44 12911if test "x$ac_cv_header_vfork_h" = xyes; then :
a3828db0 12912 cat >>confdefs.h <<_ACEOF
81ecdfbb 12913#define HAVE_VFORK_H 1
bec39cab 12914_ACEOF
c906108c
SS
12915
12916fi
a9322a30 12917
a3828db0 12918done
c906108c 12919
a9322a30 12920for ac_func in fork vfork
81ecdfbb
RW
12921do :
12922 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12923ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 12924if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
a3828db0 12925 cat >>confdefs.h <<_ACEOF
81ecdfbb 12926#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 12927_ACEOF
b83266a0 12928
97bf5e38 12929fi
a3828db0 12930done
b83266a0 12931
a9322a30 12932if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
12933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
12934$as_echo_n "checking for working fork... " >&6; }
d0ac1c44 12935if ${ac_cv_func_fork_works+:} false; then :
81ecdfbb 12936 $as_echo_n "(cached) " >&6
a9322a30 12937else
81ecdfbb 12938 if test "$cross_compiling" = yes; then :
a9322a30
TT
12939 ac_cv_func_fork_works=cross
12940else
81ecdfbb
RW
12941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12942/* end confdefs.h. */
12943$ac_includes_default
12944int
12945main ()
12946{
12947
12948 /* By Ruediger Kuhlmann. */
12949 return fork () < 0;
12950
12951 ;
12952 return 0;
12953}
a9322a30 12954_ACEOF
81ecdfbb 12955if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12956 ac_cv_func_fork_works=yes
12957else
81ecdfbb 12958 ac_cv_func_fork_works=no
a9322a30 12959fi
81ecdfbb
RW
12960rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12961 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12962fi
81ecdfbb 12963
a9322a30 12964fi
81ecdfbb
RW
12965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
12966$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
12967
12968else
12969 ac_cv_func_fork_works=$ac_cv_func_fork
12970fi
12971if test "x$ac_cv_func_fork_works" = xcross; then
12972 case $host in
12973 *-*-amigaos* | *-*-msdosdjgpp*)
12974 # Override, as these systems have only a dummy fork() stub
12975 ac_cv_func_fork_works=no
12976 ;;
12977 *)
12978 ac_cv_func_fork_works=yes
12979 ;;
12980 esac
81ecdfbb
RW
12981 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
12982$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12983fi
12984ac_cv_func_vfork_works=$ac_cv_func_vfork
12985if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
12986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
12987$as_echo_n "checking for working vfork... " >&6; }
d0ac1c44 12988if ${ac_cv_func_vfork_works+:} false; then :
81ecdfbb 12989 $as_echo_n "(cached) " >&6
a9322a30 12990else
81ecdfbb 12991 if test "$cross_compiling" = yes; then :
a9322a30
TT
12992 ac_cv_func_vfork_works=cross
12993else
81ecdfbb 12994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
12995/* end confdefs.h. */
12996/* Thanks to Paul Eggert for this test. */
81ecdfbb 12997$ac_includes_default
a9322a30 12998#include <sys/wait.h>
81ecdfbb 12999#ifdef HAVE_VFORK_H
a9322a30
TT
13000# include <vfork.h>
13001#endif
13002/* On some sparc systems, changes by the child to local and incoming
13003 argument registers are propagated back to the parent. The compiler
13004 is told about this with #include <vfork.h>, but some compilers
13005 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13006 static variable whose address is put into a register that is
13007 clobbered by the vfork. */
13008static void
13009#ifdef __cplusplus
13010sparc_address_test (int arg)
13011# else
13012sparc_address_test (arg) int arg;
13013#endif
13014{
13015 static pid_t child;
13016 if (!child) {
13017 child = vfork ();
13018 if (child < 0) {
13019 perror ("vfork");
13020 _exit(2);
13021 }
13022 if (!child) {
13023 arg = getpid();
13024 write(-1, "", 0);
13025 _exit (arg);
13026 }
13027 }
13028}
13029
13030int
13031main ()
13032{
13033 pid_t parent = getpid ();
13034 pid_t child;
13035
13036 sparc_address_test (0);
13037
13038 child = vfork ();
13039
13040 if (child == 0) {
13041 /* Here is another test for sparc vfork register problems. This
13042 test uses lots of local variables, at least as many local
13043 variables as main has allocated so far including compiler
13044 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13045 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13046 reuse the register of parent for one of the local variables,
13047 since it will think that parent can't possibly be used any more
13048 in this routine. Assigning to the local variable will thus
13049 munge parent in the parent process. */
13050 pid_t
13051 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13052 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13053 /* Convince the compiler that p..p7 are live; otherwise, it might
13054 use the same hardware register for all 8 local variables. */
13055 if (p != p1 || p != p2 || p != p3 || p != p4
13056 || p != p5 || p != p6 || p != p7)
13057 _exit(1);
13058
13059 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13060 from child file descriptors. If the child closes a descriptor
13061 before it execs or exits, this munges the parent's descriptor
13062 as well. Test for this by closing stdout in the child. */
13063 _exit(close(fileno(stdout)) != 0);
13064 } else {
13065 int status;
13066 struct stat st;
13067
13068 while (wait(&status) != child)
13069 ;
81ecdfbb 13070 return (
a9322a30
TT
13071 /* Was there some problem with vforking? */
13072 child < 0
13073
13074 /* Did the child fail? (This shouldn't happen.) */
13075 || status
13076
13077 /* Did the vfork/compiler bug occur? */
13078 || parent != getpid()
13079
13080 /* Did the file descriptor bug occur? */
13081 || fstat(fileno(stdout), &st) != 0
13082 );
13083 }
13084}
13085_ACEOF
81ecdfbb 13086if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13087 ac_cv_func_vfork_works=yes
13088else
81ecdfbb 13089 ac_cv_func_vfork_works=no
a9322a30 13090fi
81ecdfbb
RW
13091rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13092 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13093fi
81ecdfbb 13094
a9322a30 13095fi
81ecdfbb
RW
13096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13097$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
13098
13099fi;
13100if test "x$ac_cv_func_fork_works" = xcross; then
13101 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
13102 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13103$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13104fi
13105
13106if test "x$ac_cv_func_vfork_works" = xyes; then
13107
81ecdfbb 13108$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
13109
13110else
13111
81ecdfbb 13112$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
13113
13114fi
13115if test "x$ac_cv_func_fork_works" = xyes; then
13116
81ecdfbb 13117$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
13118
13119fi
13120
cdf43629 13121for ac_func in getauxval getrusage getuid getgid \
bdca27a2 13122 pipe poll pread pread64 pwrite resize_term \
e671cd59 13123 sbrk getpgid setpgid setpgrp setsid \
9467110b 13124 sigaction sigprocmask sigsetmask socketpair \
110ed339 13125 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 13126 setrlimit getrlimit posix_madvise waitpid \
1d1d0bf7 13127 ptrace64 sigaltstack setns use_default_colors
81ecdfbb
RW
13128do :
13129 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13130ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13131if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6c7a06a3 13132 cat >>confdefs.h <<_ACEOF
81ecdfbb 13133#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
13134_ACEOF
13135
13136fi
13137done
13138
13139
81ecdfbb
RW
13140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13141$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 13142if ${am_cv_langinfo_codeset+:} false; then :
81ecdfbb 13143 $as_echo_n "(cached) " >&6
6c7a06a3 13144else
81ecdfbb 13145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
13146/* end confdefs.h. */
13147#include <langinfo.h>
13148int
13149main ()
13150{
13151char* cs = nl_langinfo(CODESET);
bec39cab
AC
13152 ;
13153 return 0;
13154}
13155_ACEOF
81ecdfbb 13156if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 13157 am_cv_langinfo_codeset=yes
a4db0f07 13158else
81ecdfbb 13159 am_cv_langinfo_codeset=no
a4db0f07 13160fi
81ecdfbb
RW
13161rm -f core conftest.err conftest.$ac_objext \
13162 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 13163
a4db0f07 13164fi
81ecdfbb
RW
13165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13166$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
13167 if test $am_cv_langinfo_codeset = yes; then
13168
81ecdfbb 13169$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 13170
6c7a06a3 13171 fi
c906108c 13172
d0ac1c44
SM
13173ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13174if test "x$ac_cv_type_size_t" = xyes; then :
13175
13176else
13177
13178cat >>confdefs.h <<_ACEOF
13179#define size_t unsigned int
13180_ACEOF
13181
13182fi
13183
06825bd1 13184
3266f10b
TT
13185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13186$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 13187if ${ac_cv_header_stdc+:} false; then :
3266f10b
TT
13188 $as_echo_n "(cached) " >&6
13189else
13190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13191/* end confdefs.h. */
13192#include <stdlib.h>
13193#include <stdarg.h>
13194#include <string.h>
13195#include <float.h>
13196
13197int
13198main ()
13199{
13200
13201 ;
13202 return 0;
13203}
13204_ACEOF
13205if ac_fn_c_try_compile "$LINENO"; then :
13206 ac_cv_header_stdc=yes
13207else
13208 ac_cv_header_stdc=no
13209fi
13210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13211
13212if test $ac_cv_header_stdc = yes; then
13213 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13215/* end confdefs.h. */
13216#include <string.h>
13217
13218_ACEOF
13219if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13220 $EGREP "memchr" >/dev/null 2>&1; then :
13221
13222else
13223 ac_cv_header_stdc=no
13224fi
13225rm -f conftest*
13226
13227fi
13228
13229if test $ac_cv_header_stdc = yes; then
13230 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13232/* end confdefs.h. */
13233#include <stdlib.h>
13234
13235_ACEOF
13236if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13237 $EGREP "free" >/dev/null 2>&1; then :
13238
13239else
13240 ac_cv_header_stdc=no
13241fi
13242rm -f conftest*
13243
13244fi
13245
13246if test $ac_cv_header_stdc = yes; then
13247 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13248 if test "$cross_compiling" = yes; then :
13249 :
13250else
13251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13252/* end confdefs.h. */
13253#include <ctype.h>
13254#include <stdlib.h>
13255#if ((' ' & 0x0FF) == 0x020)
13256# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13257# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13258#else
13259# define ISLOWER(c) \
13260 (('a' <= (c) && (c) <= 'i') \
13261 || ('j' <= (c) && (c) <= 'r') \
13262 || ('s' <= (c) && (c) <= 'z'))
13263# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13264#endif
13265
13266#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13267int
13268main ()
13269{
13270 int i;
13271 for (i = 0; i < 256; i++)
13272 if (XOR (islower (i), ISLOWER (i))
13273 || toupper (i) != TOUPPER (i))
13274 return 2;
13275 return 0;
13276}
13277_ACEOF
13278if ac_fn_c_try_run "$LINENO"; then :
13279
13280else
13281 ac_cv_header_stdc=no
13282fi
13283rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13284 conftest.$ac_objext conftest.beam conftest.$ac_ext
13285fi
13286
13287fi
13288fi
13289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
13290$as_echo "$ac_cv_header_stdc" >&6; }
13291if test $ac_cv_header_stdc = yes; then
13292
13293$as_echo "#define STDC_HEADERS 1" >>confdefs.h
13294
3266f10b
TT
13295fi
13296
13297 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13298# for constant arguments. Useless!
13299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13300$as_echo_n "checking for working alloca.h... " >&6; }
d0ac1c44 13301if ${ac_cv_working_alloca_h+:} false; then :
3266f10b
TT
13302 $as_echo_n "(cached) " >&6
13303else
13304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13305/* end confdefs.h. */
13306#include <alloca.h>
13307int
13308main ()
13309{
13310char *p = (char *) alloca (2 * sizeof (int));
13311 if (p) return 0;
13312 ;
13313 return 0;
13314}
13315_ACEOF
13316if ac_fn_c_try_link "$LINENO"; then :
13317 ac_cv_working_alloca_h=yes
13318else
13319 ac_cv_working_alloca_h=no
13320fi
13321rm -f core conftest.err conftest.$ac_objext \
13322 conftest$ac_exeext conftest.$ac_ext
13323fi
13324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13325$as_echo "$ac_cv_working_alloca_h" >&6; }
13326if test $ac_cv_working_alloca_h = yes; then
13327
13328$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
13329
13330fi
13331
13332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13333$as_echo_n "checking for alloca... " >&6; }
d0ac1c44 13334if ${ac_cv_func_alloca_works+:} false; then :
3266f10b
TT
13335 $as_echo_n "(cached) " >&6
13336else
13337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13338/* end confdefs.h. */
13339#ifdef __GNUC__
13340# define alloca __builtin_alloca
13341#else
13342# ifdef _MSC_VER
13343# include <malloc.h>
13344# define alloca _alloca
13345# else
13346# ifdef HAVE_ALLOCA_H
13347# include <alloca.h>
13348# else
13349# ifdef _AIX
13350 #pragma alloca
13351# else
13352# ifndef alloca /* predefined by HP cc +Olibcalls */
d0ac1c44 13353void *alloca (size_t);
3266f10b
TT
13354# endif
13355# endif
13356# endif
13357# endif
13358#endif
13359
13360int
13361main ()
13362{
13363char *p = (char *) alloca (1);
13364 if (p) return 0;
13365 ;
13366 return 0;
13367}
13368_ACEOF
13369if ac_fn_c_try_link "$LINENO"; then :
13370 ac_cv_func_alloca_works=yes
13371else
13372 ac_cv_func_alloca_works=no
13373fi
13374rm -f core conftest.err conftest.$ac_objext \
13375 conftest$ac_exeext conftest.$ac_ext
13376fi
13377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13378$as_echo "$ac_cv_func_alloca_works" >&6; }
13379
13380if test $ac_cv_func_alloca_works = yes; then
13381
13382$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13383
13384else
13385 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13386# that cause trouble. Some versions do not even contain alloca or
13387# contain a buggy version. If you still want to use their alloca,
13388# use ar to extract alloca.o from them instead of compiling alloca.c.
13389
13390ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
13391
13392$as_echo "#define C_ALLOCA 1" >>confdefs.h
13393
13394
13395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13396$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
d0ac1c44 13397if ${ac_cv_os_cray+:} false; then :
3266f10b
TT
13398 $as_echo_n "(cached) " >&6
13399else
13400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13401/* end confdefs.h. */
13402#if defined CRAY && ! defined CRAY2
13403webecray
13404#else
13405wenotbecray
13406#endif
13407
13408_ACEOF
13409if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13410 $EGREP "webecray" >/dev/null 2>&1; then :
13411 ac_cv_os_cray=yes
13412else
13413 ac_cv_os_cray=no
13414fi
13415rm -f conftest*
13416
13417fi
13418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13419$as_echo "$ac_cv_os_cray" >&6; }
13420if test $ac_cv_os_cray = yes; then
13421 for ac_func in _getb67 GETB67 getb67; do
13422 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13423ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13424if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
13425
13426cat >>confdefs.h <<_ACEOF
13427#define CRAY_STACKSEG_END $ac_func
13428_ACEOF
13429
13430 break
13431fi
13432
13433 done
13434fi
13435
13436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13437$as_echo_n "checking stack direction for C alloca... " >&6; }
d0ac1c44 13438if ${ac_cv_c_stack_direction+:} false; then :
3266f10b
TT
13439 $as_echo_n "(cached) " >&6
13440else
13441 if test "$cross_compiling" = yes; then :
13442 ac_cv_c_stack_direction=0
13443else
13444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13445/* end confdefs.h. */
13446$ac_includes_default
13447int
d0ac1c44 13448find_stack_direction (int *addr, int depth)
3266f10b 13449{
d0ac1c44
SM
13450 int dir, dummy = 0;
13451 if (! addr)
13452 addr = &dummy;
13453 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
13454 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
13455 return dir + dummy;
3266f10b
TT
13456}
13457
13458int
d0ac1c44 13459main (int argc, char **argv)
3266f10b 13460{
d0ac1c44 13461 return find_stack_direction (0, argc + !argv + 20) < 0;
3266f10b
TT
13462}
13463_ACEOF
13464if ac_fn_c_try_run "$LINENO"; then :
13465 ac_cv_c_stack_direction=1
13466else
13467 ac_cv_c_stack_direction=-1
13468fi
13469rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13470 conftest.$ac_objext conftest.beam conftest.$ac_ext
13471fi
13472
13473fi
13474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13475$as_echo "$ac_cv_c_stack_direction" >&6; }
13476cat >>confdefs.h <<_ACEOF
13477#define STACK_DIRECTION $ac_cv_c_stack_direction
13478_ACEOF
13479
13480
13481fi
13482
13483
13484
13485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13486$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 13487if ${am_cv_langinfo_codeset+:} false; then :
3266f10b
TT
13488 $as_echo_n "(cached) " >&6
13489else
13490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13491/* end confdefs.h. */
13492#include <langinfo.h>
13493int
13494main ()
13495{
13496char* cs = nl_langinfo(CODESET);
13497 ;
13498 return 0;
13499}
13500_ACEOF
13501if ac_fn_c_try_link "$LINENO"; then :
13502 am_cv_langinfo_codeset=yes
13503else
13504 am_cv_langinfo_codeset=no
13505fi
13506rm -f core conftest.err conftest.$ac_objext \
13507 conftest$ac_exeext conftest.$ac_ext
13508
13509fi
13510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13511$as_echo "$am_cv_langinfo_codeset" >&6; }
13512 if test $am_cv_langinfo_codeset = yes; then
13513
13514$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13515
13516 fi
13517
13518
2d41fa11 13519 for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/un.h sys/wait.h thread_db.h wait.h termios.h dlfcn.h
3266f10b
TT
13520do :
13521 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13522ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 13523if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3266f10b
TT
13524 cat >>confdefs.h <<_ACEOF
13525#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13526_ACEOF
13527
13528fi
13529
13530done
13531
13532
f348d89a 13533 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction
3266f10b
TT
13534do :
13535 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13536ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13537if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
13538 cat >>confdefs.h <<_ACEOF
13539#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13540_ACEOF
13541
13542fi
13543done
13544
13545
13546 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
d0ac1c44 13547if test "x$ac_cv_have_decl_strerror" = xyes; then :
3266f10b
TT
13548 ac_have_decl=1
13549else
13550 ac_have_decl=0
13551fi
13552
13553cat >>confdefs.h <<_ACEOF
13554#define HAVE_DECL_STRERROR $ac_have_decl
13555_ACEOF
13556ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
d0ac1c44 13557if test "x$ac_cv_have_decl_strstr" = xyes; then :
3266f10b
TT
13558 ac_have_decl=1
13559else
13560 ac_have_decl=0
13561fi
13562
13563cat >>confdefs.h <<_ACEOF
13564#define HAVE_DECL_STRSTR $ac_have_decl
13565_ACEOF
13566
13567
e9bcb658
GB
13568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13569$as_echo_n "checking for sigsetjmp... " >&6; }
d0ac1c44 13570if ${gdb_cv_func_sigsetjmp+:} false; then :
e9bcb658
GB
13571 $as_echo_n "(cached) " >&6
13572else
13573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13574/* end confdefs.h. */
13575
13576#include <setjmp.h>
13577
13578int
13579main ()
13580{
13581sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
13582 ;
13583 return 0;
13584}
13585_ACEOF
13586if ac_fn_c_try_compile "$LINENO"; then :
13587 gdb_cv_func_sigsetjmp=yes
13588else
13589 gdb_cv_func_sigsetjmp=no
13590fi
13591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13592fi
13593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13594$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
13595if test $gdb_cv_func_sigsetjmp = yes; then
13596
13597$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
13598
13599fi
13600
3266f10b 13601
54019719
PA
13602# Check the return and argument types of ptrace.
13603
13604
54019719
PA
13605for ac_header in sys/ptrace.h ptrace.h
13606do :
13607 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13608ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 13609if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
54019719
PA
13610 cat >>confdefs.h <<_ACEOF
13611#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13612_ACEOF
13613
13614fi
13615
13616done
13617
13618
a3828db0 13619gdb_ptrace_headers='
4ff70b84 13620#include <sys/types.h>
a3828db0
MK
13621#if HAVE_SYS_PTRACE_H
13622# include <sys/ptrace.h>
13623#endif
13624#if HAVE_UNISTD_H
13625# include <unistd.h>
13626#endif
13627'
13628# There is no point in checking if we don't have a prototype.
9b30624b 13629ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
81ecdfbb 13630"
d0ac1c44 13631if test "x$ac_cv_have_decl_ptrace" = xyes; then :
81ecdfbb 13632 ac_have_decl=1
06825bd1 13633else
81ecdfbb 13634 ac_have_decl=0
06825bd1 13635fi
06825bd1 13636
a3828db0 13637cat >>confdefs.h <<_ACEOF
81ecdfbb 13638#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 13639_ACEOF
81ecdfbb 13640if test $ac_have_decl = 1; then :
bec39cab 13641
a3828db0 13642else
a3828db0
MK
13643
13644 : ${gdb_cv_func_ptrace_ret='int'}
13645 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13646
06825bd1
MK
13647fi
13648
064ef605
DJ
13649# Check return type. Varargs (used on GNU/Linux) conflict with the
13650# empty argument list, so check for that explicitly.
81ecdfbb
RW
13651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
13652$as_echo_n "checking return type of ptrace... " >&6; }
d0ac1c44 13653if ${gdb_cv_func_ptrace_ret+:} false; then :
81ecdfbb 13654 $as_echo_n "(cached) " >&6
bec39cab 13655else
81ecdfbb 13656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13657/* end confdefs.h. */
a3828db0 13658$gdb_ptrace_headers
bec39cab
AC
13659int
13660main ()
13661{
064ef605
DJ
13662extern long ptrace (enum __ptrace_request, ...);
13663 ;
13664 return 0;
13665}
13666_ACEOF
9b30624b 13667if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
13668 gdb_cv_func_ptrace_ret='long'
13669else
81ecdfbb 13670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13671/* end confdefs.h. */
13672$gdb_ptrace_headers
13673int
13674main ()
13675{
a3828db0 13676extern int ptrace ();
bec39cab
AC
13677 ;
13678 return 0;
13679}
13680_ACEOF
9b30624b 13681if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13682 gdb_cv_func_ptrace_ret='int'
70f9f479 13683else
81ecdfbb 13684 gdb_cv_func_ptrace_ret='long'
70f9f479 13685fi
81ecdfbb 13686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 13687fi
81ecdfbb 13688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 13689fi
81ecdfbb
RW
13690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13691$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 13692
a3828db0
MK
13693cat >>confdefs.h <<_ACEOF
13694#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 13695_ACEOF
70f9f479 13696
a3828db0 13697# Check argument types.
81ecdfbb
RW
13698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13699$as_echo_n "checking types of arguments for ptrace... " >&6; }
d0ac1c44 13700if ${gdb_cv_func_ptrace_args+:} false; then :
81ecdfbb 13701 $as_echo_n "(cached) " >&6
bec39cab 13702else
a3828db0 13703
81ecdfbb 13704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13705/* end confdefs.h. */
13706$gdb_ptrace_headers
13707int
13708main ()
13709{
13710extern long ptrace (enum __ptrace_request, ...);
13711 ;
13712 return 0;
13713}
13714_ACEOF
9b30624b 13715if ac_fn_c_try_compile "$LINENO"; then :
54019719 13716 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
064ef605 13717else
064ef605 13718
a3828db0
MK
13719for gdb_arg1 in 'int' 'long'; do
13720 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 13721 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 13722 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 13723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13724/* end confdefs.h. */
a3828db0 13725$gdb_ptrace_headers
bec39cab
AC
13726int
13727main ()
13728{
a3828db0
MK
13729
13730extern $gdb_cv_func_ptrace_ret
13731 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13732
bec39cab
AC
13733 ;
13734 return 0;
13735}
13736_ACEOF
9b30624b 13737if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13738 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13739 break 4;
5c7f2947 13740fi
81ecdfbb 13741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 13742 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 13743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13744/* end confdefs.h. */
a3828db0 13745$gdb_ptrace_headers
bec39cab
AC
13746int
13747main ()
13748{
a3828db0
MK
13749
13750extern $gdb_cv_func_ptrace_ret
13751 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13752
bec39cab
AC
13753 ;
13754 return 0;
13755}
13756_ACEOF
9b30624b 13757if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13758
13759gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13760 break 5;
78434e59 13761fi
81ecdfbb 13762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
13763 done
13764 done
13765 done
13766 done
13767done
13768# Provide a safe default value.
13769: ${gdb_cv_func_ptrace_args='int,int,long,long'}
13770
064ef605 13771fi
81ecdfbb 13772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 13773fi
81ecdfbb
RW
13774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13775$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
13776ac_save_IFS=$IFS; IFS=','
13777set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13778IFS=$ac_save_IFS
13779shift
bec39cab 13780
54019719
PA
13781cat >>confdefs.h <<_ACEOF
13782#define PTRACE_TYPE_ARG1 $1
13783_ACEOF
13784
13785
a3828db0
MK
13786cat >>confdefs.h <<_ACEOF
13787#define PTRACE_TYPE_ARG3 $3
13788_ACEOF
13789
96d7229d
LM
13790
13791cat >>confdefs.h <<_ACEOF
13792#define PTRACE_TYPE_ARG4 $4
13793_ACEOF
13794
a3828db0
MK
13795if test -n "$5"; then
13796
13797cat >>confdefs.h <<_ACEOF
13798#define PTRACE_TYPE_ARG5 $5
bec39cab 13799_ACEOF
78434e59
MK
13800
13801fi
13802
54019719 13803
a3828db0 13804if test "$cross_compiling" = no; then
81ecdfbb
RW
13805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13806$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
d0ac1c44 13807if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 13808 $as_echo_n "(cached) " >&6
a3828db0 13809else
81ecdfbb 13810 if test "$cross_compiling" = yes; then :
d0ac1c44 13811 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 13812else
81ecdfbb 13813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13814/* end confdefs.h. */
81ecdfbb 13815$ac_includes_default
bec39cab
AC
13816int
13817main ()
13818{
a3828db0
MK
13819/* If this system has a BSD-style setpgrp which takes arguments,
13820 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
13821 exit successfully. */
81ecdfbb 13822 return setpgrp (1,1) != -1;
bec39cab
AC
13823 ;
13824 return 0;
13825}
13826_ACEOF
81ecdfbb 13827if ac_fn_c_try_run "$LINENO"; then :
a3828db0 13828 ac_cv_func_setpgrp_void=no
c906108c 13829else
81ecdfbb 13830 ac_cv_func_setpgrp_void=yes
c906108c 13831fi
81ecdfbb
RW
13832rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13833 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13834fi
81ecdfbb 13835
a3828db0 13836fi
81ecdfbb
RW
13837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13838$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
13839if test $ac_cv_func_setpgrp_void = yes; then
13840
81ecdfbb 13841$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
13842
13843fi
a3828db0
MK
13844
13845else
81ecdfbb
RW
13846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13847$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
d0ac1c44 13848if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 13849 $as_echo_n "(cached) " >&6
97bf5e38 13850else
81ecdfbb 13851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13852/* end confdefs.h. */
a3828db0
MK
13853
13854#include <unistd.h>
13855
bec39cab
AC
13856int
13857main ()
13858{
a3828db0
MK
13859
13860 if (setpgrp(1,1) == -1)
13861 exit (0);
13862 else
13863 exit (1);
13864
bec39cab
AC
13865 ;
13866 return 0;
13867}
13868_ACEOF
81ecdfbb 13869if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13870 ac_cv_func_setpgrp_void=no
c906108c 13871else
81ecdfbb 13872 ac_cv_func_setpgrp_void=yes
c906108c 13873fi
81ecdfbb 13874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13875fi
81ecdfbb
RW
13876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13877$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 13878if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 13879 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 13880
a3828db0 13881fi
c906108c
SS
13882fi
13883
db1ff28b
JK
13884# Assume we'll default to using the included libiberty regex.
13885gdb_use_included_regex=yes
13886
13887# However, if the system regex is GNU regex, then default to *not*
13888# using the included regex.
13889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
13890$as_echo_n "checking for GNU regex... " >&6; }
d0ac1c44 13891if ${gdb_cv_have_gnu_regex+:} false; then :
db1ff28b
JK
13892 $as_echo_n "(cached) " >&6
13893else
13894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13895/* end confdefs.h. */
13896#include <gnu-versions.h>
13897int
13898main ()
13899{
13900#define REGEX_INTERFACE_VERSION 1
13901#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
13902# error "Version mismatch"
13903#endif
13904 ;
13905 return 0;
13906}
13907_ACEOF
13908if ac_fn_c_try_compile "$LINENO"; then :
13909 gdb_cv_have_gnu_regex=yes
13910else
13911 gdb_cv_have_gnu_regex=no
13912fi
13913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13914fi
13915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
13916$as_echo "$gdb_cv_have_gnu_regex" >&6; }
13917if test $gdb_cv_have_gnu_regex = yes; then
13918 gdb_use_included_regex=no
13919fi
13920
13921
13922# Check whether --with-included-regex was given.
13923if test "${with_included_regex+set}" = set; then :
13924 withval=$with_included_regex; gdb_with_regex=$withval
13925else
13926 gdb_with_regex=$gdb_use_included_regex
13927fi
13928
13929if test "$gdb_with_regex" = yes; then
13930
13931$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
13932
13933fi
13934
81ecdfbb
RW
13935# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
13936ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
13937#include <sys/proc.h>
13938
13939"
d0ac1c44 13940if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
c906108c 13941
5c45e068 13942cat >>confdefs.h <<_ACEOF
a3828db0 13943#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 13944_ACEOF
c906108c 13945
5c45e068 13946
97bf5e38 13947fi
c906108c 13948
5c45e068 13949
a3828db0 13950# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
13951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
13952$as_echo_n "checking for struct lwp... " >&6; }
d0ac1c44 13953if ${gdb_cv_struct_lwp+:} false; then :
81ecdfbb 13954 $as_echo_n "(cached) " >&6
bec39cab 13955else
81ecdfbb 13956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13957/* end confdefs.h. */
a3828db0 13958#include <sys/param.h>
c49fbc6c 13959#define _KMEMUSER
a3828db0 13960#include <sys/lwp.h>
bec39cab
AC
13961int
13962main ()
13963{
a3828db0 13964struct lwp l;
bec39cab
AC
13965 ;
13966 return 0;
13967}
13968_ACEOF
81ecdfbb 13969if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13970 gdb_cv_struct_lwp=yes
c906108c 13971else
81ecdfbb 13972 gdb_cv_struct_lwp=no
c906108c 13973fi
81ecdfbb 13974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13975fi
81ecdfbb
RW
13976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
13977$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 13978if test $gdb_cv_struct_lwp = yes; then
c906108c 13979
81ecdfbb 13980$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 13981
97bf5e38 13982fi
c906108c 13983
a3828db0 13984# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
13985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
13986$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
d0ac1c44 13987if ${gdb_cv_struct_reg+:} false; then :
81ecdfbb 13988 $as_echo_n "(cached) " >&6
bec39cab 13989else
81ecdfbb 13990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13991/* end confdefs.h. */
a3828db0
MK
13992#include <sys/types.h>
13993#include <machine/reg.h>
bec39cab
AC
13994int
13995main ()
13996{
a3828db0 13997struct reg r;
bec39cab
AC
13998 ;
13999 return 0;
14000}
14001_ACEOF
81ecdfbb 14002if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14003 gdb_cv_struct_reg=yes
27ca5dad 14004else
81ecdfbb 14005 gdb_cv_struct_reg=no
27ca5dad 14006fi
81ecdfbb 14007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 14008fi
81ecdfbb
RW
14009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
14010$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 14011if test $gdb_cv_struct_reg = yes; then
bec39cab 14012
81ecdfbb 14013$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
14014
14015fi
97bf5e38 14016
a3828db0
MK
14017# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
14018# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
a6e69c1f
JB
14019ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
14020#include <machine/reg.h>
81ecdfbb 14021"
d0ac1c44 14022if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
5c45e068
MK
14023
14024cat >>confdefs.h <<_ACEOF
a3828db0 14025#define HAVE_STRUCT_REG_R_FS 1
bec39cab 14026_ACEOF
3862412b 14027
5c45e068 14028
97bf5e38 14029fi
a6e69c1f
JB
14030ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
14031#include <machine/reg.h>
81ecdfbb 14032"
d0ac1c44 14033if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
5c45e068
MK
14034
14035cat >>confdefs.h <<_ACEOF
a3828db0 14036#define HAVE_STRUCT_REG_R_GS 1
bec39cab 14037_ACEOF
3862412b 14038
5c45e068 14039
97bf5e38 14040fi
3862412b 14041
5c45e068 14042
6fea9e18
L
14043# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
14044# Older amd64 Linux's don't have the fs_base and gs_base members of
14045# `struct user_regs_struct'.
f517c180
EA
14046ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/types.h>
14047#include <sys/user.h>
6fea9e18 14048"
d0ac1c44 14049if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then :
6fea9e18
L
14050
14051cat >>confdefs.h <<_ACEOF
14052#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
14053_ACEOF
14054
14055
14056fi
f517c180
EA
14057ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/types.h>
14058#include <sys/user.h>
6fea9e18 14059"
d0ac1c44 14060if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then :
6fea9e18
L
14061
14062cat >>confdefs.h <<_ACEOF
14063#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
14064_ACEOF
14065
14066
14067fi
14068
14069
a3828db0 14070# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
14071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
14072$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
d0ac1c44 14073if ${gdb_cv_have_ptrace_getregs+:} false; then :
81ecdfbb 14074 $as_echo_n "(cached) " >&6
451928c5 14075else
81ecdfbb 14076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14077/* end confdefs.h. */
a3828db0 14078#include <sys/ptrace.h>
bec39cab
AC
14079int
14080main ()
14081{
a3828db0 14082PTRACE_GETREGS;
bec39cab
AC
14083 ;
14084 return 0;
14085}
14086_ACEOF
81ecdfbb 14087if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14088 gdb_cv_have_ptrace_getregs=yes
451928c5 14089else
81ecdfbb 14090 gdb_cv_have_ptrace_getregs=no
451928c5 14091fi
81ecdfbb 14092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14093fi
14094
81ecdfbb
RW
14095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
14096$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 14097if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 14098
81ecdfbb 14099$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 14100
97bf5e38 14101fi
451928c5 14102
a3828db0 14103# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
14104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
14105$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
d0ac1c44 14106if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
81ecdfbb 14107 $as_echo_n "(cached) " >&6
451928c5 14108else
81ecdfbb 14109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14110/* end confdefs.h. */
a3828db0 14111#include <sys/ptrace.h>
bec39cab
AC
14112int
14113main ()
14114{
a3828db0 14115PTRACE_GETFPXREGS;
bec39cab
AC
14116 ;
14117 return 0;
14118}
14119_ACEOF
81ecdfbb 14120if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14121 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 14122else
81ecdfbb 14123 gdb_cv_have_ptrace_getfpxregs=no
451928c5 14124fi
81ecdfbb 14125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14126fi
14127
81ecdfbb
RW
14128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
14129$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 14130if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 14131
81ecdfbb 14132$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 14133
97bf5e38 14134fi
451928c5 14135
a3828db0 14136# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
14137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
14138$as_echo_n "checking for PT_GETDBREGS... " >&6; }
d0ac1c44 14139if ${gdb_cv_have_pt_getdbregs+:} false; then :
81ecdfbb 14140 $as_echo_n "(cached) " >&6
3862412b 14141else
81ecdfbb 14142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14143/* end confdefs.h. */
a3828db0
MK
14144#include <sys/types.h>
14145#include <sys/ptrace.h>
bec39cab
AC
14146int
14147main ()
14148{
a3828db0 14149PT_GETDBREGS;
bec39cab
AC
14150 ;
14151 return 0;
14152}
14153_ACEOF
81ecdfbb 14154if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14155 gdb_cv_have_pt_getdbregs=yes
3862412b 14156else
81ecdfbb 14157 gdb_cv_have_pt_getdbregs=no
3862412b 14158fi
81ecdfbb 14159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14160fi
14161
81ecdfbb
RW
14162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
14163$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 14164if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 14165
81ecdfbb 14166$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 14167
97bf5e38 14168fi
3862412b 14169
a3828db0 14170# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
14171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
14172$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
d0ac1c44 14173if ${gdb_cv_have_pt_getxmmregs+:} false; then :
81ecdfbb 14174 $as_echo_n "(cached) " >&6
3862412b 14175else
81ecdfbb 14176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14177/* end confdefs.h. */
a3828db0
MK
14178#include <sys/types.h>
14179#include <sys/ptrace.h>
bec39cab
AC
14180int
14181main ()
14182{
a3828db0 14183PT_GETXMMREGS;
bec39cab
AC
14184 ;
14185 return 0;
14186}
14187_ACEOF
81ecdfbb 14188if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14189 gdb_cv_have_pt_getxmmregs=yes
3862412b 14190else
81ecdfbb 14191 gdb_cv_have_pt_getxmmregs=no
3862412b 14192fi
81ecdfbb 14193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14194fi
14195
81ecdfbb
RW
14196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
14197$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 14198if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 14199
81ecdfbb 14200$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 14201
97bf5e38 14202fi
3862412b 14203
6e9567fe
JB
14204# See if <sys/ptrace.h> supports LWP names on FreeBSD
14205# Older FreeBSD versions don't have the pl_tdname member of
14206# `struct ptrace_lwpinfo'.
14207ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
14208"
d0ac1c44 14209if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
6e9567fe
JB
14210
14211cat >>confdefs.h <<_ACEOF
14212#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
14213_ACEOF
14214
14215
14216fi
14217
14218
e6cdd38e
JB
14219# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
14220# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
14221# FreeBSD 10.3.
14222ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
14223"
d0ac1c44 14224if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
e6cdd38e
JB
14225
14226cat >>confdefs.h <<_ACEOF
14227#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
14228_ACEOF
14229
14230
14231fi
14232
6e9567fe 14233
97bf5e38 14234if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
14235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
14236$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14237 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
81ecdfbb 14238 $as_echo_n "(cached) " >&6
596c9d4b 14239else
81ecdfbb 14240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14241/* end confdefs.h. */
596c9d4b
KB
14242
14243#define _SYSCALL32
d30c5336
JK
14244/* Needed for new procfs interface on sparc-solaris. */
14245#define _STRUCTURED_PROC 1
596c9d4b 14246#include <sys/procfs.h>
bec39cab
AC
14247int
14248main ()
14249{
97bf5e38 14250gregset_t avar
bec39cab
AC
14251 ;
14252 return 0;
14253}
14254_ACEOF
81ecdfbb 14255if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14256 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 14257else
81ecdfbb 14258 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 14259
596c9d4b 14260fi
81ecdfbb 14261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
14262fi
14263
97bf5e38 14264 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 14265
81ecdfbb 14266$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
14267
14268 fi
81ecdfbb
RW
14269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14270$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 14271
81ecdfbb
RW
14272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
14273$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14274 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
81ecdfbb 14275 $as_echo_n "(cached) " >&6
d84dd0c5 14276else
81ecdfbb 14277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14278/* end confdefs.h. */
97bf5e38
MK
14279
14280#define _SYSCALL32
d30c5336
JK
14281/* Needed for new procfs interface on sparc-solaris. */
14282#define _STRUCTURED_PROC 1
d84dd0c5 14283#include <sys/procfs.h>
bec39cab
AC
14284int
14285main ()
14286{
97bf5e38 14287fpregset_t avar
bec39cab
AC
14288 ;
14289 return 0;
14290}
14291_ACEOF
81ecdfbb 14292if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14293 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 14294else
81ecdfbb 14295 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 14296
d84dd0c5 14297fi
81ecdfbb 14298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
14299fi
14300
97bf5e38 14301 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 14302
81ecdfbb 14303$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 14304
97bf5e38 14305 fi
81ecdfbb
RW
14306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14307$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 14308
81ecdfbb
RW
14309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
14310$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14311 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
81ecdfbb 14312 $as_echo_n "(cached) " >&6
c906108c 14313else
81ecdfbb 14314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14315/* end confdefs.h. */
c906108c 14316
97bf5e38 14317#define _SYSCALL32
d30c5336
JK
14318/* Needed for new procfs interface on sparc-solaris. */
14319#define _STRUCTURED_PROC 1
97bf5e38 14320#include <sys/procfs.h>
bec39cab
AC
14321int
14322main ()
14323{
97bf5e38 14324prgregset_t avar
bec39cab
AC
14325 ;
14326 return 0;
14327}
14328_ACEOF
81ecdfbb 14329if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14330 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 14331else
81ecdfbb 14332 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 14333
c906108c 14334fi
81ecdfbb 14335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14336fi
14337
97bf5e38 14338 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 14339
81ecdfbb 14340$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 14341
97bf5e38 14342 fi
81ecdfbb
RW
14343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14344$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 14345
81ecdfbb
RW
14346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
14347$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14348 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
81ecdfbb 14349 $as_echo_n "(cached) " >&6
d45fe813 14350else
81ecdfbb 14351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14352/* end confdefs.h. */
97bf5e38
MK
14353
14354#define _SYSCALL32
d30c5336
JK
14355/* Needed for new procfs interface on sparc-solaris. */
14356#define _STRUCTURED_PROC 1
97bf5e38 14357#include <sys/procfs.h>
bec39cab
AC
14358int
14359main ()
14360{
97bf5e38 14361prfpregset_t avar
bec39cab
AC
14362 ;
14363 return 0;
14364}
14365_ACEOF
81ecdfbb 14366if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14367 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 14368else
81ecdfbb 14369 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 14370
d45fe813 14371fi
81ecdfbb 14372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14373fi
14374
97bf5e38 14375 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 14376
81ecdfbb 14377$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 14378
97bf5e38 14379 fi
81ecdfbb
RW
14380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14381$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 14382
81ecdfbb
RW
14383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14384$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
d0ac1c44 14385 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
81ecdfbb 14386 $as_echo_n "(cached) " >&6
d45fe813 14387else
81ecdfbb 14388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14389/* end confdefs.h. */
97bf5e38
MK
14390
14391#define _SYSCALL32
d30c5336
JK
14392/* Needed for new procfs interface on sparc-solaris. */
14393#define _STRUCTURED_PROC 1
97bf5e38 14394#include <sys/procfs.h>
bec39cab
AC
14395int
14396main ()
14397{
97bf5e38 14398prgregset32_t avar
bec39cab
AC
14399 ;
14400 return 0;
14401}
14402_ACEOF
81ecdfbb 14403if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14404 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 14405else
81ecdfbb 14406 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 14407
d45fe813 14408fi
81ecdfbb 14409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14410fi
14411
97bf5e38 14412 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 14413
81ecdfbb 14414$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 14415
97bf5e38 14416 fi
81ecdfbb
RW
14417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14418$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 14419
81ecdfbb
RW
14420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14421$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
d0ac1c44 14422 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
81ecdfbb 14423 $as_echo_n "(cached) " >&6
d45fe813 14424else
81ecdfbb 14425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14426/* end confdefs.h. */
97bf5e38 14427
d45fe813 14428#define _SYSCALL32
d30c5336
JK
14429/* Needed for new procfs interface on sparc-solaris. */
14430#define _STRUCTURED_PROC 1
97bf5e38 14431#include <sys/procfs.h>
bec39cab
AC
14432int
14433main ()
14434{
97bf5e38 14435lwpid_t avar
bec39cab
AC
14436 ;
14437 return 0;
14438}
14439_ACEOF
81ecdfbb 14440if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14441 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 14442else
81ecdfbb 14443 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 14444
d45fe813 14445fi
81ecdfbb 14446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14447fi
14448
97bf5e38 14449 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 14450
81ecdfbb 14451$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 14452
97bf5e38 14453 fi
81ecdfbb
RW
14454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14455$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 14456
81ecdfbb
RW
14457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14458$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
d0ac1c44 14459 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
81ecdfbb 14460 $as_echo_n "(cached) " >&6
c906108c 14461else
81ecdfbb 14462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14463/* end confdefs.h. */
c906108c 14464
97bf5e38 14465#define _SYSCALL32
d30c5336
JK
14466/* Needed for new procfs interface on sparc-solaris. */
14467#define _STRUCTURED_PROC 1
97bf5e38 14468#include <sys/procfs.h>
bec39cab
AC
14469int
14470main ()
14471{
97bf5e38 14472psaddr_t avar
bec39cab
AC
14473 ;
14474 return 0;
14475}
14476_ACEOF
81ecdfbb 14477if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14478 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 14479else
81ecdfbb 14480 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 14481
c906108c 14482fi
81ecdfbb 14483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14484fi
14485
97bf5e38 14486 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 14487
81ecdfbb 14488$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 14489
97bf5e38 14490 fi
81ecdfbb
RW
14491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14492$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 14493
43b7e92b
GB
14494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
14495$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
14496 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
14497 $as_echo_n "(cached) " >&6
14498else
14499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14500/* end confdefs.h. */
14501
14502#define _SYSCALL32
14503/* Needed for new procfs interface on sparc-solaris. */
14504#define _STRUCTURED_PROC 1
14505#include <sys/procfs.h>
14506int
14507main ()
14508{
14509elf_fpregset_t avar
14510 ;
14511 return 0;
14512}
14513_ACEOF
14514if ac_fn_c_try_compile "$LINENO"; then :
14515 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
14516else
14517 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
14518
14519fi
14520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14521fi
14522
14523 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
14524
14525$as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
14526
14527 fi
14528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
14529$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
14530
c906108c 14531fi
c906108c 14532
bc8bcb4b 14533# Check if the compiler supports the `long long' type.
c906108c 14534
81ecdfbb
RW
14535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14536$as_echo_n "checking for long long support in compiler... " >&6; }
d0ac1c44 14537if ${gdb_cv_c_long_long+:} false; then :
81ecdfbb 14538 $as_echo_n "(cached) " >&6
97bf5e38 14539else
81ecdfbb 14540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14541/* end confdefs.h. */
bc8bcb4b 14542extern long long foo;
bec39cab
AC
14543int
14544main ()
14545{
bc8bcb4b 14546switch (foo & 2) { case 0: return 1; }
bec39cab
AC
14547 ;
14548 return 0;
14549}
14550_ACEOF
81ecdfbb 14551if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14552 gdb_cv_c_long_long=yes
14553else
81ecdfbb 14554 gdb_cv_c_long_long=no
97bf5e38 14555fi
81ecdfbb 14556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14557fi
81ecdfbb
RW
14558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14559$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
14560if test $gdb_cv_c_long_long != yes; then
14561 # libdecnumber requires long long.
d0ac1c44 14562 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
14563fi
14564
bc8bcb4b 14565# Check if the compiler and runtime support printing long longs.
97bf5e38 14566
81ecdfbb
RW
14567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14568$as_echo_n "checking for long long support in printf... " >&6; }
d0ac1c44 14569if ${gdb_cv_printf_has_long_long+:} false; then :
81ecdfbb 14570 $as_echo_n "(cached) " >&6
97bf5e38 14571else
81ecdfbb 14572 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14573 gdb_cv_printf_has_long_long=no
14574else
81ecdfbb 14575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14576/* end confdefs.h. */
bc8bcb4b
MK
14577$ac_includes_default
14578int
14579main ()
14580{
14581char buf[32];
97bf5e38
MK
14582 long long l = 0;
14583 l = (l << 16) + 0x0123;
14584 l = (l << 16) + 0x4567;
14585 l = (l << 16) + 0x89ab;
14586 l = (l << 16) + 0xcdef;
14587 sprintf (buf, "0x%016llx", l);
14588 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
14589 ;
14590 return 0;
c906108c 14591}
bec39cab 14592_ACEOF
81ecdfbb 14593if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14594 gdb_cv_printf_has_long_long=yes
14595else
81ecdfbb 14596 gdb_cv_printf_has_long_long=no
97bf5e38 14597fi
81ecdfbb
RW
14598rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14599 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14600fi
81ecdfbb 14601
97bf5e38 14602fi
81ecdfbb
RW
14603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14604$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 14605if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 14606
81ecdfbb 14607$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14608
14609fi
97bf5e38 14610
1a619819
LM
14611# Check if the compiler and runtime support printing decfloats.
14612
81ecdfbb
RW
14613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14614$as_echo_n "checking for decfloat support in printf... " >&6; }
d0ac1c44 14615if ${gdb_cv_printf_has_decfloat+:} false; then :
81ecdfbb 14616 $as_echo_n "(cached) " >&6
1a619819 14617else
81ecdfbb 14618 if test "$cross_compiling" = yes; then :
1a619819
LM
14619 gdb_cv_printf_has_decfloat=no
14620else
81ecdfbb 14621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
14622/* end confdefs.h. */
14623$ac_includes_default
14624int
14625main ()
14626{
14627char buf[64];
14628 _Decimal32 d32 = 1.2345df;
14629 _Decimal64 d64 = 1.2345dd;
14630 _Decimal128 d128 = 1.2345dl;
14631 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14632 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14633 ;
14634 return 0;
14635}
14636_ACEOF
81ecdfbb 14637if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
14638 gdb_cv_printf_has_decfloat=yes
14639else
81ecdfbb 14640 gdb_cv_printf_has_decfloat=no
1a619819 14641fi
81ecdfbb
RW
14642rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14643 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 14644fi
81ecdfbb 14645
1a619819 14646fi
81ecdfbb
RW
14647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14648$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
14649if test $gdb_cv_printf_has_decfloat = yes; then
14650
81ecdfbb 14651$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
14652
14653fi
14654
bc8bcb4b
MK
14655# Check if the compiler supports the `long double' type. We can't use
14656# AC_C_LONG_DOUBLE because that one does additional checks on the
14657# constants defined in <float.h> that fail on some systems,
14658# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 14659
81ecdfbb
RW
14660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14661$as_echo_n "checking for long double support in compiler... " >&6; }
d0ac1c44 14662if ${gdb_cv_c_long_double+:} false; then :
81ecdfbb 14663 $as_echo_n "(cached) " >&6
97bf5e38 14664else
81ecdfbb 14665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14666/* end confdefs.h. */
97bf5e38 14667long double foo;
bec39cab 14668_ACEOF
81ecdfbb 14669if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 14670 gdb_cv_c_long_double=yes
97bf5e38 14671else
81ecdfbb 14672 gdb_cv_c_long_double=no
97bf5e38 14673fi
81ecdfbb 14674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14675fi
81ecdfbb
RW
14676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14677$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 14678if test $gdb_cv_c_long_double = yes; then
c906108c 14679
81ecdfbb 14680$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14681
14682fi
14683
bc8bcb4b 14684# Check if the compiler and runtime support printing long doubles.
97bf5e38 14685
81ecdfbb
RW
14686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14687$as_echo_n "checking for long double support in printf... " >&6; }
d0ac1c44 14688if ${gdb_cv_printf_has_long_double+:} false; then :
81ecdfbb 14689 $as_echo_n "(cached) " >&6
97bf5e38 14690else
81ecdfbb 14691 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14692 gdb_cv_printf_has_long_double=no
14693else
81ecdfbb 14694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14695/* end confdefs.h. */
bc8bcb4b
MK
14696$ac_includes_default
14697int
14698main ()
14699{
14700char buf[16];
97bf5e38
MK
14701 long double f = 3.141592653;
14702 sprintf (buf, "%Lg", f);
14703 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
14704 ;
14705 return 0;
97bf5e38 14706}
bec39cab 14707_ACEOF
81ecdfbb 14708if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14709 gdb_cv_printf_has_long_double=yes
c906108c 14710else
81ecdfbb 14711 gdb_cv_printf_has_long_double=no
c906108c 14712fi
81ecdfbb
RW
14713rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14714 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14715fi
81ecdfbb 14716
c906108c 14717fi
81ecdfbb
RW
14718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14719$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 14720if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 14721
81ecdfbb 14722$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14723
14724fi
97bf5e38 14725
bc8bcb4b 14726# Check if the compiler and runtime support scanning long doubles.
97bf5e38 14727
81ecdfbb
RW
14728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14729$as_echo_n "checking for long double support in scanf... " >&6; }
d0ac1c44 14730if ${gdb_cv_scanf_has_long_double+:} false; then :
81ecdfbb 14731 $as_echo_n "(cached) " >&6
97bf5e38 14732else
81ecdfbb 14733 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14734 gdb_cv_scanf_has_long_double=no
14735else
81ecdfbb 14736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14737/* end confdefs.h. */
bc8bcb4b
MK
14738#include <stdio.h>
14739int
14740main ()
14741{
14742char *buf = "3.141592653";
97bf5e38
MK
14743 long double f = 0;
14744 sscanf (buf, "%Lg", &f);
14745 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
14746 ;
14747 return 0;
97bf5e38 14748}
bec39cab 14749_ACEOF
81ecdfbb 14750if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14751 gdb_cv_scanf_has_long_double=yes
14752else
81ecdfbb 14753 gdb_cv_scanf_has_long_double=no
97bf5e38 14754fi
81ecdfbb
RW
14755rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14756 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14757fi
81ecdfbb 14758
c906108c 14759fi
81ecdfbb
RW
14760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14761$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 14762if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 14763
81ecdfbb 14764$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14765
14766fi
c906108c 14767
438013df
AO
14768case ${host_os} in
14769aix*)
81ecdfbb
RW
14770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14771$as_echo_n "checking for -bbigtoc option... " >&6; }
d0ac1c44 14772if ${gdb_cv_bigtoc+:} false; then :
81ecdfbb 14773 $as_echo_n "(cached) " >&6
438013df 14774else
bec39cab 14775
438013df
AO
14776 SAVE_LDFLAGS=$LDFLAGS
14777
14778 case $GCC in
14779 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14780 *) gdb_cv_bigtoc=-bbigtoc ;;
14781 esac
14782
14783 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 14784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14785/* end confdefs.h. */
438013df 14786
bec39cab
AC
14787int
14788main ()
14789{
438013df 14790int i;
bec39cab
AC
14791 ;
14792 return 0;
14793}
14794_ACEOF
81ecdfbb 14795if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14796
81ecdfbb
RW
14797else
14798 gdb_cv_bigtoc=
438013df 14799fi
81ecdfbb
RW
14800rm -f core conftest.err conftest.$ac_objext \
14801 conftest$ac_exeext conftest.$ac_ext
ec76baa5 14802 LDFLAGS="${SAVE_LDFLAGS}"
438013df 14803
bec39cab 14804fi
81ecdfbb
RW
14805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
14806$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
14807 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
14808 ;;
14809esac
14810
38f6b338 14811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 14812$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
14813dynamic_list=false
14814if test "${gdb_native}" = yes; then
14815 # The dynamically loaded libthread_db needs access to symbols in the gdb
14816 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
14817 # may not be supported there.
14818 old_LDFLAGS="$LDFLAGS"
14819 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
14820 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
14821 LDFLAGS="$LDFLAGS $RDYNAMIC"
14822 if test "${have_libpython}" = no; then
14823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
14824/* end confdefs.h. */
14825
14826int
14827main ()
14828{
14829
14830 ;
14831 return 0;
14832}
14833_ACEOF
14834if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
14835 dynamic_list=true
14836fi
14837rm -f core conftest.err conftest.$ac_objext \
14838 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
14839 else
14840 # Workaround http://bugs.python.org/issue4434 where static
14841 # libpythonX.Y.a would get its symbols required for
14842 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
14843 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
14844
14845 # Note the workaround for Python
14846 # http://bugs.python.org/issue10112 earlier has removed
14847 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
14848 # here too, as otherwise it'd make this -Wl,--dynamic-list test
14849 # always pass.
38f6b338
JK
14850 old_CFLAGS="$CFLAGS"
14851 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
14852 old_LIBS="$LIBS"
14853 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
14854 old_CPPFLAGS="$CPPFLAGS"
14855 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 14856 if test "$cross_compiling" = yes; then :
3bebe2f2 14857 true
f6528abd 14858else
3bebe2f2
JK
14859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14860/* end confdefs.h. */
1b4f615e 14861#include "Python.h"
3bebe2f2
JK
14862int
14863main ()
14864{
14865int err;
38f6b338
JK
14866 Py_Initialize ();
14867 err = PyRun_SimpleString ("import itertools\n");
14868 Py_Finalize ();
14869 return err == 0 ? 0 : 1;
3bebe2f2
JK
14870 ;
14871 return 0;
14872}
14873_ACEOF
14874if ac_fn_c_try_run "$LINENO"; then :
14875 dynamic_list=true
14876fi
14877rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14878 conftest.$ac_objext conftest.beam conftest.$ac_ext
14879fi
14880
8c1fb155 14881 LIBS="$old_LIBS"
38f6b338 14882 CFLAGS="$old_CFLAGS"
1b4f615e 14883 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
14884 fi
14885 LDFLAGS="$old_LDFLAGS"
14886fi
14887if $dynamic_list; then
14888 found="-Wl,--dynamic-list"
14889 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 14890else
38f6b338
JK
14891 found="-rdynamic"
14892 RDYNAMIC="-rdynamic"
f6528abd 14893fi
f6528abd 14894
38f6b338 14895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 14896$as_echo "$found" >&6; }
0407b3f1 14897
f6528abd 14898
0407b3f1 14899if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 14900 case ${host_os} in
d92419e5 14901 aix*)
81ecdfbb
RW
14902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
14903$as_echo_n "checking for AiX thread debugging library... " >&6; }
d0ac1c44 14904 if ${gdb_cv_have_aix_thread_debug+:} false; then :
81ecdfbb 14905 $as_echo_n "(cached) " >&6
bec39cab 14906else
81ecdfbb 14907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14908/* end confdefs.h. */
d92419e5 14909#include <sys/pthdebug.h>
bec39cab
AC
14910int
14911main ()
14912{
d92419e5
JB
14913#ifndef PTHDB_VERSION_3
14914 #error
14915 #endif
bec39cab
AC
14916 ;
14917 return 0;
14918}
14919_ACEOF
81ecdfbb 14920if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
14921 gdb_cv_have_aix_thread_debug=yes
14922else
81ecdfbb 14923 gdb_cv_have_aix_thread_debug=no
d92419e5 14924fi
81ecdfbb 14925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
14926fi
14927
81ecdfbb
RW
14928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
14929$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
14930 if test $gdb_cv_have_aix_thread_debug = yes; then
14931 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 14932 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 14933 LIBS="$LIBS -lpthdebug"
d645e32e
JB
14934
14935 # Older versions of AIX do not provide the declaration for
14936 # the getthrds function (it appears that it was introduced
14937 # with AIX 6.x).
14938 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
14939"
d0ac1c44 14940if test "x$ac_cv_have_decl_getthrds" = xyes; then :
d645e32e
JB
14941 ac_have_decl=1
14942else
14943 ac_have_decl=0
14944fi
14945
14946cat >>confdefs.h <<_ACEOF
14947#define HAVE_DECL_GETTHRDS $ac_have_decl
14948_ACEOF
14949
d92419e5
JB
14950 fi
14951 ;;
c906108c 14952 esac
bec39cab 14953
c906108c
SS
14954fi
14955
3f47be5c 14956if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
14957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
14958$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
d0ac1c44 14959if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
81ecdfbb 14960 $as_echo_n "(cached) " >&6
bec39cab 14961else
81ecdfbb 14962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14963/* end confdefs.h. */
3f47be5c 14964#include <thread_db.h>
bec39cab
AC
14965int
14966main ()
14967{
3f47be5c 14968int i = TD_NOTALLOC;
bec39cab
AC
14969 ;
14970 return 0;
14971}
14972_ACEOF
81ecdfbb 14973if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
14974 gdb_cv_thread_db_h_has_td_notalloc=yes
14975else
81ecdfbb 14976 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 14977
3f47be5c 14978fi
81ecdfbb 14979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 14980
bec39cab 14981fi
81ecdfbb
RW
14982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
14983$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
14984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
14985$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
d0ac1c44 14986if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
81ecdfbb 14987 $as_echo_n "(cached) " >&6
59f80f10 14988else
81ecdfbb 14989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14990/* end confdefs.h. */
14991#include <thread_db.h>
14992int
14993main ()
14994{
14995int i = TD_VERSION;
14996 ;
14997 return 0;
14998}
14999_ACEOF
81ecdfbb 15000if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15001 gdb_cv_thread_db_h_has_td_version=yes
15002else
81ecdfbb 15003 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
15004
15005fi
81ecdfbb 15006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15007
15008fi
81ecdfbb
RW
15009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
15010$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
15011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
15012$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
d0ac1c44 15013if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
81ecdfbb 15014 $as_echo_n "(cached) " >&6
59f80f10 15015else
81ecdfbb 15016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
15017/* end confdefs.h. */
15018#include <thread_db.h>
15019int
15020main ()
15021{
15022int i = TD_NOTLS;
15023 ;
15024 return 0;
15025}
15026_ACEOF
81ecdfbb 15027if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15028 gdb_cv_thread_db_h_has_td_notls=yes
15029else
81ecdfbb 15030 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
15031
15032fi
81ecdfbb 15033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15034
15035fi
81ecdfbb
RW
15036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
15037$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
15038fi
15039if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 15040
81ecdfbb 15041$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 15042
59f80f10
DJ
15043fi
15044if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
15045
81ecdfbb 15046$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
15047
15048fi
15049if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
15050
81ecdfbb 15051$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 15052
3f47be5c
EZ
15053fi
15054
81ecdfbb
RW
15055ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
15056"
d0ac1c44 15057if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
81ecdfbb 15058 ac_have_decl=1
10568435 15059else
81ecdfbb 15060 ac_have_decl=0
10568435 15061fi
10568435
JK
15062
15063cat >>confdefs.h <<_ACEOF
81ecdfbb 15064#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
15065_ACEOF
15066
15067
81ecdfbb
RW
15068if test "$cross_compiling" = yes; then :
15069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15070/* end confdefs.h. */
15071#include <sys/personality.h>
15072int
15073main ()
15074{
15075
15076# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15077# define ADDR_NO_RANDOMIZE 0x0040000
15078# endif
15079 /* Test the flag could be set and stays set. */
15080 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15081 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15082 return 1
15083 ;
15084 return 0;
15085}
15086_ACEOF
81ecdfbb 15087if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
15088 have_personality=true
15089else
81ecdfbb 15090 have_personality=false
10568435 15091fi
81ecdfbb
RW
15092rm -f core conftest.err conftest.$ac_objext \
15093 conftest$ac_exeext conftest.$ac_ext
10568435 15094else
81ecdfbb 15095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15096/* end confdefs.h. */
15097#include <sys/personality.h>
15098int
15099main ()
15100{
15101
15102# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15103# define ADDR_NO_RANDOMIZE 0x0040000
15104# endif
15105 /* Test the flag could be set and stays set. */
15106 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15107 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15108 return 1
15109 ;
15110 return 0;
15111}
15112_ACEOF
81ecdfbb 15113if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
15114 have_personality=true
15115else
81ecdfbb 15116 have_personality=false
10568435 15117fi
81ecdfbb
RW
15118rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15119 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 15120fi
81ecdfbb 15121
10568435
JK
15122if $have_personality
15123then
15124
81ecdfbb 15125$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
15126
15127fi
15128
e655c1a2
PA
15129case $host_os in
15130 go32* | *djgpp*)
15131 gdbinit=gdb.ini
15132 ;;
15133 *)
15134 gdbinit=.gdbinit
15135 ;;
15136esac
15137
15138cat >>confdefs.h <<_ACEOF
15139#define GDBINIT "$gdbinit"
15140_ACEOF
15141
15142
fb40c209 15143
f83d8a90
DE
15144# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
15145# except that the argument to --with-sysroot is optional.
15146# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
15147if test "x$with_sysroot" = xyes; then
15148 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
15149fi
bec39cab 15150
81ecdfbb
RW
15151# Check whether --with-sysroot was given.
15152if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
15153 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
15154else
15155 TARGET_SYSTEM_ROOT=
15156fi
030292b7 15157
030292b7 15158
f83d8a90
DE
15159 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15160 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15161 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
15162 ac_define_dir=`eval echo $ac_define_dir`
030292b7 15163
f83d8a90
DE
15164cat >>confdefs.h <<_ACEOF
15165#define TARGET_SYSTEM_ROOT "$ac_define_dir"
15166_ACEOF
bec39cab 15167
030292b7 15168
b14b1491 15169
f83d8a90
DE
15170
15171 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15172 if test "x$prefix" = xNONE; then
15173 test_prefix=/usr/local
15174 else
15175 test_prefix=$prefix
15176 fi
15177 else
15178 test_prefix=$exec_prefix
15179 fi
15180 value=0
15181 case ${ac_define_dir} in
15182 "${test_prefix}"|"${test_prefix}/"*|\
15183 '${exec_prefix}'|'${exec_prefix}/'*)
15184 value=1
15185 ;;
15186 esac
15187
15188cat >>confdefs.h <<_ACEOF
15189#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
15190_ACEOF
030292b7
DJ
15191
15192
15193
16e7150e 15194
16e7150e 15195
81ecdfbb
RW
15196# Check whether --with-system-gdbinit was given.
15197if test "${with_system_gdbinit+set}" = set; then :
15198 withval=$with_system_gdbinit;
b14b1491
TT
15199 SYSTEM_GDBINIT=$withval
15200else
15201 SYSTEM_GDBINIT=
81ecdfbb
RW
15202fi
15203
16e7150e
JG
15204
15205 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15206 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 15207 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
15208 ac_define_dir=`eval echo $ac_define_dir`
15209
15210cat >>confdefs.h <<_ACEOF
15211#define SYSTEM_GDBINIT "$ac_define_dir"
15212_ACEOF
15213
15214
15215
0c4a4063 15216
b14b1491
TT
15217 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15218 if test "x$prefix" = xNONE; then
15219 test_prefix=/usr/local
15220 else
15221 test_prefix=$prefix
15222 fi
15223 else
15224 test_prefix=$exec_prefix
15225 fi
15226 value=0
15227 case ${ac_define_dir} in
15228 "${test_prefix}"|"${test_prefix}/"*|\
15229 '${exec_prefix}'|'${exec_prefix}/'*)
15230 value=1
15231 ;;
15232 esac
16e7150e 15233
b14b1491
TT
15234cat >>confdefs.h <<_ACEOF
15235#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
15236_ACEOF
15237
b14b1491 15238
16e7150e 15239
0c4a4063 15240
b835bb52 15241
81ecdfbb
RW
15242# Check whether --enable-werror was given.
15243if test "${enable_werror+set}" = set; then :
15244 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
15245 yes | y) ERROR_ON_WARNING="yes" ;;
15246 no | n) ERROR_ON_WARNING="no" ;;
d0ac1c44 15247 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 15248 esac
81ecdfbb
RW
15249fi
15250
094a342e 15251
9a084706
PA
15252# Enable -Werror by default when using gcc. Turn it off for releases.
15253if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
15254 ERROR_ON_WARNING=yes
15255fi
15256
15257WERROR_CFLAGS=""
15258if test "${ERROR_ON_WARNING}" = yes ; then
15259 WERROR_CFLAGS="-Werror"
15260fi
15261
cf6de44d 15262# The options we'll try to enable.
aac331e4 15263build_warnings="-Wall -Wpointer-arith \
a0de763e 15264-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
aac331e4 15265-Wno-switch -Wno-char-subscripts \
cf6de44d 15266-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
d3d8724a 15267-Wno-sign-compare -Wno-error=maybe-uninitialized \
7f8a5d38 15268-Wno-mismatched-tags \
632e107b 15269-Wno-error=deprecated-register \
85e26832 15270-Wsuggest-override \
1a34f210 15271-Wimplicit-fallthrough=3 \
96643e35 15272-Wduplicated-cond \
33a6bc35
TT
15273-Wshadow=local \
15274-Wdeprecated-copy \
15275-Wdeprecated-copy-dtor \
15276-Wredundant-move"
3bc3d82a 15277
3526781e 15278case "${host}" in
4fa7574e
RO
15279 *-*-mingw32*)
15280 # Enable -Wno-format by default when using gcc on mingw since many
15281 # GCC versions complain about %I64.
15282 build_warnings="$build_warnings -Wno-format" ;;
15283 *-*-solaris*)
15284 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
15285 # doesn't understand.
15286 build_warnings="$build_warnings -Wno-unknown-pragmas"
15287 # Solaris 11 <unistd.h> marks vfork deprecated.
15288 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
f1628857
TT
15289 *)
15290 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
15291 # but there's a special case for this below.
15292 build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
15293esac
15294
81ecdfbb
RW
15295# Check whether --enable-build-warnings was given.
15296if test "${enable_build_warnings+set}" = set; then :
15297 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
15298 yes) ;;
15299 no) build_warnings="-w";;
15300 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15301 build_warnings="${build_warnings} ${t}";;
15302 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15303 build_warnings="${t} ${build_warnings}";;
15304 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15305esac
d4f3574e 15306if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 15307 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 15308fi
81ecdfbb
RW
15309fi
15310# Check whether --enable-gdb-build-warnings was given.
15311if test "${enable_gdb_build_warnings+set}" = set; then :
15312 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
15313 yes) ;;
15314 no) build_warnings="-w";;
15315 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15316 build_warnings="${build_warnings} ${t}";;
15317 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15318 build_warnings="${t} ${build_warnings}";;
15319 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15320esac
15321if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15322 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
15323fi
81ecdfbb 15324fi
3bc3d82a
PA
15325
15326# The set of warnings supported by a C++ compiler is not the same as
15327# of the C compiler.
cf6de44d 15328ac_ext=cpp
3bc3d82a
PA
15329ac_cpp='$CXXCPP $CPPFLAGS'
15330ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15331ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15332ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15333
3bc3d82a 15334
81ecdfbb 15335WARN_CFLAGS=""
c906108c
SS
15336if test "x${build_warnings}" != x -a "x$GCC" = xyes
15337then
81ecdfbb
RW
15338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
15339$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
15340 # Separate out the -Werror flag as some files just cannot be
15341 # compiled with it enabled.
15342 for w in ${build_warnings}; do
7544db95
PA
15343 # GCC does not complain about -Wno-unknown-warning. Invert
15344 # and test -Wunknown-warning instead.
15345 case $w in
15346 -Wno-*)
15347 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
f1628857
TT
15348 -Wformat-nonliteral)
15349 # gcc requires -Wformat before -Wformat-nonliteral
15350 # will work, so stick them together.
15351 w="-Wformat $w"
15352 wtest="$w"
15353 ;;
7544db95
PA
15354 *)
15355 wtest=$w ;;
15356 esac
15357
746a987d
AC
15358 case $w in
15359 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
15360 *)
15361 # Check whether GCC accepts it.
4536bbc6 15362 saved_CFLAGS="$CFLAGS"
3e019bdc 15363 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 15364 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 15365 CXXFLAGS="$CXXFLAGS -Werror $wtest"
a0de763e
TT
15366 if test "x$w" = "x-Wunused-variable"; then
15367 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
15368 # fixed in GCC 4.9. This test is derived from the gdb
15369 # source code that triggered this bug in GCC.
15370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15371/* end confdefs.h. */
15372struct scoped_restore_base {};
15373 struct scoped_restore_tmpl : public scoped_restore_base {
15374 ~scoped_restore_tmpl() {}
15375 };
15376int
15377main ()
15378{
15379const scoped_restore_base &b = scoped_restore_tmpl();
15380 ;
15381 return 0;
15382}
15383_ACEOF
15384if ac_fn_cxx_try_compile "$LINENO"; then :
15385 WARN_CFLAGS="${WARN_CFLAGS} $w"
15386fi
15387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15388 else
15389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15390/* end confdefs.h. */
4536bbc6 15391
bec39cab
AC
15392int
15393main ()
15394{
4536bbc6 15395
bec39cab
AC
15396 ;
15397 return 0;
15398}
15399_ACEOF
3bc3d82a 15400if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 15401 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 15402fi
81ecdfbb 15403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a0de763e 15404 fi
4536bbc6 15405 CFLAGS="$saved_CFLAGS"
3bc3d82a 15406 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
15407 esac
15408 done
81ecdfbb
RW
15409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
15410$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
15411fi
15412
15413
104c1213 15414
cf6de44d 15415ac_ext=c
3bc3d82a
PA
15416ac_cpp='$CPP $CPPFLAGS'
15417ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15418ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15419ac_compiler_gnu=$ac_cv_c_compiler_gnu
15420
3bc3d82a 15421
b835bb52 15422
f35d5ade
TT
15423# Check whether --enable-ubsan was given.
15424if test "${enable_ubsan+set}" = set; then :
15425 enableval=$enable_ubsan;
15426else
eff98030 15427 enable_ubsan=no
f35d5ade
TT
15428fi
15429
15430if test "x$enable_ubsan" = xauto; then
15431 if $development; then
15432 enable_ubsan=yes
15433 fi
15434fi
15435ac_ext=cpp
15436ac_cpp='$CXXCPP $CPPFLAGS'
15437ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15438ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15439ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15440
15441if test "x$enable_ubsan" = xyes; then
15442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
15443$as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
15444 saved_CXXFLAGS="$CXXFLAGS"
15445 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
15446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15447/* end confdefs.h. */
15448
15449int
15450main ()
15451{
15452
15453 ;
15454 return 0;
15455}
15456_ACEOF
15457if ac_fn_cxx_try_link "$LINENO"; then :
15458 enable_ubsan=yes
15459else
15460 enable_ubsan=no
15461fi
15462rm -f core conftest.err conftest.$ac_objext \
15463 conftest$ac_exeext conftest.$ac_ext
15464 CXXFLAGS="$saved_CXXFLAGS"
15465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
15466$as_echo "$enable_ubsan" >&6; }
15467 if test "x$enable_ubsan" = xyes; then
15468 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
15469 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
15470 fi
15471fi
15472ac_ext=c
15473ac_cpp='$CPP $CPPFLAGS'
15474ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15475ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15476ac_compiler_gnu=$ac_cv_c_compiler_gnu
15477
15478
15479
7a292a7a 15480# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
15481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
15482$as_echo_n "checking for cygwin... " >&6; }
d0ac1c44 15483if ${gdb_cv_os_cygwin+:} false; then :
81ecdfbb 15484 $as_echo_n "(cached) " >&6
bec39cab 15485else
81ecdfbb 15486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15487/* end confdefs.h. */
7a292a7a
SS
15488
15489#if defined (__CYGWIN__) || defined (__CYGWIN32__)
15490lose
15491#endif
bec39cab 15492_ACEOF
7a292a7a 15493if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 15494 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
15495 gdb_cv_os_cygwin=yes
15496else
7a292a7a
SS
15497 gdb_cv_os_cygwin=no
15498fi
15499rm -f conftest*
15500
15501fi
81ecdfbb
RW
15502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
15503$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 15504
aff38e61 15505
3eb25fda 15506SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 15507case ${host} in
95cbc983
AC
15508 *go32* ) SER_HARDWIRE=ser-go32.o ;;
15509 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 15510 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
c1168a2f 15511 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
aff38e61
AC
15512esac
15513
15514
cd0fc7c3
SS
15515# libreadline needs libuser32.a in a cygwin environment
15516WIN32LIBS=
15517if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
15518 WIN32LIBS="-luser32"
15519 case "${target}" in
15520 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15521 ;;
15522 esac
cd0fc7c3 15523fi
c906108c 15524
b4505029
MM
15525# The ser-tcp.c module requires sockets.
15526case ${host} in
15527 *mingw32*)
15528
81ecdfbb 15529$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
15530
15531 WIN32LIBS="$WIN32LIBS -lws2_32"
15532 ;;
15533esac
15534
7a292a7a 15535
31d99776 15536# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
15537
15538 OLD_CFLAGS=$CFLAGS
15539 OLD_LDFLAGS=$LDFLAGS
15540 OLD_LIBS=$LIBS
15541 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15542 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15543 # always want our bfd.
15544 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15545 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15546 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 15547 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15548 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 15549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb 15550$as_echo_n "checking for ELF support in BFD... " >&6; }
d0ac1c44 15551if ${gdb_cv_var_elf+:} false; then :
81ecdfbb 15552 $as_echo_n "(cached) " >&6
31d99776 15553else
81ecdfbb 15554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
15555/* end confdefs.h. */
15556#include <stdlib.h>
def63ff0
TT
15557 #include "bfd.h"
15558 #include "elf-bfd.h"
31d99776
DJ
15559
15560int
15561main ()
15562{
def63ff0 15563return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
15564 ;
15565 return 0;
15566}
15567_ACEOF
81ecdfbb 15568if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
15569 gdb_cv_var_elf=yes
15570else
81ecdfbb 15571 gdb_cv_var_elf=no
31d99776 15572fi
81ecdfbb
RW
15573rm -f core conftest.err conftest.$ac_objext \
15574 conftest$ac_exeext conftest.$ac_ext
31d99776 15575fi
81ecdfbb
RW
15576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15577$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
15578 CFLAGS=$OLD_CFLAGS
15579 LDFLAGS=$OLD_LDFLAGS
15580 LIBS=$OLD_LIBS
31d99776 15581if test $gdb_cv_var_elf = yes; then
d4777acb 15582 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 15583
81ecdfbb 15584$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 15585
075ff26d
JK
15586 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15587 if test "$plugins" = "yes"; then
a48b32c0
L
15588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
15589$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 15590if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15591 $as_echo_n "(cached) " >&6
15592else
15593 ac_func_search_save_LIBS=$LIBS
15594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15595/* end confdefs.h. */
15596
15597/* Override any GCC internal prototype to avoid an error.
15598 Use char because int might match the return type of a GCC
15599 builtin and then its argument prototype would still apply. */
15600#ifdef __cplusplus
15601extern "C"
15602#endif
15603char dlopen ();
15604int
15605main ()
15606{
15607return dlopen ();
15608 ;
15609 return 0;
15610}
15611_ACEOF
15612for ac_lib in '' dl; do
15613 if test -z "$ac_lib"; then
15614 ac_res="none required"
15615 else
15616 ac_res=-l$ac_lib
15617 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15618 fi
15619 if ac_fn_c_try_link "$LINENO"; then :
15620 ac_cv_search_dlopen=$ac_res
15621fi
15622rm -f core conftest.err conftest.$ac_objext \
15623 conftest$ac_exeext
d0ac1c44 15624 if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15625 break
15626fi
15627done
d0ac1c44 15628if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15629
15630else
15631 ac_cv_search_dlopen=no
15632fi
15633rm conftest.$ac_ext
15634LIBS=$ac_func_search_save_LIBS
15635fi
15636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
15637$as_echo "$ac_cv_search_dlopen" >&6; }
15638ac_res=$ac_cv_search_dlopen
15639if test "$ac_res" != no; then :
15640 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15641
15642fi
15643
075ff26d 15644 fi
31d99776 15645fi
31d99776 15646
4f05add4
TT
15647# Add macho support to GDB, but only if BFD includes it.
15648
15649 OLD_CFLAGS=$CFLAGS
15650 OLD_LDFLAGS=$LDFLAGS
15651 OLD_LIBS=$LIBS
15652 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15653 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15654 # always want our bfd.
15655 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15656 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15657 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 15658 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15659 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
15660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
15661$as_echo_n "checking for Mach-O support in BFD... " >&6; }
d0ac1c44 15662if ${gdb_cv_var_macho+:} false; then :
4f05add4
TT
15663 $as_echo_n "(cached) " >&6
15664else
15665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15666/* end confdefs.h. */
15667#include <stdlib.h>
15668 #include "bfd.h"
15669 #include "mach-o.h"
15670
15671int
15672main ()
15673{
15674return bfd_mach_o_lookup_command (NULL, 0, NULL);
15675 ;
15676 return 0;
15677}
15678_ACEOF
15679if ac_fn_c_try_link "$LINENO"; then :
15680 gdb_cv_var_macho=yes
15681else
15682 gdb_cv_var_macho=no
15683fi
15684rm -f core conftest.err conftest.$ac_objext \
15685 conftest$ac_exeext conftest.$ac_ext
15686fi
15687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
15688$as_echo "$gdb_cv_var_macho" >&6; }
15689 CFLAGS=$OLD_CFLAGS
15690 LDFLAGS=$OLD_LDFLAGS
15691 LIBS=$OLD_LIBS
15692if test $gdb_cv_var_macho = yes; then
15693 CONFIG_OBS="$CONFIG_OBS machoread.o"
15694fi
15695
121ce6e5
DJ
15696# Add any host-specific objects to GDB.
15697CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15698
608e2dbb
TT
15699# If building on ELF, look for lzma support for embedded compressed debug info.
15700if test $gdb_cv_var_elf = yes; then
15701
15702# Check whether --with-lzma was given.
15703if test "${with_lzma+set}" = set; then :
15704 withval=$with_lzma;
15705else
15706 with_lzma=auto
15707fi
15708
15709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
15710$as_echo_n "checking whether to use lzma... " >&6; }
15711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
15712$as_echo "$with_lzma" >&6; }
15713
15714 if test "${with_lzma}" != no; then
15715
15716
15717
15718
15719
15720
15721
15722
15723 use_additional=yes
15724
15725 acl_save_prefix="$prefix"
15726 prefix="$acl_final_prefix"
15727 acl_save_exec_prefix="$exec_prefix"
15728 exec_prefix="$acl_final_exec_prefix"
15729
15730 eval additional_includedir=\"$includedir\"
15731 eval additional_libdir=\"$libdir\"
15732
15733 exec_prefix="$acl_save_exec_prefix"
15734 prefix="$acl_save_prefix"
15735
15736
15737# Check whether --with-liblzma-prefix was given.
15738if test "${with_liblzma_prefix+set}" = set; then :
15739 withval=$with_liblzma_prefix;
15740 if test "X$withval" = "Xno"; then
15741 use_additional=no
15742 else
15743 if test "X$withval" = "X"; then
15744
15745 acl_save_prefix="$prefix"
15746 prefix="$acl_final_prefix"
15747 acl_save_exec_prefix="$exec_prefix"
15748 exec_prefix="$acl_final_exec_prefix"
15749
15750 eval additional_includedir=\"$includedir\"
15751 eval additional_libdir=\"$libdir\"
15752
15753 exec_prefix="$acl_save_exec_prefix"
15754 prefix="$acl_save_prefix"
15755
15756 else
15757 additional_includedir="$withval/include"
15758 additional_libdir="$withval/lib"
15759 fi
15760 fi
15761
15762fi
15763
15764 LIBLZMA=
15765 LTLIBLZMA=
15766 INCLZMA=
15767 rpathdirs=
15768 ltrpathdirs=
15769 names_already_handled=
15770 names_next_round='lzma '
15771 while test -n "$names_next_round"; do
15772 names_this_round="$names_next_round"
15773 names_next_round=
15774 for name in $names_this_round; do
15775 already_handled=
15776 for n in $names_already_handled; do
15777 if test "$n" = "$name"; then
15778 already_handled=yes
15779 break
15780 fi
15781 done
15782 if test -z "$already_handled"; then
15783 names_already_handled="$names_already_handled $name"
15784 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
15785 eval value=\"\$HAVE_LIB$uppername\"
15786 if test -n "$value"; then
15787 if test "$value" = yes; then
15788 eval value=\"\$LIB$uppername\"
15789 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
15790 eval value=\"\$LTLIB$uppername\"
15791 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
15792 else
15793 :
15794 fi
15795 else
15796 found_dir=
15797 found_la=
15798 found_so=
15799 found_a=
15800 if test $use_additional = yes; then
15801 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
15802 found_dir="$additional_libdir"
15803 found_so="$additional_libdir/lib$name.$shlibext"
15804 if test -f "$additional_libdir/lib$name.la"; then
15805 found_la="$additional_libdir/lib$name.la"
15806 fi
15807 else
15808 if test -f "$additional_libdir/lib$name.$libext"; then
15809 found_dir="$additional_libdir"
15810 found_a="$additional_libdir/lib$name.$libext"
15811 if test -f "$additional_libdir/lib$name.la"; then
15812 found_la="$additional_libdir/lib$name.la"
15813 fi
15814 fi
15815 fi
15816 fi
15817 if test "X$found_dir" = "X"; then
15818 for x in $LDFLAGS $LTLIBLZMA; do
15819
15820 acl_save_prefix="$prefix"
15821 prefix="$acl_final_prefix"
15822 acl_save_exec_prefix="$exec_prefix"
15823 exec_prefix="$acl_final_exec_prefix"
15824 eval x=\"$x\"
15825 exec_prefix="$acl_save_exec_prefix"
15826 prefix="$acl_save_prefix"
15827
15828 case "$x" in
15829 -L*)
15830 dir=`echo "X$x" | sed -e 's/^X-L//'`
15831 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
15832 found_dir="$dir"
15833 found_so="$dir/lib$name.$shlibext"
15834 if test -f "$dir/lib$name.la"; then
15835 found_la="$dir/lib$name.la"
15836 fi
15837 else
15838 if test -f "$dir/lib$name.$libext"; then
15839 found_dir="$dir"
15840 found_a="$dir/lib$name.$libext"
15841 if test -f "$dir/lib$name.la"; then
15842 found_la="$dir/lib$name.la"
15843 fi
15844 fi
15845 fi
15846 ;;
15847 esac
15848 if test "X$found_dir" != "X"; then
15849 break
15850 fi
15851 done
15852 fi
15853 if test "X$found_dir" != "X"; then
15854 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
15855 if test "X$found_so" != "X"; then
15856 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
15857 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15858 else
15859 haveit=
15860 for x in $ltrpathdirs; do
15861 if test "X$x" = "X$found_dir"; then
15862 haveit=yes
15863 break
15864 fi
15865 done
15866 if test -z "$haveit"; then
15867 ltrpathdirs="$ltrpathdirs $found_dir"
15868 fi
15869 if test "$hardcode_direct" = yes; then
15870 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15871 else
15872 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
15873 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15874 haveit=
15875 for x in $rpathdirs; do
15876 if test "X$x" = "X$found_dir"; then
15877 haveit=yes
15878 break
15879 fi
15880 done
15881 if test -z "$haveit"; then
15882 rpathdirs="$rpathdirs $found_dir"
15883 fi
15884 else
15885 haveit=
15886 for x in $LDFLAGS $LIBLZMA; do
15887
15888 acl_save_prefix="$prefix"
15889 prefix="$acl_final_prefix"
15890 acl_save_exec_prefix="$exec_prefix"
15891 exec_prefix="$acl_final_exec_prefix"
15892 eval x=\"$x\"
15893 exec_prefix="$acl_save_exec_prefix"
15894 prefix="$acl_save_prefix"
15895
15896 if test "X$x" = "X-L$found_dir"; then
15897 haveit=yes
15898 break
15899 fi
15900 done
15901 if test -z "$haveit"; then
15902 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
15903 fi
15904 if test "$hardcode_minus_L" != no; then
15905 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15906 else
15907 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
15908 fi
15909 fi
15910 fi
15911 fi
15912 else
15913 if test "X$found_a" != "X"; then
15914 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
15915 else
15916 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
15917 fi
15918 fi
15919 additional_includedir=
15920 case "$found_dir" in
15921 */lib | */lib/)
15922 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
15923 additional_includedir="$basedir/include"
15924 ;;
15925 esac
15926 if test "X$additional_includedir" != "X"; then
15927 if test "X$additional_includedir" != "X/usr/include"; then
15928 haveit=
15929 if test "X$additional_includedir" = "X/usr/local/include"; then
15930 if test -n "$GCC"; then
15931 case $host_os in
15932 linux*) haveit=yes;;
15933 esac
15934 fi
15935 fi
15936 if test -z "$haveit"; then
15937 for x in $CPPFLAGS $INCLZMA; do
15938
15939 acl_save_prefix="$prefix"
15940 prefix="$acl_final_prefix"
15941 acl_save_exec_prefix="$exec_prefix"
15942 exec_prefix="$acl_final_exec_prefix"
15943 eval x=\"$x\"
15944 exec_prefix="$acl_save_exec_prefix"
15945 prefix="$acl_save_prefix"
15946
15947 if test "X$x" = "X-I$additional_includedir"; then
15948 haveit=yes
15949 break
15950 fi
15951 done
15952 if test -z "$haveit"; then
15953 if test -d "$additional_includedir"; then
15954 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
15955 fi
15956 fi
15957 fi
15958 fi
15959 fi
15960 if test -n "$found_la"; then
15961 save_libdir="$libdir"
15962 case "$found_la" in
15963 */* | *\\*) . "$found_la" ;;
15964 *) . "./$found_la" ;;
15965 esac
15966 libdir="$save_libdir"
15967 for dep in $dependency_libs; do
15968 case "$dep" in
15969 -L*)
15970 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15971 if test "X$additional_libdir" != "X/usr/lib"; then
15972 haveit=
15973 if test "X$additional_libdir" = "X/usr/local/lib"; then
15974 if test -n "$GCC"; then
15975 case $host_os in
15976 linux*) haveit=yes;;
15977 esac
15978 fi
15979 fi
15980 if test -z "$haveit"; then
15981 haveit=
15982 for x in $LDFLAGS $LIBLZMA; do
15983
15984 acl_save_prefix="$prefix"
15985 prefix="$acl_final_prefix"
15986 acl_save_exec_prefix="$exec_prefix"
15987 exec_prefix="$acl_final_exec_prefix"
15988 eval x=\"$x\"
15989 exec_prefix="$acl_save_exec_prefix"
15990 prefix="$acl_save_prefix"
15991
15992 if test "X$x" = "X-L$additional_libdir"; then
15993 haveit=yes
15994 break
15995 fi
15996 done
15997 if test -z "$haveit"; then
15998 if test -d "$additional_libdir"; then
15999 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
16000 fi
16001 fi
16002 haveit=
16003 for x in $LDFLAGS $LTLIBLZMA; do
16004
16005 acl_save_prefix="$prefix"
16006 prefix="$acl_final_prefix"
16007 acl_save_exec_prefix="$exec_prefix"
16008 exec_prefix="$acl_final_exec_prefix"
16009 eval x=\"$x\"
16010 exec_prefix="$acl_save_exec_prefix"
16011 prefix="$acl_save_prefix"
16012
16013 if test "X$x" = "X-L$additional_libdir"; then
16014 haveit=yes
16015 break
16016 fi
16017 done
16018 if test -z "$haveit"; then
16019 if test -d "$additional_libdir"; then
16020 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
16021 fi
16022 fi
16023 fi
16024 fi
16025 ;;
16026 -R*)
16027 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16028 if test "$enable_rpath" != no; then
16029 haveit=
16030 for x in $rpathdirs; do
16031 if test "X$x" = "X$dir"; then
16032 haveit=yes
16033 break
16034 fi
16035 done
16036 if test -z "$haveit"; then
16037 rpathdirs="$rpathdirs $dir"
16038 fi
16039 haveit=
16040 for x in $ltrpathdirs; do
16041 if test "X$x" = "X$dir"; then
16042 haveit=yes
16043 break
16044 fi
16045 done
16046 if test -z "$haveit"; then
16047 ltrpathdirs="$ltrpathdirs $dir"
16048 fi
16049 fi
16050 ;;
16051 -l*)
16052 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16053 ;;
16054 *.la)
16055 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16056 ;;
16057 *)
16058 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
16059 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
16060 ;;
16061 esac
16062 done
16063 fi
16064 else
16065 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16066 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
16067 fi
16068 fi
16069 fi
16070 done
16071 done
16072 if test "X$rpathdirs" != "X"; then
16073 if test -n "$hardcode_libdir_separator"; then
16074 alldirs=
16075 for found_dir in $rpathdirs; do
16076 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16077 done
16078 acl_save_libdir="$libdir"
16079 libdir="$alldirs"
16080 eval flag=\"$hardcode_libdir_flag_spec\"
16081 libdir="$acl_save_libdir"
16082 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16083 else
16084 for found_dir in $rpathdirs; do
16085 acl_save_libdir="$libdir"
16086 libdir="$found_dir"
16087 eval flag=\"$hardcode_libdir_flag_spec\"
16088 libdir="$acl_save_libdir"
16089 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16090 done
16091 fi
16092 fi
16093 if test "X$ltrpathdirs" != "X"; then
16094 for found_dir in $ltrpathdirs; do
16095 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
16096 done
16097 fi
16098
16099
16100 ac_save_CPPFLAGS="$CPPFLAGS"
16101
16102 for element in $INCLZMA; do
16103 haveit=
16104 for x in $CPPFLAGS; do
16105
16106 acl_save_prefix="$prefix"
16107 prefix="$acl_final_prefix"
16108 acl_save_exec_prefix="$exec_prefix"
16109 exec_prefix="$acl_final_exec_prefix"
16110 eval x=\"$x\"
16111 exec_prefix="$acl_save_exec_prefix"
16112 prefix="$acl_save_prefix"
16113
16114 if test "X$x" = "X$element"; then
16115 haveit=yes
16116 break
16117 fi
16118 done
16119 if test -z "$haveit"; then
16120 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16121 fi
16122 done
16123
16124
16125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
16126$as_echo_n "checking for liblzma... " >&6; }
d0ac1c44 16127if ${ac_cv_liblzma+:} false; then :
608e2dbb
TT
16128 $as_echo_n "(cached) " >&6
16129else
16130
16131 ac_save_LIBS="$LIBS"
16132 LIBS="$LIBS $LIBLZMA"
16133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16134/* end confdefs.h. */
16135#include "lzma.h"
16136int
16137main ()
16138{
16139lzma_index_iter iter;
16140 lzma_index_iter_init (&iter, 0);
16141 lzma_mf_is_supported (LZMA_MF_HC3);
16142 ;
16143 return 0;
16144}
16145_ACEOF
16146if ac_fn_c_try_link "$LINENO"; then :
16147 ac_cv_liblzma=yes
16148else
16149 ac_cv_liblzma=no
16150fi
16151rm -f core conftest.err conftest.$ac_objext \
16152 conftest$ac_exeext conftest.$ac_ext
16153 LIBS="$ac_save_LIBS"
16154
16155fi
16156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
16157$as_echo "$ac_cv_liblzma" >&6; }
16158 if test "$ac_cv_liblzma" = yes; then
16159 HAVE_LIBLZMA=yes
16160
16161$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
16162
16163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
16164$as_echo_n "checking how to link with liblzma... " >&6; }
16165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
16166$as_echo "$LIBLZMA" >&6; }
16167 else
16168 HAVE_LIBLZMA=no
16169 CPPFLAGS="$ac_save_CPPFLAGS"
16170 LIBLZMA=
16171 LTLIBLZMA=
16172 fi
16173
16174
16175
16176
16177
16178
16179 if test "$HAVE_LIBLZMA" != yes; then
16180 if test "$with_lzma" = yes; then
d0ac1c44 16181 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
608e2dbb
TT
16182 fi
16183 fi
16184 fi
16185fi
16186
3fc11d3e
JM
16187LIBGUI="../libgui/src/libgui.a"
16188GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
16189
16190
7a292a7a 16191
3fc11d3e
JM
16192WIN32LDAPP=
16193
16194
16195
d91670b9 16196case "${host}" in
686a5eed 16197*-*-cygwin* | *-*-mingw* )
d91670b9
CV
16198 configdir="win"
16199 ;;
16200*)
16201 configdir="unix"
16202 ;;
16203esac
3fc11d3e
JM
16204
16205GDBTKLIBS=
16206if test "${enable_gdbtk}" = "yes"; then
16207
d1c3b63a
KS
16208 # Gdbtk must have an absolute path to srcdir in order to run
16209 # properly when not installed.
16210 here=`pwd`
16211 cd ${srcdir}
16212 GDBTK_SRC_DIR=`pwd`
16213 cd $here
16214
bec39cab 16215
5062cc19
KS
16216 #
16217 # Ok, lets find the tcl configuration
16218 # First, look for one uninstalled.
16219 # the alternative search directory is invoked by --with-tcl
16220 #
3fc11d3e 16221
5062cc19
KS
16222 if test x"${no_tcl}" = x ; then
16223 # we reset no_tcl in case something fails here
16224 no_tcl=true
bec39cab 16225
81ecdfbb
RW
16226# Check whether --with-tcl was given.
16227if test "${with_tcl+set}" = set; then :
16228 withval=$with_tcl; with_tclconfig=${withval}
16229fi
16230
16231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
16232$as_echo_n "checking for Tcl configuration... " >&6; }
d0ac1c44 16233 if ${ac_cv_c_tclconfig+:} false; then :
81ecdfbb 16234 $as_echo_n "(cached) " >&6
3fc11d3e 16235else
bec39cab 16236
3fc11d3e 16237
5062cc19
KS
16238 # First check to see if --with-tcl was specified.
16239 case "${host}" in
16240 *-*-cygwin*) platDir="win" ;;
16241 *) platDir="unix" ;;
16242 esac
16243 if test x"${with_tclconfig}" != x ; then
16244 if test -f "${with_tclconfig}/tclConfig.sh" ; then
16245 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
16246 else
d0ac1c44 16247 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
16248 fi
16249 fi
16250
16251 # then check for a private Tcl installation
16252 if test x"${ac_cv_c_tclconfig}" = x ; then
16253 for i in \
16254 ../tcl \
16255 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16256 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
16257 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
16258 ../../tcl \
16259 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16260 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
16261 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
16262 ../../../tcl \
16263 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16264 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
16265 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
16266 if test -f "$i/$platDir/tclConfig.sh" ; then
16267 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16268 break
16269 fi
16270 done
16271 fi
16272
16273 # on Darwin, check in Framework installation locations
16274 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
16275 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16276 `ls -d /Library/Frameworks 2>/dev/null` \
16277 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16278 `ls -d /System/Library/Frameworks 2>/dev/null` \
16279 ; do
16280 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
16281 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
16282 break
16283 fi
16284 done
16285 fi
16286
16287 # check in a few common install locations
16288 if test x"${ac_cv_c_tclconfig}" = x ; then
16289 for i in `ls -d ${libdir} 2>/dev/null` \
16290 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16291 `ls -d ${prefix}/lib 2>/dev/null` \
16292 `ls -d /usr/local/lib 2>/dev/null` \
16293 `ls -d /usr/contrib/lib 2>/dev/null` \
16294 `ls -d /usr/lib 2>/dev/null` \
16295 ; do
16296 if test -f "$i/tclConfig.sh" ; then
16297 ac_cv_c_tclconfig=`(cd $i; pwd)`
16298 break
16299 fi
16300 done
16301 fi
3fc11d3e 16302
5062cc19
KS
16303 # check in a few other private locations
16304 if test x"${ac_cv_c_tclconfig}" = x ; then
16305 for i in \
16306 ${srcdir}/../tcl \
16307 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16308 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
16309 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
16310 if test -f "$i/$platDir/tclConfig.sh" ; then
16311 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16312 break
16313 fi
16314 done
16315 fi
bec39cab 16316
3fc11d3e
JM
16317fi
16318
5062cc19
KS
16319
16320 if test x"${ac_cv_c_tclconfig}" = x ; then
16321 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
16322 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
16323$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
16324 else
16325 no_tcl=
16326 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
16327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
16328$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
16329 fi
16330 fi
3fc11d3e 16331
bec39cab 16332
85541719
DE
16333 # If $no_tk is nonempty, then we can't do Tk, and there is no
16334 # point to doing Tcl.
bec39cab 16335
5062cc19
KS
16336 #
16337 # Ok, lets find the tk configuration
16338 # First, look for one uninstalled.
16339 # the alternative search directory is invoked by --with-tk
16340 #
3fc11d3e 16341
5062cc19
KS
16342 if test x"${no_tk}" = x ; then
16343 # we reset no_tk in case something fails here
16344 no_tk=true
bec39cab 16345
81ecdfbb
RW
16346# Check whether --with-tk was given.
16347if test "${with_tk+set}" = set; then :
16348 withval=$with_tk; with_tkconfig=${withval}
16349fi
16350
16351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
16352$as_echo_n "checking for Tk configuration... " >&6; }
d0ac1c44 16353 if ${ac_cv_c_tkconfig+:} false; then :
81ecdfbb 16354 $as_echo_n "(cached) " >&6
bec39cab 16355else
3fc11d3e
JM
16356
16357
5062cc19
KS
16358 # First check to see if --with-tkconfig was specified.
16359 if test x"${with_tkconfig}" != x ; then
16360 if test -f "${with_tkconfig}/tkConfig.sh" ; then
16361 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
16362 else
d0ac1c44 16363 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
16364 fi
16365 fi
3fc11d3e 16366
5062cc19
KS
16367 # then check for a private Tk library
16368 case "${host}" in
16369 *-*-cygwin*) platDir="win" ;;
16370 *) platDir="unix" ;;
16371 esac
16372 if test x"${ac_cv_c_tkconfig}" = x ; then
16373 for i in \
16374 ../tk \
16375 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16376 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
16377 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
16378 ../../tk \
16379 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16380 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
16381 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
16382 ../../../tk \
16383 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16384 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
16385 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
16386 if test -f "$i/$platDir/tkConfig.sh" ; then
16387 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16388 break
16389 fi
16390 done
16391 fi
16392
16393 # on Darwin, check in Framework installation locations
16394 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
16395 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16396 `ls -d /Library/Frameworks 2>/dev/null` \
16397 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16398 `ls -d /System/Library/Frameworks 2>/dev/null` \
16399 ; do
16400 if test -f "$i/Tk.framework/tkConfig.sh" ; then
16401 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
16402 break
16403 fi
16404 done
16405 fi
16406
16407 # check in a few common install locations
16408 if test x"${ac_cv_c_tkconfig}" = x ; then
16409 for i in `ls -d ${libdir} 2>/dev/null` \
16410 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16411 `ls -d ${prefix}/lib 2>/dev/null` \
16412 `ls -d /usr/local/lib 2>/dev/null` \
16413 `ls -d /usr/contrib/lib 2>/dev/null` \
16414 `ls -d /usr/lib 2>/dev/null` \
16415 ; do
16416 if test -f "$i/tkConfig.sh" ; then
16417 ac_cv_c_tkconfig=`(cd $i; pwd)`
16418 break
16419 fi
16420 done
16421 fi
16422 # check in a few other private locations
16423 if test x"${ac_cv_c_tkconfig}" = x ; then
16424 for i in \
16425 ${srcdir}/../tk \
16426 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16427 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
16428 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
16429 if test -f "$i/$platDir/tkConfig.sh" ; then
16430 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16431 break
16432 fi
16433 done
16434 fi
3fc11d3e 16435
3fc11d3e
JM
16436fi
16437
16438
5062cc19
KS
16439 if test x"${ac_cv_c_tkconfig}" = x ; then
16440 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
16441 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
16442$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
16443 else
16444 no_tk=
16445 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
16446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
16447$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 16448 fi
3fc11d3e 16449 fi
dd2504ab 16450
dd2504ab 16451
85541719
DE
16452 if test -z "${no_tcl}" -a -z "${no_tk}"; then
16453
81ecdfbb
RW
16454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
16455$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
16456
16457 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
16458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16459$as_echo "loading" >&6; }
85541719
DE
16460 . ${TCL_BIN_DIR}/tclConfig.sh
16461 else
81ecdfbb
RW
16462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
16463$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
16464 fi
16465
16466 # eval is required to do the TCL_DBGX substitution
16467 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
16468 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
16469
16470 # If the TCL_BIN_DIR is the build directory (not the install directory),
16471 # then set the common variable name to the value of the build variables.
16472 # For example, the variable TCL_LIB_SPEC will be set to the value
16473 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
16474 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
16475 # installed and uninstalled version of Tcl.
16476 if test -f "${TCL_BIN_DIR}/Makefile" ; then
16477 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
16478 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
16479 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
16480 elif test "`uname -s`" = "Darwin"; then
16481 # If Tcl was built as a framework, attempt to use the libraries
16482 # from the framework at the given location so that linking works
a68ffae9 16483 # against Tcl.framework installed in an arbitrary location.
85541719
DE
16484 case ${TCL_DEFS} in
16485 *TCL_FRAMEWORK*)
16486 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
16487 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
16488 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
16489 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
16490 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
16491 break
16492 fi
16493 done
16494 fi
16495 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
16496 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
16497 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
16498 fi
16499 ;;
16500 esac
16501 fi
16502
16503 # eval is required to do the TCL_DBGX substitution
16504 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
16505 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
16506 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
16507 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
16508
16509
16510
16511
16512
16513
16514
16515
16516
16517
16518
16519
16520
16521
16522
16523 # Check for in-tree tcl
16524 here=`pwd`
16525 cd ${srcdir}/..
16526 topdir=`pwd`
16527 cd ${here}
16528
16529 intree="no"
16530 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
16531 intree="yes"
16532 fi
16533
16534 # Find Tcl private headers
16535 if test x"${intree}" = xno; then
16536
81ecdfbb
RW
16537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
16538$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
16539 private_dir=""
16540 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
16541 if test -f ${dir}/tclInt.h ; then
16542 private_dir=${dir}
16543 fi
16544
16545 if test x"${private_dir}" = x; then
d0ac1c44 16546 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
85541719
DE
16547 else
16548 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16550$as_echo "${private_dir}" >&6; }
85541719
DE
16551 fi
16552
16553 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
16554 TCL_LIBRARY="${TCL_LIB_SPEC}"
16555 TCL_DEPS=""
16556 else
16557 # If building tcl in the same src tree, private headers
16558 # are not needed, but we need to be sure to use the right
16559 # headers library
16560 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
16561 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
16562 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
16563 fi
16564
16565
16566
16567
16568
81ecdfbb
RW
16569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
16570$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 16571
5062cc19 16572 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
16573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16574$as_echo "loading" >&6; }
5062cc19 16575 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 16576 else
81ecdfbb
RW
16577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
16578$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 16579 fi
bec39cab 16580
5062cc19
KS
16581 # eval is required to do the TK_DBGX substitution
16582 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
16583 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
16584
16585 # If the TK_BIN_DIR is the build directory (not the install directory),
16586 # then set the common variable name to the value of the build variables.
16587 # For example, the variable TK_LIB_SPEC will be set to the value
16588 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
16589 # instead of TK_BUILD_LIB_SPEC since it will work with both an
16590 # installed and uninstalled version of Tcl.
85541719 16591 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
16592 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
16593 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
16594 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
16595 elif test "`uname -s`" = "Darwin"; then
16596 # If Tk was built as a framework, attempt to use the libraries
16597 # from the framework at the given location so that linking works
a68ffae9 16598 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
16599 case ${TK_DEFS} in
16600 *TK_FRAMEWORK*)
85541719 16601 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
16602 for i in "`cd ${TK_BIN_DIR}; pwd`" \
16603 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
16604 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
16605 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
16606 break
16607 fi
16608 done
16609 fi
85541719 16610 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
16611 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
16612 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
16613 fi
16614 ;;
16615 esac
3fc11d3e
JM
16616 fi
16617
5062cc19
KS
16618 # eval is required to do the TK_DBGX substitution
16619 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
16620 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
16621 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
16622 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 16623
3fc11d3e
JM
16624
16625
bec39cab
AC
16626
16627
16628
16629
16630
16631
16632
3fc11d3e 16633
3fc11d3e 16634
bec39cab 16635
bec39cab 16636
85541719
DE
16637 # Check for in-tree Tk
16638 intree="no"
16639 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
16640 intree="yes"
16641 fi
3fc11d3e 16642
85541719
DE
16643 # Find Tk private headers
16644 if test x"${intree}" = xno; then
3fc11d3e 16645
81ecdfbb
RW
16646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
16647$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
16648 private_dir=""
16649 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
16650 if test -f ${dir}/tkInt.h; then
16651 private_dir=${dir}
3fc11d3e 16652 fi
bec39cab 16653
5062cc19 16654 if test x"${private_dir}" = x; then
d0ac1c44 16655 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
3fc11d3e 16656 else
5062cc19 16657 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16659$as_echo "${private_dir}" >&6; }
3fc11d3e 16660 fi
3fc11d3e 16661
85541719
DE
16662 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
16663 TK_LIBRARY=${TK_LIB_SPEC}
16664 TK_DEPS=""
16665 else
16666 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
16667 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
16668 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
16669 fi
3fc11d3e
JM
16670
16671
3fc11d3e
JM
16672
16673
3fc11d3e 16674
85541719 16675 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 16676
85541719
DE
16677 # Include some libraries that Tcl and Tk want.
16678 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
16679 # Yes, the ordering seems wrong here. But it isn't.
16680 # TK_LIBS is the list of libraries that need to be linked
16681 # after Tcl/Tk. Note that this isn't put into LIBS. If it
16682 # were in LIBS then any link tests after this point would
16683 # try to include things like `$(LIBGUI)', which wouldn't work.
16684 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 16685
85541719
DE
16686 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
16687 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
16688 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
16689 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
16690 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
16691 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
16692 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 16693
85541719
DE
16694 if test x$gdb_cv_os_cygwin = xyes; then
16695 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
16696 WIN32LDAPP="-Wl,--subsystem,console"
16697 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 16698 fi
ffc6a242 16699
81ecdfbb 16700 subdirs="$subdirs gdbtk"
3ace7edb 16701
85541719 16702 fi
3fc11d3e
JM
16703fi
16704
16705
16706
16707
16708
16709
16710
16711
81ecdfbb
RW
16712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
16713$as_echo_n "checking for X... " >&6; }
bec39cab 16714
c906108c 16715
81ecdfbb
RW
16716# Check whether --with-x was given.
16717if test "${with_x+set}" = set; then :
16718 withval=$with_x;
16719fi
c906108c
SS
16720
16721# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
16722if test "x$with_x" = xno; then
16723 # The user explicitly disabled X.
16724 have_x=disabled
16725else
81ecdfbb 16726 case $x_includes,$x_libraries in #(
d0ac1c44
SM
16727 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
16728 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
81ecdfbb 16729 $as_echo_n "(cached) " >&6
c906108c
SS
16730else
16731 # One or both of the vars are not set, and there is no cached value.
bec39cab 16732ac_x_includes=no ac_x_libraries=no
81ecdfbb 16733rm -f -r conftest.dir
bec39cab
AC
16734if mkdir conftest.dir; then
16735 cd conftest.dir
bec39cab 16736 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
16737incroot:
16738 @echo incroot='${INCROOT}'
16739usrlibdir:
16740 @echo usrlibdir='${USRLIBDIR}'
16741libdir:
16742 @echo libdir='${LIBDIR}'
16743_ACEOF
16744 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
d0ac1c44 16745 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
81ecdfbb
RW
16746 for ac_var in incroot usrlibdir libdir; do
16747 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
16748 done
c906108c 16749 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
16750 for ac_extension in a so sl dylib la dll; do
16751 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
16752 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 16753 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
16754 fi
16755 done
16756 # Screen out bogus values from the imake configuration. They are
16757 # bogus both because they are the default anyway, and because
16758 # using them would break gcc on systems where it needs fixed includes.
bec39cab 16759 case $ac_im_incroot in
81ecdfbb 16760 /usr/include) ac_x_includes= ;;
bec39cab 16761 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 16762 esac
bec39cab 16763 case $ac_im_usrlibdir in
81ecdfbb 16764 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 16765 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
16766 esac
16767 fi
16768 cd ..
81ecdfbb 16769 rm -f -r conftest.dir
c906108c
SS
16770fi
16771
bec39cab
AC
16772# Standard set of common directories for X headers.
16773# Check X11 before X11Rn because it is often a symlink to the current release.
16774ac_x_header_dirs='
16775/usr/X11/include
81ecdfbb 16776/usr/X11R7/include
bec39cab
AC
16777/usr/X11R6/include
16778/usr/X11R5/include
16779/usr/X11R4/include
16780
16781/usr/include/X11
81ecdfbb 16782/usr/include/X11R7
bec39cab
AC
16783/usr/include/X11R6
16784/usr/include/X11R5
16785/usr/include/X11R4
16786
16787/usr/local/X11/include
81ecdfbb 16788/usr/local/X11R7/include
bec39cab
AC
16789/usr/local/X11R6/include
16790/usr/local/X11R5/include
16791/usr/local/X11R4/include
16792
16793/usr/local/include/X11
81ecdfbb 16794/usr/local/include/X11R7
bec39cab
AC
16795/usr/local/include/X11R6
16796/usr/local/include/X11R5
16797/usr/local/include/X11R4
16798
16799/usr/X386/include
16800/usr/x386/include
16801/usr/XFree86/include/X11
16802
16803/usr/include
16804/usr/local/include
16805/usr/unsupported/include
16806/usr/athena/include
16807/usr/local/x11r5/include
16808/usr/lpp/Xamples/include
16809
16810/usr/openwin/include
16811/usr/openwin/share/include'
16812
16813if test "$ac_x_includes" = no; then
81ecdfbb 16814 # Guess where to find include files, by looking for Xlib.h.
c906108c 16815 # First, try using that file with no special directory specified.
81ecdfbb 16816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16817/* end confdefs.h. */
81ecdfbb 16818#include <X11/Xlib.h>
bec39cab 16819_ACEOF
81ecdfbb 16820if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
16821 # We can compile using X headers with no special include directory.
16822ac_x_includes=
16823else
bec39cab 16824 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 16825 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
16826 ac_x_includes=$ac_dir
16827 break
16828 fi
16829done
c906108c 16830fi
d0ac1c44 16831rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 16832fi # $ac_x_includes = no
c906108c 16833
bec39cab 16834if test "$ac_x_libraries" = no; then
c906108c 16835 # Check for the libraries.
c906108c
SS
16836 # See if we find them without any special options.
16837 # Don't add to $LIBS permanently.
bec39cab 16838 ac_save_LIBS=$LIBS
81ecdfbb
RW
16839 LIBS="-lX11 $LIBS"
16840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16841/* end confdefs.h. */
81ecdfbb 16842#include <X11/Xlib.h>
bec39cab
AC
16843int
16844main ()
16845{
81ecdfbb 16846XrmInitialize ()
bec39cab
AC
16847 ;
16848 return 0;
16849}
16850_ACEOF
81ecdfbb 16851if ac_fn_c_try_link "$LINENO"; then :
bec39cab 16852 LIBS=$ac_save_LIBS
c906108c
SS
16853# We can link X programs with no special library path.
16854ac_x_libraries=
16855else
81ecdfbb
RW
16856 LIBS=$ac_save_LIBS
16857for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 16858do
bec39cab 16859 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
16860 for ac_extension in a so sl dylib la dll; do
16861 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
16862 ac_x_libraries=$ac_dir
16863 break 2
16864 fi
16865 done
16866done
16867fi
81ecdfbb
RW
16868rm -f core conftest.err conftest.$ac_objext \
16869 conftest$ac_exeext conftest.$ac_ext
bec39cab 16870fi # $ac_x_libraries = no
c906108c 16871
81ecdfbb
RW
16872case $ac_x_includes,$ac_x_libraries in #(
16873 no,* | *,no | *\'*)
16874 # Didn't find X, or a directory has "'" in its name.
16875 ac_cv_have_x="have_x=no";; #(
16876 *)
16877 # Record where we found X for the cache.
16878 ac_cv_have_x="have_x=yes\
16879 ac_x_includes='$ac_x_includes'\
16880 ac_x_libraries='$ac_x_libraries'"
16881esac
c906108c 16882fi
81ecdfbb
RW
16883;; #(
16884 *) have_x=yes;;
16885 esac
c906108c
SS
16886 eval "$ac_cv_have_x"
16887fi # $with_x != no
16888
16889if test "$have_x" != yes; then
81ecdfbb
RW
16890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
16891$as_echo "$have_x" >&6; }
c906108c
SS
16892 no_x=yes
16893else
16894 # If each of the values was on the command line, it overrides each guess.
16895 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
16896 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
16897 # Update the cache value to reflect the command line values.
81ecdfbb
RW
16898 ac_cv_have_x="have_x=yes\
16899 ac_x_includes='$x_includes'\
16900 ac_x_libraries='$x_libraries'"
16901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
16902$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
16903fi
16904
16905
bec39cab 16906# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 16907# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
16908# This code just checks for a few cases where we'd like to ignore those
16909# definitions, even when they're present in the '.mt' file. These cases
16910# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 16911# not part of the source tree.
7a292a7a 16912#
81ecdfbb
RW
16913# Check whether --enable-sim was given.
16914if test "${enable_sim+set}" = set; then :
16915 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
16916 echo "enableval = ${enableval}";
16917 case "${enableval}" in
16918 yes) ignore_sim=false ;;
16919 no) ignore_sim=true ;;
16920 *) ignore_sim=false ;;
16921 esac
16922else
16923 ignore_sim=false
81ecdfbb
RW
16924fi
16925
7a292a7a
SS
16926
16927if test ! -d "${srcdir}/../sim"; then
16928 ignore_sim=true
16929fi
16930
9b624dbe
UW
16931SIM=
16932SIM_OBS=
16933if test "${ignore_sim}" = "false"; then
16934 if test x"${gdb_sim}" != x ; then
16935 SIM="${gdb_sim}"
16936 SIM_OBS="remote-sim.o"
60ca704f 16937
81ecdfbb 16938$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 16939
976102cd
PA
16940
16941 # Some tdep code should only be compiled in when the ppc sim is
16942 # built. PR sim/13418.
16943 case $target in
16944 powerpc*-*-*)
16945
16946$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
16947
16948 ;;
16949 esac
9b624dbe 16950 fi
7a292a7a
SS
16951fi
16952
16953
16954
c906108c
SS
16955
16956
16957
16958
16959
16960
dfcd3bfb 16961
e56ac5c3
AC
16962
16963
b3a90332
AC
16964
16965
c35f4ffc 16966# List of host floatformats.
bec39cab
AC
16967
16968cat >>confdefs.h <<_ACEOF
c35f4ffc 16969#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 16970_ACEOF
c35f4ffc 16971
bec39cab
AC
16972
16973cat >>confdefs.h <<_ACEOF
c35f4ffc 16974#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
16975_ACEOF
16976
c35f4ffc 16977
bec39cab 16978cat >>confdefs.h <<_ACEOF
c35f4ffc 16979#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 16980_ACEOF
c35f4ffc
AC
16981
16982
c906108c
SS
16983# target_subdir is used by the testsuite to find the target libraries.
16984target_subdir=
16985if test "${host}" != "${target}"; then
16986 target_subdir="${target_alias}/"
16987fi
16988
16989
21ea5acd 16990# Import nat definitions.
2b351b19 16991nat_makefile_frag=/dev/null
771b4502 16992if test "${gdb_native}" = "yes"; then
21ea5acd
SDJ
16993 . ${srcdir}/configure.nat
16994 nativefile=$NAT_FILE
c906108c 16995fi
c906108c 16996
c906108c
SS
16997
16998
16999
21ea5acd
SDJ
17000
17001
17002
17003
17004
c906108c
SS
17005
17006
b00a8037 17007if test x"${gdb_osabi}" != x ; then
bec39cab
AC
17008
17009cat >>confdefs.h <<_ACEOF
b00a8037 17010#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 17011_ACEOF
b00a8037
DJ
17012
17013fi
17014
496c0e1b
JB
17015# Check whether --enable-gdbserver was given.
17016if test "${enable_gdbserver+set}" = set; then :
17017 enableval=$enable_gdbserver; case "${enableval}" in
17018 yes| no|auto) ;;
d0ac1c44 17019 *) as_fn_error $? "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
496c0e1b
JB
17020esac
17021else
17022 enable_gdbserver=auto
17023fi
17024
17025
17026# We only build gdbserver automatically in a native configuration, and
17027# only if the user did not explicitly disable its build.
17028if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
17029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
17030$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 17031 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
17032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17033$as_echo "yes" >&6; }
17034 subdirs="$subdirs gdbserver"
3ace7edb 17035
496c0e1b 17036 gdbserver_build_enabled=yes
8dcde887 17037 else
81ecdfbb
RW
17038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17039$as_echo "no" >&6; }
8dcde887
MK
17040 fi
17041fi
17042
496c0e1b
JB
17043# If the user explicitly request the gdbserver to be built, verify that
17044# we were in fact able to enable it.
17045if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
d0ac1c44 17046 as_fn_error $? "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
496c0e1b
JB
17047fi
17048
393fd4c3
YQ
17049# Check for babeltrace and babeltrace-ctf
17050
17051# Check whether --with-babeltrace was given.
17052if test "${with_babeltrace+set}" = set; then :
17053 withval=$with_babeltrace;
17054else
17055 with_babeltrace=auto
17056fi
17057
17058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
17059$as_echo_n "checking whether to use babeltrace... " >&6; }
17060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
17061$as_echo "$with_babeltrace" >&6; }
17062
17063if test "x$with_babeltrace" = "xno"; then
17064 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
17065$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
17066else
17067 # Append -Werror to CFLAGS so that configure can catch the warning
17068 # "assignment from incompatible pointer type", which is related to
17069 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
17070 # in GDB, while babeltrace 1.0.3 is broken.
17071 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
17072 # safe to save and restore CFLAGS here.
17073 saved_CFLAGS=$CFLAGS
17074 CFLAGS="$CFLAGS -Werror"
17075
17076
17077
17078
17079
17080
17081
17082
17083 use_additional=yes
17084
17085 acl_save_prefix="$prefix"
17086 prefix="$acl_final_prefix"
17087 acl_save_exec_prefix="$exec_prefix"
17088 exec_prefix="$acl_final_exec_prefix"
17089
17090 eval additional_includedir=\"$includedir\"
17091 eval additional_libdir=\"$libdir\"
17092
17093 exec_prefix="$acl_save_exec_prefix"
17094 prefix="$acl_save_prefix"
17095
17096
17097# Check whether --with-libbabeltrace-prefix was given.
17098if test "${with_libbabeltrace_prefix+set}" = set; then :
17099 withval=$with_libbabeltrace_prefix;
17100 if test "X$withval" = "Xno"; then
17101 use_additional=no
17102 else
17103 if test "X$withval" = "X"; then
17104
17105 acl_save_prefix="$prefix"
17106 prefix="$acl_final_prefix"
17107 acl_save_exec_prefix="$exec_prefix"
17108 exec_prefix="$acl_final_exec_prefix"
17109
17110 eval additional_includedir=\"$includedir\"
17111 eval additional_libdir=\"$libdir\"
17112
17113 exec_prefix="$acl_save_exec_prefix"
17114 prefix="$acl_save_prefix"
17115
17116 else
17117 additional_includedir="$withval/include"
17118 additional_libdir="$withval/lib"
17119 fi
17120 fi
17121
17122fi
17123
17124 LIBBABELTRACE=
17125 LTLIBBABELTRACE=
17126 INCBABELTRACE=
17127 rpathdirs=
17128 ltrpathdirs=
17129 names_already_handled=
17130 names_next_round='babeltrace babeltrace-ctf'
17131 while test -n "$names_next_round"; do
17132 names_this_round="$names_next_round"
17133 names_next_round=
17134 for name in $names_this_round; do
17135 already_handled=
17136 for n in $names_already_handled; do
17137 if test "$n" = "$name"; then
17138 already_handled=yes
17139 break
17140 fi
17141 done
17142 if test -z "$already_handled"; then
17143 names_already_handled="$names_already_handled $name"
17144 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17145 eval value=\"\$HAVE_LIB$uppername\"
17146 if test -n "$value"; then
17147 if test "$value" = yes; then
17148 eval value=\"\$LIB$uppername\"
17149 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
17150 eval value=\"\$LTLIB$uppername\"
17151 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
17152 else
17153 :
17154 fi
17155 else
17156 found_dir=
17157 found_la=
17158 found_so=
17159 found_a=
17160 if test $use_additional = yes; then
17161 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
17162 found_dir="$additional_libdir"
17163 found_so="$additional_libdir/lib$name.$shlibext"
17164 if test -f "$additional_libdir/lib$name.la"; then
17165 found_la="$additional_libdir/lib$name.la"
17166 fi
17167 else
17168 if test -f "$additional_libdir/lib$name.$libext"; then
17169 found_dir="$additional_libdir"
17170 found_a="$additional_libdir/lib$name.$libext"
17171 if test -f "$additional_libdir/lib$name.la"; then
17172 found_la="$additional_libdir/lib$name.la"
17173 fi
17174 fi
17175 fi
17176 fi
17177 if test "X$found_dir" = "X"; then
17178 for x in $LDFLAGS $LTLIBBABELTRACE; do
17179
17180 acl_save_prefix="$prefix"
17181 prefix="$acl_final_prefix"
17182 acl_save_exec_prefix="$exec_prefix"
17183 exec_prefix="$acl_final_exec_prefix"
17184 eval x=\"$x\"
17185 exec_prefix="$acl_save_exec_prefix"
17186 prefix="$acl_save_prefix"
17187
17188 case "$x" in
17189 -L*)
17190 dir=`echo "X$x" | sed -e 's/^X-L//'`
17191 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
17192 found_dir="$dir"
17193 found_so="$dir/lib$name.$shlibext"
17194 if test -f "$dir/lib$name.la"; then
17195 found_la="$dir/lib$name.la"
17196 fi
17197 else
17198 if test -f "$dir/lib$name.$libext"; then
17199 found_dir="$dir"
17200 found_a="$dir/lib$name.$libext"
17201 if test -f "$dir/lib$name.la"; then
17202 found_la="$dir/lib$name.la"
17203 fi
17204 fi
17205 fi
17206 ;;
17207 esac
17208 if test "X$found_dir" != "X"; then
17209 break
17210 fi
17211 done
17212 fi
17213 if test "X$found_dir" != "X"; then
17214 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
17215 if test "X$found_so" != "X"; then
17216 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17217 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17218 else
17219 haveit=
17220 for x in $ltrpathdirs; do
17221 if test "X$x" = "X$found_dir"; then
17222 haveit=yes
17223 break
17224 fi
17225 done
17226 if test -z "$haveit"; then
17227 ltrpathdirs="$ltrpathdirs $found_dir"
17228 fi
17229 if test "$hardcode_direct" = yes; then
17230 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17231 else
17232 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17233 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17234 haveit=
17235 for x in $rpathdirs; do
17236 if test "X$x" = "X$found_dir"; then
17237 haveit=yes
17238 break
17239 fi
17240 done
17241 if test -z "$haveit"; then
17242 rpathdirs="$rpathdirs $found_dir"
17243 fi
17244 else
17245 haveit=
17246 for x in $LDFLAGS $LIBBABELTRACE; do
17247
17248 acl_save_prefix="$prefix"
17249 prefix="$acl_final_prefix"
17250 acl_save_exec_prefix="$exec_prefix"
17251 exec_prefix="$acl_final_exec_prefix"
17252 eval x=\"$x\"
17253 exec_prefix="$acl_save_exec_prefix"
17254 prefix="$acl_save_prefix"
17255
17256 if test "X$x" = "X-L$found_dir"; then
17257 haveit=yes
17258 break
17259 fi
17260 done
17261 if test -z "$haveit"; then
17262 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
17263 fi
17264 if test "$hardcode_minus_L" != no; then
17265 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17266 else
17267 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17268 fi
17269 fi
17270 fi
17271 fi
17272 else
17273 if test "X$found_a" != "X"; then
17274 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
17275 else
17276 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
17277 fi
17278 fi
17279 additional_includedir=
17280 case "$found_dir" in
17281 */lib | */lib/)
17282 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17283 additional_includedir="$basedir/include"
17284 ;;
17285 esac
17286 if test "X$additional_includedir" != "X"; then
17287 if test "X$additional_includedir" != "X/usr/include"; then
17288 haveit=
17289 if test "X$additional_includedir" = "X/usr/local/include"; then
17290 if test -n "$GCC"; then
17291 case $host_os in
17292 linux*) haveit=yes;;
17293 esac
17294 fi
17295 fi
17296 if test -z "$haveit"; then
17297 for x in $CPPFLAGS $INCBABELTRACE; do
17298
17299 acl_save_prefix="$prefix"
17300 prefix="$acl_final_prefix"
17301 acl_save_exec_prefix="$exec_prefix"
17302 exec_prefix="$acl_final_exec_prefix"
17303 eval x=\"$x\"
17304 exec_prefix="$acl_save_exec_prefix"
17305 prefix="$acl_save_prefix"
17306
17307 if test "X$x" = "X-I$additional_includedir"; then
17308 haveit=yes
17309 break
17310 fi
17311 done
17312 if test -z "$haveit"; then
17313 if test -d "$additional_includedir"; then
17314 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
17315 fi
17316 fi
17317 fi
17318 fi
17319 fi
17320 if test -n "$found_la"; then
17321 save_libdir="$libdir"
17322 case "$found_la" in
17323 */* | *\\*) . "$found_la" ;;
17324 *) . "./$found_la" ;;
17325 esac
17326 libdir="$save_libdir"
17327 for dep in $dependency_libs; do
17328 case "$dep" in
17329 -L*)
17330 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17331 if test "X$additional_libdir" != "X/usr/lib"; then
17332 haveit=
17333 if test "X$additional_libdir" = "X/usr/local/lib"; then
17334 if test -n "$GCC"; then
17335 case $host_os in
17336 linux*) haveit=yes;;
17337 esac
17338 fi
17339 fi
17340 if test -z "$haveit"; then
17341 haveit=
17342 for x in $LDFLAGS $LIBBABELTRACE; do
17343
17344 acl_save_prefix="$prefix"
17345 prefix="$acl_final_prefix"
17346 acl_save_exec_prefix="$exec_prefix"
17347 exec_prefix="$acl_final_exec_prefix"
17348 eval x=\"$x\"
17349 exec_prefix="$acl_save_exec_prefix"
17350 prefix="$acl_save_prefix"
17351
17352 if test "X$x" = "X-L$additional_libdir"; then
17353 haveit=yes
17354 break
17355 fi
17356 done
17357 if test -z "$haveit"; then
17358 if test -d "$additional_libdir"; then
17359 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
17360 fi
17361 fi
17362 haveit=
17363 for x in $LDFLAGS $LTLIBBABELTRACE; do
17364
17365 acl_save_prefix="$prefix"
17366 prefix="$acl_final_prefix"
17367 acl_save_exec_prefix="$exec_prefix"
17368 exec_prefix="$acl_final_exec_prefix"
17369 eval x=\"$x\"
17370 exec_prefix="$acl_save_exec_prefix"
17371 prefix="$acl_save_prefix"
17372
17373 if test "X$x" = "X-L$additional_libdir"; then
17374 haveit=yes
17375 break
17376 fi
17377 done
17378 if test -z "$haveit"; then
17379 if test -d "$additional_libdir"; then
17380 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
17381 fi
17382 fi
17383 fi
17384 fi
17385 ;;
17386 -R*)
17387 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17388 if test "$enable_rpath" != no; then
17389 haveit=
17390 for x in $rpathdirs; do
17391 if test "X$x" = "X$dir"; then
17392 haveit=yes
17393 break
17394 fi
17395 done
17396 if test -z "$haveit"; then
17397 rpathdirs="$rpathdirs $dir"
17398 fi
17399 haveit=
17400 for x in $ltrpathdirs; do
17401 if test "X$x" = "X$dir"; then
17402 haveit=yes
17403 break
17404 fi
17405 done
17406 if test -z "$haveit"; then
17407 ltrpathdirs="$ltrpathdirs $dir"
17408 fi
17409 fi
17410 ;;
17411 -l*)
17412 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17413 ;;
17414 *.la)
17415 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17416 ;;
17417 *)
17418 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
17419 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
17420 ;;
17421 esac
17422 done
17423 fi
17424 else
17425 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17426 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
17427 fi
17428 fi
17429 fi
17430 done
17431 done
17432 if test "X$rpathdirs" != "X"; then
17433 if test -n "$hardcode_libdir_separator"; then
17434 alldirs=
17435 for found_dir in $rpathdirs; do
17436 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17437 done
17438 acl_save_libdir="$libdir"
17439 libdir="$alldirs"
17440 eval flag=\"$hardcode_libdir_flag_spec\"
17441 libdir="$acl_save_libdir"
17442 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17443 else
17444 for found_dir in $rpathdirs; do
17445 acl_save_libdir="$libdir"
17446 libdir="$found_dir"
17447 eval flag=\"$hardcode_libdir_flag_spec\"
17448 libdir="$acl_save_libdir"
17449 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17450 done
17451 fi
17452 fi
17453 if test "X$ltrpathdirs" != "X"; then
17454 for found_dir in $ltrpathdirs; do
17455 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
17456 done
17457 fi
17458
17459
17460 ac_save_CPPFLAGS="$CPPFLAGS"
17461
17462 for element in $INCBABELTRACE; do
17463 haveit=
17464 for x in $CPPFLAGS; do
17465
17466 acl_save_prefix="$prefix"
17467 prefix="$acl_final_prefix"
17468 acl_save_exec_prefix="$exec_prefix"
17469 exec_prefix="$acl_final_exec_prefix"
17470 eval x=\"$x\"
17471 exec_prefix="$acl_save_exec_prefix"
17472 prefix="$acl_save_prefix"
17473
17474 if test "X$x" = "X$element"; then
17475 haveit=yes
17476 break
17477 fi
17478 done
17479 if test -z "$haveit"; then
17480 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17481 fi
17482 done
17483
17484
17485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
17486$as_echo_n "checking for libbabeltrace... " >&6; }
d0ac1c44 17487if ${ac_cv_libbabeltrace+:} false; then :
393fd4c3
YQ
17488 $as_echo_n "(cached) " >&6
17489else
17490
17491 ac_save_LIBS="$LIBS"
17492 LIBS="$LIBS $LIBBABELTRACE"
17493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17494/* end confdefs.h. */
17495#include <babeltrace/babeltrace.h>
17496 #include <babeltrace/ctf/events.h>
17497 #include <babeltrace/ctf/iterator.h>
17498int
17499main ()
17500{
17501struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
17502 struct bt_ctf_event *event = NULL;
17503 const struct bt_definition *scope;
17504
13cdc2af 17505 pos->type = BT_SEEK_BEGIN;
65c749e7 17506 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
17507 scope = bt_ctf_get_top_level_scope (event,
17508 BT_STREAM_EVENT_HEADER);
17509 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
17510
17511 ;
17512 return 0;
17513}
17514_ACEOF
17515if ac_fn_c_try_link "$LINENO"; then :
17516 ac_cv_libbabeltrace=yes
17517else
17518 ac_cv_libbabeltrace=no
17519fi
17520rm -f core conftest.err conftest.$ac_objext \
17521 conftest$ac_exeext conftest.$ac_ext
17522 LIBS="$ac_save_LIBS"
17523
17524fi
17525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
17526$as_echo "$ac_cv_libbabeltrace" >&6; }
17527 if test "$ac_cv_libbabeltrace" = yes; then
17528 HAVE_LIBBABELTRACE=yes
17529
17530$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
17531
17532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
17533$as_echo_n "checking how to link with libbabeltrace... " >&6; }
17534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
17535$as_echo "$LIBBABELTRACE" >&6; }
17536 else
17537 HAVE_LIBBABELTRACE=no
17538 CPPFLAGS="$ac_save_CPPFLAGS"
17539 LIBBABELTRACE=
17540 LTLIBBABELTRACE=
17541 fi
17542
17543
17544
17545
17546
17547
17548 CFLAGS=$saved_CFLAGS
17549
17550 if test "$HAVE_LIBBABELTRACE" != yes; then
17551 if test "$with_babeltrace" = yes; then
d0ac1c44 17552 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
393fd4c3
YQ
17553 else
17554 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
17555$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
17556 fi
17557 fi
17558fi
17559
a0a461e5 17560NM_H=
c906108c
SS
17561rm -f nm.h
17562if test "${nativefile}" != ""; then
0f475e27
AC
17563 case "${nativefile}" in
17564 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
17565 * ) GDB_NM_FILE="${nativefile}"
17566 esac
a0a461e5
TT
17567 ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE"
17568
60ca704f
SE
17569
17570cat >>confdefs.h <<_ACEOF
b78960be 17571#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 17572_ACEOF
5a2402b8 17573
a0a461e5 17574 NM_H=nm.h
c906108c 17575fi
5a2402b8
AC
17576
17577
a0a461e5 17578
e3487908
GKB
17579for ac_prog in xsltproc
17580do
17581 # Extract the first word of "$ac_prog", so it can be a program name with args.
17582set dummy $ac_prog; ac_word=$2
17583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17584$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 17585if ${ac_cv_path_XSLTPROC+:} false; then :
e3487908
GKB
17586 $as_echo_n "(cached) " >&6
17587else
17588 case $XSLTPROC in
17589 [\\/]* | ?:[\\/]*)
17590 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
17591 ;;
17592 *)
17593 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17594for as_dir in $PATH
17595do
17596 IFS=$as_save_IFS
17597 test -z "$as_dir" && as_dir=.
17598 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 17599 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e3487908
GKB
17600 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
17601 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17602 break 2
17603 fi
17604done
17605 done
17606IFS=$as_save_IFS
17607
17608 ;;
17609esac
17610fi
17611XSLTPROC=$ac_cv_path_XSLTPROC
17612if test -n "$XSLTPROC"; then
17613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
17614$as_echo "$XSLTPROC" >&6; }
17615else
17616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17617$as_echo "no" >&6; }
17618fi
17619
17620
17621 test -n "$XSLTPROC" && break
17622done
17623test -n "$XSLTPROC" || XSLTPROC="missing"
17624
17625if test "x$USE_MAINTAINER_MODE" = xyes; then
17626 if test "${XSLTPROC}" = missing; then
d0ac1c44 17627 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
e3487908
GKB
17628 fi
17629fi
17630
17631
c906108c
SS
17632
17633
c906108c 17634
81ecdfbb 17635$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 17636
bec39cab 17637
8ecfd7bd
SDJ
17638
17639# Check whether we will enable the inclusion of unit tests when
17640# compiling GDB.
17641#
17642# The default value of this option changes depending whether we're on
17643# development mode (in which case it's "true") or not (in which case
17644# it's "false").
17645# Check whether --enable-unit-tests was given.
17646if test "${enable_unit_tests+set}" = set; then :
17647 enableval=$enable_unit_tests; case "${enableval}" in
17648 yes) enable_unittests=true ;;
17649 no) enable_unittests=false ;;
17650 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
17651esac
17652else
17653 enable_unittests=$development
17654fi
17655
17656
17657if $enable_unittests; then
dcd1f979
TT
17658
17659$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
17660
8ecfd7bd 17661
268a13a5
TT
17662 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS) gdbsupport/selftest.o selftest-arch.o"
17663 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS) gdbsupport/selftest.c selftest-arch.c"
8ecfd7bd 17664
dcd1f979
TT
17665fi
17666
b292c783 17667
8ecfd7bd 17668
f6a88844
JM
17669 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17670 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
17671 if test "x$GDB_TRANSFORM_NAME" = x; then
17672 GDB_TRANSFORM_NAME=gdb
17673 fi
17674
17675
17676
17677 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17678 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
17679 if test "x$GCORE_TRANSFORM_NAME" = x; then
17680 GCORE_TRANSFORM_NAME=gcore
17681 fi
17682
b292c783
JK
17683
17684ac_config_files="$ac_config_files gcore"
17685
141ec9f6 17686ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
81ecdfbb 17687
89a34d1b 17688
bec39cab
AC
17689cat >confcache <<\_ACEOF
17690# This file is a shell script that caches the results of configure
17691# tests run on this system so they can be shared between configure
17692# scripts and configure runs, see configure's option --config-cache.
17693# It is not useful on other systems. If it contains results you don't
17694# want to keep, you may remove or edit it.
17695#
17696# config.status only pays attention to the cache file if you give it
17697# the --recheck option to rerun configure.
17698#
17699# `ac_cv_env_foo' variables (set or unset) will be overridden when
17700# loading this file, other *unset* `ac_cv_foo' will be assigned the
17701# following values.
17702
17703_ACEOF
17704
17705# The following way of writing the cache mishandles newlines in values,
17706# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 17707# So, we kill variables containing newlines.
bec39cab
AC
17708# Ultrix sh set writes to stderr and can't be redirected directly,
17709# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
17710(
17711 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17712 eval ac_val=\$$ac_var
17713 case $ac_val in #(
17714 *${as_nl}*)
17715 case $ac_var in #(
17716 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17717$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
17718 esac
17719 case $ac_var in #(
17720 _ | IFS | as_nl) ;; #(
17721 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17722 *) { eval $ac_var=; unset $ac_var;} ;;
17723 esac ;;
17724 esac
17725 done
17726
bec39cab 17727 (set) 2>&1 |
81ecdfbb
RW
17728 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17729 *${as_nl}ac_space=\ *)
17730 # `set' does not quote correctly, so add quotes: double-quote
17731 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
17732 sed -n \
17733 "s/'/'\\\\''/g;
17734 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 17735 ;; #(
bec39cab
AC
17736 *)
17737 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 17738 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 17739 ;;
81ecdfbb
RW
17740 esac |
17741 sort
17742) |
bec39cab 17743 sed '
81ecdfbb 17744 /^ac_cv_env_/b end
bec39cab 17745 t clear
81ecdfbb 17746 :clear
bec39cab
AC
17747 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17748 t end
81ecdfbb
RW
17749 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17750 :end' >>confcache
17751if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17752 if test -w "$cache_file"; then
d0ac1c44 17753 if test "x$cache_file" != "x/dev/null"; then
81ecdfbb
RW
17754 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17755$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
17756 if test ! -f "$cache_file" || test -h "$cache_file"; then
17757 cat confcache >"$cache_file"
17758 else
17759 case $cache_file in #(
17760 */* | ?:*)
17761 mv -f confcache "$cache_file"$$ &&
17762 mv -f "$cache_file"$$ "$cache_file" ;; #(
17763 *)
17764 mv -f confcache "$cache_file" ;;
17765 esac
17766 fi
17767 fi
bec39cab 17768 else
81ecdfbb
RW
17769 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17770$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
17771 fi
17772fi
17773rm -f confcache
17774
17775test "x$prefix" = xNONE && prefix=$ac_default_prefix
17776# Let make expand exec_prefix.
17777test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17778
bec39cab
AC
17779DEFS=-DHAVE_CONFIG_H
17780
17781ac_libobjs=
17782ac_ltlibobjs=
d0ac1c44 17783U=
bec39cab
AC
17784for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17785 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
17786 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
17787 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
17788 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17789 # will be set to the directory where LIBOBJS objects are built.
17790 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17791 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
17792done
17793LIBOBJS=$ac_libobjs
17794
17795LTLIBOBJS=$ac_ltlibobjs
17796
17797
85981d60 17798if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 17799 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
81ecdfbb 17800Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 17801fi
4df42755 17802if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
d0ac1c44 17803 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
4df42755
DE
17804Usually this means the macro was only invoked conditionally." "$LINENO" 5
17805fi
17806if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
d0ac1c44 17807 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
4df42755
DE
17808Usually this means the macro was only invoked conditionally." "$LINENO" 5
17809fi
81ecdfbb
RW
17810
17811
d0ac1c44 17812: "${CONFIG_STATUS=./config.status}"
81ecdfbb 17813ac_write_fail=0
bec39cab
AC
17814ac_clean_files_save=$ac_clean_files
17815ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
17816{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17817$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17818as_write_fail=0
17819cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
17820#! $SHELL
17821# Generated by $as_me.
17822# Run this file to recreate the current configuration.
17823# Compiler output produced by configure, useful for debugging
17824# configure, is in config.log if it exists.
17825
17826debug=false
17827ac_cs_recheck=false
17828ac_cs_silent=false
bec39cab 17829
81ecdfbb
RW
17830SHELL=\${CONFIG_SHELL-$SHELL}
17831export SHELL
17832_ASEOF
17833cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17834## -------------------- ##
17835## M4sh Initialization. ##
17836## -------------------- ##
17837
17838# Be more Bourne compatible
17839DUALCASE=1; export DUALCASE # for MKS sh
17840if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
17841 emulate sh
17842 NULLCMD=:
81ecdfbb 17843 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
17844 # is contrary to our usage. Disable this feature.
17845 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
17846 setopt NO_GLOB_SUBST
17847else
17848 case `(set -o) 2>/dev/null` in #(
17849 *posix*) :
17850 set -o posix ;; #(
17851 *) :
17852 ;;
17853esac
bec39cab 17854fi
bec39cab 17855
81ecdfbb
RW
17856
17857as_nl='
17858'
17859export as_nl
17860# Printing a long string crashes Solaris 7 /usr/bin/printf.
17861as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17862as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17863as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17864# Prefer a ksh shell builtin over an external printf program on Solaris,
17865# but without wasting forks for bash or zsh.
17866if test -z "$BASH_VERSION$ZSH_VERSION" \
17867 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17868 as_echo='print -r --'
17869 as_echo_n='print -rn --'
17870elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17871 as_echo='printf %s\n'
17872 as_echo_n='printf %s'
17873else
17874 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17875 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17876 as_echo_n='/usr/ucb/echo -n'
17877 else
17878 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17879 as_echo_n_body='eval
17880 arg=$1;
17881 case $arg in #(
17882 *"$as_nl"*)
17883 expr "X$arg" : "X\\(.*\\)$as_nl";
17884 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17885 esac;
17886 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17887 '
17888 export as_echo_n_body
17889 as_echo_n='sh -c $as_echo_n_body as_echo'
17890 fi
17891 export as_echo_body
17892 as_echo='sh -c $as_echo_body as_echo'
17893fi
17894
17895# The user is always right.
17896if test "${PATH_SEPARATOR+set}" != set; then
17897 PATH_SEPARATOR=:
17898 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17899 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17900 PATH_SEPARATOR=';'
17901 }
bec39cab
AC
17902fi
17903
17904
81ecdfbb
RW
17905# IFS
17906# We need space, tab and new line, in precisely that order. Quoting is
17907# there to prevent editors from complaining about space-tab.
17908# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17909# splitting by setting IFS to empty value.)
17910IFS=" "" $as_nl"
17911
17912# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 17913as_myself=
81ecdfbb
RW
17914case $0 in #((
17915 *[\\/]* ) as_myself=$0 ;;
17916 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17917for as_dir in $PATH
17918do
17919 IFS=$as_save_IFS
17920 test -z "$as_dir" && as_dir=.
17921 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17922 done
17923IFS=$as_save_IFS
17924
17925 ;;
17926esac
17927# We did not find ourselves, most probably we were run as `sh COMMAND'
17928# in which case we are not to be found in the path.
17929if test "x$as_myself" = x; then
17930 as_myself=$0
17931fi
17932if test ! -f "$as_myself"; then
17933 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17934 exit 1
17935fi
17936
17937# Unset variables that we do not need and which cause bugs (e.g. in
17938# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17939# suppresses any "Segmentation fault" message there. '((' could
17940# trigger a bug in pdksh 5.2.14.
17941for as_var in BASH_ENV ENV MAIL MAILPATH
17942do eval test x\${$as_var+set} = xset \
17943 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
17944done
bec39cab
AC
17945PS1='$ '
17946PS2='> '
17947PS4='+ '
17948
17949# NLS nuisances.
81ecdfbb
RW
17950LC_ALL=C
17951export LC_ALL
17952LANGUAGE=C
17953export LANGUAGE
17954
17955# CDPATH.
17956(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17957
17958
d0ac1c44
SM
17959# as_fn_error STATUS ERROR [LINENO LOG_FD]
17960# ----------------------------------------
81ecdfbb
RW
17961# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17962# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 17963# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
17964as_fn_error ()
17965{
d0ac1c44
SM
17966 as_status=$1; test $as_status -eq 0 && as_status=1
17967 if test "$4"; then
17968 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17969 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 17970 fi
d0ac1c44 17971 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
17972 as_fn_exit $as_status
17973} # as_fn_error
17974
17975
17976# as_fn_set_status STATUS
17977# -----------------------
17978# Set $? to STATUS, without forking.
17979as_fn_set_status ()
17980{
17981 return $1
17982} # as_fn_set_status
17983
17984# as_fn_exit STATUS
17985# -----------------
17986# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17987as_fn_exit ()
17988{
17989 set +e
17990 as_fn_set_status $1
17991 exit $1
17992} # as_fn_exit
17993
17994# as_fn_unset VAR
17995# ---------------
17996# Portably unset VAR.
17997as_fn_unset ()
17998{
17999 { eval $1=; unset $1;}
18000}
18001as_unset=as_fn_unset
18002# as_fn_append VAR VALUE
18003# ----------------------
18004# Append the text in VALUE to the end of the definition contained in VAR. Take
18005# advantage of any shell optimizations that allow amortized linear growth over
18006# repeated appends, instead of the typical quadratic growth present in naive
18007# implementations.
18008if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
18009 eval 'as_fn_append ()
18010 {
18011 eval $1+=\$2
18012 }'
18013else
18014 as_fn_append ()
18015 {
18016 eval $1=\$$1\$2
18017 }
18018fi # as_fn_append
18019
18020# as_fn_arith ARG...
18021# ------------------
18022# Perform arithmetic evaluation on the ARGs, and store the result in the
18023# global $as_val. Take advantage of shells that can avoid forks. The arguments
18024# must be portable across $(()) and expr.
18025if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
18026 eval 'as_fn_arith ()
18027 {
18028 as_val=$(( $* ))
18029 }'
18030else
18031 as_fn_arith ()
18032 {
18033 as_val=`expr "$@" || test $? -eq 1`
18034 }
18035fi # as_fn_arith
bec39cab 18036
81ecdfbb
RW
18037
18038if expr a : '\(a\)' >/dev/null 2>&1 &&
18039 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
18040 as_expr=expr
18041else
18042 as_expr=false
18043fi
18044
81ecdfbb 18045if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
18046 as_basename=basename
18047else
18048 as_basename=false
18049fi
18050
81ecdfbb
RW
18051if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18052 as_dirname=dirname
18053else
18054 as_dirname=false
18055fi
bec39cab 18056
81ecdfbb 18057as_me=`$as_basename -- "$0" ||
bec39cab
AC
18058$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18059 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
18060 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
18061$as_echo X/"$0" |
18062 sed '/^.*\/\([^/][^/]*\)\/*$/{
18063 s//\1/
18064 q
18065 }
18066 /^X\/\(\/\/\)$/{
18067 s//\1/
18068 q
18069 }
18070 /^X\/\(\/\).*/{
18071 s//\1/
18072 q
18073 }
18074 s/.*/./; q'`
b4e70030 18075
b4e70030
JB
18076# Avoid depending upon Character Ranges.
18077as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18078as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18079as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18080as_cr_digits='0123456789'
18081as_cr_alnum=$as_cr_Letters$as_cr_digits
18082
81ecdfbb
RW
18083ECHO_C= ECHO_N= ECHO_T=
18084case `echo -n x` in #(((((
18085-n*)
18086 case `echo 'xy\c'` in
18087 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
18088 xy) ECHO_C='\c';;
18089 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18090 ECHO_T=' ';;
18091 esac;;
18092*)
18093 ECHO_N='-n';;
bec39cab
AC
18094esac
18095
81ecdfbb
RW
18096rm -f conf$$ conf$$.exe conf$$.file
18097if test -d conf$$.dir; then
18098 rm -f conf$$.dir/conf$$.file
bec39cab 18099else
81ecdfbb
RW
18100 rm -f conf$$.dir
18101 mkdir conf$$.dir 2>/dev/null
bec39cab 18102fi
81ecdfbb
RW
18103if (echo >conf$$.file) 2>/dev/null; then
18104 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 18105 as_ln_s='ln -s'
81ecdfbb
RW
18106 # ... but there are two gotchas:
18107 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18108 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 18109 # In both cases, we have to default to `cp -pR'.
81ecdfbb 18110 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 18111 as_ln_s='cp -pR'
81ecdfbb
RW
18112 elif ln conf$$.file conf$$ 2>/dev/null; then
18113 as_ln_s=ln
18114 else
d0ac1c44 18115 as_ln_s='cp -pR'
b4e70030 18116 fi
bec39cab 18117else
d0ac1c44 18118 as_ln_s='cp -pR'
bec39cab 18119fi
81ecdfbb
RW
18120rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18121rmdir conf$$.dir 2>/dev/null
18122
18123
18124# as_fn_mkdir_p
18125# -------------
18126# Create "$as_dir" as a directory, including parents if necessary.
18127as_fn_mkdir_p ()
18128{
18129
18130 case $as_dir in #(
18131 -*) as_dir=./$as_dir;;
18132 esac
18133 test -d "$as_dir" || eval $as_mkdir_p || {
18134 as_dirs=
18135 while :; do
18136 case $as_dir in #(
18137 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18138 *) as_qdir=$as_dir;;
18139 esac
18140 as_dirs="'$as_qdir' $as_dirs"
18141 as_dir=`$as_dirname -- "$as_dir" ||
18142$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18143 X"$as_dir" : 'X\(//\)[^/]' \| \
18144 X"$as_dir" : 'X\(//\)$' \| \
18145 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18146$as_echo X"$as_dir" |
18147 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18148 s//\1/
18149 q
18150 }
18151 /^X\(\/\/\)[^/].*/{
18152 s//\1/
18153 q
18154 }
18155 /^X\(\/\/\)$/{
18156 s//\1/
18157 q
18158 }
18159 /^X\(\/\).*/{
18160 s//\1/
18161 q
18162 }
18163 s/.*/./; q'`
18164 test -d "$as_dir" && break
18165 done
18166 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 18167 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb 18168
bec39cab 18169
81ecdfbb 18170} # as_fn_mkdir_p
bec39cab 18171if mkdir -p . 2>/dev/null; then
81ecdfbb 18172 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
18173else
18174 test -d ./-p && rmdir ./-p
18175 as_mkdir_p=false
18176fi
18177
d0ac1c44
SM
18178
18179# as_fn_executable_p FILE
18180# -----------------------
18181# Test if FILE is an executable regular file.
18182as_fn_executable_p ()
18183{
18184 test -f "$1" && test -x "$1"
18185} # as_fn_executable_p
18186as_test_x='test -x'
18187as_executable_p=as_fn_executable_p
bec39cab
AC
18188
18189# Sed expression to map a string onto a valid CPP name.
18190as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
18191
18192# Sed expression to map a string onto a valid variable name.
18193as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
18194
18195
bec39cab 18196exec 6>&1
81ecdfbb
RW
18197## ----------------------------------- ##
18198## Main body of $CONFIG_STATUS script. ##
18199## ----------------------------------- ##
18200_ASEOF
18201test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
18202
18203cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18204# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 18205# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
18206# values after options handling.
18207ac_log="
bec39cab 18208This file was extended by $as_me, which was
d0ac1c44 18209generated by GNU Autoconf 2.69. Invocation command line was
bec39cab
AC
18210
18211 CONFIG_FILES = $CONFIG_FILES
18212 CONFIG_HEADERS = $CONFIG_HEADERS
18213 CONFIG_LINKS = $CONFIG_LINKS
18214 CONFIG_COMMANDS = $CONFIG_COMMANDS
18215 $ $0 $@
18216
81ecdfbb
RW
18217on `(hostname || uname -n) 2>/dev/null | sed 1q`
18218"
18219
bec39cab
AC
18220_ACEOF
18221
81ecdfbb
RW
18222case $ac_config_files in *"
18223"*) set x $ac_config_files; shift; ac_config_files=$*;;
18224esac
234b45d4 18225
81ecdfbb
RW
18226case $ac_config_headers in *"
18227"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18228esac
b4e70030 18229
b4e70030 18230
81ecdfbb
RW
18231cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18232# Files that config.status was made for.
18233config_files="$ac_config_files"
18234config_headers="$ac_config_headers"
18235config_links="$ac_config_links"
18236config_commands="$ac_config_commands"
234b45d4 18237
81ecdfbb 18238_ACEOF
b4e70030 18239
81ecdfbb 18240cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 18241ac_cs_usage="\
81ecdfbb
RW
18242\`$as_me' instantiates files and other configuration actions
18243from templates according to the current configuration. Unless the files
18244and actions are specified as TAGs, all are instantiated by default.
234b45d4 18245
81ecdfbb 18246Usage: $0 [OPTION]... [TAG]...
234b45d4 18247
bec39cab 18248 -h, --help print this help, then exit
81ecdfbb 18249 -V, --version print version number and configuration settings, then exit
d0ac1c44 18250 --config print configuration, then exit
81ecdfbb
RW
18251 -q, --quiet, --silent
18252 do not print progress messages
bec39cab
AC
18253 -d, --debug don't remove temporary files
18254 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
18255 --file=FILE[:TEMPLATE]
18256 instantiate the configuration file FILE
18257 --header=FILE[:TEMPLATE]
18258 instantiate the configuration header FILE
234b45d4 18259
bec39cab
AC
18260Configuration files:
18261$config_files
234b45d4 18262
bec39cab
AC
18263Configuration headers:
18264$config_headers
234b45d4 18265
bec39cab
AC
18266Configuration links:
18267$config_links
234b45d4 18268
bec39cab
AC
18269Configuration commands:
18270$config_commands
18271
81ecdfbb 18272Report bugs to the package provider."
b4e70030 18273
81ecdfbb
RW
18274_ACEOF
18275cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 18276ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
bec39cab
AC
18277ac_cs_version="\\
18278config.status
d0ac1c44
SM
18279configured by $0, generated by GNU Autoconf 2.69,
18280 with options \\"\$ac_cs_config\\"
bec39cab 18281
d0ac1c44 18282Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
18283This config.status script is free software; the Free Software Foundation
18284gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
18285
18286ac_pwd='$ac_pwd'
18287srcdir='$srcdir'
18288INSTALL='$INSTALL'
81ecdfbb
RW
18289AWK='$AWK'
18290test -n "\$AWK" || AWK=awk
bec39cab
AC
18291_ACEOF
18292
81ecdfbb
RW
18293cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18294# The default lists apply if the user does not specify any file.
bec39cab
AC
18295ac_need_defaults=:
18296while test $# != 0
18297do
18298 case $1 in
d0ac1c44 18299 --*=?*)
81ecdfbb
RW
18300 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18301 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 18302 ac_shift=:
c906108c 18303 ;;
d0ac1c44
SM
18304 --*=)
18305 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18306 ac_optarg=
18307 ac_shift=:
18308 ;;
81ecdfbb 18309 *)
bec39cab
AC
18310 ac_option=$1
18311 ac_optarg=$2
18312 ac_shift=shift
c906108c 18313 ;;
bec39cab 18314 esac
c906108c 18315
bec39cab
AC
18316 case $ac_option in
18317 # Handling of the options.
bec39cab
AC
18318 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18319 ac_cs_recheck=: ;;
81ecdfbb
RW
18320 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
18321 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
18322 --config | --confi | --conf | --con | --co | --c )
18323 $as_echo "$ac_cs_config"; exit ;;
81ecdfbb 18324 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
18325 debug=: ;;
18326 --file | --fil | --fi | --f )
18327 $ac_shift
81ecdfbb
RW
18328 case $ac_optarg in
18329 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 18330 '') as_fn_error $? "missing file argument" ;;
81ecdfbb
RW
18331 esac
18332 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
18333 ac_need_defaults=false;;
18334 --header | --heade | --head | --hea )
18335 $ac_shift
81ecdfbb
RW
18336 case $ac_optarg in
18337 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18338 esac
18339 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 18340 ac_need_defaults=false;;
81ecdfbb
RW
18341 --he | --h)
18342 # Conflict between --help and --header
d0ac1c44 18343 as_fn_error $? "ambiguous option: \`$1'
81ecdfbb
RW
18344Try \`$0 --help' for more information.";;
18345 --help | --hel | -h )
18346 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
18347 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18348 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18349 ac_cs_silent=: ;;
c906108c 18350
bec39cab 18351 # This is an error.
d0ac1c44 18352 -*) as_fn_error $? "unrecognized option: \`$1'
81ecdfbb 18353Try \`$0 --help' for more information." ;;
c906108c 18354
81ecdfbb
RW
18355 *) as_fn_append ac_config_targets " $1"
18356 ac_need_defaults=false ;;
c906108c 18357
bec39cab
AC
18358 esac
18359 shift
18360done
c906108c 18361
bec39cab 18362ac_configure_extra_args=
c906108c 18363
bec39cab
AC
18364if $ac_cs_silent; then
18365 exec 6>/dev/null
18366 ac_configure_extra_args="$ac_configure_extra_args --silent"
18367fi
c906108c 18368
bec39cab 18369_ACEOF
81ecdfbb 18370cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 18371if \$ac_cs_recheck; then
d0ac1c44 18372 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
81ecdfbb
RW
18373 shift
18374 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18375 CONFIG_SHELL='$SHELL'
18376 export CONFIG_SHELL
18377 exec "\$@"
bec39cab
AC
18378fi
18379
18380_ACEOF
81ecdfbb
RW
18381cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18382exec 5>>config.log
18383{
18384 echo
18385 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18386## Running $as_me. ##
18387_ASBOX
18388 $as_echo "$ac_log"
18389} >&5
bec39cab 18390
81ecdfbb
RW
18391_ACEOF
18392cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 18393#
81ecdfbb 18394# INIT-COMMANDS
c906108c 18395#
a417dc56 18396ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
a0a461e5 18397GDB_NM_FILE=$GDB_NM_FILE
b4e70030 18398
bec39cab
AC
18399_ACEOF
18400
81ecdfbb 18401cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 18402
81ecdfbb 18403# Handling of arguments.
bec39cab 18404for ac_config_target in $ac_config_targets
c906108c 18405do
81ecdfbb
RW
18406 case $ac_config_target in
18407 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
18408 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 18409 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
a0a461e5 18410 "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;;
b292c783 18411 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 18412 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 18413 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
141ec9f6 18414 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
5ae98d25 18415 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 18416 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb 18417
d0ac1c44 18418 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
18419 esac
18420done
18421
81ecdfbb 18422
bec39cab
AC
18423# If the user did not use the arguments to specify the items to instantiate,
18424# then the envvar interface is used. Set only those that are not.
18425# We use the long form for the default assignment because of an extremely
18426# bizarre bug on SunOS 4.1.3.
18427if $ac_need_defaults; then
18428 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18429 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18430 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
18431 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18432fi
18433
b4e70030 18434# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 18435# simply because there is no reason against having it here, and in addition,
b4e70030 18436# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
18437# Hook for its removal unless debugging.
18438# Note that there is a small window in which the directory will not be cleaned:
18439# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
18440$debug ||
18441{
d0ac1c44 18442 tmp= ac_tmp=
81ecdfbb 18443 trap 'exit_status=$?
d0ac1c44
SM
18444 : "${ac_tmp:=$tmp}"
18445 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
81ecdfbb
RW
18446' 0
18447 trap 'as_fn_exit 1' 1 2 13 15
18448}
18449# Create a (secure) tmp directory for tmp files.
18450
18451{
18452 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 18453 test -d "$tmp"
81ecdfbb
RW
18454} ||
18455{
18456 tmp=./conf$$-$RANDOM
18457 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
18458} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
18459ac_tmp=$tmp
81ecdfbb
RW
18460
18461# Set up the scripts for CONFIG_FILES section.
18462# No need to generate them if there are no CONFIG_FILES.
18463# This happens for instance with `./config.status config.h'.
18464if test -n "$CONFIG_FILES"; then
18465
18466if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
18467 ac_cs_awk_getline=:
18468 ac_cs_awk_pipe_init=
18469 ac_cs_awk_read_file='
18470 while ((getline aline < (F[key])) > 0)
18471 print(aline)
18472 close(F[key])'
18473 ac_cs_awk_pipe_fini=
18474else
18475 ac_cs_awk_getline=false
18476 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
18477 ac_cs_awk_read_file='
18478 print "|#_!!_#|"
18479 print "cat " F[key] " &&"
18480 '$ac_cs_awk_pipe_init
18481 # The final `:' finishes the AND list.
18482 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
18483fi
18484ac_cr=`echo X | tr X '\015'`
18485# On cygwin, bash can eat \r inside `` if the user requested igncr.
18486# But we know of no other shell where ac_cr would be empty at this
18487# point, so we can use a bashism as a fallback.
18488if test "x$ac_cr" = x; then
18489 eval ac_cr=\$\'\\r\'
18490fi
18491ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18492if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 18493 ac_cs_awk_cr='\\r'
81ecdfbb
RW
18494else
18495 ac_cs_awk_cr=$ac_cr
18496fi
18497
d0ac1c44 18498echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
81ecdfbb
RW
18499_ACEOF
18500
18501# Create commands to substitute file output variables.
18502{
18503 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
d0ac1c44 18504 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
81ecdfbb
RW
18505 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
18506 echo "_ACAWK" &&
18507 echo "_ACEOF"
18508} >conf$$files.sh &&
18509. ./conf$$files.sh ||
d0ac1c44 18510 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
18511rm -f conf$$files.sh
18512
18513{
18514 echo "cat >conf$$subs.awk <<_ACEOF" &&
18515 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18516 echo "_ACEOF"
18517} >conf$$subs.sh ||
d0ac1c44
SM
18518 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18519ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
81ecdfbb
RW
18520ac_delim='%!_!# '
18521for ac_last_try in false false false false false :; do
18522 . ./conf$$subs.sh ||
d0ac1c44 18523 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
18524
18525 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18526 if test $ac_delim_n = $ac_delim_num; then
18527 break
18528 elif $ac_last_try; then
d0ac1c44 18529 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
18530 else
18531 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18532 fi
18533done
18534rm -f conf$$subs.sh
18535
18536cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 18537cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
81ecdfbb
RW
18538_ACEOF
18539sed -n '
18540h
18541s/^/S["/; s/!.*/"]=/
18542p
18543g
18544s/^[^!]*!//
18545:repl
18546t repl
18547s/'"$ac_delim"'$//
18548t delim
18549:nl
18550h
d0ac1c44 18551s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
18552t more1
18553s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18554p
18555n
18556b repl
18557:more1
18558s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18559p
18560g
18561s/.\{148\}//
18562t nl
18563:delim
18564h
d0ac1c44 18565s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
18566t more2
18567s/["\\]/\\&/g; s/^/"/; s/$/"/
18568p
18569b
18570:more2
18571s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18572p
18573g
18574s/.\{148\}//
18575t delim
18576' <conf$$subs.awk | sed '
18577/^[^""]/{
18578 N
18579 s/\n//
18580}
18581' >>$CONFIG_STATUS || ac_write_fail=1
18582rm -f conf$$subs.awk
18583cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18584_ACAWK
d0ac1c44 18585cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
81ecdfbb
RW
18586 for (key in S) S_is_set[key] = 1
18587 FS = "\a"
18588 \$ac_cs_awk_pipe_init
18589}
18590{
18591 line = $ 0
18592 nfields = split(line, field, "@")
18593 substed = 0
18594 len = length(field[1])
18595 for (i = 2; i < nfields; i++) {
18596 key = field[i]
18597 keylen = length(key)
18598 if (S_is_set[key]) {
18599 value = S[key]
18600 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18601 len += length(value) + length(field[++i])
18602 substed = 1
18603 } else
18604 len += 1 + keylen
18605 }
18606 if (nfields == 3 && !substed) {
18607 key = field[2]
18608 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
18609 \$ac_cs_awk_read_file
18610 next
18611 }
18612 }
18613 print line
b4e70030 18614}
81ecdfbb
RW
18615\$ac_cs_awk_pipe_fini
18616_ACAWK
18617_ACEOF
18618cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18619if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18620 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18621else
18622 cat
d0ac1c44
SM
18623fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
18624 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
81ecdfbb
RW
18625_ACEOF
18626
d0ac1c44
SM
18627# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18628# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
81ecdfbb
RW
18629# trailing colons and then remove the whole line if VPATH becomes empty
18630# (actually we leave an empty line to preserve line numbers).
18631if test "x$srcdir" = x.; then
d0ac1c44
SM
18632 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18633h
18634s///
18635s/^/:/
18636s/[ ]*$/:/
18637s/:\$(srcdir):/:/g
18638s/:\${srcdir}:/:/g
18639s/:@srcdir@:/:/g
18640s/^:*//
81ecdfbb 18641s/:*$//
d0ac1c44
SM
18642x
18643s/\(=[ ]*\).*/\1/
18644G
18645s/\n//
81ecdfbb
RW
18646s/^[^=]*=[ ]*$//
18647}'
18648fi
18649
18650cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18651fi # test -n "$CONFIG_FILES"
18652
18653# Set up the scripts for CONFIG_HEADERS section.
18654# No need to generate them if there are no CONFIG_HEADERS.
18655# This happens for instance with `./config.status Makefile'.
18656if test -n "$CONFIG_HEADERS"; then
d0ac1c44 18657cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
81ecdfbb
RW
18658BEGIN {
18659_ACEOF
18660
18661# Transform confdefs.h into an awk script `defines.awk', embedded as
18662# here-document in config.status, that substitutes the proper values into
18663# config.h.in to produce config.h.
4e8d927d 18664
81ecdfbb
RW
18665# Create a delimiter string that does not exist in confdefs.h, to ease
18666# handling of long lines.
18667ac_delim='%!_!# '
18668for ac_last_try in false false :; do
d0ac1c44
SM
18669 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18670 if test -z "$ac_tt"; then
81ecdfbb
RW
18671 break
18672 elif $ac_last_try; then
d0ac1c44 18673 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
81ecdfbb
RW
18674 else
18675 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18676 fi
18677done
4e8d927d 18678
81ecdfbb
RW
18679# For the awk script, D is an array of macro values keyed by name,
18680# likewise P contains macro parameters if any. Preserve backslash
18681# newline sequences.
18682
18683ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18684sed -n '
18685s/.\{148\}/&'"$ac_delim"'/g
18686t rset
18687:rset
18688s/^[ ]*#[ ]*define[ ][ ]*/ /
18689t def
18690d
18691:def
18692s/\\$//
18693t bsnl
18694s/["\\]/\\&/g
18695s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18696D["\1"]=" \3"/p
18697s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18698d
18699:bsnl
18700s/["\\]/\\&/g
18701s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18702D["\1"]=" \3\\\\\\n"\\/p
18703t cont
18704s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18705t cont
18706d
18707:cont
18708n
18709s/.\{148\}/&'"$ac_delim"'/g
18710t clear
18711:clear
18712s/\\$//
18713t bsnlc
18714s/["\\]/\\&/g; s/^/"/; s/$/"/p
18715d
18716:bsnlc
18717s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18718b cont
18719' <confdefs.h | sed '
18720s/'"$ac_delim"'/"\\\
18721"/g' >>$CONFIG_STATUS || ac_write_fail=1
18722
18723cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18724 for (key in D) D_is_set[key] = 1
18725 FS = "\a"
18726}
18727/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18728 line = \$ 0
18729 split(line, arg, " ")
18730 if (arg[1] == "#") {
18731 defundef = arg[2]
18732 mac1 = arg[3]
18733 } else {
18734 defundef = substr(arg[1], 2)
18735 mac1 = arg[2]
18736 }
18737 split(mac1, mac2, "(") #)
18738 macro = mac2[1]
18739 prefix = substr(line, 1, index(line, defundef) - 1)
18740 if (D_is_set[macro]) {
18741 # Preserve the white space surrounding the "#".
18742 print prefix "define", macro P[macro] D[macro]
18743 next
18744 } else {
18745 # Replace #undef with comments. This is necessary, for example,
18746 # in the case of _POSIX_SOURCE, which is predefined and required
18747 # on some systems where configure will not decide to define it.
18748 if (defundef == "undef") {
18749 print "/*", prefix defundef, macro, "*/"
18750 next
18751 }
18752 }
b4e70030 18753}
81ecdfbb
RW
18754{ print }
18755_ACAWK
b4e70030 18756_ACEOF
81ecdfbb 18757cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 18758 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
81ecdfbb 18759fi # test -n "$CONFIG_HEADERS"
4e8d927d 18760
4e8d927d 18761
81ecdfbb
RW
18762eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
18763shift
18764for ac_tag
18765do
18766 case $ac_tag in
18767 :[FHLC]) ac_mode=$ac_tag; continue;;
18768 esac
18769 case $ac_mode$ac_tag in
18770 :[FHL]*:*);;
d0ac1c44 18771 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
81ecdfbb
RW
18772 :[FH]-) ac_tag=-:-;;
18773 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18774 esac
18775 ac_save_IFS=$IFS
18776 IFS=:
18777 set x $ac_tag
18778 IFS=$ac_save_IFS
18779 shift
18780 ac_file=$1
18781 shift
4e8d927d 18782
81ecdfbb
RW
18783 case $ac_mode in
18784 :L) ac_source=$1;;
18785 :[FH])
18786 ac_file_inputs=
18787 for ac_f
18788 do
18789 case $ac_f in
d0ac1c44 18790 -) ac_f="$ac_tmp/stdin";;
81ecdfbb
RW
18791 *) # Look for the file first in the build tree, then in the source tree
18792 # (if the path is not absolute). The absolute path cannot be DOS-style,
18793 # because $ac_f cannot contain `:'.
18794 test -f "$ac_f" ||
18795 case $ac_f in
18796 [\\/$]*) false;;
18797 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18798 esac ||
d0ac1c44 18799 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
81ecdfbb
RW
18800 esac
18801 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18802 as_fn_append ac_file_inputs " '$ac_f'"
18803 done
18804
18805 # Let's still pretend it is `configure' which instantiates (i.e., don't
18806 # use $as_me), people would be surprised to read:
18807 # /* config.h. Generated by config.status. */
18808 configure_input='Generated from '`
18809 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18810 `' by configure.'
18811 if test x"$ac_file" != x-; then
18812 configure_input="$ac_file. $configure_input"
18813 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18814$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 18815 fi
81ecdfbb
RW
18816 # Neutralize special characters interpreted by sed in replacement strings.
18817 case $configure_input in #(
18818 *\&* | *\|* | *\\* )
18819 ac_sed_conf_input=`$as_echo "$configure_input" |
18820 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18821 *) ac_sed_conf_input=$configure_input;;
18822 esac
4e8d927d 18823
81ecdfbb 18824 case $ac_tag in
d0ac1c44
SM
18825 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18826 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
81ecdfbb
RW
18827 esac
18828 ;;
c906108c
SS
18829 esac
18830
81ecdfbb 18831 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
18832$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18833 X"$ac_file" : 'X\(//\)[^/]' \| \
18834 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
18835 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
18836$as_echo X"$ac_file" |
18837 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18838 s//\1/
18839 q
18840 }
18841 /^X\(\/\/\)[^/].*/{
18842 s//\1/
18843 q
18844 }
18845 /^X\(\/\/\)$/{
18846 s//\1/
18847 q
18848 }
18849 /^X\(\/\).*/{
18850 s//\1/
18851 q
18852 }
18853 s/.*/./; q'`
18854 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
18855 ac_builddir=.
18856
81ecdfbb
RW
18857case "$ac_dir" in
18858.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18859*)
18860 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18861 # A ".." for each directory in $ac_dir_suffix.
18862 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18863 case $ac_top_builddir_sub in
18864 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18865 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18866 esac ;;
18867esac
18868ac_abs_top_builddir=$ac_pwd
18869ac_abs_builddir=$ac_pwd$ac_dir_suffix
18870# for backward compatibility:
18871ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
18872
18873case $srcdir in
81ecdfbb 18874 .) # We are building in place.
bec39cab 18875 ac_srcdir=.
81ecdfbb
RW
18876 ac_top_srcdir=$ac_top_builddir_sub
18877 ac_abs_top_srcdir=$ac_pwd ;;
18878 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 18879 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
18880 ac_top_srcdir=$srcdir
18881 ac_abs_top_srcdir=$srcdir ;;
18882 *) # Relative name.
18883 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18884 ac_top_srcdir=$ac_top_build_prefix$srcdir
18885 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 18886esac
81ecdfbb 18887ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 18888
c906108c 18889
81ecdfbb
RW
18890 case $ac_mode in
18891 :F)
18892 #
18893 # CONFIG_FILE
18894 #
c906108c 18895
bec39cab
AC
18896 case $INSTALL in
18897 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 18898 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 18899 esac
81ecdfbb 18900_ACEOF
121ce6e5 18901
81ecdfbb
RW
18902cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18903# If the template does not know about datarootdir, expand it.
18904# FIXME: This hack should be removed a few years after 2.60.
18905ac_datarootdir_hack=; ac_datarootdir_seen=
18906ac_sed_dataroot='
18907/datarootdir/ {
18908 p
18909 q
18910}
18911/@datadir@/p
18912/@docdir@/p
18913/@infodir@/p
18914/@localedir@/p
18915/@mandir@/p'
18916case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
18917*datarootdir*) ac_datarootdir_seen=yes;;
18918*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
18919 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18920$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
18921_ACEOF
18922cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18923 ac_datarootdir_hack='
18924 s&@datadir@&$datadir&g
18925 s&@docdir@&$docdir&g
18926 s&@infodir@&$infodir&g
18927 s&@localedir@&$localedir&g
18928 s&@mandir@&$mandir&g
18929 s&\\\${datarootdir}&$datarootdir&g' ;;
18930esac
4e8d927d 18931_ACEOF
81ecdfbb
RW
18932
18933# Neutralize VPATH when `$srcdir' = `.'.
18934# Shell code in configure.ac might set extrasub.
18935# FIXME: do we really want to maintain this feature?
18936cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18937ac_sed_extra="$ac_vpsub
bec39cab
AC
18938$extrasub
18939_ACEOF
81ecdfbb 18940cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
18941:t
18942/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
18943s|@configure_input@|$ac_sed_conf_input|;t t
18944s&@top_builddir@&$ac_top_builddir_sub&;t t
18945s&@top_build_prefix@&$ac_top_build_prefix&;t t
18946s&@srcdir@&$ac_srcdir&;t t
18947s&@abs_srcdir@&$ac_abs_srcdir&;t t
18948s&@top_srcdir@&$ac_top_srcdir&;t t
18949s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18950s&@builddir@&$ac_builddir&;t t
18951s&@abs_builddir@&$ac_abs_builddir&;t t
18952s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18953s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
18954$ac_datarootdir_hack
18955"
18956eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
18957if $ac_cs_awk_getline; then
d0ac1c44 18958 $AWK -f "$ac_tmp/subs.awk"
81ecdfbb 18959else
d0ac1c44
SM
18960 $AWK -f "$ac_tmp/subs.awk" | $SHELL
18961fi \
18962 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
18963
18964test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
18965 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18966 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18967 "$ac_tmp/out"`; test -z "$ac_out"; } &&
81ecdfbb 18968 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 18969which seems to be undefined. Please make sure it is defined" >&5
81ecdfbb 18970$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 18971which seems to be undefined. Please make sure it is defined" >&2;}
81ecdfbb 18972
d0ac1c44 18973 rm -f "$ac_tmp/stdin"
bec39cab 18974 case $ac_file in
d0ac1c44
SM
18975 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18976 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
81ecdfbb 18977 esac \
d0ac1c44 18978 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
18979 ;;
18980 :H)
18981 #
18982 # CONFIG_HEADER
18983 #
bec39cab 18984 if test x"$ac_file" != x-; then
81ecdfbb
RW
18985 {
18986 $as_echo "/* $configure_input */" \
d0ac1c44
SM
18987 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18988 } >"$ac_tmp/config.h" \
18989 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18990 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
81ecdfbb
RW
18991 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18992$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 18993 else
81ecdfbb 18994 rm -f "$ac_file"
d0ac1c44
SM
18995 mv "$ac_tmp/config.h" "$ac_file" \
18996 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
bec39cab
AC
18997 fi
18998 else
81ecdfbb 18999 $as_echo "/* $configure_input */" \
d0ac1c44
SM
19000 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
19001 || as_fn_error $? "could not create -" "$LINENO" 5
bec39cab 19002 fi
81ecdfbb
RW
19003 ;;
19004 :L)
19005 #
19006 # CONFIG_LINK
19007 #
c906108c 19008
81ecdfbb
RW
19009 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
19010 :
b4e70030 19011 else
81ecdfbb
RW
19012 # Prefer the file from the source tree if names are identical.
19013 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
19014 ac_source=$srcdir/$ac_source
19015 fi
b4e70030 19016
81ecdfbb
RW
19017 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
19018$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 19019
81ecdfbb 19020 if test ! -r "$ac_source"; then
d0ac1c44 19021 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
81ecdfbb
RW
19022 fi
19023 rm -f "$ac_file"
bec39cab 19024
81ecdfbb 19025 # Try a relative symlink, then a hard link, then a copy.
d0ac1c44 19026 case $ac_source in
81ecdfbb
RW
19027 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
19028 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
19029 esac
19030 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
19031 ln "$ac_source" "$ac_file" 2>/dev/null ||
19032 cp -p "$ac_source" "$ac_file" ||
d0ac1c44 19033 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
81ecdfbb
RW
19034 fi
19035 ;;
19036 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
19037$as_echo "$as_me: executing $ac_file commands" >&6;}
19038 ;;
c906108c 19039 esac
b4e70030 19040
bec39cab 19041
81ecdfbb 19042 case $ac_file$ac_mode in
c5adaa19 19043 "config.h":H) echo > stamp-h ;;
81ecdfbb 19044 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
a0a461e5 19045 "nm.h":L) echo > stamp-nmh ;;
b292c783 19046 "gcore":F) chmod +x gcore ;;
81ecdfbb 19047
bec39cab 19048 esac
81ecdfbb 19049done # for ac_tag
c906108c 19050
bec39cab 19051
81ecdfbb 19052as_fn_exit 0
bec39cab 19053_ACEOF
bec39cab
AC
19054ac_clean_files=$ac_clean_files_save
19055
81ecdfbb 19056test $ac_write_fail = 0 ||
d0ac1c44 19057 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
81ecdfbb 19058
bec39cab
AC
19059
19060# configure is writing to config.log, and then calls config.status.
19061# config.status does its own redirection, appending to config.log.
19062# Unfortunately, on DOS this fails, as config.log is still kept open
19063# by configure, so config.status won't be able to write to it; its
19064# output is simply discarded. So we exec the FD to /dev/null,
19065# effectively closing config.log, so it can be properly (re)opened and
19066# appended to by config.status. When coming back to configure, we
19067# need to make the FD available again.
19068if test "$no_create" != yes; then
19069 ac_cs_success=:
19070 ac_config_status_args=
19071 test "$silent" = yes &&
19072 ac_config_status_args="$ac_config_status_args --quiet"
19073 exec 5>/dev/null
19074 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
19075 exec 5>>config.log
19076 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19077 # would make configure fail if this is the last instruction.
d0ac1c44 19078 $ac_cs_success || as_fn_exit 1
bec39cab 19079fi
c906108c 19080
bec39cab 19081#
81ecdfbb 19082# CONFIG_SUBDIRS section.
bec39cab 19083#
c906108c
SS
19084if test "$no_recursion" != yes; then
19085
81ecdfbb
RW
19086 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
19087 # so they do not pile up.
c906108c
SS
19088 ac_sub_configure_args=
19089 ac_prev=
fdc59709
PB
19090 eval "set x $ac_configure_args"
19091 shift
19092 for ac_arg
19093 do
c906108c
SS
19094 if test -n "$ac_prev"; then
19095 ac_prev=
19096 continue
19097 fi
bec39cab 19098 case $ac_arg in
c906108c
SS
19099 -cache-file | --cache-file | --cache-fil | --cache-fi \
19100 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
19101 ac_prev=cache_file ;;
19102 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
19103 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
19104 | --c=*)
19105 ;;
19106 --config-cache | -C)
c906108c
SS
19107 ;;
19108 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
19109 ac_prev=srcdir ;;
19110 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
19111 ;;
bec39cab
AC
19112 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
19113 ac_prev=prefix ;;
19114 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
19115 ;;
81ecdfbb
RW
19116 --disable-option-checking)
19117 ;;
fdc59709
PB
19118 *)
19119 case $ac_arg in
81ecdfbb 19120 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 19121 esac
81ecdfbb 19122 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
19123 esac
19124 done
19125
bec39cab
AC
19126 # Always prepend --prefix to ensure using the same prefix
19127 # in subdir configurations.
fdc59709
PB
19128 ac_arg="--prefix=$prefix"
19129 case $ac_arg in
81ecdfbb 19130 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 19131 esac
81ecdfbb
RW
19132 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
19133
19134 # Pass --silent
19135 if test "$silent" = yes; then
19136 ac_sub_configure_args="--silent $ac_sub_configure_args"
19137 fi
19138
19139 # Always prepend --disable-option-checking to silence warnings, since
19140 # different subdirs can have different --enable and --with options.
19141 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 19142
b4e70030 19143 ac_popdir=`pwd`
bec39cab 19144 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
19145
19146 # Do not complain, so a configure script can configure whichever
19147 # parts of a large source tree are present.
fdc59709 19148 test -d "$srcdir/$ac_dir" || continue
c906108c 19149
81ecdfbb
RW
19150 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
19151 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
19152 $as_echo "$ac_msg" >&6
19153 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
19154 ac_builddir=.
19155
81ecdfbb
RW
19156case "$ac_dir" in
19157.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19158*)
19159 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19160 # A ".." for each directory in $ac_dir_suffix.
19161 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19162 case $ac_top_builddir_sub in
19163 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19164 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19165 esac ;;
19166esac
19167ac_abs_top_builddir=$ac_pwd
19168ac_abs_builddir=$ac_pwd$ac_dir_suffix
19169# for backward compatibility:
19170ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
19171
19172case $srcdir in
81ecdfbb 19173 .) # We are building in place.
bec39cab 19174 ac_srcdir=.
81ecdfbb
RW
19175 ac_top_srcdir=$ac_top_builddir_sub
19176 ac_abs_top_srcdir=$ac_pwd ;;
19177 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 19178 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
19179 ac_top_srcdir=$srcdir
19180 ac_abs_top_srcdir=$srcdir ;;
19181 *) # Relative name.
19182 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19183 ac_top_srcdir=$ac_top_build_prefix$srcdir
19184 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 19185esac
81ecdfbb 19186ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 19187
c906108c 19188
fdc59709 19189 cd "$ac_dir"
c906108c
SS
19190
19191 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
19192 if test -f "$ac_srcdir/configure.gnu"; then
19193 ac_sub_configure=$ac_srcdir/configure.gnu
19194 elif test -f "$ac_srcdir/configure"; then
19195 ac_sub_configure=$ac_srcdir/configure
19196 elif test -f "$ac_srcdir/configure.in"; then
19197 # This should be Cygnus configure.
19198 ac_sub_configure=$ac_aux_dir/configure
c906108c 19199 else
81ecdfbb
RW
19200 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
19201$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
19202 ac_sub_configure=
19203 fi
19204
19205 # The recursion is here.
19206 if test -n "$ac_sub_configure"; then
c906108c 19207 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
19208 case $cache_file in
19209 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
19210 *) # Relative name.
19211 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 19212 esac
c906108c 19213
81ecdfbb
RW
19214 { $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
19215$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 19216 # The eval makes quoting arguments work.
fdc59709
PB
19217 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
19218 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 19219 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
19220 fi
19221
fdc59709 19222 cd "$ac_popdir"
c906108c
SS
19223 done
19224fi
81ecdfbb
RW
19225if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19226 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19227$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
19228fi
c906108c 19229