Use libxxhash for hashing, if present
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
d0ac1c44
SM
3# Generated by GNU Autoconf 2.69.
4#
5#
6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
81ecdfbb 7#
c906108c
SS
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
81ecdfbb
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
bec39cab 14
81ecdfbb
RW
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18 emulate sh
19 NULLCMD=:
81ecdfbb 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
bec39cab 31fi
bec39cab 32
81ecdfbb
RW
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
bec39cab
AC
79fi
80
81
81ecdfbb
RW
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 90as_myself=
81ecdfbb
RW
91case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94for as_dir in $PATH
95do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100IFS=$as_save_IFS
101
102 ;;
103esac
104# We did not find ourselves, most probably we were run as `sh COMMAND'
105# in which case we are not to be found in the path.
106if test "x$as_myself" = x; then
107 as_myself=$0
108fi
109if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112fi
113
114# Unset variables that we do not need and which cause bugs (e.g. in
115# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116# suppresses any "Segmentation fault" message there. '((' could
117# trigger a bug in pdksh 5.2.14.
118for as_var in BASH_ENV ENV MAIL MAILPATH
119do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121done
bec39cab
AC
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
81ecdfbb
RW
127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export LANGUAGE
131
132# CDPATH.
133(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
d0ac1c44
SM
135# Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140# neutralization value for shells without unset; and this also
141# works around shells that cannot unset nonexistent variables.
142# Preserve -v and -x to the replacement shell.
143BASH_ENV=/dev/null
144ENV=/dev/null
145(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151esac
152exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153# Admittedly, this is quite paranoid, since all the known shells bail
154# out after a failed `exec'.
155$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
81ecdfbb
RW
160if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174esac
175fi
176"
177 as_required="as_fn_return () { (exit \$1); }
178as_fn_success () { as_fn_return 0; }
179as_fn_failure () { as_fn_return 1; }
180as_fn_ret_success () { return 0; }
181as_fn_ret_failure () { return 1; }
182
183exitcode=0
184as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190else
191 exitcode=1; echo positional parameters were not saved.
192fi
d0ac1c44
SM
193test x\$exitcode = x0 || exit 1
194test -x / || exit 1"
81ecdfbb
RW
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202else
203 as_have_required=no
204fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209as_found=false
210for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab 211do
81ecdfbb
RW
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225fi
226fi
227 done;;
228 esac
229 as_found=false
230done
231$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 CONFIG_SHELL=$SHELL as_have_required=yes
234fi; }
235IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
d0ac1c44
SM
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241# neutralization value for shells without unset; and this also
242# works around shells that cannot unset nonexistent variables.
243# Preserve -v and -x to the replacement shell.
244BASH_ENV=/dev/null
245ENV=/dev/null
246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252esac
253exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254# Admittedly, this is quite paranoid, since all the known shells bail
255# out after a failed `exec'.
256$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257exit 255
81ecdfbb
RW
258fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
bec39cab 266 else
81ecdfbb
RW
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268$0: including any error possibly output before this
269$0: message. Then install a modern shell, or manually run
270$0: the script under such a shell if you do have one."
bec39cab 271 fi
81ecdfbb
RW
272 exit 1
273fi
274fi
275fi
276SHELL=${CONFIG_SHELL-/bin/sh}
277export SHELL
278# Unset more variables known to interfere with behavior of common tools.
279CLICOLOR_FORCE= GREP_OPTIONS=
280unset CLICOLOR_FORCE GREP_OPTIONS
281
282## --------------------- ##
283## M4sh Shell Functions. ##
284## --------------------- ##
285# as_fn_unset VAR
286# ---------------
287# Portably unset VAR.
288as_fn_unset ()
289{
290 { eval $1=; unset $1;}
291}
292as_unset=as_fn_unset
293
294# as_fn_set_status STATUS
295# -----------------------
296# Set $? to STATUS, without forking.
297as_fn_set_status ()
298{
299 return $1
300} # as_fn_set_status
bec39cab 301
81ecdfbb
RW
302# as_fn_exit STATUS
303# -----------------
304# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305as_fn_exit ()
306{
307 set +e
308 as_fn_set_status $1
309 exit $1
310} # as_fn_exit
311
312# as_fn_mkdir_p
313# -------------
314# Create "$as_dir" as a directory, including parents if necessary.
315as_fn_mkdir_p ()
316{
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334$as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb
RW
356
357
358} # as_fn_mkdir_p
d0ac1c44
SM
359
360# as_fn_executable_p FILE
361# -----------------------
362# Test if FILE is an executable regular file.
363as_fn_executable_p ()
364{
365 test -f "$1" && test -x "$1"
366} # as_fn_executable_p
81ecdfbb
RW
367# as_fn_append VAR VALUE
368# ----------------------
369# Append the text in VALUE to the end of the definition contained in VAR. Take
370# advantage of any shell optimizations that allow amortized linear growth over
371# repeated appends, instead of the typical quadratic growth present in naive
372# implementations.
373if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383fi # as_fn_append
384
385# as_fn_arith ARG...
386# ------------------
387# Perform arithmetic evaluation on the ARGs, and store the result in the
388# global $as_val. Take advantage of shells that can avoid forks. The arguments
389# must be portable across $(()) and expr.
390if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400fi # as_fn_arith
401
402
d0ac1c44
SM
403# as_fn_error STATUS ERROR [LINENO LOG_FD]
404# ----------------------------------------
81ecdfbb
RW
405# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 407# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
408as_fn_error ()
409{
d0ac1c44
SM
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 414 fi
d0ac1c44 415 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
416 as_fn_exit $as_status
417} # as_fn_error
418
419if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
421 as_expr=expr
422else
423 as_expr=false
424fi
425
81ecdfbb 426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
427 as_basename=basename
428else
429 as_basename=false
430fi
431
81ecdfbb
RW
432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434else
435 as_dirname=false
436fi
bec39cab 437
81ecdfbb 438as_me=`$as_basename -- "$0" ||
bec39cab
AC
439$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442$as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
bec39cab 456
b4e70030
JB
457# Avoid depending upon Character Ranges.
458as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461as_cr_digits='0123456789'
462as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 463
bec39cab 464
81ecdfbb
RW
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
bec39cab 474 sed '
81ecdfbb
RW
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
bec39cab 479 N
81ecdfbb
RW
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 482 t loop
81ecdfbb 483 s/-\n.*//
bec39cab 484 ' >$as_me.lineno &&
81ecdfbb
RW
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
bec39cab 487
d0ac1c44
SM
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
bec39cab
AC
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
81ecdfbb
RW
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
bec39cab
AC
496 # Exit status is that of the last command.
497 exit
498}
499
81ecdfbb
RW
500ECHO_C= ECHO_N= ECHO_T=
501case `echo -n x` in #(((((
502-n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509*)
510 ECHO_N='-n';;
bec39cab
AC
511esac
512
81ecdfbb
RW
513rm -f conf$$ conf$$.exe conf$$.file
514if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
bec39cab 516else
81ecdfbb
RW
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
bec39cab 519fi
81ecdfbb
RW
520if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 522 as_ln_s='ln -s'
81ecdfbb
RW
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 526 # In both cases, we have to default to `cp -pR'.
81ecdfbb 527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 528 as_ln_s='cp -pR'
81ecdfbb
RW
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
d0ac1c44 532 as_ln_s='cp -pR'
b4e70030 533 fi
bec39cab 534else
d0ac1c44 535 as_ln_s='cp -pR'
bec39cab 536fi
81ecdfbb
RW
537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538rmdir conf$$.dir 2>/dev/null
bec39cab
AC
539
540if mkdir -p . 2>/dev/null; then
81ecdfbb 541 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
542else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545fi
546
d0ac1c44
SM
547as_test_x='test -x'
548as_executable_p=as_fn_executable_p
bec39cab
AC
549
550# Sed expression to map a string onto a valid CPP name.
551as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553# Sed expression to map a string onto a valid variable name.
554as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
d0ac1c44
SM
557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 6>&1
c906108c 559
bec39cab 560# Name of the host.
d0ac1c44 561# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
bec39cab
AC
562# so uname gets run too.
563ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
bec39cab
AC
565#
566# Initializations.
567#
c906108c 568ac_default_prefix=/usr/local
81ecdfbb 569ac_clean_files=
bec39cab 570ac_config_libobj_dir=.
81ecdfbb 571LIBOBJS=
bec39cab
AC
572cross_compiling=no
573subdirs=
574MFLAGS=
575MAKEFLAGS=
b4e70030 576
bec39cab
AC
577# Identity of this package.
578PACKAGE_NAME=
579PACKAGE_TARNAME=
580PACKAGE_VERSION=
581PACKAGE_STRING=
582PACKAGE_BUGREPORT=
81ecdfbb 583PACKAGE_URL=
bec39cab
AC
584
585ac_unique_file="main.c"
586# Factoring default headers for most tests.
587ac_includes_default="\
588#include <stdio.h>
81ecdfbb 589#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
590# include <sys/types.h>
591#endif
81ecdfbb 592#ifdef HAVE_SYS_STAT_H
bec39cab
AC
593# include <sys/stat.h>
594#endif
81ecdfbb 595#ifdef STDC_HEADERS
bec39cab
AC
596# include <stdlib.h>
597# include <stddef.h>
598#else
81ecdfbb 599# ifdef HAVE_STDLIB_H
bec39cab
AC
600# include <stdlib.h>
601# endif
602#endif
81ecdfbb
RW
603#ifdef HAVE_STRING_H
604# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
605# include <memory.h>
606# endif
607# include <string.h>
608#endif
81ecdfbb 609#ifdef HAVE_STRINGS_H
bec39cab
AC
610# include <strings.h>
611#endif
81ecdfbb 612#ifdef HAVE_INTTYPES_H
bec39cab 613# include <inttypes.h>
bec39cab 614#endif
81ecdfbb
RW
615#ifdef HAVE_STDINT_H
616# include <stdint.h>
617#endif
618#ifdef HAVE_UNISTD_H
bec39cab
AC
619# include <unistd.h>
620#endif"
621
81ecdfbb 622enable_option_checking=no
d0ac1c44 623ac_header_list=
c971b7fa 624ac_subst_vars='LTLIBOBJS
81ecdfbb 625LIBOBJS
b292c783
JK
626GCORE_TRANSFORM_NAME
627GDB_TRANSFORM_NAME
e3487908 628XSLTPROC
a0a461e5 629NM_H
81ecdfbb 630GDB_NM_FILE
ccb1ba62
CB
631LTLIBXXHASH
632LIBXXHASH
633HAVE_LIBXXHASH
393fd4c3
YQ
634LTLIBBABELTRACE
635LIBBABELTRACE
636HAVE_LIBBABELTRACE
21ea5acd
SDJ
637HAVE_NATIVE_GCORE_HOST
638NAT_GENERATED_FILES
639XM_CLIBS
640MH_CFLAGS
641LOADLIBES
642NAT_CDEPS
643NATDEPFILES
644NAT_FILE
81ecdfbb
RW
645target_subdir
646CONFIG_UNINSTALL
647CONFIG_INSTALL
648CONFIG_CLEAN
649CONFIG_ALL
650CONFIG_SRCS
651CONFIG_DEPS
652CONFIG_OBS
653PROFILE_CFLAGS
654ENABLE_CFLAGS
655SIM_OBS
656SIM
657XMKMF
658GDBTK_SRC_DIR
659GDBTK_CFLAGS
660GDBTKLIBS
661X_LIBS
662X_LDFLAGS
663X_CFLAGS
664TK_XINCLUDES
665TK_DEPS
666TK_LIBRARY
667TK_INCLUDE
668TK_STUB_LIB_SPEC
669TK_STUB_LIB_FLAG
670TK_STUB_LIB_FILE
671TK_LIB_SPEC
672TK_LIB_FLAG
673TK_LIB_FILE
674TK_SRC_DIR
675TK_BIN_DIR
676TK_VERSION
677TCL_DEPS
678TCL_LIBRARY
679TCL_INCLUDE
680TCL_STUB_LIB_SPEC
681TCL_STUB_LIB_FLAG
682TCL_STUB_LIB_FILE
683TCL_LIB_SPEC
684TCL_LIB_FLAG
685TCL_LIB_FILE
686TCL_SRC_DIR
687TCL_BIN_DIR
688TCL_PATCH_LEVEL
689TCL_VERSION
690WIN32LDAPP
691GUI_CFLAGS_X
692LIBGUI
608e2dbb
TT
693LTLIBLZMA
694LIBLZMA
695HAVE_LIBLZMA
81ecdfbb
RW
696WIN32LIBS
697SER_HARDWIRE
698WERROR_CFLAGS
699WARN_CFLAGS
700SYSTEM_GDBINIT
81ecdfbb
RW
701TARGET_SYSTEM_ROOT
702CONFIG_LDFLAGS
f6528abd 703RDYNAMIC
81ecdfbb 704ALLOCA
58bfce93
MM
705LTLIBIPT
706LIBIPT
707HAVE_LIBIPT
62f29fda
TT
708SRCHIGH_CFLAGS
709SRCHIGH_LIBS
4df42755
DE
710HAVE_GUILE_FALSE
711HAVE_GUILE_TRUE
ed3ef339
DE
712GUILE_LIBS
713GUILE_CPPFLAGS
e76c5d17
DE
714GUILD_TARGET_FLAG
715GUILD
ed3ef339 716pkg_config_prog_path
4df42755
DE
717HAVE_PYTHON_FALSE
718HAVE_PYTHON_TRUE
ac534cba
JB
719PYTHON_LIBS
720PYTHON_CPPFLAGS
81ecdfbb 721PYTHON_CFLAGS
ec685c5e 722python_prog_path
2400729e
UW
723LTLIBMPFR
724LIBMPFR
725HAVE_LIBMPFR
81ecdfbb
RW
726LTLIBEXPAT
727LIBEXPAT
728HAVE_LIBEXPAT
b8e0a31c 729JIT_READER_DIR
f997c383 730TARGET_PTR
39037522 731READLINE_TEXI_INCFLAG
81ecdfbb
RW
732READLINE_CFLAGS
733READLINE_DEPS
734READLINE
016a3251
DD
735LTLIBICONV
736LIBICONV
711a72d3
L
737zlibinc
738zlibdir
81ecdfbb
RW
739MIG
740WINDRES
741DLLTOOL
c971b7fa 742AR
81ecdfbb
RW
743YFLAGS
744YACC
c971b7fa 745RANLIB
81ecdfbb 746LN_S
c971b7fa
PA
747INSTALL_DATA
748INSTALL_SCRIPT
749INSTALL_PROGRAM
750AWK
81ecdfbb
RW
751REPORT_BUGS_TEXI
752REPORT_BUGS_TO
753PKGVERSION
44cee4fd 754CODESIGN_CERT
b292c783 755HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
756TARGET_OBS
757subdirs
758GDB_DATADIR
759DEBUGDIR
5048e516
JK
760MAKEINFO_EXTRA_FLAGS
761MAKEINFOFLAGS
762MAKEINFO
81ecdfbb 763PACKAGE
81ecdfbb
RW
764CATOBJEXT
765GENCAT
766INSTOBJEXT
767DATADIRNAME
768CATALOGS
769POSUB
770GMSGFMT
771XGETTEXT
772INCINTL
773LIBINTL_DEP
774LIBINTL
775USE_NLS
81ecdfbb
RW
776CCDEPMODE
777DEPDIR
778am__leading_dot
0bcda685
PA
779CXX_DIALECT
780HAVE_CXX11
4869db5e
RM
781INSTALL_STRIP_PROGRAM
782STRIP
783install_sh
81ecdfbb
RW
784target_os
785target_vendor
786target_cpu
787target
788host_os
789host_vendor
790host_cpu
791host
792build_os
793build_vendor
794build_cpu
795build
c971b7fa
PA
796EGREP
797GREP
798CPP
3bc3d82a
PA
799ac_ct_CXX
800CXXFLAGS
801CXX
81ecdfbb
RW
802OBJEXT
803EXEEXT
804ac_ct_CC
805CPPFLAGS
806LDFLAGS
807CFLAGS
808CC
809MAINT
810MAINTAINER_MODE_FALSE
811MAINTAINER_MODE_TRUE
812target_alias
813host_alias
814build_alias
815LIBS
816ECHO_T
817ECHO_N
818ECHO_C
819DEFS
820mandir
821localedir
822libdir
823psdir
824pdfdir
825dvidir
826htmldir
827infodir
828docdir
829oldincludedir
830includedir
831localstatedir
832sharedstatedir
833sysconfdir
834datadir
835datarootdir
836libexecdir
837sbindir
838bindir
839program_transform_name
840prefix
841exec_prefix
842PACKAGE_URL
843PACKAGE_BUGREPORT
844PACKAGE_STRING
845PACKAGE_VERSION
846PACKAGE_TARNAME
847PACKAGE_NAME
848PATH_SEPARATOR
849SHELL'
2b351b19 850ac_subst_files='nat_makefile_frag'
81ecdfbb
RW
851ac_user_opts='
852enable_option_checking
853enable_maintainer_mode
da2f07f1
JK
854enable_plugins
855enable_largefile
81ecdfbb
RW
856with_separate_debug_dir
857with_gdb_datadir
858with_relocated_sources
7349ff92 859with_auto_load_dir
bccbefd2 860with_auto_load_safe_path
81ecdfbb
RW
861enable_targets
862enable_64_bit_bfd
81ecdfbb
RW
863enable_gdbmi
864enable_tui
865enable_gdbtk
05e7c244 866with_libunwind_ia64
81ecdfbb
RW
867with_curses
868enable_profiling
44cee4fd 869enable_codesign
81ecdfbb
RW
870with_pkgversion
871with_bugurl
711a72d3 872with_system_zlib
016a3251
DD
873with_gnu_ld
874enable_rpath
81ecdfbb 875with_libiconv_prefix
478aac75 876with_iconv_bin
81ecdfbb 877with_system_readline
b8e0a31c 878with_jit_reader_dir
81ecdfbb 879with_expat
81ecdfbb 880with_libexpat_prefix
2400729e
UW
881with_mpfr
882with_libmpfr_prefix
81ecdfbb 883with_python
ed3ef339 884with_guile
189b8c2e 885enable_source_highlight
58bfce93
MM
886with_intel_pt
887with_libipt_prefix
81ecdfbb
RW
888with_included_regex
889with_sysroot
890with_system_gdbinit
891enable_werror
892enable_build_warnings
893enable_gdb_build_warnings
f35d5ade 894enable_ubsan
608e2dbb
TT
895with_lzma
896with_liblzma_prefix
81ecdfbb
RW
897with_tcl
898with_tk
899with_x
900enable_sim
496c0e1b 901enable_gdbserver
393fd4c3
YQ
902with_babeltrace
903with_libbabeltrace_prefix
ccb1ba62
CB
904with_xxhash
905with_libxxhash_prefix
8ecfd7bd 906enable_unit_tests
81ecdfbb
RW
907'
908 ac_precious_vars='build_alias
909host_alias
910target_alias
911CC
912CFLAGS
913LDFLAGS
914LIBS
915CPPFLAGS
3bc3d82a
PA
916CXX
917CXXFLAGS
918CCC
81ecdfbb 919CPP
f06e05e0
JK
920MAKEINFO
921MAKEINFOFLAGS
81ecdfbb
RW
922YACC
923YFLAGS
924XMKMF'
5ae98d25 925ac_subdirs_all='testsuite
81ecdfbb 926gdbtk
81ecdfbb 927gdbserver'
c906108c
SS
928
929# Initialize some variables set by options.
bec39cab
AC
930ac_init_help=
931ac_init_version=false
81ecdfbb
RW
932ac_unrecognized_opts=
933ac_unrecognized_sep=
c906108c
SS
934# The variables have the same names as the options, with
935# dashes changed to underlines.
bec39cab 936cache_file=/dev/null
c906108c 937exec_prefix=NONE
c906108c 938no_create=
c906108c
SS
939no_recursion=
940prefix=NONE
941program_prefix=NONE
942program_suffix=NONE
943program_transform_name=s,x,x,
944silent=
945site=
946srcdir=
c906108c
SS
947verbose=
948x_includes=NONE
949x_libraries=NONE
bec39cab
AC
950
951# Installation directory options.
952# These are left unexpanded so users can "make install exec_prefix=/foo"
953# and all the variables that are supposed to be based on exec_prefix
954# by default will actually change.
955# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 956# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
957bindir='${exec_prefix}/bin'
958sbindir='${exec_prefix}/sbin'
959libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
960datarootdir='${prefix}/share'
961datadir='${datarootdir}'
c906108c
SS
962sysconfdir='${prefix}/etc'
963sharedstatedir='${prefix}/com'
964localstatedir='${prefix}/var'
c906108c
SS
965includedir='${prefix}/include'
966oldincludedir='/usr/include'
81ecdfbb
RW
967docdir='${datarootdir}/doc/${PACKAGE}'
968infodir='${datarootdir}/info'
969htmldir='${docdir}'
970dvidir='${docdir}'
971pdfdir='${docdir}'
972psdir='${docdir}'
973libdir='${exec_prefix}/lib'
974localedir='${datarootdir}/locale'
975mandir='${datarootdir}/man'
c906108c 976
c906108c 977ac_prev=
81ecdfbb 978ac_dashdash=
c906108c
SS
979for ac_option
980do
c906108c
SS
981 # If the previous option needs an argument, assign it.
982 if test -n "$ac_prev"; then
81ecdfbb 983 eval $ac_prev=\$ac_option
c906108c
SS
984 ac_prev=
985 continue
986 fi
987
81ecdfbb 988 case $ac_option in
d0ac1c44
SM
989 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
990 *=) ac_optarg= ;;
991 *) ac_optarg=yes ;;
81ecdfbb 992 esac
c906108c
SS
993
994 # Accept the important Cygnus configure options, so we can diagnose typos.
995
81ecdfbb
RW
996 case $ac_dashdash$ac_option in
997 --)
998 ac_dashdash=yes ;;
c906108c
SS
999
1000 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1001 ac_prev=bindir ;;
1002 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 1003 bindir=$ac_optarg ;;
c906108c
SS
1004
1005 -build | --build | --buil | --bui | --bu)
bec39cab 1006 ac_prev=build_alias ;;
c906108c 1007 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1008 build_alias=$ac_optarg ;;
c906108c
SS
1009
1010 -cache-file | --cache-file | --cache-fil | --cache-fi \
1011 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1012 ac_prev=cache_file ;;
1013 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1014 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1015 cache_file=$ac_optarg ;;
1016
1017 --config-cache | -C)
1018 cache_file=config.cache ;;
c906108c 1019
81ecdfbb 1020 -datadir | --datadir | --datadi | --datad)
c906108c 1021 ac_prev=datadir ;;
81ecdfbb 1022 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1023 datadir=$ac_optarg ;;
c906108c 1024
81ecdfbb
RW
1025 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1026 | --dataroo | --dataro | --datar)
1027 ac_prev=datarootdir ;;
1028 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1029 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1030 datarootdir=$ac_optarg ;;
1031
c906108c 1032 -disable-* | --disable-*)
81ecdfbb 1033 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1034 # Reject names that are not valid shell variable names.
81ecdfbb 1035 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1036 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1037 ac_useropt_orig=$ac_useropt
1038 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1039 case $ac_user_opts in
1040 *"
1041"enable_$ac_useropt"
1042"*) ;;
1043 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1044 ac_unrecognized_sep=', ';;
1045 esac
1046 eval enable_$ac_useropt=no ;;
1047
1048 -docdir | --docdir | --docdi | --doc | --do)
1049 ac_prev=docdir ;;
1050 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1051 docdir=$ac_optarg ;;
1052
1053 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1054 ac_prev=dvidir ;;
1055 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1056 dvidir=$ac_optarg ;;
c906108c
SS
1057
1058 -enable-* | --enable-*)
81ecdfbb 1059 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1060 # Reject names that are not valid shell variable names.
81ecdfbb 1061 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1062 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1063 ac_useropt_orig=$ac_useropt
1064 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1065 case $ac_user_opts in
1066 *"
1067"enable_$ac_useropt"
1068"*) ;;
1069 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1070 ac_unrecognized_sep=', ';;
b4e70030 1071 esac
81ecdfbb 1072 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1073
1074 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1075 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1076 | --exec | --exe | --ex)
1077 ac_prev=exec_prefix ;;
1078 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1079 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1080 | --exec=* | --exe=* | --ex=*)
bec39cab 1081 exec_prefix=$ac_optarg ;;
c906108c
SS
1082
1083 -gas | --gas | --ga | --g)
1084 # Obsolete; use --with-gas.
1085 with_gas=yes ;;
1086
bec39cab
AC
1087 -help | --help | --hel | --he | -h)
1088 ac_init_help=long ;;
1089 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1090 ac_init_help=recursive ;;
1091 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1092 ac_init_help=short ;;
c906108c
SS
1093
1094 -host | --host | --hos | --ho)
bec39cab 1095 ac_prev=host_alias ;;
c906108c 1096 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1097 host_alias=$ac_optarg ;;
c906108c 1098
81ecdfbb
RW
1099 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1100 ac_prev=htmldir ;;
1101 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1102 | --ht=*)
1103 htmldir=$ac_optarg ;;
1104
c906108c
SS
1105 -includedir | --includedir | --includedi | --included | --include \
1106 | --includ | --inclu | --incl | --inc)
1107 ac_prev=includedir ;;
1108 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1109 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1110 includedir=$ac_optarg ;;
c906108c
SS
1111
1112 -infodir | --infodir | --infodi | --infod | --info | --inf)
1113 ac_prev=infodir ;;
1114 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1115 infodir=$ac_optarg ;;
c906108c
SS
1116
1117 -libdir | --libdir | --libdi | --libd)
1118 ac_prev=libdir ;;
1119 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1120 libdir=$ac_optarg ;;
c906108c
SS
1121
1122 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1123 | --libexe | --libex | --libe)
1124 ac_prev=libexecdir ;;
1125 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1126 | --libexe=* | --libex=* | --libe=*)
bec39cab 1127 libexecdir=$ac_optarg ;;
c906108c 1128
81ecdfbb
RW
1129 -localedir | --localedir | --localedi | --localed | --locale)
1130 ac_prev=localedir ;;
1131 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1132 localedir=$ac_optarg ;;
1133
c906108c 1134 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1135 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1136 ac_prev=localstatedir ;;
1137 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1138 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1139 localstatedir=$ac_optarg ;;
c906108c
SS
1140
1141 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1142 ac_prev=mandir ;;
1143 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1144 mandir=$ac_optarg ;;
c906108c
SS
1145
1146 -nfp | --nfp | --nf)
1147 # Obsolete; use --without-fp.
1148 with_fp=no ;;
1149
1150 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1151 | --no-cr | --no-c | -n)
c906108c
SS
1152 no_create=yes ;;
1153
1154 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1155 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1156 no_recursion=yes ;;
1157
1158 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1159 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1160 | --oldin | --oldi | --old | --ol | --o)
1161 ac_prev=oldincludedir ;;
1162 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1163 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1164 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1165 oldincludedir=$ac_optarg ;;
c906108c
SS
1166
1167 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1168 ac_prev=prefix ;;
1169 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1170 prefix=$ac_optarg ;;
c906108c
SS
1171
1172 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1173 | --program-pre | --program-pr | --program-p)
1174 ac_prev=program_prefix ;;
1175 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1176 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1177 program_prefix=$ac_optarg ;;
c906108c
SS
1178
1179 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1180 | --program-suf | --program-su | --program-s)
1181 ac_prev=program_suffix ;;
1182 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1183 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1184 program_suffix=$ac_optarg ;;
c906108c
SS
1185
1186 -program-transform-name | --program-transform-name \
1187 | --program-transform-nam | --program-transform-na \
1188 | --program-transform-n | --program-transform- \
1189 | --program-transform | --program-transfor \
1190 | --program-transfo | --program-transf \
1191 | --program-trans | --program-tran \
1192 | --progr-tra | --program-tr | --program-t)
1193 ac_prev=program_transform_name ;;
1194 -program-transform-name=* | --program-transform-name=* \
1195 | --program-transform-nam=* | --program-transform-na=* \
1196 | --program-transform-n=* | --program-transform-=* \
1197 | --program-transform=* | --program-transfor=* \
1198 | --program-transfo=* | --program-transf=* \
1199 | --program-trans=* | --program-tran=* \
1200 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1201 program_transform_name=$ac_optarg ;;
c906108c 1202
81ecdfbb
RW
1203 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1204 ac_prev=pdfdir ;;
1205 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1206 pdfdir=$ac_optarg ;;
1207
1208 -psdir | --psdir | --psdi | --psd | --ps)
1209 ac_prev=psdir ;;
1210 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1211 psdir=$ac_optarg ;;
1212
c906108c
SS
1213 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1214 | -silent | --silent | --silen | --sile | --sil)
1215 silent=yes ;;
1216
1217 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1218 ac_prev=sbindir ;;
1219 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1220 | --sbi=* | --sb=*)
bec39cab 1221 sbindir=$ac_optarg ;;
c906108c
SS
1222
1223 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1224 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1225 | --sharedst | --shareds | --shared | --share | --shar \
1226 | --sha | --sh)
1227 ac_prev=sharedstatedir ;;
1228 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1229 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1230 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1231 | --sha=* | --sh=*)
bec39cab 1232 sharedstatedir=$ac_optarg ;;
c906108c
SS
1233
1234 -site | --site | --sit)
1235 ac_prev=site ;;
1236 -site=* | --site=* | --sit=*)
bec39cab 1237 site=$ac_optarg ;;
3ace7edb 1238
c906108c
SS
1239 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1240 ac_prev=srcdir ;;
1241 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1242 srcdir=$ac_optarg ;;
c906108c
SS
1243
1244 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1245 | --syscon | --sysco | --sysc | --sys | --sy)
1246 ac_prev=sysconfdir ;;
1247 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1248 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1249 sysconfdir=$ac_optarg ;;
c906108c
SS
1250
1251 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1252 ac_prev=target_alias ;;
c906108c 1253 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1254 target_alias=$ac_optarg ;;
c906108c
SS
1255
1256 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1257 verbose=yes ;;
1258
bec39cab
AC
1259 -version | --version | --versio | --versi | --vers | -V)
1260 ac_init_version=: ;;
c906108c
SS
1261
1262 -with-* | --with-*)
81ecdfbb 1263 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1264 # Reject names that are not valid shell variable names.
81ecdfbb 1265 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1266 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1267 ac_useropt_orig=$ac_useropt
1268 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1269 case $ac_user_opts in
1270 *"
1271"with_$ac_useropt"
1272"*) ;;
1273 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1274 ac_unrecognized_sep=', ';;
b4e70030 1275 esac
81ecdfbb 1276 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1277
1278 -without-* | --without-*)
81ecdfbb 1279 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1280 # Reject names that are not valid shell variable names.
81ecdfbb 1281 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1282 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1283 ac_useropt_orig=$ac_useropt
1284 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1285 case $ac_user_opts in
1286 *"
1287"with_$ac_useropt"
1288"*) ;;
1289 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1290 ac_unrecognized_sep=', ';;
1291 esac
1292 eval with_$ac_useropt=no ;;
c906108c
SS
1293
1294 --x)
1295 # Obsolete; use --with-x.
1296 with_x=yes ;;
1297
1298 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1299 | --x-incl | --x-inc | --x-in | --x-i)
1300 ac_prev=x_includes ;;
1301 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1302 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1303 x_includes=$ac_optarg ;;
c906108c
SS
1304
1305 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1306 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1307 ac_prev=x_libraries ;;
1308 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1309 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1310 x_libraries=$ac_optarg ;;
c906108c 1311
d0ac1c44
SM
1312 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1313Try \`$0 --help' for more information"
c906108c
SS
1314 ;;
1315
bec39cab
AC
1316 *=*)
1317 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1318 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1319 case $ac_envvar in #(
1320 '' | [0-9]* | *[!_$as_cr_alnum]* )
d0ac1c44 1321 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
81ecdfbb
RW
1322 esac
1323 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1324 export $ac_envvar ;;
1325
c906108c 1326 *)
bec39cab 1327 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1328 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1329 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1330 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
d0ac1c44 1331 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
c906108c
SS
1332 ;;
1333
1334 esac
1335done
1336
1337if test -n "$ac_prev"; then
bec39cab 1338 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
d0ac1c44 1339 as_fn_error $? "missing argument to $ac_option"
c906108c 1340fi
c906108c 1341
81ecdfbb
RW
1342if test -n "$ac_unrecognized_opts"; then
1343 case $enable_option_checking in
1344 no) ;;
d0ac1c44 1345 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
81ecdfbb 1346 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1347 esac
81ecdfbb 1348fi
b4e70030 1349
81ecdfbb
RW
1350# Check all directory arguments for consistency.
1351for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1352 datadir sysconfdir sharedstatedir localstatedir includedir \
1353 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1354 libdir localedir mandir
b4e70030 1355do
81ecdfbb
RW
1356 eval ac_val=\$$ac_var
1357 # Remove trailing slashes.
1358 case $ac_val in
1359 */ )
1360 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1361 eval $ac_var=\$ac_val;;
1362 esac
1363 # Be sure to have absolute directory names.
b4e70030 1364 case $ac_val in
81ecdfbb
RW
1365 [\\/$]* | ?:[\\/]* ) continue;;
1366 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1367 esac
d0ac1c44 1368 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1369done
1370
bec39cab
AC
1371# There might be people who depend on the old broken behavior: `$host'
1372# used to hold the argument of --host etc.
1373# FIXME: To remove some day.
1374build=$build_alias
1375host=$host_alias
1376target=$target_alias
1377
1378# FIXME: To remove some day.
1379if test "x$host_alias" != x; then
1380 if test "x$build_alias" = x; then
1381 cross_compiling=maybe
bec39cab
AC
1382 elif test "x$build_alias" != "x$host_alias"; then
1383 cross_compiling=yes
1384 fi
1385fi
c906108c 1386
bec39cab
AC
1387ac_tool_prefix=
1388test -n "$host_alias" && ac_tool_prefix=$host_alias-
1389
1390test "$silent" = yes && exec 6>/dev/null
c906108c 1391
c906108c 1392
81ecdfbb
RW
1393ac_pwd=`pwd` && test -n "$ac_pwd" &&
1394ac_ls_di=`ls -di .` &&
1395ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
d0ac1c44 1396 as_fn_error $? "working directory cannot be determined"
81ecdfbb 1397test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
d0ac1c44 1398 as_fn_error $? "pwd does not report name of working directory"
81ecdfbb
RW
1399
1400
c906108c
SS
1401# Find the source files, if location was not specified.
1402if test -z "$srcdir"; then
1403 ac_srcdir_defaulted=yes
81ecdfbb
RW
1404 # Try the directory containing this script, then the parent directory.
1405 ac_confdir=`$as_dirname -- "$as_myself" ||
1406$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1407 X"$as_myself" : 'X\(//\)[^/]' \| \
1408 X"$as_myself" : 'X\(//\)$' \| \
1409 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1410$as_echo X"$as_myself" |
1411 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1412 s//\1/
1413 q
1414 }
1415 /^X\(\/\/\)[^/].*/{
1416 s//\1/
1417 q
1418 }
1419 /^X\(\/\/\)$/{
1420 s//\1/
1421 q
1422 }
1423 /^X\(\/\).*/{
1424 s//\1/
1425 q
1426 }
1427 s/.*/./; q'`
c906108c 1428 srcdir=$ac_confdir
81ecdfbb 1429 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1430 srcdir=..
1431 fi
1432else
1433 ac_srcdir_defaulted=no
1434fi
81ecdfbb
RW
1435if test ! -r "$srcdir/$ac_unique_file"; then
1436 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
d0ac1c44 1437 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
81ecdfbb
RW
1438fi
1439ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1440ac_abs_confdir=`(
d0ac1c44 1441 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
81ecdfbb
RW
1442 pwd)`
1443# When building in place, set srcdir=.
1444if test "$ac_abs_confdir" = "$ac_pwd"; then
1445 srcdir=.
1446fi
1447# Remove unnecessary trailing slashes from srcdir.
1448# Double slashes in file names in object file debugging info
1449# mess up M-x gdb in Emacs.
1450case $srcdir in
1451*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1452esac
1453for ac_var in $ac_precious_vars; do
1454 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1455 eval ac_env_${ac_var}_value=\$${ac_var}
1456 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1457 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1458done
c906108c 1459
bec39cab
AC
1460#
1461# Report the --help message.
1462#
1463if test "$ac_init_help" = "long"; then
1464 # Omit some internal or obsolete options to make the list less imposing.
1465 # This message is too long to be a string in the A/UX 3.1 sh.
1466 cat <<_ACEOF
1467\`configure' configures this package to adapt to many kinds of systems.
1468
1469Usage: $0 [OPTION]... [VAR=VALUE]...
1470
1471To assign environment variables (e.g., CC, CFLAGS...), specify them as
1472VAR=VALUE. See below for descriptions of some of the useful variables.
1473
1474Defaults for the options are specified in brackets.
1475
1476Configuration:
1477 -h, --help display this help and exit
1478 --help=short display options specific to this package
1479 --help=recursive display the short help of all the included packages
1480 -V, --version display version information and exit
d0ac1c44 1481 -q, --quiet, --silent do not print \`checking ...' messages
bec39cab
AC
1482 --cache-file=FILE cache test results in FILE [disabled]
1483 -C, --config-cache alias for \`--cache-file=config.cache'
1484 -n, --no-create do not create output files
1485 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1486
bec39cab
AC
1487Installation directories:
1488 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1489 [$ac_default_prefix]
bec39cab 1490 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1491 [PREFIX]
bec39cab
AC
1492
1493By default, \`make install' will install all the files in
1494\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1495an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1496for instance \`--prefix=\$HOME'.
1497
1498For better control, use the options below.
1499
1500Fine tuning of the installation directories:
81ecdfbb
RW
1501 --bindir=DIR user executables [EPREFIX/bin]
1502 --sbindir=DIR system admin executables [EPREFIX/sbin]
1503 --libexecdir=DIR program executables [EPREFIX/libexec]
1504 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1505 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1506 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1507 --libdir=DIR object code libraries [EPREFIX/lib]
1508 --includedir=DIR C header files [PREFIX/include]
1509 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1510 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1511 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1512 --infodir=DIR info documentation [DATAROOTDIR/info]
1513 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1514 --mandir=DIR man documentation [DATAROOTDIR/man]
1515 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1516 --htmldir=DIR html documentation [DOCDIR]
1517 --dvidir=DIR dvi documentation [DOCDIR]
1518 --pdfdir=DIR pdf documentation [DOCDIR]
1519 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1520_ACEOF
1521
1522 cat <<\_ACEOF
1523
9009e1ae
MR
1524Program names:
1525 --program-prefix=PREFIX prepend PREFIX to installed program names
1526 --program-suffix=SUFFIX append SUFFIX to installed program names
1527 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1528
bec39cab
AC
1529X features:
1530 --x-includes=DIR X include files are in DIR
1531 --x-libraries=DIR X library files are in DIR
1532
1533System types:
1534 --build=BUILD configure for building on BUILD [guessed]
1535 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1536 --target=TARGET configure for building compilers for TARGET [HOST]
1537_ACEOF
1538fi
1539
1540if test -n "$ac_init_help"; then
1541
1542 cat <<\_ACEOF
1543
1544Optional Features:
81ecdfbb 1545 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1546 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1547 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
d0ac1c44
SM
1548 --enable-maintainer-mode
1549 enable make rules and dependencies not useful (and
1550 sometimes confusing) to the casual installer
2974be62 1551 --enable-plugins Enable support for plugins
da2f07f1 1552 --disable-largefile omit support for large files
a1220294
TT
1553 --enable-targets=TARGETS
1554 alternative target configurations
c0993dbe 1555 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1556 --disable-gdbmi disable machine-interface (MI)
1557 --enable-tui enable full-screen terminal user interface (TUI)
1558 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1559 --enable-profiling enable profiling of GDB
44cee4fd 1560 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
3841debe 1561 --disable-rpath do not hardcode runtime library paths
189b8c2e
ST
1562 --enable-source-highlight
1563 enable source-highlight for source listings
a1220294 1564 --enable-werror treat compile warnings as errors
32c1c914 1565 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1566 --enable-gdb-build-warnings
32c1c914 1567 enable GDB specific build-time compiler warnings if
a1220294 1568 gcc is used
f35d5ade 1569 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
32c1c914 1570 --enable-sim link gdb with simulator
496c0e1b
JB
1571 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1572 is auto)
8ecfd7bd
SDJ
1573 --enable-unit-tests Enable the inclusion of unit tests when compiling
1574 GDB
bec39cab
AC
1575
1576Optional Packages:
1577 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1578 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1579 --with-separate-debug-dir=PATH
32c1c914 1580 look for global separate debug info in this path
62e4f60c 1581 [LIBDIR/debug]
b14b1491
TT
1582 --with-gdb-datadir=PATH look for global separate data files in this path
1583 [DATADIR/gdb]
29b0e8a2 1584 --with-relocated-sources=PATH
32c1c914 1585 automatically relocate this path for source files
7349ff92 1586 --with-auto-load-dir=PATH
aff139ff 1587 directories from which to load auto-loaded scripts
1564a261 1588 [$debugdir:$datadir/auto-load]
bccbefd2 1589 --with-auto-load-safe-path=PATH
aff139ff 1590 directories safe to hold auto-loaded files
7349ff92 1591 [--with-auto-load-dir]
bccbefd2
JK
1592 --without-auto-load-safe-path
1593 do not restrict auto-loaded files locations
05e7c244 1594 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1595 --with-curses use the curses library instead of the termcap
1596 library
c16158bc
JM
1597 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1598 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1599 --with-system-zlib use installed libz
016a3251
DD
1600 --with-gnu-ld assume the C compiler uses GNU ld default=no
1601 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1602 --without-libiconv-prefix don't search for libiconv in includedir and libdir
478aac75 1603 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1604 --with-system-readline use installed readline library
b8e0a31c
SD
1605 --with-jit-reader-dir=PATH
1606 directory to load the JIT readers from
5c39566f 1607 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1608 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1609 --without-libexpat-prefix don't search for libexpat in includedir and libdir
2400729e
UW
1610 --with-mpfr include MPFR support (auto/yes/no)
1611 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1612 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
0c4a4063
DE
1613 --with-python[=PYTHON] include python support
1614 (auto/yes/no/<python-program>)
ed3ef339
DE
1615 --with-guile[=GUILE] include guile support
1616 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1617 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1618 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1619 --without-libipt-prefix don't search for libipt in includedir and libdir
a1220294
TT
1620 --without-included-regex
1621 don't use included regex; this is the default on
1622 systems with version 2 of the GNU C library (use
1623 with caution on other system)
81ecdfbb 1624 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1625 --with-system-gdbinit=PATH
32c1c914 1626 automatically load a system-wide gdbinit file
608e2dbb
TT
1627 --with-lzma support lzma compression (auto/yes/no)
1628 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1629 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1630 --with-tcl directory containing tcl configuration (tclConfig.sh)
1631 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1632 --with-x use the X Window System
393fd4c3
YQ
1633 --with-babeltrace include babeltrace support (auto/yes/no)
1634 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1635 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
ccb1ba62
CB
1636 --with-xxhash use libxxhash for hashing (faster) (auto/yes/no)
1637 --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib
1638 --without-libxxhash-prefix don't search for libxxhash in includedir and libdir
bec39cab
AC
1639
1640Some influential environment variables:
1641 CC C compiler command
1642 CFLAGS C compiler flags
1643 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1644 nonstandard directory <lib dir>
81ecdfbb 1645 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 1646 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
81ecdfbb 1647 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1648 CXX C++ compiler command
1649 CXXFLAGS C++ compiler flags
bec39cab 1650 CPP C preprocessor
f06e05e0
JK
1651 MAKEINFO Parent configure detects if it is of sufficient version.
1652 MAKEINFOFLAGS
1653 Parameters for MAKEINFO.
d0ac1c44
SM
1654 YACC The `Yet Another Compiler Compiler' implementation to use.
1655 Defaults to the first program found out of: `bison -y', `byacc',
1656 `yacc'.
81ecdfbb
RW
1657 YFLAGS The list of arguments that will be passed by default to $YACC.
1658 This script will default YFLAGS to the empty string to avoid a
1659 default value of `-d' given by some make applications.
1660 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1661
1662Use these variables to override the choices made by `configure' or to help
1663it to find libraries and programs with nonstandard names/locations.
1664
81ecdfbb 1665Report bugs to the package provider.
bec39cab 1666_ACEOF
81ecdfbb 1667ac_status=$?
bec39cab
AC
1668fi
1669
1670if test "$ac_init_help" = "recursive"; then
1671 # If there are subdirs, report their specific --help.
bec39cab 1672 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1673 test -d "$ac_dir" ||
1674 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1675 continue
bec39cab
AC
1676 ac_builddir=.
1677
81ecdfbb
RW
1678case "$ac_dir" in
1679.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1680*)
1681 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1682 # A ".." for each directory in $ac_dir_suffix.
1683 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1684 case $ac_top_builddir_sub in
1685 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1686 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1687 esac ;;
1688esac
1689ac_abs_top_builddir=$ac_pwd
1690ac_abs_builddir=$ac_pwd$ac_dir_suffix
1691# for backward compatibility:
1692ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1693
1694case $srcdir in
81ecdfbb 1695 .) # We are building in place.
bec39cab 1696 ac_srcdir=.
81ecdfbb
RW
1697 ac_top_srcdir=$ac_top_builddir_sub
1698 ac_abs_top_srcdir=$ac_pwd ;;
1699 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1700 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1701 ac_top_srcdir=$srcdir
1702 ac_abs_top_srcdir=$srcdir ;;
1703 *) # Relative name.
1704 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1705 ac_top_srcdir=$ac_top_build_prefix$srcdir
1706 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1707esac
81ecdfbb 1708ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1709
81ecdfbb
RW
1710 cd "$ac_dir" || { ac_status=$?; continue; }
1711 # Check for guested configure.
1712 if test -f "$ac_srcdir/configure.gnu"; then
1713 echo &&
1714 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1715 elif test -f "$ac_srcdir/configure"; then
1716 echo &&
1717 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1718 else
81ecdfbb
RW
1719 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1720 fi || ac_status=$?
1721 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1722 done
1723fi
1724
81ecdfbb 1725test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1726if $ac_init_version; then
1727 cat <<\_ACEOF
81ecdfbb 1728configure
d0ac1c44 1729generated by GNU Autoconf 2.69
bec39cab 1730
d0ac1c44 1731Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
1732This configure script is free software; the Free Software Foundation
1733gives unlimited permission to copy, distribute and modify it.
1734_ACEOF
81ecdfbb 1735 exit
bec39cab 1736fi
bec39cab 1737
81ecdfbb
RW
1738## ------------------------ ##
1739## Autoconf initialization. ##
1740## ------------------------ ##
bec39cab 1741
81ecdfbb
RW
1742# ac_fn_c_try_compile LINENO
1743# --------------------------
1744# Try to compile conftest.$ac_ext, and return whether this succeeded.
1745ac_fn_c_try_compile ()
1746{
1747 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1748 rm -f conftest.$ac_objext
1749 if { { ac_try="$ac_compile"
1750case "(($ac_try" in
1751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1752 *) ac_try_echo=$ac_try;;
1753esac
1754eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1755$as_echo "$ac_try_echo"; } >&5
1756 (eval "$ac_compile") 2>conftest.err
1757 ac_status=$?
1758 if test -s conftest.err; then
1759 grep -v '^ *+' conftest.err >conftest.er1
1760 cat conftest.er1 >&5
1761 mv -f conftest.er1 conftest.err
1762 fi
1763 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1764 test $ac_status = 0; } && {
1765 test -z "$ac_c_werror_flag" ||
1766 test ! -s conftest.err
1767 } && test -s conftest.$ac_objext; then :
1768 ac_retval=0
1769else
1770 $as_echo "$as_me: failed program was:" >&5
1771sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1772
81ecdfbb
RW
1773 ac_retval=1
1774fi
d0ac1c44
SM
1775 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1776 as_fn_set_status $ac_retval
81ecdfbb
RW
1777
1778} # ac_fn_c_try_compile
1779
3bc3d82a
PA
1780# ac_fn_cxx_try_compile LINENO
1781# ----------------------------
1782# Try to compile conftest.$ac_ext, and return whether this succeeded.
1783ac_fn_cxx_try_compile ()
1784{
1785 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1786 rm -f conftest.$ac_objext
1787 if { { ac_try="$ac_compile"
1788case "(($ac_try" in
1789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1790 *) ac_try_echo=$ac_try;;
1791esac
1792eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1793$as_echo "$ac_try_echo"; } >&5
1794 (eval "$ac_compile") 2>conftest.err
1795 ac_status=$?
1796 if test -s conftest.err; then
1797 grep -v '^ *+' conftest.err >conftest.er1
1798 cat conftest.er1 >&5
1799 mv -f conftest.er1 conftest.err
1800 fi
1801 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1802 test $ac_status = 0; } && {
1803 test -z "$ac_cxx_werror_flag" ||
1804 test ! -s conftest.err
1805 } && test -s conftest.$ac_objext; then :
1806 ac_retval=0
1807else
1808 $as_echo "$as_me: failed program was:" >&5
1809sed 's/^/| /' conftest.$ac_ext >&5
1810
1811 ac_retval=1
1812fi
d0ac1c44
SM
1813 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1814 as_fn_set_status $ac_retval
3bc3d82a
PA
1815
1816} # ac_fn_cxx_try_compile
1817
81ecdfbb
RW
1818# ac_fn_c_try_cpp LINENO
1819# ----------------------
1820# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1821ac_fn_c_try_cpp ()
bec39cab 1822{
81ecdfbb
RW
1823 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1824 if { { ac_try="$ac_cpp conftest.$ac_ext"
1825case "(($ac_try" in
1826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1827 *) ac_try_echo=$ac_try;;
1828esac
1829eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1830$as_echo "$ac_try_echo"; } >&5
1831 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1832 ac_status=$?
1833 if test -s conftest.err; then
1834 grep -v '^ *+' conftest.err >conftest.er1
1835 cat conftest.er1 >&5
1836 mv -f conftest.er1 conftest.err
1837 fi
1838 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 1839 test $ac_status = 0; } > conftest.i && {
81ecdfbb
RW
1840 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1841 test ! -s conftest.err
1842 }; then :
1843 ac_retval=0
1844else
1845 $as_echo "$as_me: failed program was:" >&5
1846sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1847
81ecdfbb
RW
1848 ac_retval=1
1849fi
d0ac1c44
SM
1850 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1851 as_fn_set_status $ac_retval
bec39cab 1852
81ecdfbb 1853} # ac_fn_c_try_cpp
bec39cab 1854
81ecdfbb
RW
1855# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1856# -------------------------------------------------------
1857# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1858# the include files in INCLUDES and setting the cache variable VAR
1859# accordingly.
1860ac_fn_c_check_header_mongrel ()
1861{
1862 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 1863 if eval \${$3+:} false; then :
81ecdfbb
RW
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1865$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1866if eval \${$3+:} false; then :
81ecdfbb
RW
1867 $as_echo_n "(cached) " >&6
1868fi
1869eval ac_res=\$$3
1870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1871$as_echo "$ac_res" >&6; }
1872else
1873 # Is the header compilable?
1874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1875$as_echo_n "checking $2 usability... " >&6; }
1876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1877/* end confdefs.h. */
1878$4
1879#include <$2>
1880_ACEOF
1881if ac_fn_c_try_compile "$LINENO"; then :
1882 ac_header_compiler=yes
1883else
1884 ac_header_compiler=no
1885fi
1886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1888$as_echo "$ac_header_compiler" >&6; }
bec39cab 1889
81ecdfbb
RW
1890# Is the header present?
1891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1892$as_echo_n "checking $2 presence... " >&6; }
1893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1894/* end confdefs.h. */
1895#include <$2>
1896_ACEOF
1897if ac_fn_c_try_cpp "$LINENO"; then :
1898 ac_header_preproc=yes
1899else
1900 ac_header_preproc=no
1901fi
d0ac1c44 1902rm -f conftest.err conftest.i conftest.$ac_ext
81ecdfbb
RW
1903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1904$as_echo "$ac_header_preproc" >&6; }
bec39cab 1905
81ecdfbb
RW
1906# So? What about this header?
1907case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1908 yes:no: )
1909 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1910$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1911 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1912$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1913 ;;
1914 no:yes:* )
1915 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1916$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1918$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1920$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1922$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1924$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1925 ;;
1926esac
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1928$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1929if eval \${$3+:} false; then :
81ecdfbb
RW
1930 $as_echo_n "(cached) " >&6
1931else
1932 eval "$3=\$ac_header_compiler"
1933fi
1934eval ac_res=\$$3
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1936$as_echo "$ac_res" >&6; }
1937fi
d0ac1c44 1938 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 1939
81ecdfbb 1940} # ac_fn_c_check_header_mongrel
bec39cab 1941
81ecdfbb
RW
1942# ac_fn_c_try_run LINENO
1943# ----------------------
1944# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1945# that executables *can* be run.
1946ac_fn_c_try_run ()
1947{
1948 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1949 if { { ac_try="$ac_link"
1950case "(($ac_try" in
1951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1952 *) ac_try_echo=$ac_try;;
1953esac
1954eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1955$as_echo "$ac_try_echo"; } >&5
1956 (eval "$ac_link") 2>&5
1957 ac_status=$?
1958 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1959 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1960 { { case "(($ac_try" in
1961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1962 *) ac_try_echo=$ac_try;;
1963esac
1964eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1965$as_echo "$ac_try_echo"; } >&5
1966 (eval "$ac_try") 2>&5
1967 ac_status=$?
1968 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1969 test $ac_status = 0; }; }; then :
1970 ac_retval=0
1971else
1972 $as_echo "$as_me: program exited with status $ac_status" >&5
1973 $as_echo "$as_me: failed program was:" >&5
1974sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1975
81ecdfbb
RW
1976 ac_retval=$ac_status
1977fi
1978 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
1979 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1980 as_fn_set_status $ac_retval
bec39cab 1981
81ecdfbb 1982} # ac_fn_c_try_run
bec39cab 1983
81ecdfbb
RW
1984# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1985# -------------------------------------------------------
1986# Tests whether HEADER exists and can be compiled using the include files in
1987# INCLUDES, setting the cache variable VAR accordingly.
1988ac_fn_c_check_header_compile ()
1989{
1990 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1992$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1993if eval \${$3+:} false; then :
81ecdfbb
RW
1994 $as_echo_n "(cached) " >&6
1995else
1996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1997/* end confdefs.h. */
1998$4
1999#include <$2>
bec39cab 2000_ACEOF
81ecdfbb
RW
2001if ac_fn_c_try_compile "$LINENO"; then :
2002 eval "$3=yes"
2003else
2004 eval "$3=no"
2005fi
2006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2007fi
2008eval ac_res=\$$3
2009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2010$as_echo "$ac_res" >&6; }
d0ac1c44 2011 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 2012
81ecdfbb 2013} # ac_fn_c_check_header_compile
bec39cab 2014
2974be62
AM
2015# ac_fn_c_try_link LINENO
2016# -----------------------
2017# Try to link conftest.$ac_ext, and return whether this succeeded.
2018ac_fn_c_try_link ()
2019{
2020 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2021 rm -f conftest.$ac_objext conftest$ac_exeext
2022 if { { ac_try="$ac_link"
2023case "(($ac_try" in
2024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2025 *) ac_try_echo=$ac_try;;
2026esac
2027eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2028$as_echo "$ac_try_echo"; } >&5
2029 (eval "$ac_link") 2>conftest.err
2030 ac_status=$?
2031 if test -s conftest.err; then
2032 grep -v '^ *+' conftest.err >conftest.er1
2033 cat conftest.er1 >&5
2034 mv -f conftest.er1 conftest.err
2035 fi
2036 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2037 test $ac_status = 0; } && {
2038 test -z "$ac_c_werror_flag" ||
2039 test ! -s conftest.err
2040 } && test -s conftest$ac_exeext && {
2041 test "$cross_compiling" = yes ||
d0ac1c44 2042 test -x conftest$ac_exeext
2974be62
AM
2043 }; then :
2044 ac_retval=0
2045else
2046 $as_echo "$as_me: failed program was:" >&5
2047sed 's/^/| /' conftest.$ac_ext >&5
2048
2049 ac_retval=1
2050fi
2051 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2052 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2053 # interfere with the next link command; also delete a directory that is
2054 # left behind by Apple's compiler. We do this before executing the actions.
2055 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2056 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2057 as_fn_set_status $ac_retval
2974be62
AM
2058
2059} # ac_fn_c_try_link
2060
81ecdfbb
RW
2061# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2062# --------------------------------------------
2063# Tries to find the compile-time value of EXPR in a program that includes
2064# INCLUDES, setting VAR accordingly. Returns whether the value could be
2065# computed
2066ac_fn_c_compute_int ()
2067{
2068 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2069 if test "$cross_compiling" = yes; then
2070 # Depending upon the size, compute the lo and hi bounds.
2071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2072/* end confdefs.h. */
2073$4
2074int
2075main ()
2076{
2077static int test_array [1 - 2 * !(($2) >= 0)];
d0ac1c44
SM
2078test_array [0] = 0;
2079return test_array [0];
bec39cab 2080
81ecdfbb
RW
2081 ;
2082 return 0;
2083}
2084_ACEOF
2085if ac_fn_c_try_compile "$LINENO"; then :
2086 ac_lo=0 ac_mid=0
2087 while :; do
2088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2089/* end confdefs.h. */
2090$4
2091int
2092main ()
2093{
2094static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2095test_array [0] = 0;
2096return test_array [0];
bec39cab 2097
81ecdfbb
RW
2098 ;
2099 return 0;
2100}
2101_ACEOF
2102if ac_fn_c_try_compile "$LINENO"; then :
2103 ac_hi=$ac_mid; break
2104else
2105 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2106 if test $ac_lo -le $ac_mid; then
2107 ac_lo= ac_hi=
2108 break
2109 fi
2110 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2111fi
81ecdfbb
RW
2112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2113 done
c906108c 2114else
81ecdfbb
RW
2115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2116/* end confdefs.h. */
2117$4
2118int
2119main ()
2120{
2121static int test_array [1 - 2 * !(($2) < 0)];
d0ac1c44
SM
2122test_array [0] = 0;
2123return test_array [0];
bec39cab 2124
81ecdfbb
RW
2125 ;
2126 return 0;
2127}
2128_ACEOF
2129if ac_fn_c_try_compile "$LINENO"; then :
2130 ac_hi=-1 ac_mid=-1
2131 while :; do
2132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2133/* end confdefs.h. */
2134$4
2135int
2136main ()
2137{
2138static int test_array [1 - 2 * !(($2) >= $ac_mid)];
d0ac1c44
SM
2139test_array [0] = 0;
2140return test_array [0];
bec39cab 2141
81ecdfbb
RW
2142 ;
2143 return 0;
2144}
2145_ACEOF
2146if ac_fn_c_try_compile "$LINENO"; then :
2147 ac_lo=$ac_mid; break
2148else
2149 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2150 if test $ac_mid -le $ac_hi; then
2151 ac_lo= ac_hi=
2152 break
2153 fi
2154 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2155fi
2156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2157 done
2158else
2159 ac_lo= ac_hi=
2160fi
2161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2162fi
2163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2164# Binary search between lo and hi bounds.
2165while test "x$ac_lo" != "x$ac_hi"; do
2166 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2168/* end confdefs.h. */
2169$4
2170int
2171main ()
2172{
2173static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2174test_array [0] = 0;
2175return test_array [0];
bec39cab 2176
81ecdfbb
RW
2177 ;
2178 return 0;
2179}
2180_ACEOF
2181if ac_fn_c_try_compile "$LINENO"; then :
2182 ac_hi=$ac_mid
2183else
2184 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2185fi
2186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2187done
2188case $ac_lo in #((
2189?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2190'') ac_retval=1 ;;
2191esac
2192 else
2193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2194/* end confdefs.h. */
2195$4
2196static long int longval () { return $2; }
2197static unsigned long int ulongval () { return $2; }
2198#include <stdio.h>
2199#include <stdlib.h>
2200int
2201main ()
2202{
bec39cab 2203
81ecdfbb
RW
2204 FILE *f = fopen ("conftest.val", "w");
2205 if (! f)
2206 return 1;
2207 if (($2) < 0)
2208 {
2209 long int i = longval ();
2210 if (i != ($2))
2211 return 1;
2212 fprintf (f, "%ld", i);
2213 }
2214 else
2215 {
2216 unsigned long int i = ulongval ();
2217 if (i != ($2))
2218 return 1;
2219 fprintf (f, "%lu", i);
2220 }
2221 /* Do not output a trailing newline, as this causes \r\n confusion
2222 on some platforms. */
2223 return ferror (f) || fclose (f) != 0;
bec39cab 2224
81ecdfbb
RW
2225 ;
2226 return 0;
2227}
2228_ACEOF
2229if ac_fn_c_try_run "$LINENO"; then :
2230 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2231else
2232 ac_retval=1
2233fi
2234rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2235 conftest.$ac_objext conftest.beam conftest.$ac_ext
2236rm -f conftest.val
bec39cab 2237
81ecdfbb 2238 fi
d0ac1c44
SM
2239 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2240 as_fn_set_status $ac_retval
bec39cab 2241
81ecdfbb 2242} # ac_fn_c_compute_int
bec39cab 2243
55a8c076
YQ
2244# ac_fn_c_check_func LINENO FUNC VAR
2245# ----------------------------------
2246# Tests whether FUNC exists, setting the cache variable VAR accordingly
2247ac_fn_c_check_func ()
81ecdfbb
RW
2248{
2249 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2251$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2252if eval \${$3+:} false; then :
81ecdfbb
RW
2253 $as_echo_n "(cached) " >&6
2254else
81ecdfbb
RW
2255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2256/* end confdefs.h. */
55a8c076
YQ
2257/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2258 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2259#define $2 innocuous_$2
2260
2261/* System header to define __stub macros and hopefully few prototypes,
2262 which can conflict with char $2 (); below.
2263 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2264 <limits.h> exists even on freestanding compilers. */
2265
2266#ifdef __STDC__
2267# include <limits.h>
2268#else
2269# include <assert.h>
2270#endif
2271
2272#undef $2
2273
2274/* Override any GCC internal prototype to avoid an error.
2275 Use char because int might match the return type of a GCC
2276 builtin and then its argument prototype would still apply. */
2277#ifdef __cplusplus
2278extern "C"
2279#endif
2280char $2 ();
2281/* The GNU C library defines this for functions which it implements
2282 to always fail with ENOSYS. Some functions are actually named
2283 something starting with __ and the normal name is an alias. */
2284#if defined __stub_$2 || defined __stub___$2
2285choke me
2286#endif
2287
2288int
2289main ()
2290{
2291return $2 ();
2292 ;
2293 return 0;
2294}
2295_ACEOF
2296if ac_fn_c_try_link "$LINENO"; then :
2297 eval "$3=yes"
2298else
2299 eval "$3=no"
2300fi
2301rm -f core conftest.err conftest.$ac_objext \
2302 conftest$ac_exeext conftest.$ac_ext
2303fi
2304eval ac_res=\$$3
2305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2306$as_echo "$ac_res" >&6; }
d0ac1c44 2307 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
55a8c076
YQ
2308
2309} # ac_fn_c_check_func
2310
c56ccc05
MM
2311# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2312# ----------------------------------------------------
2313# Tries to find if the field MEMBER exists in type AGGR, after including
2314# INCLUDES, setting cache variable VAR accordingly.
2315ac_fn_c_check_member ()
2316{
2317 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2319$as_echo_n "checking for $2.$3... " >&6; }
d0ac1c44 2320if eval \${$4+:} false; then :
c56ccc05
MM
2321 $as_echo_n "(cached) " >&6
2322else
2323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2324/* end confdefs.h. */
2325$5
2326int
2327main ()
2328{
2329static $2 ac_aggr;
2330if (ac_aggr.$3)
2331return 0;
2332 ;
2333 return 0;
2334}
2335_ACEOF
2336if ac_fn_c_try_compile "$LINENO"; then :
2337 eval "$4=yes"
2338else
2339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2340/* end confdefs.h. */
2341$5
2342int
2343main ()
2344{
2345static $2 ac_aggr;
2346if (sizeof ac_aggr.$3)
2347return 0;
2348 ;
2349 return 0;
2350}
2351_ACEOF
2352if ac_fn_c_try_compile "$LINENO"; then :
2353 eval "$4=yes"
2354else
2355 eval "$4=no"
2356fi
2357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2358fi
2359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2360fi
2361eval ac_res=\$$4
2362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2363$as_echo "$ac_res" >&6; }
d0ac1c44 2364 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
c56ccc05
MM
2365
2366} # ac_fn_c_check_member
2367
07697489
PA
2368# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2369# -------------------------------------------
2370# Tests whether TYPE exists after having included INCLUDES, setting cache
2371# variable VAR accordingly.
2372ac_fn_c_check_type ()
2373{
2374 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2376$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2377if eval \${$3+:} false; then :
07697489
PA
2378 $as_echo_n "(cached) " >&6
2379else
2380 eval "$3=no"
2381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2382/* end confdefs.h. */
2383$4
2384int
2385main ()
2386{
2387if (sizeof ($2))
2388 return 0;
2389 ;
2390 return 0;
2391}
2392_ACEOF
2393if ac_fn_c_try_compile "$LINENO"; then :
2394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2395/* end confdefs.h. */
2396$4
2397int
2398main ()
2399{
2400if (sizeof (($2)))
2401 return 0;
2402 ;
2403 return 0;
2404}
2405_ACEOF
2406if ac_fn_c_try_compile "$LINENO"; then :
2407
2408else
2409 eval "$3=yes"
2410fi
2411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2412fi
2413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2414fi
2415eval ac_res=\$$3
2416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2417$as_echo "$ac_res" >&6; }
d0ac1c44 2418 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
07697489
PA
2419
2420} # ac_fn_c_check_type
2421
d0ac1c44
SM
2422# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2423# ---------------------------------------------
2424# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2425# accordingly.
770d76d7
PA
2426ac_fn_c_check_decl ()
2427{
2428 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2429 as_decl_name=`echo $2|sed 's/ *(.*//'`
2430 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2432$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
d0ac1c44 2433if eval \${$3+:} false; then :
770d76d7
PA
2434 $as_echo_n "(cached) " >&6
2435else
2436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2437/* end confdefs.h. */
2438$4
2439int
2440main ()
2441{
2442#ifndef $as_decl_name
2443#ifdef __cplusplus
2444 (void) $as_decl_use;
2445#else
2446 (void) $as_decl_name;
2447#endif
2448#endif
2449
2450 ;
2451 return 0;
2452}
2453_ACEOF
2454if ac_fn_c_try_compile "$LINENO"; then :
2455 eval "$3=yes"
2456else
2457 eval "$3=no"
2458fi
2459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2460fi
2461eval ac_res=\$$3
2462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2463$as_echo "$ac_res" >&6; }
d0ac1c44 2464 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
770d76d7
PA
2465
2466} # ac_fn_c_check_decl
f35d5ade
TT
2467
2468# ac_fn_cxx_try_link LINENO
2469# -------------------------
2470# Try to link conftest.$ac_ext, and return whether this succeeded.
2471ac_fn_cxx_try_link ()
2472{
2473 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2474 rm -f conftest.$ac_objext conftest$ac_exeext
2475 if { { ac_try="$ac_link"
2476case "(($ac_try" in
2477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2478 *) ac_try_echo=$ac_try;;
2479esac
2480eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2481$as_echo "$ac_try_echo"; } >&5
2482 (eval "$ac_link") 2>conftest.err
2483 ac_status=$?
2484 if test -s conftest.err; then
2485 grep -v '^ *+' conftest.err >conftest.er1
2486 cat conftest.er1 >&5
2487 mv -f conftest.er1 conftest.err
2488 fi
2489 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2490 test $ac_status = 0; } && {
2491 test -z "$ac_cxx_werror_flag" ||
2492 test ! -s conftest.err
2493 } && test -s conftest$ac_exeext && {
2494 test "$cross_compiling" = yes ||
2495 test -x conftest$ac_exeext
2496 }; then :
2497 ac_retval=0
2498else
2499 $as_echo "$as_me: failed program was:" >&5
2500sed 's/^/| /' conftest.$ac_ext >&5
2501
2502 ac_retval=1
2503fi
2504 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2505 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2506 # interfere with the next link command; also delete a directory that is
2507 # left behind by Apple's compiler. We do this before executing the actions.
2508 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2509 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2510 as_fn_set_status $ac_retval
2511
2512} # ac_fn_cxx_try_link
81ecdfbb
RW
2513cat >config.log <<_ACEOF
2514This file contains any messages produced by compilers while
2515running configure, to aid debugging if configure makes a mistake.
d5af19ba 2516
81ecdfbb 2517It was created by $as_me, which was
d0ac1c44 2518generated by GNU Autoconf 2.69. Invocation command line was
b4e70030 2519
81ecdfbb 2520 $ $0 $@
413ccac7 2521
81ecdfbb
RW
2522_ACEOF
2523exec 5>>config.log
2524{
2525cat <<_ASUNAME
2526## --------- ##
2527## Platform. ##
2528## --------- ##
413ccac7 2529
81ecdfbb
RW
2530hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2531uname -m = `(uname -m) 2>/dev/null || echo unknown`
2532uname -r = `(uname -r) 2>/dev/null || echo unknown`
2533uname -s = `(uname -s) 2>/dev/null || echo unknown`
2534uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2535
81ecdfbb
RW
2536/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2537/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2538
81ecdfbb
RW
2539/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2540/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2541/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2542/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2543/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2544/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2545/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2546
81ecdfbb 2547_ASUNAME
bec39cab 2548
bec39cab
AC
2549as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2550for as_dir in $PATH
2551do
2552 IFS=$as_save_IFS
2553 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2554 $as_echo "PATH: $as_dir"
2555 done
2556IFS=$as_save_IFS
bec39cab 2557
81ecdfbb 2558} >&5
bec39cab 2559
81ecdfbb 2560cat >&5 <<_ACEOF
bec39cab 2561
bec39cab 2562
81ecdfbb
RW
2563## ----------- ##
2564## Core tests. ##
2565## ----------- ##
2566
2567_ACEOF
2568
2569
2570# Keep a trace of the command line.
2571# Strip out --no-create and --no-recursion so they do not pile up.
2572# Strip out --silent because we don't want to record it for future runs.
2573# Also quote any args containing shell meta-characters.
2574# Make two passes to allow for proper duplicate-argument suppression.
2575ac_configure_args=
2576ac_configure_args0=
2577ac_configure_args1=
2578ac_must_keep_next=false
2579for ac_pass in 1 2
2580do
2581 for ac_arg
2582 do
2583 case $ac_arg in
2584 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2585 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2586 | -silent | --silent | --silen | --sile | --sil)
2587 continue ;;
2588 *\'*)
2589 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2590 esac
2591 case $ac_pass in
2592 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2593 2)
2594 as_fn_append ac_configure_args1 " '$ac_arg'"
2595 if test $ac_must_keep_next = true; then
2596 ac_must_keep_next=false # Got value, back to normal.
2597 else
2598 case $ac_arg in
2599 *=* | --config-cache | -C | -disable-* | --disable-* \
2600 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2601 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2602 | -with-* | --with-* | -without-* | --without-* | --x)
2603 case "$ac_configure_args0 " in
2604 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2605 esac
2606 ;;
2607 -* ) ac_must_keep_next=true ;;
2608 esac
2609 fi
2610 as_fn_append ac_configure_args " '$ac_arg'"
2611 ;;
2612 esac
2613 done
2614done
2615{ ac_configure_args0=; unset ac_configure_args0;}
2616{ ac_configure_args1=; unset ac_configure_args1;}
2617
2618# When interrupted or exit'd, cleanup temporary files, and complete
2619# config.log. We remove comments because anyway the quotes in there
2620# would cause problems or look ugly.
2621# WARNING: Use '\'' to represent an apostrophe within the trap.
2622# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2623trap 'exit_status=$?
2624 # Save into config.log some information that might help in debugging.
2625 {
2626 echo
2627
d0ac1c44 2628 $as_echo "## ---------------- ##
81ecdfbb 2629## Cache variables. ##
d0ac1c44 2630## ---------------- ##"
81ecdfbb
RW
2631 echo
2632 # The following way of writing the cache mishandles newlines in values,
2633(
2634 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2635 eval ac_val=\$$ac_var
2636 case $ac_val in #(
2637 *${as_nl}*)
2638 case $ac_var in #(
2639 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2640$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2641 esac
2642 case $ac_var in #(
2643 _ | IFS | as_nl) ;; #(
2644 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2645 *) { eval $ac_var=; unset $ac_var;} ;;
2646 esac ;;
2647 esac
2648 done
2649 (set) 2>&1 |
2650 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2651 *${as_nl}ac_space=\ *)
2652 sed -n \
2653 "s/'\''/'\''\\\\'\'''\''/g;
2654 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2655 ;; #(
2656 *)
2657 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2658 ;;
2659 esac |
2660 sort
2661)
2662 echo
2663
d0ac1c44 2664 $as_echo "## ----------------- ##
81ecdfbb 2665## Output variables. ##
d0ac1c44 2666## ----------------- ##"
81ecdfbb
RW
2667 echo
2668 for ac_var in $ac_subst_vars
2669 do
2670 eval ac_val=\$$ac_var
2671 case $ac_val in
2672 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2673 esac
2674 $as_echo "$ac_var='\''$ac_val'\''"
2675 done | sort
2676 echo
2677
2678 if test -n "$ac_subst_files"; then
d0ac1c44 2679 $as_echo "## ------------------- ##
81ecdfbb 2680## File substitutions. ##
d0ac1c44 2681## ------------------- ##"
81ecdfbb
RW
2682 echo
2683 for ac_var in $ac_subst_files
2684 do
2685 eval ac_val=\$$ac_var
2686 case $ac_val in
2687 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2688 esac
2689 $as_echo "$ac_var='\''$ac_val'\''"
2690 done | sort
2691 echo
2692 fi
2693
2694 if test -s confdefs.h; then
d0ac1c44 2695 $as_echo "## ----------- ##
81ecdfbb 2696## confdefs.h. ##
d0ac1c44 2697## ----------- ##"
81ecdfbb
RW
2698 echo
2699 cat confdefs.h
2700 echo
2701 fi
2702 test "$ac_signal" != 0 &&
2703 $as_echo "$as_me: caught signal $ac_signal"
2704 $as_echo "$as_me: exit $exit_status"
2705 } >&5
2706 rm -f core *.core core.conftest.* &&
2707 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2708 exit $exit_status
2709' 0
2710for ac_signal in 1 2 13 15; do
2711 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2712done
2713ac_signal=0
2714
2715# confdefs.h avoids OS command line length limits that DEFS can exceed.
2716rm -f -r conftest* confdefs.h
2717
2718$as_echo "/* confdefs.h */" > confdefs.h
2719
2720# Predefined preprocessor variables.
2721
2722cat >>confdefs.h <<_ACEOF
2723#define PACKAGE_NAME "$PACKAGE_NAME"
2724_ACEOF
2725
2726cat >>confdefs.h <<_ACEOF
2727#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2728_ACEOF
2729
2730cat >>confdefs.h <<_ACEOF
2731#define PACKAGE_VERSION "$PACKAGE_VERSION"
2732_ACEOF
2733
2734cat >>confdefs.h <<_ACEOF
2735#define PACKAGE_STRING "$PACKAGE_STRING"
2736_ACEOF
2737
2738cat >>confdefs.h <<_ACEOF
2739#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2740_ACEOF
2741
2742cat >>confdefs.h <<_ACEOF
2743#define PACKAGE_URL "$PACKAGE_URL"
2744_ACEOF
2745
2746
2747# Let the site file select an alternate cache file if it wants to.
2748# Prefer an explicitly selected file to automatically selected ones.
2749ac_site_file1=NONE
2750ac_site_file2=NONE
2751if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
2752 # We do not want a PATH search for config.site.
2753 case $CONFIG_SITE in #((
2754 -*) ac_site_file1=./$CONFIG_SITE;;
2755 */*) ac_site_file1=$CONFIG_SITE;;
2756 *) ac_site_file1=./$CONFIG_SITE;;
2757 esac
81ecdfbb
RW
2758elif test "x$prefix" != xNONE; then
2759 ac_site_file1=$prefix/share/config.site
2760 ac_site_file2=$prefix/etc/config.site
2761else
2762 ac_site_file1=$ac_default_prefix/share/config.site
2763 ac_site_file2=$ac_default_prefix/etc/config.site
2764fi
2765for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2766do
2767 test "x$ac_site_file" = xNONE && continue
d0ac1c44 2768 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
81ecdfbb
RW
2769 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2770$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2771 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
2772 . "$ac_site_file" \
2773 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2774$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2775as_fn_error $? "failed to load site script $ac_site_file
2776See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
2777 fi
2778done
2779
2780if test -r "$cache_file"; then
d0ac1c44
SM
2781 # Some versions of bash will fail to source /dev/null (special files
2782 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2783 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
81ecdfbb
RW
2784 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2785$as_echo "$as_me: loading cache $cache_file" >&6;}
2786 case $cache_file in
2787 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2788 *) . "./$cache_file";;
2789 esac
2790 fi
2791else
2792 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2793$as_echo "$as_me: creating cache $cache_file" >&6;}
2794 >$cache_file
bec39cab
AC
2795fi
2796
d0ac1c44
SM
2797as_fn_append ac_header_list " stdlib.h"
2798as_fn_append ac_header_list " unistd.h"
2799as_fn_append ac_header_list " sys/param.h"
81ecdfbb
RW
2800# Check that the precious variables saved in the cache have kept the same
2801# value.
2802ac_cache_corrupted=false
2803for ac_var in $ac_precious_vars; do
2804 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2805 eval ac_new_set=\$ac_env_${ac_var}_set
2806 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2807 eval ac_new_val=\$ac_env_${ac_var}_value
2808 case $ac_old_set,$ac_new_set in
2809 set,)
2810 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2811$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2812 ac_cache_corrupted=: ;;
2813 ,set)
2814 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2815$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2816 ac_cache_corrupted=: ;;
2817 ,);;
2818 *)
2819 if test "x$ac_old_val" != "x$ac_new_val"; then
2820 # differences in whitespace do not lead to failure.
2821 ac_old_val_w=`echo x $ac_old_val`
2822 ac_new_val_w=`echo x $ac_new_val`
2823 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2824 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2825$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2826 ac_cache_corrupted=:
2827 else
2828 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2829$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2830 eval $ac_var=\$ac_old_val
2831 fi
2832 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2833$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2834 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2835$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2836 fi;;
2837 esac
2838 # Pass precious variables to config.status.
2839 if test "$ac_new_set" = set; then
2840 case $ac_new_val in
2841 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2842 *) ac_arg=$ac_var=$ac_new_val ;;
2843 esac
2844 case " $ac_configure_args " in
2845 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2846 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2847 esac
2848 fi
2849done
2850if $ac_cache_corrupted; then
2851 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2852$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2853 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2854$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 2855 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
81ecdfbb
RW
2856fi
2857## -------------------- ##
2858## Main body of script. ##
2859## -------------------- ##
2860
2861ac_ext=c
2862ac_cpp='$CPP $CPPFLAGS'
2863ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2864ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2865ac_compiler_gnu=$ac_cv_c_compiler_gnu
2866
2867
2868
2869
2870
2871ac_config_headers="$ac_config_headers config.h:config.in"
2872
2873
2874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2875$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2876 # Check whether --enable-maintainer-mode was given.
2877if test "${enable_maintainer_mode+set}" = set; then :
2878 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2879else
2880 USE_MAINTAINER_MODE=no
2881fi
2882
2883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2884$as_echo "$USE_MAINTAINER_MODE" >&6; }
2885 if test $USE_MAINTAINER_MODE = yes; then
2886 MAINTAINER_MODE_TRUE=
2887 MAINTAINER_MODE_FALSE='#'
2888else
2889 MAINTAINER_MODE_TRUE='#'
2890 MAINTAINER_MODE_FALSE=
2891fi
2892
2893 MAINT=$MAINTAINER_MODE_TRUE
2894
2895
2896
17ef446e 2897# Set the 'development' global.
270c9937 2898. $srcdir/../bfd/development.sh
f5f1cdb6 2899
81ecdfbb
RW
2900ac_ext=c
2901ac_cpp='$CPP $CPPFLAGS'
2902ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2903ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2904ac_compiler_gnu=$ac_cv_c_compiler_gnu
2905if test -n "$ac_tool_prefix"; then
2906 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2907set dummy ${ac_tool_prefix}gcc; ac_word=$2
2908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2909$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2910if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 2911 $as_echo_n "(cached) " >&6
c906108c
SS
2912else
2913 if test -n "$CC"; then
2914 ac_cv_prog_CC="$CC" # Let the user override the test.
2915else
bec39cab
AC
2916as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2917for as_dir in $PATH
2918do
2919 IFS=$as_save_IFS
2920 test -z "$as_dir" && as_dir=.
81ecdfbb 2921 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2922 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2923 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2924 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2925 break 2
2926 fi
2927done
81ecdfbb
RW
2928 done
2929IFS=$as_save_IFS
bec39cab 2930
c906108c
SS
2931fi
2932fi
bec39cab 2933CC=$ac_cv_prog_CC
c906108c 2934if test -n "$CC"; then
81ecdfbb
RW
2935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2936$as_echo "$CC" >&6; }
c906108c 2937else
81ecdfbb
RW
2938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2939$as_echo "no" >&6; }
c906108c
SS
2940fi
2941
81ecdfbb 2942
b4e70030
JB
2943fi
2944if test -z "$ac_cv_prog_CC"; then
2945 ac_ct_CC=$CC
81ecdfbb
RW
2946 # Extract the first word of "gcc", so it can be a program name with args.
2947set dummy gcc; ac_word=$2
2948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2949$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 2950if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 2951 $as_echo_n "(cached) " >&6
b4e70030
JB
2952else
2953 if test -n "$ac_ct_CC"; then
2954 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2955else
2956as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2957for as_dir in $PATH
2958do
2959 IFS=$as_save_IFS
2960 test -z "$as_dir" && as_dir=.
81ecdfbb 2961 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 2962 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
2963 ac_cv_prog_ac_ct_CC="gcc"
2964 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2965 break 2
4e8d927d 2966 fi
b4e70030 2967done
81ecdfbb
RW
2968 done
2969IFS=$as_save_IFS
b4e70030
JB
2970
2971fi
2972fi
2973ac_ct_CC=$ac_cv_prog_ac_ct_CC
2974if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2976$as_echo "$ac_ct_CC" >&6; }
b4e70030 2977else
81ecdfbb
RW
2978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2979$as_echo "no" >&6; }
b4e70030
JB
2980fi
2981
81ecdfbb
RW
2982 if test "x$ac_ct_CC" = x; then
2983 CC=""
2984 else
2985 case $cross_compiling:$ac_tool_warned in
2986yes:)
2987{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2988$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2989ac_tool_warned=yes ;;
2990esac
2991 CC=$ac_ct_CC
2992 fi
b4e70030
JB
2993else
2994 CC="$ac_cv_prog_CC"
2995fi
2996
c906108c 2997if test -z "$CC"; then
81ecdfbb
RW
2998 if test -n "$ac_tool_prefix"; then
2999 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3000set dummy ${ac_tool_prefix}cc; ac_word=$2
3001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3002$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3003if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3004 $as_echo_n "(cached) " >&6
c906108c
SS
3005else
3006 if test -n "$CC"; then
3007 ac_cv_prog_CC="$CC" # Let the user override the test.
3008else
bec39cab
AC
3009as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3010for as_dir in $PATH
3011do
3012 IFS=$as_save_IFS
3013 test -z "$as_dir" && as_dir=.
81ecdfbb 3014 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3015 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3016 ac_cv_prog_CC="${ac_tool_prefix}cc"
3017 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3018 break 2
3019 fi
3020done
81ecdfbb
RW
3021 done
3022IFS=$as_save_IFS
3023
3024fi
3025fi
3026CC=$ac_cv_prog_CC
3027if test -n "$CC"; then
3028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3029$as_echo "$CC" >&6; }
3030else
3031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3032$as_echo "no" >&6; }
3033fi
3034
3035
3036 fi
3037fi
3038if test -z "$CC"; then
3039 # Extract the first word of "cc", so it can be a program name with args.
3040set dummy cc; ac_word=$2
3041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3042$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3043if ${ac_cv_prog_CC+:} false; then :
81ecdfbb
RW
3044 $as_echo_n "(cached) " >&6
3045else
3046 if test -n "$CC"; then
3047 ac_cv_prog_CC="$CC" # Let the user override the test.
3048else
3049 ac_prog_rejected=no
3050as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3051for as_dir in $PATH
3052do
3053 IFS=$as_save_IFS
3054 test -z "$as_dir" && as_dir=.
3055 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3056 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3057 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3058 ac_prog_rejected=yes
3059 continue
3060 fi
3061 ac_cv_prog_CC="cc"
3062 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3063 break 2
3064 fi
3065done
3066 done
3067IFS=$as_save_IFS
bec39cab 3068
c906108c
SS
3069if test $ac_prog_rejected = yes; then
3070 # We found a bogon in the path, so make sure we never use it.
3071 set dummy $ac_cv_prog_CC
3072 shift
bec39cab 3073 if test $# != 0; then
c906108c
SS
3074 # We chose a different compiler from the bogus one.
3075 # However, it has the same basename, so the bogon will be chosen
3076 # first if we set CC to just the basename; use the full file name.
3077 shift
bec39cab 3078 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3079 fi
3080fi
3081fi
3082fi
bec39cab 3083CC=$ac_cv_prog_CC
c906108c 3084if test -n "$CC"; then
81ecdfbb
RW
3085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3086$as_echo "$CC" >&6; }
c906108c 3087else
81ecdfbb
RW
3088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3089$as_echo "no" >&6; }
c906108c
SS
3090fi
3091
81ecdfbb 3092
bec39cab
AC
3093fi
3094if test -z "$CC"; then
3095 if test -n "$ac_tool_prefix"; then
81ecdfbb 3096 for ac_prog in cl.exe
bec39cab
AC
3097 do
3098 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3099set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3101$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3102if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3103 $as_echo_n "(cached) " >&6
c906108c
SS
3104else
3105 if test -n "$CC"; then
3106 ac_cv_prog_CC="$CC" # Let the user override the test.
3107else
bec39cab
AC
3108as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3109for as_dir in $PATH
3110do
3111 IFS=$as_save_IFS
3112 test -z "$as_dir" && as_dir=.
81ecdfbb 3113 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3114 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3115 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3116 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3117 break 2
3118 fi
3119done
81ecdfbb
RW
3120 done
3121IFS=$as_save_IFS
bec39cab 3122
c906108c
SS
3123fi
3124fi
bec39cab 3125CC=$ac_cv_prog_CC
c906108c 3126if test -n "$CC"; then
81ecdfbb
RW
3127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3128$as_echo "$CC" >&6; }
c906108c 3129else
81ecdfbb
RW
3130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3131$as_echo "no" >&6; }
c906108c 3132fi
bec39cab 3133
81ecdfbb 3134
bec39cab
AC
3135 test -n "$CC" && break
3136 done
3137fi
3138if test -z "$CC"; then
3139 ac_ct_CC=$CC
81ecdfbb 3140 for ac_prog in cl.exe
bec39cab
AC
3141do
3142 # Extract the first word of "$ac_prog", so it can be a program name with args.
3143set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3145$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3146if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3147 $as_echo_n "(cached) " >&6
bec39cab
AC
3148else
3149 if test -n "$ac_ct_CC"; then
3150 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3151else
3152as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3153for as_dir in $PATH
3154do
3155 IFS=$as_save_IFS
3156 test -z "$as_dir" && as_dir=.
81ecdfbb 3157 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3158 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3159 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3160 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3161 break 2
c906108c 3162 fi
bec39cab 3163done
81ecdfbb
RW
3164 done
3165IFS=$as_save_IFS
bec39cab
AC
3166
3167fi
3168fi
3169ac_ct_CC=$ac_cv_prog_ac_ct_CC
3170if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3172$as_echo "$ac_ct_CC" >&6; }
bec39cab 3173else
81ecdfbb
RW
3174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3175$as_echo "no" >&6; }
c906108c
SS
3176fi
3177
81ecdfbb 3178
bec39cab
AC
3179 test -n "$ac_ct_CC" && break
3180done
c906108c 3181
81ecdfbb
RW
3182 if test "x$ac_ct_CC" = x; then
3183 CC=""
3184 else
3185 case $cross_compiling:$ac_tool_warned in
3186yes:)
3187{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3188$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3189ac_tool_warned=yes ;;
3190esac
3191 CC=$ac_ct_CC
3192 fi
bec39cab
AC
3193fi
3194
3195fi
3196
3197
81ecdfbb
RW
3198test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3199$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3200as_fn_error $? "no acceptable C compiler found in \$PATH
3201See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3202
3203# Provide some information about the compiler.
81ecdfbb
RW
3204$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3205set X $ac_compile
3206ac_compiler=$2
3207for ac_option in --version -v -V -qversion; do
3208 { { ac_try="$ac_compiler $ac_option >&5"
3209case "(($ac_try" in
3210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3211 *) ac_try_echo=$ac_try;;
3212esac
3213eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3214$as_echo "$ac_try_echo"; } >&5
3215 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3216 ac_status=$?
81ecdfbb
RW
3217 if test -s conftest.err; then
3218 sed '10a\
3219... rest of stderr output deleted ...
3220 10q' conftest.err >conftest.er1
3221 cat conftest.er1 >&5
81ecdfbb 3222 fi
d0ac1c44 3223 rm -f conftest.er1 conftest.err
81ecdfbb
RW
3224 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3225 test $ac_status = 0; }
3226done
bec39cab 3227
81ecdfbb 3228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3229/* end confdefs.h. */
3230
3231int
3232main ()
3233{
3234
3235 ;
3236 return 0;
3237}
3238_ACEOF
3239ac_clean_files_save=$ac_clean_files
d0ac1c44 3240ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
bec39cab
AC
3241# Try to create an executable without -o first, disregard a.out.
3242# It will help us diagnose broken compilers, and finding out an intuition
3243# of exeext.
d0ac1c44
SM
3244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3245$as_echo_n "checking whether the C compiler works... " >&6; }
81ecdfbb
RW
3246ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3247
3248# The possible output files:
3249ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3250
3251ac_rmfiles=
3252for ac_file in $ac_files
3253do
3254 case $ac_file in
3255 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3256 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3257 esac
3258done
3259rm -f $ac_rmfiles
3260
3261if { { ac_try="$ac_link_default"
3262case "(($ac_try" in
3263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3264 *) ac_try_echo=$ac_try;;
3265esac
3266eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3267$as_echo "$ac_try_echo"; } >&5
3268 (eval "$ac_link_default") 2>&5
3269 ac_status=$?
3270 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3271 test $ac_status = 0; }; then :
3272 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3273# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3274# in a Makefile. We should not override ac_cv_exeext if it was cached,
3275# so that the user can short-circuit this test for compilers unknown to
3276# Autoconf.
3277for ac_file in $ac_files ''
bec39cab
AC
3278do
3279 test -f "$ac_file" || continue
3280 case $ac_file in
81ecdfbb 3281 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3282 ;;
3283 [ab].out )
3284 # We found the default executable, but exeext='' is most
3285 # certainly right.
3286 break;;
3287 *.* )
81ecdfbb
RW
3288 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3289 then :; else
3290 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3291 fi
3292 # We set ac_cv_exeext here because the later test for it is not
3293 # safe: cross compilers may not add the suffix if given an `-o'
3294 # argument, so we may need to know it at that point already.
3295 # Even if this section looks crufty: it has the advantage of
3296 # actually working.
b4e70030
JB
3297 break;;
3298 * )
3299 break;;
bec39cab
AC
3300 esac
3301done
81ecdfbb
RW
3302test "$ac_cv_exeext" = no && ac_cv_exeext=
3303
bec39cab 3304else
81ecdfbb
RW
3305 ac_file=''
3306fi
81ecdfbb 3307if test -z "$ac_file"; then :
d0ac1c44
SM
3308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3309$as_echo "no" >&6; }
3310$as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3311sed 's/^/| /' conftest.$ac_ext >&5
3312
81ecdfbb
RW
3313{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3314$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3315as_fn_error 77 "C compiler cannot create executables
3316See \`config.log' for more details" "$LINENO" 5; }
3317else
3318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3319$as_echo "yes" >&6; }
bec39cab 3320fi
d0ac1c44
SM
3321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3322$as_echo_n "checking for C compiler default output file name... " >&6; }
3323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3324$as_echo "$ac_file" >&6; }
b4e70030 3325ac_exeext=$ac_cv_exeext
b4e70030 3326
d0ac1c44 3327rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
b4e70030 3328ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3330$as_echo_n "checking for suffix of executables... " >&6; }
3331if { { ac_try="$ac_link"
3332case "(($ac_try" in
3333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3334 *) ac_try_echo=$ac_try;;
3335esac
3336eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3337$as_echo "$ac_try_echo"; } >&5
3338 (eval "$ac_link") 2>&5
bec39cab 3339 ac_status=$?
81ecdfbb
RW
3340 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3341 test $ac_status = 0; }; then :
b4e70030
JB
3342 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3343# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3344# work properly (i.e., refer to `conftest.exe'), while it won't with
3345# `rm'.
3346for ac_file in conftest.exe conftest conftest.*; do
3347 test -f "$ac_file" || continue
3348 case $ac_file in
81ecdfbb 3349 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3350 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3351 break;;
3352 * ) break;;
3353 esac
3354done
c906108c 3355else
81ecdfbb
RW
3356 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3357$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3358as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3359See \`config.log' for more details" "$LINENO" 5; }
c906108c 3360fi
d0ac1c44 3361rm -f conftest conftest$ac_cv_exeext
81ecdfbb
RW
3362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3363$as_echo "$ac_cv_exeext" >&6; }
c906108c 3364
b4e70030 3365rm -f conftest.$ac_ext
bec39cab
AC
3366EXEEXT=$ac_cv_exeext
3367ac_exeext=$EXEEXT
d0ac1c44
SM
3368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3369/* end confdefs.h. */
3370#include <stdio.h>
3371int
3372main ()
3373{
3374FILE *f = fopen ("conftest.out", "w");
3375 return ferror (f) || fclose (f) != 0;
3376
3377 ;
3378 return 0;
3379}
3380_ACEOF
3381ac_clean_files="$ac_clean_files conftest.out"
3382# Check that the compiler produces executables we can run. If not, either
3383# the compiler is broken, or we cross compile.
3384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3385$as_echo_n "checking whether we are cross compiling... " >&6; }
3386if test "$cross_compiling" != yes; then
3387 { { ac_try="$ac_link"
3388case "(($ac_try" in
3389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3390 *) ac_try_echo=$ac_try;;
3391esac
3392eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3393$as_echo "$ac_try_echo"; } >&5
3394 (eval "$ac_link") 2>&5
3395 ac_status=$?
3396 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3397 test $ac_status = 0; }
3398 if { ac_try='./conftest$ac_cv_exeext'
3399 { { case "(($ac_try" in
3400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3401 *) ac_try_echo=$ac_try;;
3402esac
3403eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3404$as_echo "$ac_try_echo"; } >&5
3405 (eval "$ac_try") 2>&5
3406 ac_status=$?
3407 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3408 test $ac_status = 0; }; }; then
3409 cross_compiling=no
3410 else
3411 if test "$cross_compiling" = maybe; then
3412 cross_compiling=yes
3413 else
3414 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3415$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3416as_fn_error $? "cannot run C compiled programs.
3417If you meant to cross compile, use \`--host'.
3418See \`config.log' for more details" "$LINENO" 5; }
3419 fi
3420 fi
3421fi
3422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3423$as_echo "$cross_compiling" >&6; }
3424
3425rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3426ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3428$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 3429if ${ac_cv_objext+:} false; then :
81ecdfbb 3430 $as_echo_n "(cached) " >&6
bec39cab 3431else
81ecdfbb 3432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3433/* end confdefs.h. */
3434
3435int
3436main ()
3437{
3438
3439 ;
3440 return 0;
3441}
3442_ACEOF
3443rm -f conftest.o conftest.obj
81ecdfbb
RW
3444if { { ac_try="$ac_compile"
3445case "(($ac_try" in
3446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3447 *) ac_try_echo=$ac_try;;
3448esac
3449eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3450$as_echo "$ac_try_echo"; } >&5
3451 (eval "$ac_compile") 2>&5
3452 ac_status=$?
3453 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3454 test $ac_status = 0; }; then :
3455 for ac_file in conftest.o conftest.obj conftest.*; do
3456 test -f "$ac_file" || continue;
bec39cab 3457 case $ac_file in
81ecdfbb 3458 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3459 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3460 break;;
3461 esac
3462done
c906108c 3463else
81ecdfbb 3464 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3465sed 's/^/| /' conftest.$ac_ext >&5
3466
81ecdfbb
RW
3467{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3468$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3469as_fn_error $? "cannot compute suffix of object files: cannot compile
3470See \`config.log' for more details" "$LINENO" 5; }
c906108c 3471fi
b4e70030 3472rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3473fi
81ecdfbb
RW
3474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3475$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3476OBJEXT=$ac_cv_objext
3477ac_objext=$OBJEXT
81ecdfbb
RW
3478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3479$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 3480if ${ac_cv_c_compiler_gnu+:} false; then :
81ecdfbb 3481 $as_echo_n "(cached) " >&6
c906108c 3482else
81ecdfbb 3483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3484/* end confdefs.h. */
3485
3486int
3487main ()
3488{
3489#ifndef __GNUC__
3490 choke me
3491#endif
3492
3493 ;
3494 return 0;
3495}
3496_ACEOF
81ecdfbb 3497if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3498 ac_compiler_gnu=yes
3499else
81ecdfbb 3500 ac_compiler_gnu=no
bec39cab 3501fi
81ecdfbb 3502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3503ac_cv_c_compiler_gnu=$ac_compiler_gnu
3504
3505fi
81ecdfbb
RW
3506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3507$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3508if test $ac_compiler_gnu = yes; then
3509 GCC=yes
3510else
3511 GCC=
3512fi
bec39cab
AC
3513ac_test_CFLAGS=${CFLAGS+set}
3514ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3516$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 3517if ${ac_cv_prog_cc_g+:} false; then :
81ecdfbb 3518 $as_echo_n "(cached) " >&6
bec39cab 3519else
81ecdfbb
RW
3520 ac_save_c_werror_flag=$ac_c_werror_flag
3521 ac_c_werror_flag=yes
3522 ac_cv_prog_cc_g=no
3523 CFLAGS="-g"
3524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3525/* end confdefs.h. */
3526
3527int
3528main ()
3529{
3530
3531 ;
3532 return 0;
3533}
3534_ACEOF
81ecdfbb 3535if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3536 ac_cv_prog_cc_g=yes
3537else
81ecdfbb
RW
3538 CFLAGS=""
3539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3540/* end confdefs.h. */
3541
3542int
3543main ()
3544{
3545
3546 ;
3547 return 0;
3548}
3549_ACEOF
3550if ac_fn_c_try_compile "$LINENO"; then :
3551
3552else
3553 ac_c_werror_flag=$ac_save_c_werror_flag
3554 CFLAGS="-g"
3555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3556/* end confdefs.h. */
3557
3558int
3559main ()
3560{
c906108c 3561
81ecdfbb
RW
3562 ;
3563 return 0;
3564}
3565_ACEOF
3566if ac_fn_c_try_compile "$LINENO"; then :
3567 ac_cv_prog_cc_g=yes
3568fi
3569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3570fi
3571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3572fi
81ecdfbb
RW
3573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3574 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3575fi
81ecdfbb
RW
3576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3577$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3578if test "$ac_test_CFLAGS" = set; then
bec39cab 3579 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3580elif test $ac_cv_prog_cc_g = yes; then
3581 if test "$GCC" = yes; then
3582 CFLAGS="-g -O2"
3583 else
3584 CFLAGS="-g"
3585 fi
3586else
3587 if test "$GCC" = yes; then
3588 CFLAGS="-O2"
3589 else
3590 CFLAGS=
3591 fi
3592fi
81ecdfbb
RW
3593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3594$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
d0ac1c44 3595if ${ac_cv_prog_cc_c89+:} false; then :
81ecdfbb 3596 $as_echo_n "(cached) " >&6
bec39cab 3597else
81ecdfbb 3598 ac_cv_prog_cc_c89=no
bec39cab 3599ac_save_CC=$CC
81ecdfbb 3600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3601/* end confdefs.h. */
c906108c
SS
3602#include <stdarg.h>
3603#include <stdio.h>
d0ac1c44 3604struct stat;
c906108c
SS
3605/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3606struct buf { int x; };
3607FILE * (*rcsopen) (struct buf *, struct stat *, int);
3608static char *e (p, i)
3609 char **p;
3610 int i;
3611{
3612 return p[i];
3613}
3614static char *f (char * (*g) (char **, int), char **p, ...)
3615{
3616 char *s;
3617 va_list v;
3618 va_start (v,p);
3619 s = g (p, va_arg (v,int));
3620 va_end (v);
3621 return s;
3622}
bec39cab
AC
3623
3624/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3625 function prototypes and stuff, but not '\xHH' hex character constants.
3626 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3627 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3628 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3629 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3630 that's true only with -std. */
bec39cab
AC
3631int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3632
81ecdfbb
RW
3633/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3634 inside strings and character constants. */
3635#define FOO(x) 'x'
3636int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3637
c906108c
SS
3638int test (int i, double x);
3639struct s1 {int (*f) (int a);};
3640struct s2 {int (*f) (double a);};
3641int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3642int argc;
3643char **argv;
bec39cab
AC
3644int
3645main ()
3646{
c906108c 3647return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3648 ;
3649 return 0;
3650}
3651_ACEOF
81ecdfbb
RW
3652for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3653 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3654do
3655 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3656 if ac_fn_c_try_compile "$LINENO"; then :
3657 ac_cv_prog_cc_c89=$ac_arg
c906108c 3658fi
81ecdfbb
RW
3659rm -f core conftest.err conftest.$ac_objext
3660 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3661done
81ecdfbb 3662rm -f conftest.$ac_ext
bec39cab 3663CC=$ac_save_CC
c906108c
SS
3664
3665fi
81ecdfbb
RW
3666# AC_CACHE_VAL
3667case "x$ac_cv_prog_cc_c89" in
3668 x)
3669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3670$as_echo "none needed" >&6; } ;;
3671 xno)
3672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3673$as_echo "unsupported" >&6; } ;;
bec39cab 3674 *)
81ecdfbb
RW
3675 CC="$CC $ac_cv_prog_cc_c89"
3676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3677$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3678esac
81ecdfbb 3679if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3680
b4e70030
JB
3681fi
3682
bec39cab
AC
3683ac_ext=c
3684ac_cpp='$CPP $CPPFLAGS'
3685ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3686ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3687ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3688
3bc3d82a
PA
3689ac_ext=cpp
3690ac_cpp='$CXXCPP $CPPFLAGS'
3691ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3692ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3693ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3694if test -z "$CXX"; then
3695 if test -n "$CCC"; then
3696 CXX=$CCC
3697 else
3698 if test -n "$ac_tool_prefix"; then
3699 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3700 do
3701 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3702set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3704$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3705if ${ac_cv_prog_CXX+:} false; then :
3bc3d82a
PA
3706 $as_echo_n "(cached) " >&6
3707else
3708 if test -n "$CXX"; then
3709 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3710else
3711as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3712for as_dir in $PATH
3713do
3714 IFS=$as_save_IFS
3715 test -z "$as_dir" && as_dir=.
3716 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3717 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3718 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3719 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3720 break 2
3721 fi
3722done
3723 done
3724IFS=$as_save_IFS
3725
3726fi
3727fi
3728CXX=$ac_cv_prog_CXX
3729if test -n "$CXX"; then
3730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3731$as_echo "$CXX" >&6; }
3732else
3733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3734$as_echo "no" >&6; }
3735fi
3736
3737
3738 test -n "$CXX" && break
3739 done
3740fi
3741if test -z "$CXX"; then
3742 ac_ct_CXX=$CXX
3743 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3744do
3745 # Extract the first word of "$ac_prog", so it can be a program name with args.
3746set dummy $ac_prog; ac_word=$2
3747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3748$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3749if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3bc3d82a
PA
3750 $as_echo_n "(cached) " >&6
3751else
3752 if test -n "$ac_ct_CXX"; then
3753 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3754else
3755as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3756for as_dir in $PATH
3757do
3758 IFS=$as_save_IFS
3759 test -z "$as_dir" && as_dir=.
3760 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3761 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3762 ac_cv_prog_ac_ct_CXX="$ac_prog"
3763 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3764 break 2
3765 fi
3766done
3767 done
3768IFS=$as_save_IFS
3769
3770fi
3771fi
3772ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3773if test -n "$ac_ct_CXX"; then
3774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3775$as_echo "$ac_ct_CXX" >&6; }
3776else
3777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3778$as_echo "no" >&6; }
3779fi
3780
3781
3782 test -n "$ac_ct_CXX" && break
3783done
3784
3785 if test "x$ac_ct_CXX" = x; then
3786 CXX="g++"
3787 else
3788 case $cross_compiling:$ac_tool_warned in
3789yes:)
3790{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3791$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3792ac_tool_warned=yes ;;
3793esac
3794 CXX=$ac_ct_CXX
3795 fi
3796fi
3797
3798 fi
3799fi
3800# Provide some information about the compiler.
3801$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3802set X $ac_compile
3803ac_compiler=$2
3804for ac_option in --version -v -V -qversion; do
3805 { { ac_try="$ac_compiler $ac_option >&5"
3806case "(($ac_try" in
3807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3808 *) ac_try_echo=$ac_try;;
3809esac
3810eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3811$as_echo "$ac_try_echo"; } >&5
3812 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3813 ac_status=$?
3814 if test -s conftest.err; then
3815 sed '10a\
3816... rest of stderr output deleted ...
3817 10q' conftest.err >conftest.er1
3818 cat conftest.er1 >&5
3bc3d82a 3819 fi
d0ac1c44 3820 rm -f conftest.er1 conftest.err
3bc3d82a
PA
3821 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3822 test $ac_status = 0; }
3823done
3824
3825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3826$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
d0ac1c44 3827if ${ac_cv_cxx_compiler_gnu+:} false; then :
3bc3d82a
PA
3828 $as_echo_n "(cached) " >&6
3829else
3830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3831/* end confdefs.h. */
3832
3833int
3834main ()
3835{
3836#ifndef __GNUC__
3837 choke me
3838#endif
3839
3840 ;
3841 return 0;
3842}
3843_ACEOF
3844if ac_fn_cxx_try_compile "$LINENO"; then :
3845 ac_compiler_gnu=yes
3846else
3847 ac_compiler_gnu=no
3848fi
3849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3850ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3851
3852fi
3853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3854$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3855if test $ac_compiler_gnu = yes; then
3856 GXX=yes
3857else
3858 GXX=
3859fi
3860ac_test_CXXFLAGS=${CXXFLAGS+set}
3861ac_save_CXXFLAGS=$CXXFLAGS
3862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3863$as_echo_n "checking whether $CXX accepts -g... " >&6; }
d0ac1c44 3864if ${ac_cv_prog_cxx_g+:} false; then :
3bc3d82a
PA
3865 $as_echo_n "(cached) " >&6
3866else
3867 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3868 ac_cxx_werror_flag=yes
3869 ac_cv_prog_cxx_g=no
3870 CXXFLAGS="-g"
3871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3872/* end confdefs.h. */
3873
3874int
3875main ()
3876{
3877
3878 ;
3879 return 0;
3880}
3881_ACEOF
3882if ac_fn_cxx_try_compile "$LINENO"; then :
3883 ac_cv_prog_cxx_g=yes
3884else
3885 CXXFLAGS=""
3886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3887/* end confdefs.h. */
3888
3889int
3890main ()
3891{
3892
3893 ;
3894 return 0;
3895}
3896_ACEOF
3897if ac_fn_cxx_try_compile "$LINENO"; then :
3898
3899else
3900 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3901 CXXFLAGS="-g"
3902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3903/* end confdefs.h. */
3904
3905int
3906main ()
3907{
3908
3909 ;
3910 return 0;
3911}
3912_ACEOF
3913if ac_fn_cxx_try_compile "$LINENO"; then :
3914 ac_cv_prog_cxx_g=yes
3915fi
3916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3917fi
3918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3919fi
3920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3921 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3922fi
3923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3924$as_echo "$ac_cv_prog_cxx_g" >&6; }
3925if test "$ac_test_CXXFLAGS" = set; then
3926 CXXFLAGS=$ac_save_CXXFLAGS
3927elif test $ac_cv_prog_cxx_g = yes; then
3928 if test "$GXX" = yes; then
3929 CXXFLAGS="-g -O2"
3930 else
3931 CXXFLAGS="-g"
3932 fi
3933else
3934 if test "$GXX" = yes; then
3935 CXXFLAGS="-O2"
3936 else
3937 CXXFLAGS=
3938 fi
3939fi
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
3945
3946
60ca704f 3947
bec39cab
AC
3948ac_ext=c
3949ac_cpp='$CPP $CPPFLAGS'
3950ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3951ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3952ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3954$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3955# On Suns, sometimes $CPP names a directory.
3956if test -n "$CPP" && test -d "$CPP"; then
3957 CPP=
8bb2c122 3958fi
bec39cab 3959if test -z "$CPP"; then
d0ac1c44 3960 if ${ac_cv_prog_CPP+:} false; then :
81ecdfbb 3961 $as_echo_n "(cached) " >&6
bec39cab
AC
3962else
3963 # Double quotes because CPP needs to be expanded
3964 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3965 do
3966 ac_preproc_ok=false
3967for ac_c_preproc_warn_flag in '' yes
3968do
3969 # Use a header file that comes with gcc, so configuring glibc
3970 # with a fresh cross-compiler works.
3971 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3972 # <limits.h> exists even on freestanding compilers.
3973 # On the NeXT, cc -E runs the code through the compiler's parser,
3974 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3976/* end confdefs.h. */
3977#ifdef __STDC__
3978# include <limits.h>
3979#else
3980# include <assert.h>
3981#endif
3982 Syntax error
3983_ACEOF
81ecdfbb 3984if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3985
81ecdfbb 3986else
bec39cab
AC
3987 # Broken: fails on valid input.
3988continue
3989fi
d0ac1c44 3990rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 3991
81ecdfbb 3992 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3993 # can be detected and how.
81ecdfbb 3994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3995/* end confdefs.h. */
3996#include <ac_nonexistent.h>
3997_ACEOF
81ecdfbb 3998if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3999 # Broken: success on invalid input.
4000continue
8bb2c122 4001else
bec39cab
AC
4002 # Passes both tests.
4003ac_preproc_ok=:
4004break
8bb2c122 4005fi
d0ac1c44 4006rm -f conftest.err conftest.i conftest.$ac_ext
8bb2c122 4007
bec39cab
AC
4008done
4009# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4010rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb 4011if $ac_preproc_ok; then :
bec39cab
AC
4012 break
4013fi
8bb2c122 4014
bec39cab
AC
4015 done
4016 ac_cv_prog_CPP=$CPP
ddc9cd0f 4017
c906108c 4018fi
bec39cab
AC
4019 CPP=$ac_cv_prog_CPP
4020else
4021 ac_cv_prog_CPP=$CPP
c906108c 4022fi
81ecdfbb
RW
4023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4024$as_echo "$CPP" >&6; }
bec39cab
AC
4025ac_preproc_ok=false
4026for ac_c_preproc_warn_flag in '' yes
4027do
4028 # Use a header file that comes with gcc, so configuring glibc
4029 # with a fresh cross-compiler works.
4030 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4031 # <limits.h> exists even on freestanding compilers.
4032 # On the NeXT, cc -E runs the code through the compiler's parser,
4033 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4035/* end confdefs.h. */
4036#ifdef __STDC__
4037# include <limits.h>
4038#else
4039# include <assert.h>
4040#endif
4041 Syntax error
4042_ACEOF
81ecdfbb 4043if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4044
81ecdfbb 4045else
bec39cab
AC
4046 # Broken: fails on valid input.
4047continue
4048fi
d0ac1c44 4049rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4050
81ecdfbb 4051 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4052 # can be detected and how.
81ecdfbb 4053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4054/* end confdefs.h. */
4055#include <ac_nonexistent.h>
4056_ACEOF
81ecdfbb 4057if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4058 # Broken: success on invalid input.
4059continue
c906108c 4060else
bec39cab
AC
4061 # Passes both tests.
4062ac_preproc_ok=:
4063break
c906108c 4064fi
d0ac1c44 4065rm -f conftest.err conftest.i conftest.$ac_ext
c906108c 4066
bec39cab
AC
4067done
4068# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4069rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb
RW
4070if $ac_preproc_ok; then :
4071
c906108c 4072else
81ecdfbb
RW
4073 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4074$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4075as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4076See \`config.log' for more details" "$LINENO" 5; }
c906108c 4077fi
c906108c 4078
bec39cab
AC
4079ac_ext=c
4080ac_cpp='$CPP $CPPFLAGS'
4081ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4082ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4083ac_compiler_gnu=$ac_cv_c_compiler_gnu
4084
4085
81ecdfbb
RW
4086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4087$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 4088if ${ac_cv_path_GREP+:} false; then :
81ecdfbb 4089 $as_echo_n "(cached) " >&6
4e8d927d 4090else
81ecdfbb
RW
4091 if test -z "$GREP"; then
4092 ac_path_GREP_found=false
4093 # Loop through the user's path and test for each of PROGNAME-LIST
4094 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4095for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4096do
4097 IFS=$as_save_IFS
4098 test -z "$as_dir" && as_dir=.
4099 for ac_prog in grep ggrep; do
4100 for ac_exec_ext in '' $ac_executable_extensions; do
4101 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4102 as_fn_executable_p "$ac_path_GREP" || continue
81ecdfbb
RW
4103# Check for GNU ac_path_GREP and select it if it is found.
4104 # Check for GNU $ac_path_GREP
4105case `"$ac_path_GREP" --version 2>&1` in
4106*GNU*)
4107 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4108*)
4109 ac_count=0
4110 $as_echo_n 0123456789 >"conftest.in"
4111 while :
4112 do
4113 cat "conftest.in" "conftest.in" >"conftest.tmp"
4114 mv "conftest.tmp" "conftest.in"
4115 cp "conftest.in" "conftest.nl"
4116 $as_echo 'GREP' >> "conftest.nl"
4117 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4118 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4119 as_fn_arith $ac_count + 1 && ac_count=$as_val
4120 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4121 # Best one so far, save it but keep looking for a better one
4122 ac_cv_path_GREP="$ac_path_GREP"
4123 ac_path_GREP_max=$ac_count
bec39cab 4124 fi
81ecdfbb
RW
4125 # 10*(2^10) chars as input seems more than enough
4126 test $ac_count -gt 10 && break
4127 done
4128 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4129esac
bec39cab 4130
81ecdfbb
RW
4131 $ac_path_GREP_found && break 3
4132 done
4133 done
4134 done
4135IFS=$as_save_IFS
4136 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 4137 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
81ecdfbb 4138 fi
c906108c 4139else
81ecdfbb 4140 ac_cv_path_GREP=$GREP
c906108c 4141fi
c906108c 4142
81ecdfbb
RW
4143fi
4144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4145$as_echo "$ac_cv_path_GREP" >&6; }
4146 GREP="$ac_cv_path_GREP"
c906108c 4147
c906108c 4148
81ecdfbb
RW
4149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4150$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 4151if ${ac_cv_path_EGREP+:} false; then :
81ecdfbb 4152 $as_echo_n "(cached) " >&6
783e057b 4153else
81ecdfbb
RW
4154 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4155 then ac_cv_path_EGREP="$GREP -E"
4156 else
4157 if test -z "$EGREP"; then
4158 ac_path_EGREP_found=false
4159 # Loop through the user's path and test for each of PROGNAME-LIST
4160 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4161for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4162do
4163 IFS=$as_save_IFS
4164 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4165 for ac_prog in egrep; do
4166 for ac_exec_ext in '' $ac_executable_extensions; do
4167 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4168 as_fn_executable_p "$ac_path_EGREP" || continue
81ecdfbb
RW
4169# Check for GNU ac_path_EGREP and select it if it is found.
4170 # Check for GNU $ac_path_EGREP
4171case `"$ac_path_EGREP" --version 2>&1` in
4172*GNU*)
4173 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4174*)
4175 ac_count=0
4176 $as_echo_n 0123456789 >"conftest.in"
4177 while :
4178 do
4179 cat "conftest.in" "conftest.in" >"conftest.tmp"
4180 mv "conftest.tmp" "conftest.in"
4181 cp "conftest.in" "conftest.nl"
4182 $as_echo 'EGREP' >> "conftest.nl"
4183 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4184 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4185 as_fn_arith $ac_count + 1 && ac_count=$as_val
4186 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4187 # Best one so far, save it but keep looking for a better one
4188 ac_cv_path_EGREP="$ac_path_EGREP"
4189 ac_path_EGREP_max=$ac_count
4190 fi
4191 # 10*(2^10) chars as input seems more than enough
4192 test $ac_count -gt 10 && break
4193 done
4194 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4195esac
bec39cab 4196
81ecdfbb
RW
4197 $ac_path_EGREP_found && break 3
4198 done
4199 done
4200 done
4201IFS=$as_save_IFS
4202 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4203 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4204 fi
783e057b 4205else
81ecdfbb 4206 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4207fi
4208
81ecdfbb 4209 fi
783e057b 4210fi
81ecdfbb
RW
4211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4212$as_echo "$ac_cv_path_EGREP" >&6; }
4213 EGREP="$ac_cv_path_EGREP"
4214
783e057b 4215
81ecdfbb
RW
4216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4217$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4218if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 4219 $as_echo_n "(cached) " >&6
783e057b 4220else
81ecdfbb 4221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4222/* end confdefs.h. */
783e057b 4223#include <stdlib.h>
bec39cab 4224#include <stdarg.h>
783e057b
DJ
4225#include <string.h>
4226#include <float.h>
c906108c 4227
bec39cab
AC
4228int
4229main ()
4230{
c906108c 4231
bec39cab
AC
4232 ;
4233 return 0;
4234}
4235_ACEOF
81ecdfbb 4236if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4237 ac_cv_header_stdc=yes
c906108c 4238else
81ecdfbb 4239 ac_cv_header_stdc=no
c906108c 4240fi
81ecdfbb 4241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4242
783e057b
DJ
4243if test $ac_cv_header_stdc = yes; then
4244 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4246/* end confdefs.h. */
4247#include <string.h>
c906108c 4248
783e057b
DJ
4249_ACEOF
4250if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4251 $EGREP "memchr" >/dev/null 2>&1; then :
4252
c906108c 4253else
783e057b 4254 ac_cv_header_stdc=no
c906108c 4255fi
783e057b 4256rm -f conftest*
c906108c
SS
4257
4258fi
4259
783e057b
DJ
4260if test $ac_cv_header_stdc = yes; then
4261 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4263/* end confdefs.h. */
4264#include <stdlib.h>
bec39cab 4265
783e057b
DJ
4266_ACEOF
4267if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4268 $EGREP "free" >/dev/null 2>&1; then :
4269
bec39cab 4270else
783e057b 4271 ac_cv_header_stdc=no
bec39cab 4272fi
783e057b 4273rm -f conftest*
bec39cab
AC
4274
4275fi
bec39cab 4276
783e057b
DJ
4277if test $ac_cv_header_stdc = yes; then
4278 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4279 if test "$cross_compiling" = yes; then :
783e057b 4280 :
bec39cab 4281else
81ecdfbb 4282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4283/* end confdefs.h. */
4284#include <ctype.h>
81ecdfbb 4285#include <stdlib.h>
783e057b
DJ
4286#if ((' ' & 0x0FF) == 0x020)
4287# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4288# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4289#else
4290# define ISLOWER(c) \
4291 (('a' <= (c) && (c) <= 'i') \
4292 || ('j' <= (c) && (c) <= 'r') \
4293 || ('s' <= (c) && (c) <= 'z'))
4294# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4295#endif
4296
4297#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4298int
4299main ()
4300{
4301 int i;
4302 for (i = 0; i < 256; i++)
4303 if (XOR (islower (i), ISLOWER (i))
4304 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4305 return 2;
4306 return 0;
783e057b
DJ
4307}
4308_ACEOF
81ecdfbb 4309if ac_fn_c_try_run "$LINENO"; then :
783e057b 4310
81ecdfbb
RW
4311else
4312 ac_cv_header_stdc=no
783e057b 4313fi
81ecdfbb
RW
4314rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4315 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4316fi
81ecdfbb 4317
783e057b
DJ
4318fi
4319fi
81ecdfbb
RW
4320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4321$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4322if test $ac_cv_header_stdc = yes; then
4323
81ecdfbb 4324$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4325
4326fi
4327
4328# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4329for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4330 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4331do :
4332 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4333ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4334"
d0ac1c44 4335if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
783e057b 4336 cat >>confdefs.h <<_ACEOF
81ecdfbb 4337#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4338_ACEOF
4339
4340fi
4341
4342done
4343
4344
4345
81ecdfbb 4346 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4347if test "x$ac_cv_header_minix_config_h" = xyes; then :
783e057b
DJ
4348 MINIX=yes
4349else
4350 MINIX=
4351fi
4352
4353
4354 if test "$MINIX" = yes; then
4355
81ecdfbb 4356$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4357
4358
81ecdfbb 4359$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4360
4361
81ecdfbb 4362$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4363
4364 fi
4365
4366
81ecdfbb
RW
4367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4368$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4369if ${ac_cv_safe_to_define___extensions__+:} false; then :
81ecdfbb 4370 $as_echo_n "(cached) " >&6
783e057b 4371else
81ecdfbb 4372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4373/* end confdefs.h. */
4374
d0ac1c44
SM
4375# define __EXTENSIONS__ 1
4376 $ac_includes_default
783e057b
DJ
4377int
4378main ()
4379{
4380
4381 ;
4382 return 0;
4383}
4384_ACEOF
81ecdfbb 4385if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4386 ac_cv_safe_to_define___extensions__=yes
4387else
81ecdfbb 4388 ac_cv_safe_to_define___extensions__=no
783e057b 4389fi
81ecdfbb 4390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4391fi
81ecdfbb
RW
4392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4393$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4394 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4395 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4396
81ecdfbb 4397 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4398
81ecdfbb 4399 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4400
81ecdfbb 4401 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4402
81ecdfbb 4403 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4404
4405
c971b7fa
PA
4406ac_aux_dir=
4407for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
d0ac1c44
SM
4408 if test -f "$ac_dir/install-sh"; then
4409 ac_aux_dir=$ac_dir
4410 ac_install_sh="$ac_aux_dir/install-sh -c"
4411 break
4412 elif test -f "$ac_dir/install.sh"; then
4413 ac_aux_dir=$ac_dir
4414 ac_install_sh="$ac_aux_dir/install.sh -c"
4415 break
4416 elif test -f "$ac_dir/shtool"; then
4417 ac_aux_dir=$ac_dir
4418 ac_install_sh="$ac_aux_dir/shtool install -c"
4419 break
4420 fi
c971b7fa
PA
4421done
4422if test -z "$ac_aux_dir"; then
d0ac1c44 4423 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
c971b7fa 4424fi
770d76d7 4425
c971b7fa
PA
4426# These three variables are undocumented and unsupported,
4427# and are intended to be withdrawn in a future Autoconf release.
4428# They can cause serious problems if a builder's source tree is in a directory
4429# whose full name contains unusual characters.
4430ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4431ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4432ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4433
770d76d7 4434
c971b7fa
PA
4435# Make sure we can run config.sub.
4436$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 4437 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4438
c971b7fa
PA
4439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4440$as_echo_n "checking build system type... " >&6; }
d0ac1c44 4441if ${ac_cv_build+:} false; then :
c971b7fa 4442 $as_echo_n "(cached) " >&6
770d76d7 4443else
c971b7fa
PA
4444 ac_build_alias=$build_alias
4445test "x$ac_build_alias" = x &&
4446 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4447test "x$ac_build_alias" = x &&
d0ac1c44 4448 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
c971b7fa 4449ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 4450 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
c971b7fa 4451
770d76d7 4452fi
c971b7fa
PA
4453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4454$as_echo "$ac_cv_build" >&6; }
4455case $ac_cv_build in
4456*-*-*) ;;
d0ac1c44 4457*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4458esac
c971b7fa
PA
4459build=$ac_cv_build
4460ac_save_IFS=$IFS; IFS='-'
4461set x $ac_cv_build
4462shift
4463build_cpu=$1
4464build_vendor=$2
4465shift; shift
4466# Remember, the first character of IFS is used to create $*,
4467# except with old shells:
4468build_os=$*
4469IFS=$ac_save_IFS
4470case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4471
4472
c971b7fa
PA
4473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4474$as_echo_n "checking host system type... " >&6; }
d0ac1c44 4475if ${ac_cv_host+:} false; then :
81ecdfbb
RW
4476 $as_echo_n "(cached) " >&6
4477else
c971b7fa
PA
4478 if test "x$host_alias" = x; then
4479 ac_cv_host=$ac_cv_build
81ecdfbb 4480else
c971b7fa 4481 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 4482 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4483fi
81ecdfbb
RW
4484
4485fi
c971b7fa
PA
4486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4487$as_echo "$ac_cv_host" >&6; }
4488case $ac_cv_host in
4489*-*-*) ;;
d0ac1c44 4490*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4491esac
c971b7fa
PA
4492host=$ac_cv_host
4493ac_save_IFS=$IFS; IFS='-'
4494set x $ac_cv_host
4495shift
4496host_cpu=$1
4497host_vendor=$2
4498shift; shift
4499# Remember, the first character of IFS is used to create $*,
4500# except with old shells:
4501host_os=$*
4502IFS=$ac_save_IFS
4503case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4504
4505
4506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4507$as_echo_n "checking target system type... " >&6; }
d0ac1c44 4508if ${ac_cv_target+:} false; then :
3388710e
JM
4509 $as_echo_n "(cached) " >&6
4510else
4511 if test "x$target_alias" = x; then
4512 ac_cv_target=$ac_cv_host
4513else
4514 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
d0ac1c44 4515 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
3388710e
JM
4516fi
4517
4518fi
4519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4520$as_echo "$ac_cv_target" >&6; }
4521case $ac_cv_target in
4522*-*-*) ;;
d0ac1c44 4523*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
3388710e
JM
4524esac
4525target=$ac_cv_target
4526ac_save_IFS=$IFS; IFS='-'
4527set x $ac_cv_target
4528shift
4529target_cpu=$1
4530target_vendor=$2
4531shift; shift
4532# Remember, the first character of IFS is used to create $*,
4533# except with old shells:
4534target_os=$*
4535IFS=$ac_save_IFS
4536case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4537
4538
4539# The aliases save the names the user supplied, while $host etc.
4540# will get canonicalized.
4541test -n "$target_alias" &&
4542 test "$program_prefix$program_suffix$program_transform_name" = \
4543 NONENONEs,x,x, &&
4544 program_prefix=${target_alias}-
4545
4546# The tests for host and target for $enable_largefile require
4547# canonical names.
4548
4549
81ecdfbb 4550
da2f07f1
JK
4551# As the $enable_largefile decision depends on --enable-plugins we must set it
4552# even in directories otherwise not depending on the $plugins option.
4553
4554
2974be62
AM
4555 maybe_plugins=no
4556 for ac_header in dlfcn.h
4557do :
4558 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4559"
d0ac1c44 4560if test "x$ac_cv_header_dlfcn_h" = xyes; then :
2974be62
AM
4561 cat >>confdefs.h <<_ACEOF
4562#define HAVE_DLFCN_H 1
4563_ACEOF
4564 maybe_plugins=yes
4565fi
4566
4567done
4568
4569 for ac_header in windows.h
4570do :
4571 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4572"
d0ac1c44 4573if test "x$ac_cv_header_windows_h" = xyes; then :
2974be62
AM
4574 cat >>confdefs.h <<_ACEOF
4575#define HAVE_WINDOWS_H 1
4576_ACEOF
4577 maybe_plugins=yes
4578fi
4579
4580done
4581
4582
4583 # Check whether --enable-plugins was given.
da2f07f1
JK
4584if test "${enable_plugins+set}" = set; then :
4585 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4586 no) plugins=no ;;
4587 *) plugins=yes
4588 if test "$maybe_plugins" != "yes" ; then
d0ac1c44 4589 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
2974be62
AM
4590 fi ;;
4591 esac
da2f07f1 4592else
2974be62
AM
4593 plugins=$maybe_plugins
4594
da2f07f1
JK
4595fi
4596
2974be62 4597 if test "$plugins" = "yes"; then
458412c3
TT
4598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4599$as_echo_n "checking for library containing dlsym... " >&6; }
d0ac1c44 4600if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4601 $as_echo_n "(cached) " >&6
4602else
4603 ac_func_search_save_LIBS=$LIBS
4604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4605/* end confdefs.h. */
4606
4607/* Override any GCC internal prototype to avoid an error.
4608 Use char because int might match the return type of a GCC
4609 builtin and then its argument prototype would still apply. */
4610#ifdef __cplusplus
4611extern "C"
4612#endif
458412c3 4613char dlsym ();
2974be62
AM
4614int
4615main ()
4616{
458412c3 4617return dlsym ();
2974be62
AM
4618 ;
4619 return 0;
4620}
4621_ACEOF
4622for ac_lib in '' dl; do
4623 if test -z "$ac_lib"; then
4624 ac_res="none required"
4625 else
4626 ac_res=-l$ac_lib
4627 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4628 fi
4629 if ac_fn_c_try_link "$LINENO"; then :
458412c3 4630 ac_cv_search_dlsym=$ac_res
2974be62
AM
4631fi
4632rm -f core conftest.err conftest.$ac_objext \
4633 conftest$ac_exeext
d0ac1c44 4634 if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4635 break
4636fi
4637done
d0ac1c44 4638if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4639
4640else
458412c3 4641 ac_cv_search_dlsym=no
2974be62
AM
4642fi
4643rm conftest.$ac_ext
4644LIBS=$ac_func_search_save_LIBS
4645fi
458412c3
TT
4646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4647$as_echo "$ac_cv_search_dlsym" >&6; }
4648ac_res=$ac_cv_search_dlsym
2974be62
AM
4649if test "$ac_res" != no; then :
4650 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4651
4652fi
4653
4654 fi
da2f07f1
JK
4655
4656
4657case "${host}" in
4658 sparc-*-solaris*|i[3-7]86-*-solaris*)
4659 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4660 # are mutually exclusive; and without procfs support, the bfd/ elf module
4661 # cannot provide certain routines such as elfcore_write_prpsinfo
4662 # or elfcore_write_prstatus. So unless the user explicitly requested
4663 # large-file support through the --enable-largefile switch, disable
4664 # large-file support in favor of procfs support.
4665 test "${target}" = "${host}" -a "x$plugins" = xno \
4666 && : ${enable_largefile="no"}
4667 ;;
4668esac
4669
4670# Check whether --enable-largefile was given.
4671if test "${enable_largefile+set}" = set; then :
4672 enableval=$enable_largefile;
4673fi
4674
4675if test "$enable_largefile" != no; then
4676
4677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4678$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 4679if ${ac_cv_sys_largefile_CC+:} false; then :
da2f07f1
JK
4680 $as_echo_n "(cached) " >&6
4681else
4682 ac_cv_sys_largefile_CC=no
4683 if test "$GCC" != yes; then
4684 ac_save_CC=$CC
4685 while :; do
4686 # IRIX 6.2 and later do not support large files by default,
4687 # so use the C compiler's -n32 option if that helps.
4688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4689/* end confdefs.h. */
4690#include <sys/types.h>
4691 /* Check that off_t can represent 2**63 - 1 correctly.
4692 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4693 since some C++ compilers masquerading as C compilers
4694 incorrectly reject 9223372036854775807. */
4695#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4696 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4697 && LARGE_OFF_T % 2147483647 == 1)
4698 ? 1 : -1];
4699int
4700main ()
4701{
4702
4703 ;
4704 return 0;
4705}
4706_ACEOF
4707 if ac_fn_c_try_compile "$LINENO"; then :
4708 break
4709fi
4710rm -f core conftest.err conftest.$ac_objext
4711 CC="$CC -n32"
4712 if ac_fn_c_try_compile "$LINENO"; then :
4713 ac_cv_sys_largefile_CC=' -n32'; break
4714fi
4715rm -f core conftest.err conftest.$ac_objext
4716 break
4717 done
4718 CC=$ac_save_CC
4719 rm -f conftest.$ac_ext
4720 fi
4721fi
4722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4723$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4724 if test "$ac_cv_sys_largefile_CC" != no; then
4725 CC=$CC$ac_cv_sys_largefile_CC
4726 fi
4727
4728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4729$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 4730if ${ac_cv_sys_file_offset_bits+:} false; then :
da2f07f1
JK
4731 $as_echo_n "(cached) " >&6
4732else
4733 while :; do
4734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4735/* end confdefs.h. */
4736#include <sys/types.h>
4737 /* Check that off_t can represent 2**63 - 1 correctly.
4738 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4739 since some C++ compilers masquerading as C compilers
4740 incorrectly reject 9223372036854775807. */
4741#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4742 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4743 && LARGE_OFF_T % 2147483647 == 1)
4744 ? 1 : -1];
4745int
4746main ()
4747{
4748
4749 ;
4750 return 0;
4751}
4752_ACEOF
4753if ac_fn_c_try_compile "$LINENO"; then :
4754 ac_cv_sys_file_offset_bits=no; break
4755fi
4756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4758/* end confdefs.h. */
4759#define _FILE_OFFSET_BITS 64
4760#include <sys/types.h>
4761 /* Check that off_t can represent 2**63 - 1 correctly.
4762 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4763 since some C++ compilers masquerading as C compilers
4764 incorrectly reject 9223372036854775807. */
4765#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4766 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4767 && LARGE_OFF_T % 2147483647 == 1)
4768 ? 1 : -1];
4769int
4770main ()
4771{
4772
4773 ;
4774 return 0;
4775}
4776_ACEOF
4777if ac_fn_c_try_compile "$LINENO"; then :
4778 ac_cv_sys_file_offset_bits=64; break
4779fi
4780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4781 ac_cv_sys_file_offset_bits=unknown
4782 break
4783done
4784fi
4785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4786$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4787case $ac_cv_sys_file_offset_bits in #(
4788 no | unknown) ;;
4789 *)
4790cat >>confdefs.h <<_ACEOF
4791#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4792_ACEOF
4793;;
4794esac
4795rm -rf conftest*
4796 if test $ac_cv_sys_file_offset_bits = unknown; then
4797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4798$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 4799if ${ac_cv_sys_large_files+:} false; then :
da2f07f1
JK
4800 $as_echo_n "(cached) " >&6
4801else
4802 while :; do
4803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4804/* end confdefs.h. */
4805#include <sys/types.h>
4806 /* Check that off_t can represent 2**63 - 1 correctly.
4807 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4808 since some C++ compilers masquerading as C compilers
4809 incorrectly reject 9223372036854775807. */
4810#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4811 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4812 && LARGE_OFF_T % 2147483647 == 1)
4813 ? 1 : -1];
4814int
4815main ()
4816{
4817
4818 ;
4819 return 0;
4820}
4821_ACEOF
4822if ac_fn_c_try_compile "$LINENO"; then :
4823 ac_cv_sys_large_files=no; break
4824fi
4825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4827/* end confdefs.h. */
4828#define _LARGE_FILES 1
4829#include <sys/types.h>
4830 /* Check that off_t can represent 2**63 - 1 correctly.
4831 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4832 since some C++ compilers masquerading as C compilers
4833 incorrectly reject 9223372036854775807. */
4834#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4835 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4836 && LARGE_OFF_T % 2147483647 == 1)
4837 ? 1 : -1];
4838int
4839main ()
4840{
4841
4842 ;
4843 return 0;
4844}
4845_ACEOF
4846if ac_fn_c_try_compile "$LINENO"; then :
4847 ac_cv_sys_large_files=1; break
4848fi
4849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4850 ac_cv_sys_large_files=unknown
4851 break
4852done
4853fi
4854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4855$as_echo "$ac_cv_sys_large_files" >&6; }
4856case $ac_cv_sys_large_files in #(
4857 no | unknown) ;;
4858 *)
4859cat >>confdefs.h <<_ACEOF
4860#define _LARGE_FILES $ac_cv_sys_large_files
4861_ACEOF
4862;;
4863esac
4864rm -rf conftest*
4865 fi
d0ac1c44
SM
4866
4867
da2f07f1
JK
4868fi
4869
4870
4871
81ecdfbb
RW
4872
4873
4874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4875$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
d0ac1c44 4876if ${am_cv_prog_cc_stdc+:} false; then :
81ecdfbb
RW
4877 $as_echo_n "(cached) " >&6
4878else
4879 am_cv_prog_cc_stdc=no
4880ac_save_CC="$CC"
4881# Don't try gcc -ansi; that turns off useful extensions and
4882# breaks some systems' header files.
4883# AIX -qlanglvl=ansi
4884# Ultrix and OSF/1 -std1
4885# HP-UX 10.20 and later -Ae
4886# HP-UX older versions -Aa -D_HPUX_SOURCE
4887# SVR4 -Xc -D__EXTENSIONS__
4888for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4889do
783e057b 4890 CC="$ac_save_CC $ac_arg"
81ecdfbb 4891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4892/* end confdefs.h. */
4893#include <stdarg.h>
4894#include <stdio.h>
4895#include <sys/types.h>
4896#include <sys/stat.h>
4897/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4898struct buf { int x; };
4899FILE * (*rcsopen) (struct buf *, struct stat *, int);
4900static char *e (p, i)
4901 char **p;
4902 int i;
4903{
4904 return p[i];
4905}
4906static char *f (char * (*g) (char **, int), char **p, ...)
4907{
4908 char *s;
4909 va_list v;
4910 va_start (v,p);
4911 s = g (p, va_arg (v,int));
4912 va_end (v);
4913 return s;
4914}
4915int test (int i, double x);
4916struct s1 {int (*f) (int a);};
4917struct s2 {int (*f) (double a);};
4918int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4919int argc;
4920char **argv;
4921
4922int
4923main ()
4924{
4925
4926return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4927
4928 ;
4929 return 0;
4930}
4931_ACEOF
81ecdfbb 4932if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4933 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4934fi
81ecdfbb 4935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4936done
4937CC="$ac_save_CC"
4938
4939fi
4940
4941if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4943$as_echo "none needed" >&6; }
783e057b 4944else
81ecdfbb
RW
4945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4946$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4947fi
4948case "x$am_cv_prog_cc_stdc" in
4949 x|xno) ;;
4950 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4951esac
4952
d0ac1c44
SM
4953# Expand $ac_aux_dir to an absolute path.
4954am_aux_dir=`cd "$ac_aux_dir" && pwd`
4869db5e 4955
d0ac1c44 4956if test x"${install_sh+set}" != xset; then
4869db5e
RM
4957 case $am_aux_dir in
4958 *\ * | *\ *)
4959 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4960 *)
4961 install_sh="\${SHELL} $am_aux_dir/install-sh"
4962 esac
4963fi
4964
d0ac1c44
SM
4965# Installed binaries are usually stripped using 'strip' when the user
4966# run "make install-strip". However 'strip' might not be the right
4869db5e 4967# tool to use in cross-compilation environments, therefore Automake
d0ac1c44 4968# will honor the 'STRIP' environment variable to overrule this program.
4869db5e
RM
4969if test "$cross_compiling" != no; then
4970 if test -n "$ac_tool_prefix"; then
4971 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4972set dummy ${ac_tool_prefix}strip; ac_word=$2
4973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4974$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 4975if ${ac_cv_prog_STRIP+:} false; then :
4869db5e
RM
4976 $as_echo_n "(cached) " >&6
4977else
4978 if test -n "$STRIP"; then
4979 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4980else
4981as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4982for as_dir in $PATH
4983do
4984 IFS=$as_save_IFS
4985 test -z "$as_dir" && as_dir=.
4986 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 4987 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
4988 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4989 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4990 break 2
4991 fi
4992done
4993 done
4994IFS=$as_save_IFS
4995
4996fi
4997fi
4998STRIP=$ac_cv_prog_STRIP
4999if test -n "$STRIP"; then
5000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5001$as_echo "$STRIP" >&6; }
5002else
5003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5004$as_echo "no" >&6; }
5005fi
5006
5007
5008fi
5009if test -z "$ac_cv_prog_STRIP"; then
5010 ac_ct_STRIP=$STRIP
5011 # Extract the first word of "strip", so it can be a program name with args.
5012set dummy strip; ac_word=$2
5013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5014$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5015if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4869db5e
RM
5016 $as_echo_n "(cached) " >&6
5017else
5018 if test -n "$ac_ct_STRIP"; then
5019 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5020else
5021as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5022for as_dir in $PATH
5023do
5024 IFS=$as_save_IFS
5025 test -z "$as_dir" && as_dir=.
5026 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5027 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5028 ac_cv_prog_ac_ct_STRIP="strip"
5029 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5030 break 2
5031 fi
5032done
5033 done
5034IFS=$as_save_IFS
5035
5036fi
5037fi
5038ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5039if test -n "$ac_ct_STRIP"; then
5040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5041$as_echo "$ac_ct_STRIP" >&6; }
5042else
5043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5044$as_echo "no" >&6; }
5045fi
5046
5047 if test "x$ac_ct_STRIP" = x; then
5048 STRIP=":"
5049 else
5050 case $cross_compiling:$ac_tool_warned in
5051yes:)
5052{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5053$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5054ac_tool_warned=yes ;;
5055esac
5056 STRIP=$ac_ct_STRIP
5057 fi
5058else
5059 STRIP="$ac_cv_prog_STRIP"
5060fi
5061
5062fi
5063INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5064
783e057b
DJ
5065
5066ac_aux_dir=
81ecdfbb 5067for ac_dir in .. "$srcdir"/..; do
d0ac1c44
SM
5068 if test -f "$ac_dir/install-sh"; then
5069 ac_aux_dir=$ac_dir
5070 ac_install_sh="$ac_aux_dir/install-sh -c"
5071 break
5072 elif test -f "$ac_dir/install.sh"; then
5073 ac_aux_dir=$ac_dir
5074 ac_install_sh="$ac_aux_dir/install.sh -c"
5075 break
5076 elif test -f "$ac_dir/shtool"; then
5077 ac_aux_dir=$ac_dir
5078 ac_install_sh="$ac_aux_dir/shtool install -c"
5079 break
5080 fi
783e057b
DJ
5081done
5082if test -z "$ac_aux_dir"; then
d0ac1c44 5083 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 5084fi
81ecdfbb
RW
5085
5086# These three variables are undocumented and unsupported,
5087# and are intended to be withdrawn in a future Autoconf release.
5088# They can cause serious problems if a builder's source tree is in a directory
5089# whose full name contains unusual characters.
5090ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5091ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5092ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5093
783e057b 5094
783e057b 5095
9009e1ae
MR
5096test "$program_prefix" != NONE &&
5097 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5098# Use a double $ so make ignores it.
5099test "$program_suffix" != NONE &&
5100 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5101# Double any \ or $.
5102# By default was `s,x,x', remove it if useless.
5103ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5104program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5105
81ecdfbb 5106
0bcda685
PA
5107# We require a C++11 compiler. Check if one is available, and if
5108# necessary, set CXX_DIALECT to some -std=xxx switch.
5109
41260ac2 5110 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
0bcda685
PA
5111 ac_ext=cpp
5112ac_cpp='$CXXCPP $CPPFLAGS'
5113ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5114ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5115ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5116 CXX_DIALECT=""
5117 ac_success=no
5118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5119$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
d0ac1c44 5120if ${ax_cv_cxx_compile_cxx11+:} false; then :
0bcda685
PA
5121 $as_echo_n "(cached) " >&6
5122else
5123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5124/* end confdefs.h. */
5125
5126
5127// If the compiler admits that it is not ready for C++11, why torture it?
5128// Hopefully, this will speed up the test.
5129
5130#ifndef __cplusplus
5131
5132#error "This is not a C++ compiler"
5133
5134#elif __cplusplus < 201103L
5135
5136#error "This is not a C++11 compiler"
5137
5138#else
5139
5140namespace cxx11
5141{
5142
5143 namespace test_static_assert
5144 {
5145
5146 template <typename T>
5147 struct check
5148 {
5149 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5150 };
5151
5152 }
5153
5154 namespace test_final_override
5155 {
5156
5157 struct Base
5158 {
5159 virtual void f() {}
5160 };
5161
5162 struct Derived : public Base
5163 {
5164 virtual void f() override {}
5165 };
5166
5167 }
5168
5169 namespace test_double_right_angle_brackets
5170 {
5171
5172 template < typename T >
5173 struct check {};
5174
5175 typedef check<void> single_type;
5176 typedef check<check<void>> double_type;
5177 typedef check<check<check<void>>> triple_type;
5178 typedef check<check<check<check<void>>>> quadruple_type;
5179
5180 }
5181
5182 namespace test_decltype
5183 {
5184
5185 int
5186 f()
5187 {
5188 int a = 1;
5189 decltype(a) b = 2;
5190 return a + b;
5191 }
5192
5193 }
5194
5195 namespace test_type_deduction
5196 {
5197
5198 template < typename T1, typename T2 >
5199 struct is_same
5200 {
5201 static const bool value = false;
5202 };
5203
5204 template < typename T >
5205 struct is_same<T, T>
5206 {
5207 static const bool value = true;
5208 };
5209
5210 template < typename T1, typename T2 >
5211 auto
5212 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5213 {
5214 return a1 + a2;
5215 }
5216
5217 int
5218 test(const int c, volatile int v)
5219 {
5220 static_assert(is_same<int, decltype(0)>::value == true, "");
5221 static_assert(is_same<int, decltype(c)>::value == false, "");
5222 static_assert(is_same<int, decltype(v)>::value == false, "");
5223 auto ac = c;
5224 auto av = v;
5225 auto sumi = ac + av + 'x';
5226 auto sumf = ac + av + 1.0;
5227 static_assert(is_same<int, decltype(ac)>::value == true, "");
5228 static_assert(is_same<int, decltype(av)>::value == true, "");
5229 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5230 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5231 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5232 return (sumf > 0.0) ? sumi : add(c, v);
5233 }
5234
5235 }
5236
5237 namespace test_noexcept
5238 {
5239
5240 int f() { return 0; }
5241 int g() noexcept { return 0; }
5242
5243 static_assert(noexcept(f()) == false, "");
5244 static_assert(noexcept(g()) == true, "");
5245
5246 }
5247
5248 namespace test_constexpr
5249 {
5250
5251 template < typename CharT >
5252 unsigned long constexpr
5253 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5254 {
5255 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5256 }
5257
5258 template < typename CharT >
5259 unsigned long constexpr
5260 strlen_c(const CharT *const s) noexcept
5261 {
5262 return strlen_c_r(s, 0UL);
5263 }
5264
5265 static_assert(strlen_c("") == 0UL, "");
5266 static_assert(strlen_c("1") == 1UL, "");
5267 static_assert(strlen_c("example") == 7UL, "");
5268 static_assert(strlen_c("another\0example") == 7UL, "");
5269
5270 }
5271
5272 namespace test_rvalue_references
5273 {
5274
5275 template < int N >
5276 struct answer
5277 {
5278 static constexpr int value = N;
5279 };
5280
5281 answer<1> f(int&) { return answer<1>(); }
5282 answer<2> f(const int&) { return answer<2>(); }
5283 answer<3> f(int&&) { return answer<3>(); }
5284
5285 void
5286 test()
5287 {
5288 int i = 0;
5289 const int c = 0;
5290 static_assert(decltype(f(i))::value == 1, "");
5291 static_assert(decltype(f(c))::value == 2, "");
5292 static_assert(decltype(f(0))::value == 3, "");
5293 }
5294
5295 }
5296
5297 namespace test_uniform_initialization
5298 {
5299
5300 struct test
5301 {
5302 static const int zero {};
5303 static const int one {1};
5304 };
5305
5306 static_assert(test::zero == 0, "");
5307 static_assert(test::one == 1, "");
5308
5309 }
5310
5311 namespace test_lambdas
5312 {
5313
5314 void
5315 test1()
5316 {
5317 auto lambda1 = [](){};
5318 auto lambda2 = lambda1;
5319 lambda1();
5320 lambda2();
5321 }
5322
5323 int
5324 test2()
5325 {
5326 auto a = [](int i, int j){ return i + j; }(1, 2);
5327 auto b = []() -> int { return '0'; }();
5328 auto c = [=](){ return a + b; }();
5329 auto d = [&](){ return c; }();
5330 auto e = [a, &b](int x) mutable {
5331 const auto identity = [](int y){ return y; };
5332 for (auto i = 0; i < a; ++i)
5333 a += b--;
5334 return x + identity(a + b);
5335 }(0);
5336 return a + b + c + d + e;
5337 }
5338
5339 int
5340 test3()
5341 {
5342 const auto nullary = [](){ return 0; };
5343 const auto unary = [](int x){ return x; };
5344 using nullary_t = decltype(nullary);
5345 using unary_t = decltype(unary);
5346 const auto higher1st = [](nullary_t f){ return f(); };
5347 const auto higher2nd = [unary](nullary_t f1){
5348 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5349 };
5350 return higher1st(nullary) + higher2nd(nullary)(unary);
5351 }
5352
5353 }
5354
5355 namespace test_variadic_templates
5356 {
5357
5358 template <int...>
5359 struct sum;
5360
5361 template <int N0, int... N1toN>
5362 struct sum<N0, N1toN...>
5363 {
5364 static constexpr auto value = N0 + sum<N1toN...>::value;
5365 };
5366
5367 template <>
5368 struct sum<>
5369 {
5370 static constexpr auto value = 0;
5371 };
5372
5373 static_assert(sum<>::value == 0, "");
5374 static_assert(sum<1>::value == 1, "");
5375 static_assert(sum<23>::value == 23, "");
5376 static_assert(sum<1, 2>::value == 3, "");
5377 static_assert(sum<5, 5, 11>::value == 21, "");
5378 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5379
5380 }
5381
5382 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5383 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5384 // because of this.
5385 namespace test_template_alias_sfinae
5386 {
5387
5388 struct foo {};
5389
5390 template<typename T>
5391 using member = typename T::member_type;
5392
5393 template<typename T>
5394 void func(...) {}
5395
5396 template<typename T>
5397 void func(member<T>*) {}
5398
5399 void test();
5400
5401 void test() { func<foo>(0); }
5402
5403 }
5404
5405} // namespace cxx11
5406
5407#endif // __cplusplus >= 201103L
5408
5409
5410
5411_ACEOF
5412if ac_fn_cxx_try_compile "$LINENO"; then :
5413 ax_cv_cxx_compile_cxx11=yes
5414else
5415 ax_cv_cxx_compile_cxx11=no
5416fi
5417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5418fi
5419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5420$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5421 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5422 ac_success=yes
5423 fi
5424
5425 if test x$ac_success = xno; then
41260ac2
SM
5426 for alternative in ${ax_cxx_compile_alternatives}; do
5427 switch="-std=gnu++${alternative}"
0bcda685
PA
5428 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5430$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5431if eval \${$cachevar+:} false; then :
0bcda685
PA
5432 $as_echo_n "(cached) " >&6
5433else
5434 ac_save_CXX="$CXX"
5435 CXX="$CXX $switch"
5436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5437/* end confdefs.h. */
5438
5439
5440// If the compiler admits that it is not ready for C++11, why torture it?
5441// Hopefully, this will speed up the test.
5442
5443#ifndef __cplusplus
5444
5445#error "This is not a C++ compiler"
5446
5447#elif __cplusplus < 201103L
5448
5449#error "This is not a C++11 compiler"
5450
5451#else
5452
5453namespace cxx11
5454{
5455
5456 namespace test_static_assert
5457 {
5458
5459 template <typename T>
5460 struct check
5461 {
5462 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5463 };
5464
5465 }
5466
5467 namespace test_final_override
5468 {
5469
5470 struct Base
5471 {
5472 virtual void f() {}
5473 };
5474
5475 struct Derived : public Base
5476 {
5477 virtual void f() override {}
5478 };
5479
5480 }
5481
5482 namespace test_double_right_angle_brackets
5483 {
5484
5485 template < typename T >
5486 struct check {};
5487
5488 typedef check<void> single_type;
5489 typedef check<check<void>> double_type;
5490 typedef check<check<check<void>>> triple_type;
5491 typedef check<check<check<check<void>>>> quadruple_type;
5492
5493 }
5494
5495 namespace test_decltype
5496 {
5497
5498 int
5499 f()
5500 {
5501 int a = 1;
5502 decltype(a) b = 2;
5503 return a + b;
5504 }
5505
5506 }
5507
5508 namespace test_type_deduction
5509 {
5510
5511 template < typename T1, typename T2 >
5512 struct is_same
5513 {
5514 static const bool value = false;
5515 };
5516
5517 template < typename T >
5518 struct is_same<T, T>
5519 {
5520 static const bool value = true;
5521 };
5522
5523 template < typename T1, typename T2 >
5524 auto
5525 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5526 {
5527 return a1 + a2;
5528 }
5529
5530 int
5531 test(const int c, volatile int v)
5532 {
5533 static_assert(is_same<int, decltype(0)>::value == true, "");
5534 static_assert(is_same<int, decltype(c)>::value == false, "");
5535 static_assert(is_same<int, decltype(v)>::value == false, "");
5536 auto ac = c;
5537 auto av = v;
5538 auto sumi = ac + av + 'x';
5539 auto sumf = ac + av + 1.0;
5540 static_assert(is_same<int, decltype(ac)>::value == true, "");
5541 static_assert(is_same<int, decltype(av)>::value == true, "");
5542 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5543 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5544 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5545 return (sumf > 0.0) ? sumi : add(c, v);
5546 }
5547
5548 }
5549
5550 namespace test_noexcept
5551 {
5552
5553 int f() { return 0; }
5554 int g() noexcept { return 0; }
5555
5556 static_assert(noexcept(f()) == false, "");
5557 static_assert(noexcept(g()) == true, "");
5558
5559 }
5560
5561 namespace test_constexpr
5562 {
5563
5564 template < typename CharT >
5565 unsigned long constexpr
5566 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5567 {
5568 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5569 }
5570
5571 template < typename CharT >
5572 unsigned long constexpr
5573 strlen_c(const CharT *const s) noexcept
5574 {
5575 return strlen_c_r(s, 0UL);
5576 }
5577
5578 static_assert(strlen_c("") == 0UL, "");
5579 static_assert(strlen_c("1") == 1UL, "");
5580 static_assert(strlen_c("example") == 7UL, "");
5581 static_assert(strlen_c("another\0example") == 7UL, "");
5582
5583 }
5584
5585 namespace test_rvalue_references
5586 {
5587
5588 template < int N >
5589 struct answer
5590 {
5591 static constexpr int value = N;
5592 };
5593
5594 answer<1> f(int&) { return answer<1>(); }
5595 answer<2> f(const int&) { return answer<2>(); }
5596 answer<3> f(int&&) { return answer<3>(); }
5597
5598 void
5599 test()
5600 {
5601 int i = 0;
5602 const int c = 0;
5603 static_assert(decltype(f(i))::value == 1, "");
5604 static_assert(decltype(f(c))::value == 2, "");
5605 static_assert(decltype(f(0))::value == 3, "");
5606 }
5607
5608 }
5609
5610 namespace test_uniform_initialization
5611 {
5612
5613 struct test
5614 {
5615 static const int zero {};
5616 static const int one {1};
5617 };
5618
5619 static_assert(test::zero == 0, "");
5620 static_assert(test::one == 1, "");
5621
5622 }
5623
5624 namespace test_lambdas
5625 {
5626
5627 void
5628 test1()
5629 {
5630 auto lambda1 = [](){};
5631 auto lambda2 = lambda1;
5632 lambda1();
5633 lambda2();
5634 }
5635
5636 int
5637 test2()
5638 {
5639 auto a = [](int i, int j){ return i + j; }(1, 2);
5640 auto b = []() -> int { return '0'; }();
5641 auto c = [=](){ return a + b; }();
5642 auto d = [&](){ return c; }();
5643 auto e = [a, &b](int x) mutable {
5644 const auto identity = [](int y){ return y; };
5645 for (auto i = 0; i < a; ++i)
5646 a += b--;
5647 return x + identity(a + b);
5648 }(0);
5649 return a + b + c + d + e;
5650 }
5651
5652 int
5653 test3()
5654 {
5655 const auto nullary = [](){ return 0; };
5656 const auto unary = [](int x){ return x; };
5657 using nullary_t = decltype(nullary);
5658 using unary_t = decltype(unary);
5659 const auto higher1st = [](nullary_t f){ return f(); };
5660 const auto higher2nd = [unary](nullary_t f1){
5661 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5662 };
5663 return higher1st(nullary) + higher2nd(nullary)(unary);
5664 }
5665
5666 }
5667
5668 namespace test_variadic_templates
5669 {
5670
5671 template <int...>
5672 struct sum;
5673
5674 template <int N0, int... N1toN>
5675 struct sum<N0, N1toN...>
5676 {
5677 static constexpr auto value = N0 + sum<N1toN...>::value;
5678 };
5679
5680 template <>
5681 struct sum<>
5682 {
5683 static constexpr auto value = 0;
5684 };
5685
5686 static_assert(sum<>::value == 0, "");
5687 static_assert(sum<1>::value == 1, "");
5688 static_assert(sum<23>::value == 23, "");
5689 static_assert(sum<1, 2>::value == 3, "");
5690 static_assert(sum<5, 5, 11>::value == 21, "");
5691 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5692
5693 }
5694
5695 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5696 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5697 // because of this.
5698 namespace test_template_alias_sfinae
5699 {
5700
5701 struct foo {};
5702
5703 template<typename T>
5704 using member = typename T::member_type;
5705
5706 template<typename T>
5707 void func(...) {}
5708
5709 template<typename T>
5710 void func(member<T>*) {}
5711
5712 void test();
5713
5714 void test() { func<foo>(0); }
5715
5716 }
5717
5718} // namespace cxx11
5719
5720#endif // __cplusplus >= 201103L
5721
5722
5723
5724_ACEOF
5725if ac_fn_cxx_try_compile "$LINENO"; then :
5726 eval $cachevar=yes
5727else
5728 eval $cachevar=no
5729fi
5730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5731 CXX="$ac_save_CXX"
5732fi
5733eval ac_res=\$$cachevar
5734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5735$as_echo "$ac_res" >&6; }
5736 if eval test x\$$cachevar = xyes; then
5737 CXX_DIALECT="$switch"
5738 ac_success=yes
5739 break
5740 fi
5741 done
5742 fi
5743
5744 if test x$ac_success = xno; then
41260ac2
SM
5745 for alternative in ${ax_cxx_compile_alternatives}; do
5746 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5747 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
0bcda685 5749$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5750if eval \${$cachevar+:} false; then :
0bcda685
PA
5751 $as_echo_n "(cached) " >&6
5752else
5753 ac_save_CXX="$CXX"
41260ac2
SM
5754 CXX="$CXX $switch"
5755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0bcda685
PA
5756/* end confdefs.h. */
5757
5758
5759// If the compiler admits that it is not ready for C++11, why torture it?
5760// Hopefully, this will speed up the test.
5761
5762#ifndef __cplusplus
5763
5764#error "This is not a C++ compiler"
5765
5766#elif __cplusplus < 201103L
5767
5768#error "This is not a C++11 compiler"
5769
5770#else
5771
5772namespace cxx11
5773{
5774
5775 namespace test_static_assert
5776 {
5777
5778 template <typename T>
5779 struct check
5780 {
5781 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5782 };
5783
5784 }
5785
5786 namespace test_final_override
5787 {
5788
5789 struct Base
5790 {
5791 virtual void f() {}
5792 };
5793
5794 struct Derived : public Base
5795 {
5796 virtual void f() override {}
5797 };
5798
5799 }
5800
5801 namespace test_double_right_angle_brackets
5802 {
5803
5804 template < typename T >
5805 struct check {};
5806
5807 typedef check<void> single_type;
5808 typedef check<check<void>> double_type;
5809 typedef check<check<check<void>>> triple_type;
5810 typedef check<check<check<check<void>>>> quadruple_type;
5811
5812 }
5813
5814 namespace test_decltype
5815 {
5816
5817 int
5818 f()
5819 {
5820 int a = 1;
5821 decltype(a) b = 2;
5822 return a + b;
5823 }
5824
5825 }
5826
5827 namespace test_type_deduction
5828 {
5829
5830 template < typename T1, typename T2 >
5831 struct is_same
5832 {
5833 static const bool value = false;
5834 };
5835
5836 template < typename T >
5837 struct is_same<T, T>
5838 {
5839 static const bool value = true;
5840 };
5841
5842 template < typename T1, typename T2 >
5843 auto
5844 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5845 {
5846 return a1 + a2;
5847 }
5848
5849 int
5850 test(const int c, volatile int v)
5851 {
5852 static_assert(is_same<int, decltype(0)>::value == true, "");
5853 static_assert(is_same<int, decltype(c)>::value == false, "");
5854 static_assert(is_same<int, decltype(v)>::value == false, "");
5855 auto ac = c;
5856 auto av = v;
5857 auto sumi = ac + av + 'x';
5858 auto sumf = ac + av + 1.0;
5859 static_assert(is_same<int, decltype(ac)>::value == true, "");
5860 static_assert(is_same<int, decltype(av)>::value == true, "");
5861 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5862 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5863 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5864 return (sumf > 0.0) ? sumi : add(c, v);
5865 }
5866
5867 }
5868
5869 namespace test_noexcept
5870 {
5871
5872 int f() { return 0; }
5873 int g() noexcept { return 0; }
5874
5875 static_assert(noexcept(f()) == false, "");
5876 static_assert(noexcept(g()) == true, "");
5877
5878 }
5879
5880 namespace test_constexpr
5881 {
5882
5883 template < typename CharT >
5884 unsigned long constexpr
5885 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5886 {
5887 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5888 }
5889
5890 template < typename CharT >
5891 unsigned long constexpr
5892 strlen_c(const CharT *const s) noexcept
5893 {
5894 return strlen_c_r(s, 0UL);
5895 }
5896
5897 static_assert(strlen_c("") == 0UL, "");
5898 static_assert(strlen_c("1") == 1UL, "");
5899 static_assert(strlen_c("example") == 7UL, "");
5900 static_assert(strlen_c("another\0example") == 7UL, "");
5901
5902 }
5903
5904 namespace test_rvalue_references
5905 {
5906
5907 template < int N >
5908 struct answer
5909 {
5910 static constexpr int value = N;
5911 };
5912
5913 answer<1> f(int&) { return answer<1>(); }
5914 answer<2> f(const int&) { return answer<2>(); }
5915 answer<3> f(int&&) { return answer<3>(); }
5916
5917 void
5918 test()
5919 {
5920 int i = 0;
5921 const int c = 0;
5922 static_assert(decltype(f(i))::value == 1, "");
5923 static_assert(decltype(f(c))::value == 2, "");
5924 static_assert(decltype(f(0))::value == 3, "");
5925 }
5926
5927 }
5928
5929 namespace test_uniform_initialization
5930 {
5931
5932 struct test
5933 {
5934 static const int zero {};
5935 static const int one {1};
5936 };
5937
5938 static_assert(test::zero == 0, "");
5939 static_assert(test::one == 1, "");
5940
5941 }
5942
5943 namespace test_lambdas
5944 {
5945
5946 void
5947 test1()
5948 {
5949 auto lambda1 = [](){};
5950 auto lambda2 = lambda1;
5951 lambda1();
5952 lambda2();
5953 }
5954
5955 int
5956 test2()
5957 {
5958 auto a = [](int i, int j){ return i + j; }(1, 2);
5959 auto b = []() -> int { return '0'; }();
5960 auto c = [=](){ return a + b; }();
5961 auto d = [&](){ return c; }();
5962 auto e = [a, &b](int x) mutable {
5963 const auto identity = [](int y){ return y; };
5964 for (auto i = 0; i < a; ++i)
5965 a += b--;
5966 return x + identity(a + b);
5967 }(0);
5968 return a + b + c + d + e;
5969 }
5970
5971 int
5972 test3()
5973 {
5974 const auto nullary = [](){ return 0; };
5975 const auto unary = [](int x){ return x; };
5976 using nullary_t = decltype(nullary);
5977 using unary_t = decltype(unary);
5978 const auto higher1st = [](nullary_t f){ return f(); };
5979 const auto higher2nd = [unary](nullary_t f1){
5980 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5981 };
5982 return higher1st(nullary) + higher2nd(nullary)(unary);
5983 }
5984
5985 }
5986
5987 namespace test_variadic_templates
5988 {
5989
5990 template <int...>
5991 struct sum;
5992
5993 template <int N0, int... N1toN>
5994 struct sum<N0, N1toN...>
5995 {
5996 static constexpr auto value = N0 + sum<N1toN...>::value;
5997 };
5998
5999 template <>
6000 struct sum<>
6001 {
6002 static constexpr auto value = 0;
6003 };
6004
6005 static_assert(sum<>::value == 0, "");
6006 static_assert(sum<1>::value == 1, "");
6007 static_assert(sum<23>::value == 23, "");
6008 static_assert(sum<1, 2>::value == 3, "");
6009 static_assert(sum<5, 5, 11>::value == 21, "");
6010 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6011
6012 }
6013
6014 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6015 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6016 // because of this.
6017 namespace test_template_alias_sfinae
6018 {
6019
6020 struct foo {};
6021
6022 template<typename T>
6023 using member = typename T::member_type;
6024
6025 template<typename T>
6026 void func(...) {}
6027
6028 template<typename T>
6029 void func(member<T>*) {}
6030
6031 void test();
6032
6033 void test() { func<foo>(0); }
6034
6035 }
6036
6037} // namespace cxx11
6038
6039#endif // __cplusplus >= 201103L
6040
6041
6042
6043_ACEOF
6044if ac_fn_cxx_try_compile "$LINENO"; then :
6045 eval $cachevar=yes
6046else
6047 eval $cachevar=no
6048fi
6049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41260ac2 6050 CXX="$ac_save_CXX"
0bcda685
PA
6051fi
6052eval ac_res=\$$cachevar
6053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6054$as_echo "$ac_res" >&6; }
41260ac2
SM
6055 if eval test x\$$cachevar = xyes; then
6056 CXX_DIALECT="$switch"
6057 ac_success=yes
6058 break
6059 fi
6060 done
6061 if test x$ac_success = xyes; then
0bcda685
PA
6062 break
6063 fi
6064 done
6065 fi
6066 ac_ext=c
6067ac_cpp='$CPP $CPPFLAGS'
6068ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6069ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6070ac_compiler_gnu=$ac_cv_c_compiler_gnu
6071
6072 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6073 if test x$ac_success = xno; then
d0ac1c44 6074 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
0bcda685
PA
6075 fi
6076 fi
6077 if test x$ac_success = xno; then
6078 HAVE_CXX11=0
6079 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6080$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6081 else
6082 HAVE_CXX11=1
6083
6084$as_echo "#define HAVE_CXX11 1" >>confdefs.h
6085
6086 fi
6087
6088
6089
6090
a417dc56
RW
6091# Dependency checking.
6092rm -rf .tst 2>/dev/null
6093mkdir .tst 2>/dev/null
6094if test -d .tst; then
6095 am__leading_dot=.
6096else
6097 am__leading_dot=_
6098fi
6099rmdir .tst 2>/dev/null
6100
6101DEPDIR="${am__leading_dot}deps"
6102
81ecdfbb 6103ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
6104
6105
6106depcc="$CC" am_compiler_list=
6107
6108am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
6109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6110$as_echo_n "checking dependency style of $depcc... " >&6; }
d0ac1c44 6111if ${am_cv_CC_dependencies_compiler_type+:} false; then :
81ecdfbb 6112 $as_echo_n "(cached) " >&6
a417dc56
RW
6113else
6114 if test -f "$am_depcomp"; then
6115 # We make a subdir and do the tests there. Otherwise we can end up
6116 # making bogus files that we don't know about and never remove. For
6117 # instance it was reported that on HP-UX the gcc test will end up
6118 # making a dummy file named `D' -- because `-MD' means `put the output
6119 # in D'.
6120 mkdir conftest.dir
6121 # Copy depcomp to subdir because otherwise we won't find it if we're
6122 # using a relative directory.
6123 cp "$am_depcomp" conftest.dir
6124 cd conftest.dir
6125 # We will build objects and dependencies in a subdirectory because
6126 # it helps to detect inapplicable dependency modes. For instance
6127 # both Tru64's cc and ICC support -MD to output dependencies as a
6128 # side effect of compilation, but ICC will put the dependencies in
6129 # the current directory while Tru64 will put them in the object
6130 # directory.
6131 mkdir sub
6132
6133 am_cv_CC_dependencies_compiler_type=none
6134 if test "$am_compiler_list" = ""; then
6135 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6136 fi
6137 for depmode in $am_compiler_list; do
6138 if test $depmode = none; then break; fi
6139
81ecdfbb 6140 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
6141 # Setup a source with many dependencies, because some compilers
6142 # like to wrap large dependency lists on column 80 (with \), and
6143 # we should not choose a depcomp mode which is confused by this.
6144 #
6145 # We need to recreate these files for each test, as the compiler may
6146 # overwrite some of them when testing with obscure command lines.
6147 # This happens at least with the AIX C compiler.
6148 : > sub/conftest.c
6149 for i in 1 2 3 4 5 6; do
6150 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6151 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6152 # Solaris 8's {/usr,}/bin/sh.
6153 touch sub/conftst$i.h
6154 done
6155 echo "include sub/conftest.Po" > confmf
6156
6157 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6158 # mode. It turns out that the SunPro C++ compiler does not properly
6159 # handle `-M -o', and we need to detect this.
6160 depcmd="depmode=$depmode \
6161 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6162 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6163 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6164 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6165 if env $depcmd > conftest.err 2>&1 &&
6166 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6167 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6168 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6169 # icc doesn't choke on unknown options, it will just issue warnings
6170 # or remarks (even with -Werror). So we grep stderr for any message
6171 # that says an option was ignored or not supported.
6172 # When given -MP, icc 7.0 and 7.1 complain thusly:
6173 # icc: Command line warning: ignoring option '-M'; no argument required
6174 # The diagnosis changed in icc 8.0:
6175 # icc: Command line remark: option '-MP' not supported
6176 if (grep 'ignoring option' conftest.err ||
6177 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6178 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 6179 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
6180 break
6181 fi
6182 fi
81ecdfbb 6183 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
6184 sed -e 's/^/| /' < conftest.err >&5
6185 done
6186
6187 cd ..
6188 rm -rf conftest.dir
6189else
6190 am_cv_CC_dependencies_compiler_type=none
6191fi
6192
6193fi
81ecdfbb
RW
6194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6195$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 6196if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
d0ac1c44 6197then as_fn_error $? "no usable dependency style found" "$LINENO" 5
a417dc56
RW
6198else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6199
6200fi
6201
6202
c971b7fa
PA
6203
6204CONFIG_OBS=
6205CONFIG_DEPS=
6206CONFIG_SRCS=
6207ENABLE_CFLAGS=
6208
6209CONFIG_ALL=
6210CONFIG_CLEAN=
6211CONFIG_INSTALL=
6212CONFIG_UNINSTALL=
6213
6214# If we haven't got the data from the intl directory,
6215# assume NLS is disabled.
6216USE_NLS=no
6217LIBINTL=
6218LIBINTL_DEP=
6219INCINTL=
6220XGETTEXT=
6221GMSGFMT=
6222POSUB=
783e057b
DJ
6223
6224if test -f ../intl/config.intl; then
6225 . ../intl/config.intl
6226fi
81ecdfbb
RW
6227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6228$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 6229if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
6230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6231$as_echo "no" >&6; }
783e057b 6232else
81ecdfbb
RW
6233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6234$as_echo "yes" >&6; }
783e057b 6235
81ecdfbb 6236$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
6237
6238
81ecdfbb
RW
6239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6240$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
6241 # Look for .po and .gmo files in the source directory.
6242 CATALOGS=
6243 XLINGUAS=
6244 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6245 # If there aren't any .gmo files the shell will give us the
6246 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6247 # weeded out.
6248 case "$cat" in *\**)
6249 continue;;
6250 esac
6251 # The quadruple backslash is collapsed to a double backslash
6252 # by the backticks, then collapsed again by the double quotes,
6253 # leaving us with one backslash in the sed expression (right
6254 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
6255 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6256 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6257 # The user is allowed to set LINGUAS to a list of languages to
6258 # install catalogs for. If it's empty that means "all of them."
6259 if test "x$LINGUAS" = x; then
6260 CATALOGS="$CATALOGS $cat"
6261 XLINGUAS="$XLINGUAS $lang"
6262 else
6263 case "$LINGUAS" in *$lang*)
6264 CATALOGS="$CATALOGS $cat"
6265 XLINGUAS="$XLINGUAS $lang"
6266 ;;
6267 esac
e28b3332
DJ
6268 fi
6269 done
c971b7fa
PA
6270 LINGUAS="$XLINGUAS"
6271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6272$as_echo "$LINGUAS" >&6; }
6273
6274
6275 DATADIRNAME=share
6276
6277 INSTOBJEXT=.mo
6278
6279 GENCAT=gencat
6280
6281 CATOBJEXT=.gmo
e28b3332 6282
e28b3332
DJ
6283fi
6284
c971b7fa
PA
6285localedir='${datadir}/locale'
6286
6287
6288if test x"$USE_NLS" = xyes; then
6289 CONFIG_ALL="$CONFIG_ALL all-po"
6290 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6291 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6292 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 6293fi
e28b3332 6294
c971b7fa
PA
6295PACKAGE=gdb
6296
6297cat >>confdefs.h <<_ACEOF
6298#define PACKAGE "$PACKAGE"
6299_ACEOF
6300
6301
6302
6303# We never need to detect it in this sub-configure.
6304# But preserve it for config.status --recheck.
6305
6306
6307
6308MAKEINFO_EXTRA_FLAGS=""
6309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6310$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
d0ac1c44 6311if ${gdb_cv_have_makeinfo_click+:} false; then :
c971b7fa
PA
6312 $as_echo_n "(cached) " >&6
6313else
6314 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6315 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6316 gdb_cv_have_makeinfo_click=yes
6317 else
6318 gdb_cv_have_makeinfo_click=no
6319 fi
6320fi
6321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6322$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6323if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6324 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6325fi
e28b3332
DJ
6326
6327
bec39cab
AC
6328
6329
81ecdfbb
RW
6330# Check whether --with-separate-debug-dir was given.
6331if test "${with_separate_debug_dir+set}" = set; then :
6332 withval=$with_separate_debug_dir;
b14b1491
TT
6333 DEBUGDIR=$withval
6334else
6335 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
6336fi
6337
20e95c23 6338
783e057b
DJ
6339 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6340 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 6341 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 6342 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 6343
783e057b
DJ
6344cat >>confdefs.h <<_ACEOF
6345#define DEBUGDIR "$ac_define_dir"
20e95c23 6346_ACEOF
20e95c23 6347
20e95c23 6348
20e95c23 6349
0c4a4063 6350
b14b1491
TT
6351 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6352 if test "x$prefix" = xNONE; then
6353 test_prefix=/usr/local
6354 else
6355 test_prefix=$prefix
6356 fi
783e057b 6357 else
b14b1491 6358 test_prefix=$exec_prefix
783e057b 6359 fi
b14b1491
TT
6360 value=0
6361 case ${ac_define_dir} in
6362 "${test_prefix}"|"${test_prefix}/"*|\
6363 '${exec_prefix}'|'${exec_prefix}/'*)
6364 value=1
6365 ;;
6366 esac
6367
6368cat >>confdefs.h <<_ACEOF
6369#define DEBUGDIR_RELOCATABLE $value
6370_ACEOF
6371
6372
6373
0c4a4063 6374
f83d8a90
DE
6375# We can't pass paths as command line arguments.
6376# Mingw32 tries to be clever and will convert the paths for us.
6377# For example -DBINDIR="/usr/local/bin" passed on the command line may get
6378# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6379# This breaks GDB's relocatable path conversions since paths passed in
6380# config.h would not get so translated, the path prefixes no longer match.
6381
6382 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6383 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6384 ac_define_dir=`eval echo $bindir`
6385 ac_define_dir=`eval echo $ac_define_dir`
6386
6387cat >>confdefs.h <<_ACEOF
6388#define BINDIR "$ac_define_dir"
6389_ACEOF
6390
6391
6392
b14b1491
TT
6393# GDB's datadir relocation
6394
6395
6396
81ecdfbb
RW
6397# Check whether --with-gdb-datadir was given.
6398if test "${with_gdb_datadir+set}" = set; then :
6399 withval=$with_gdb_datadir;
b14b1491 6400 GDB_DATADIR=$withval
20e95c23 6401else
b14b1491 6402 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
6403fi
6404
20e95c23 6405
b14b1491
TT
6406 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6407 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6408 ac_define_dir=`eval echo $GDB_DATADIR`
6409 ac_define_dir=`eval echo $ac_define_dir`
6410
6411cat >>confdefs.h <<_ACEOF
6412#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
6413_ACEOF
6414
b14b1491
TT
6415
6416
0c4a4063 6417
b14b1491
TT
6418 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6419 if test "x$prefix" = xNONE; then
6420 test_prefix=/usr/local
6421 else
6422 test_prefix=$prefix
6423 fi
6424 else
6425 test_prefix=$exec_prefix
6426 fi
6427 value=0
6428 case ${ac_define_dir} in
6429 "${test_prefix}"|"${test_prefix}/"*|\
6430 '${exec_prefix}'|'${exec_prefix}/'*)
6431 value=1
6432 ;;
6433 esac
6434
6435cat >>confdefs.h <<_ACEOF
6436#define GDB_DATADIR_RELOCATABLE $value
6437_ACEOF
6438
6439
783e057b 6440
20e95c23 6441
0c4a4063 6442
81ecdfbb
RW
6443# Check whether --with-relocated-sources was given.
6444if test "${with_relocated_sources+set}" = set; then :
6445 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
6446
6447 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6448 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6449 ac_define_dir=`eval echo $reloc_srcdir`
6450 ac_define_dir=`eval echo $ac_define_dir`
6451
6452cat >>confdefs.h <<_ACEOF
6453#define RELOC_SRCDIR "$ac_define_dir"
6454_ACEOF
6455
6456
6457
81ecdfbb
RW
6458fi
6459
29b0e8a2 6460
7349ff92
JK
6461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6462$as_echo_n "checking for default auto-load directory... " >&6; }
6463
6464# Check whether --with-auto-load-dir was given.
6465if test "${with_auto_load_dir+set}" = set; then :
6466 withval=$with_auto_load_dir;
6467else
1564a261 6468 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
6469fi
6470
2861ee4f 6471escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
6472
6473 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6474 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6475 ac_define_dir=`eval echo $escape_dir`
6476 ac_define_dir=`eval echo $ac_define_dir`
6477
6478cat >>confdefs.h <<_ACEOF
6479#define AUTO_LOAD_DIR "$ac_define_dir"
6480_ACEOF
6481
6482
6483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6484$as_echo "$with_auto_load_dir" >&6; }
6485
bccbefd2
JK
6486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6487$as_echo_n "checking for default auto-load safe-path... " >&6; }
6488
6489# Check whether --with-auto-load-safe-path was given.
6490if test "${with_auto_load_safe_path+set}" = set; then :
6491 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
6492 with_auto_load_safe_path="/"
6493 fi
bccbefd2 6494else
7349ff92 6495 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
6496fi
6497
2861ee4f 6498escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
6499
6500 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6501 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 6502 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
6503 ac_define_dir=`eval echo $ac_define_dir`
6504
6505cat >>confdefs.h <<_ACEOF
6dea1fbd 6506#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
6507_ACEOF
6508
6509
6510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6511$as_echo "$with_auto_load_safe_path" >&6; }
6512
29b0e8a2 6513
20e95c23 6514
5ae98d25 6515subdirs="$subdirs testsuite"
20e95c23
DJ
6516
6517
783e057b 6518# Check whether to support alternative target configurations
81ecdfbb
RW
6519# Check whether --enable-targets was given.
6520if test "${enable_targets+set}" = set; then :
6521 enableval=$enable_targets; case "${enableval}" in
d0ac1c44 6522 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
6523 ;;
6524 no) enable_targets= ;;
6525 *) enable_targets=$enableval ;;
6526esac
81ecdfbb
RW
6527fi
6528
20e95c23 6529
783e057b 6530# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
6531# Check whether --enable-64-bit-bfd was given.
6532if test "${enable_64_bit_bfd+set}" = set; then :
6533 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
6534 yes) want64=true ;;
6535 no) want64=false ;;
d0ac1c44 6536 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
6537esac
6538else
6539 want64=false
81ecdfbb
RW
6540fi
6541
783e057b
DJ
6542# Provide defaults for some variables set by the per-host and per-target
6543# configuration.
6544gdb_host_obs=posix-hdep.o
20e95c23 6545
783e057b
DJ
6546if test "${target}" = "${host}"; then
6547 gdb_native=yes
6548else
6549 gdb_native=no
6550fi
20e95c23 6551
783e057b 6552. $srcdir/configure.host
20e95c23 6553
fb23d554 6554# Add in the common host objects.
268a13a5 6555. $srcdir/gdbsupport/common.host
fb23d554
SDJ
6556gdb_host_obs="$gdb_host_obs $common_host_obs"
6557
783e057b 6558# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 6559
783e057b
DJ
6560TARGET_OBS=
6561all_targets=
b292c783 6562HAVE_NATIVE_GCORE_TARGET=
20e95c23 6563
783e057b 6564for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 6565do
783e057b
DJ
6566 if test "$targ_alias" = "all"; then
6567 all_targets=true
6568 else
6569 # Canonicalize the secondary target names.
6570 result=`$ac_config_sub $targ_alias 2>/dev/null`
6571 if test -n "$result"; then
6572 targ=$result
6573 else
6574 targ=$targ_alias
6575 fi
20e95c23 6576
783e057b 6577 . ${srcdir}/configure.tgt
20e95c23 6578
bf307134 6579 if test -z "${gdb_target_obs}"; then :
d0ac1c44 6580 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
bf307134
JB
6581fi
6582
783e057b
DJ
6583 # Target-specific object files
6584 for i in ${gdb_target_obs}; do
6585 case " $TARGET_OBS " in
6586 *" ${i} "*) ;;
6587 *)
6588 TARGET_OBS="$TARGET_OBS ${i}"
6589 ;;
6590 esac
6591 done
20e95c23 6592
783e057b
DJ
6593 # Check whether this target needs 64-bit CORE_ADDR
6594 if test x${want64} = xfalse; then
6595 . ${srcdir}/../bfd/config.bfd
6596 fi
b292c783
JK
6597
6598 # Check whether this target is native and supports gcore.
6599 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6600 && $gdb_have_gcore; then
6601 HAVE_NATIVE_GCORE_TARGET=1
6602 fi
783e057b 6603 fi
20e95c23
DJ
6604done
6605
783e057b
DJ
6606if test x${all_targets} = xtrue; then
6607
6608 # We want all 64-bit targets if we either:
6609 # - run on a 64-bit host or
6610 # - already require 64-bit support for some other target or
6611 # - the --enable-64-bit-bfd option was supplied
6612 # Otherwise we only support all 32-bit targets.
6613 #
6614 # NOTE: This test must be in sync with the corresponding
6615 # tests in BFD!
20e95c23 6616
783e057b 6617 if test x${want64} = xfalse; then
81ecdfbb
RW
6618 # The cast to long int works around a bug in the HP C Compiler
6619# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6620# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6621# This bug is HP SR number 8606223364.
6622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6623$as_echo_n "checking size of long... " >&6; }
d0ac1c44 6624if ${ac_cv_sizeof_long+:} false; then :
81ecdfbb 6625 $as_echo_n "(cached) " >&6
c0993dbe 6626else
81ecdfbb 6627 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 6628
81ecdfbb
RW
6629else
6630 if test "$ac_cv_type_long" = yes; then
6631 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6632$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
6633as_fn_error 77 "cannot compute sizeof (long)
6634See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
6635 else
6636 ac_cv_sizeof_long=0
6637 fi
c0993dbe 6638fi
81ecdfbb 6639
c0993dbe 6640fi
81ecdfbb
RW
6641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6642$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 6643
c0993dbe 6644
c0993dbe 6645
c0993dbe
UW
6646cat >>confdefs.h <<_ACEOF
6647#define SIZEOF_LONG $ac_cv_sizeof_long
6648_ACEOF
6649
6650
6651 if test "x${ac_cv_sizeof_long}" = "x8"; then
6652 want64=true
6653 fi
6654 fi
6655 if test x${want64} = xtrue; then
6656 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6657 else
6658 TARGET_OBS='$(ALL_TARGET_OBS)'
6659 fi
6660fi
6661
6662
6663
b292c783 6664
c0993dbe
UW
6665# For other settings, only the main target counts.
6666gdb_sim=
6667gdb_osabi=
6668build_gdbserver=
6669targ=$target; . ${srcdir}/configure.tgt
6670
6671# Fetch the default architecture and default target vector from BFD.
6672targ=$target; . $srcdir/../bfd/config.bfd
6673
6674# We only want the first architecture, so strip off the others if
6675# there is more than one.
6676targ_archs=`echo $targ_archs | sed 's/ .*//'`
6677
6678if test "x$targ_archs" != x; then
6679
6680cat >>confdefs.h <<_ACEOF
6681#define DEFAULT_BFD_ARCH $targ_archs
6682_ACEOF
6683
6684fi
6685if test "x$targ_defvec" != x; then
6686
6687cat >>confdefs.h <<_ACEOF
6688#define DEFAULT_BFD_VEC $targ_defvec
6689_ACEOF
6690
6691fi
6692
c0993dbe 6693# Enable MI.
81ecdfbb
RW
6694# Check whether --enable-gdbmi was given.
6695if test "${enable_gdbmi+set}" = set; then :
6696 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
6697 yes | no)
6698 ;;
6699 *)
d0ac1c44 6700 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
6701 esac
6702else
6703 enable_gdbmi=yes
81ecdfbb
RW
6704fi
6705
c0993dbe
UW
6706if test x"$enable_gdbmi" = xyes; then
6707 if test -d $srcdir/mi; then
6708 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6709 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6710 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6711 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6712 fi
6713fi
6714
6715# Enable TUI.
81ecdfbb
RW
6716# Check whether --enable-tui was given.
6717if test "${enable_tui+set}" = set; then :
6718 enableval=$enable_tui; case $enableval in
3ca64bd3 6719 yes | no | auto)
c0993dbe
UW
6720 ;;
6721 *)
d0ac1c44 6722 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
6723 esac
6724else
3ca64bd3 6725 enable_tui=auto
81ecdfbb
RW
6726fi
6727
c0993dbe
UW
6728
6729# Enable gdbtk.
81ecdfbb
RW
6730# Check whether --enable-gdbtk was given.
6731if test "${enable_gdbtk+set}" = set; then :
6732 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
6733 yes | no)
6734 ;;
6735 *)
d0ac1c44 6736 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
6737 esac
6738else
5062cc19 6739 if test -d $srcdir/gdbtk; then
c0993dbe
UW
6740 enable_gdbtk=yes
6741 else
6742 enable_gdbtk=no
6743 fi
81ecdfbb
RW
6744fi
6745
c0993dbe
UW
6746# We unconditionally disable gdbtk tests on selected platforms.
6747case $host_os in
6748 go32* | windows*)
81ecdfbb
RW
6749 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6750$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
6751 enable_gdbtk=no ;;
6752esac
6753
05e7c244 6754# Libunwind support for ia64.
bec39cab 6755
05e7c244
JK
6756
6757# Check whether --with-libunwind-ia64 was given.
6758if test "${with_libunwind_ia64+set}" = set; then :
6759 withval=$with_libunwind_ia64;
bec39cab 6760else
05e7c244
JK
6761 with_libunwind_ia64=auto
6762fi
bec39cab 6763
05e7c244
JK
6764
6765# Backward compatibility option.
6766if test "${with_libunwind+set}" = set; then
6767 if test x"$with_libunwind_ia64" != xauto; then
d0ac1c44 6768 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
05e7c244
JK
6769 fi
6770 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6771$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6772 with_libunwind_ia64="$with_libunwind"
6773fi
6774
6775case "$with_libunwind_ia64" in
6776 yes | no)
6777 ;;
6778 auto)
6779 for ac_header in libunwind-ia64.h
81ecdfbb 6780do :
b54a8fd7 6781 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 6782if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6783 cat >>confdefs.h <<_ACEOF
b54a8fd7 6784#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6785_ACEOF
6786
6787fi
6788
6789done
6790
05e7c244
JK
6791 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6792 ;;
6793 *)
d0ac1c44 6794 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
05e7c244
JK
6795 ;;
6796esac
bec39cab 6797
05e7c244 6798if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 6799 for ac_header in libunwind-ia64.h
81ecdfbb 6800do :
b54a8fd7 6801 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 6802if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 6803 cat >>confdefs.h <<_ACEOF
b54a8fd7 6804#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6805_ACEOF
6806
6807fi
6808
6809done
6810
05e7c244 6811 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
d0ac1c44 6812 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
05e7c244
JK
6813 fi
6814 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6815 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6816 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
6817fi
6818
cb01cfba
JB
6819opt_curses=no
6820
81ecdfbb
RW
6821# Check whether --with-curses was given.
6822if test "${with_curses+set}" = set; then :
6823 withval=$with_curses; opt_curses=$withval
6824fi
6825
cb01cfba 6826
76a39ba7 6827prefer_curses=no
cb01cfba 6828if test "$opt_curses" = "yes"; then
76a39ba7 6829 prefer_curses=yes
cb01cfba
JB
6830fi
6831
a9322a30 6832# Profiling support.
81ecdfbb
RW
6833# Check whether --enable-profiling was given.
6834if test "${enable_profiling+set}" = set; then :
6835 enableval=$enable_profiling; case $enableval in
a9322a30
TT
6836 yes | no)
6837 ;;
6838 *)
d0ac1c44 6839 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
6840 esac
6841else
6842 enable_profiling=no
81ecdfbb 6843fi
bec39cab 6844
a9322a30
TT
6845
6846for ac_func in monstartup _mcleanup
81ecdfbb
RW
6847do :
6848 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6849ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 6850if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
81ecdfbb
RW
6851 cat >>confdefs.h <<_ACEOF
6852#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 6853_ACEOF
a9322a30 6854
81ecdfbb
RW
6855fi
6856done
a9322a30 6857
81ecdfbb
RW
6858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6859$as_echo_n "checking for _etext... " >&6; }
d0ac1c44 6860if ${ac_cv_var__etext+:} false; then :
81ecdfbb
RW
6861 $as_echo_n "(cached) " >&6
6862else
6863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6864/* end confdefs.h. */
6865#include <stdlib.h>
6866extern char _etext;
a9322a30
TT
6867
6868int
6869main ()
6870{
6871free (&_etext);
6872 ;
6873 return 0;
6874}
bec39cab 6875_ACEOF
81ecdfbb 6876if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6877 ac_cv_var__etext=yes
bec39cab 6878else
81ecdfbb 6879 ac_cv_var__etext=no
bec39cab 6880fi
81ecdfbb
RW
6881rm -f core conftest.err conftest.$ac_objext \
6882 conftest$ac_exeext conftest.$ac_ext
bec39cab 6883fi
81ecdfbb
RW
6884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6885$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 6886if test $ac_cv_var__etext = yes; then
60ca704f 6887
81ecdfbb 6888$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 6889
bec39cab 6890fi
81ecdfbb
RW
6891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6892$as_echo_n "checking for etext... " >&6; }
d0ac1c44 6893if ${ac_cv_var_etext+:} false; then :
81ecdfbb 6894 $as_echo_n "(cached) " >&6
bec39cab 6895else
81ecdfbb 6896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6897/* end confdefs.h. */
a9322a30
TT
6898#include <stdlib.h>
6899extern char etext;
bec39cab
AC
6900
6901int
6902main ()
6903{
a9322a30 6904free (&etext);
bec39cab
AC
6905 ;
6906 return 0;
6907}
6908_ACEOF
81ecdfbb 6909if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6910 ac_cv_var_etext=yes
bec39cab 6911else
81ecdfbb 6912 ac_cv_var_etext=no
bec39cab 6913fi
81ecdfbb
RW
6914rm -f core conftest.err conftest.$ac_objext \
6915 conftest$ac_exeext conftest.$ac_ext
bec39cab 6916fi
81ecdfbb
RW
6917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
6918$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
6919if test $ac_cv_var_etext = yes; then
6920
81ecdfbb 6921$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
6922
6923fi
a9322a30
TT
6924if test "$enable_profiling" = yes ; then
6925 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
d0ac1c44 6926 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
6927 fi
6928 PROFILE_CFLAGS=-pg
6929 OLD_CFLAGS="$CFLAGS"
6930 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 6931
81ecdfbb
RW
6932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
6933$as_echo_n "checking whether $CC supports -pg... " >&6; }
d0ac1c44 6934if ${ac_cv_cc_supports_pg+:} false; then :
81ecdfbb 6935 $as_echo_n "(cached) " >&6
bec39cab 6936else
81ecdfbb 6937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6938/* end confdefs.h. */
bec39cab
AC
6939
6940int
6941main ()
6942{
a9322a30 6943int x;
bec39cab
AC
6944 ;
6945 return 0;
6946}
6947_ACEOF
81ecdfbb 6948if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 6949 ac_cv_cc_supports_pg=yes
bec39cab 6950else
81ecdfbb 6951 ac_cv_cc_supports_pg=no
bec39cab 6952fi
81ecdfbb 6953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 6954fi
81ecdfbb
RW
6955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
6956$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 6957
a9322a30 6958 if test $ac_cv_cc_supports_pg = no; then
d0ac1c44 6959 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 6960 fi
bec39cab 6961
a9322a30 6962 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
6963fi
6964
44cee4fd
TT
6965CODESIGN_CERT=
6966# Check whether --enable-codesign was given.
6967if test "${enable_codesign+set}" = set; then :
6968 enableval=$enable_codesign; CODESIGN_CERT=$enableval
6969fi
6970
6971
6972
c16158bc
JM
6973
6974
81ecdfbb
RW
6975# Check whether --with-pkgversion was given.
6976if test "${with_pkgversion+set}" = set; then :
6977 withval=$with_pkgversion; case "$withval" in
d0ac1c44 6978 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
6979 no) PKGVERSION= ;;
6980 *) PKGVERSION="($withval) " ;;
6981 esac
6982else
6983 PKGVERSION="(GDB) "
6984
81ecdfbb 6985fi
c16158bc
JM
6986
6987
6988
6989
81ecdfbb
RW
6990
6991# Check whether --with-bugurl was given.
6992if test "${with_bugurl+set}" = set; then :
6993 withval=$with_bugurl; case "$withval" in
d0ac1c44 6994 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
6995 no) BUGURL=
6996 ;;
6997 *) BUGURL="$withval"
6998 ;;
6999 esac
7000else
7001 BUGURL="http://www.gnu.org/software/gdb/bugs/"
7002
81ecdfbb
RW
7003fi
7004
c16158bc
JM
7005 case ${BUGURL} in
7006 "")
7007 REPORT_BUGS_TO=
7008 REPORT_BUGS_TEXI=
7009 ;;
7010 *)
7011 REPORT_BUGS_TO="<$BUGURL>"
7012 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7013 ;;
7014 esac;
7015
7016
7017
7018
7019cat >>confdefs.h <<_ACEOF
7020#define PKGVERSION "$PKGVERSION"
7021_ACEOF
7022
7023
7024cat >>confdefs.h <<_ACEOF
7025#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7026_ACEOF
7027
7028
bec39cab
AC
7029# --------------------- #
7030# Checks for programs. #
7031# --------------------- #
7032
7033for ac_prog in gawk mawk nawk awk
7034do
7035 # Extract the first word of "$ac_prog", so it can be a program name with args.
7036set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7038$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7039if ${ac_cv_prog_AWK+:} false; then :
81ecdfbb 7040 $as_echo_n "(cached) " >&6
bec39cab
AC
7041else
7042 if test -n "$AWK"; then
7043 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7044else
7045as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7046for as_dir in $PATH
7047do
7048 IFS=$as_save_IFS
7049 test -z "$as_dir" && as_dir=.
81ecdfbb 7050 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7051 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7052 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7053 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7054 break 2
7055 fi
7056done
81ecdfbb
RW
7057 done
7058IFS=$as_save_IFS
bec39cab
AC
7059
7060fi
7061fi
7062AWK=$ac_cv_prog_AWK
7063if test -n "$AWK"; then
81ecdfbb
RW
7064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7065$as_echo "$AWK" >&6; }
bec39cab 7066else
81ecdfbb
RW
7067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7068$as_echo "no" >&6; }
bec39cab
AC
7069fi
7070
bec39cab 7071
81ecdfbb 7072 test -n "$AWK" && break
bec39cab
AC
7073done
7074
c971b7fa
PA
7075# Find a good install program. We prefer a C program (faster),
7076# so one script is as good as another. But avoid the broken or
7077# incompatible versions:
7078# SysV /etc/install, /usr/sbin/install
7079# SunOS /usr/etc/install
7080# IRIX /sbin/install
7081# AIX /bin/install
7082# AmigaOS /C/install, which installs bootblocks on floppy discs
7083# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7084# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7085# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7086# OS/2's system install, which has a completely different semantic
7087# ./install, which can be erroneously created by make from ./install.sh.
7088# Reject install programs that cannot install multiple files.
7089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7090$as_echo_n "checking for a BSD-compatible install... " >&6; }
7091if test -z "$INSTALL"; then
d0ac1c44 7092if ${ac_cv_path_install+:} false; then :
c971b7fa
PA
7093 $as_echo_n "(cached) " >&6
7094else
7095 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7096for as_dir in $PATH
7097do
7098 IFS=$as_save_IFS
7099 test -z "$as_dir" && as_dir=.
7100 # Account for people who put trailing slashes in PATH elements.
7101case $as_dir/ in #((
7102 ./ | .// | /[cC]/* | \
7103 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7104 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7105 /usr/ucb/* ) ;;
7106 *)
7107 # OSF1 and SCO ODT 3.0 have their own names for install.
7108 # Don't use installbsd from OSF since it installs stuff as root
7109 # by default.
7110 for ac_prog in ginstall scoinst install; do
7111 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7112 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
c971b7fa
PA
7113 if test $ac_prog = install &&
7114 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7115 # AIX install. It has an incompatible calling convention.
7116 :
7117 elif test $ac_prog = install &&
7118 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7119 # program-specific install script used by HP pwplus--don't use.
7120 :
7121 else
7122 rm -rf conftest.one conftest.two conftest.dir
7123 echo one > conftest.one
7124 echo two > conftest.two
7125 mkdir conftest.dir
7126 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7127 test -s conftest.one && test -s conftest.two &&
7128 test -s conftest.dir/conftest.one &&
7129 test -s conftest.dir/conftest.two
7130 then
7131 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7132 break 3
7133 fi
7134 fi
7135 fi
7136 done
7137 done
7138 ;;
7139esac
7140
7141 done
7142IFS=$as_save_IFS
7143
7144rm -rf conftest.one conftest.two conftest.dir
7145
7146fi
7147 if test "${ac_cv_path_install+set}" = set; then
7148 INSTALL=$ac_cv_path_install
7149 else
7150 # As a last resort, use the slow shell script. Don't cache a
7151 # value for INSTALL within a source directory, because that will
7152 # break other packages using the cache if that directory is
7153 # removed, or if the value is a relative name.
7154 INSTALL=$ac_install_sh
7155 fi
7156fi
7157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7158$as_echo "$INSTALL" >&6; }
7159
7160# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7161# It thinks the first close brace ends the variable substitution.
7162test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7163
7164test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7165
7166test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 7167
81ecdfbb
RW
7168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7169$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
7170LN_S=$as_ln_s
7171if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
7172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7173$as_echo "yes" >&6; }
bec39cab 7174else
81ecdfbb
RW
7175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7176$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
7177fi
7178
7179if test -n "$ac_tool_prefix"; then
7180 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7181set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
7182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7183$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7184if ${ac_cv_prog_RANLIB+:} false; then :
81ecdfbb 7185 $as_echo_n "(cached) " >&6
bec39cab
AC
7186else
7187 if test -n "$RANLIB"; then
7188 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7189else
7190as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7191for as_dir in $PATH
7192do
7193 IFS=$as_save_IFS
7194 test -z "$as_dir" && as_dir=.
81ecdfbb 7195 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7196 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7197 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 7198 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7199 break 2
7200 fi
7201done
81ecdfbb
RW
7202 done
7203IFS=$as_save_IFS
bec39cab
AC
7204
7205fi
7206fi
7207RANLIB=$ac_cv_prog_RANLIB
7208if test -n "$RANLIB"; then
81ecdfbb
RW
7209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7210$as_echo "$RANLIB" >&6; }
bec39cab 7211else
81ecdfbb
RW
7212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7213$as_echo "no" >&6; }
bec39cab
AC
7214fi
7215
81ecdfbb 7216
bec39cab
AC
7217fi
7218if test -z "$ac_cv_prog_RANLIB"; then
7219 ac_ct_RANLIB=$RANLIB
7220 # Extract the first word of "ranlib", so it can be a program name with args.
7221set dummy ranlib; ac_word=$2
81ecdfbb
RW
7222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7223$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7224if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
81ecdfbb 7225 $as_echo_n "(cached) " >&6
bec39cab
AC
7226else
7227 if test -n "$ac_ct_RANLIB"; then
7228 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7229else
7230as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7231for as_dir in $PATH
7232do
7233 IFS=$as_save_IFS
7234 test -z "$as_dir" && as_dir=.
81ecdfbb 7235 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7236 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7237 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 7238 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7239 break 2
7240 fi
7241done
81ecdfbb
RW
7242 done
7243IFS=$as_save_IFS
bec39cab 7244
bec39cab
AC
7245fi
7246fi
7247ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7248if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
7249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7250$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 7251else
81ecdfbb
RW
7252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7253$as_echo "no" >&6; }
bec39cab
AC
7254fi
7255
81ecdfbb
RW
7256 if test "x$ac_ct_RANLIB" = x; then
7257 RANLIB=":"
7258 else
7259 case $cross_compiling:$ac_tool_warned in
7260yes:)
7261{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7262$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7263ac_tool_warned=yes ;;
7264esac
7265 RANLIB=$ac_ct_RANLIB
7266 fi
bec39cab
AC
7267else
7268 RANLIB="$ac_cv_prog_RANLIB"
7269fi
7270
7271for ac_prog in 'bison -y' byacc
7272do
7273 # Extract the first word of "$ac_prog", so it can be a program name with args.
7274set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7276$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7277if ${ac_cv_prog_YACC+:} false; then :
81ecdfbb 7278 $as_echo_n "(cached) " >&6
bec39cab
AC
7279else
7280 if test -n "$YACC"; then
7281 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7282else
7283as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7284for as_dir in $PATH
7285do
7286 IFS=$as_save_IFS
7287 test -z "$as_dir" && as_dir=.
81ecdfbb 7288 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7289 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7290 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 7291 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7292 break 2
7293 fi
7294done
81ecdfbb
RW
7295 done
7296IFS=$as_save_IFS
bec39cab
AC
7297
7298fi
7299fi
7300YACC=$ac_cv_prog_YACC
7301if test -n "$YACC"; then
81ecdfbb
RW
7302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7303$as_echo "$YACC" >&6; }
bec39cab 7304else
81ecdfbb
RW
7305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7306$as_echo "no" >&6; }
bec39cab
AC
7307fi
7308
81ecdfbb 7309
bec39cab
AC
7310 test -n "$YACC" && break
7311done
7312test -n "$YACC" || YACC="yacc"
7313
7314
7315if test -n "$ac_tool_prefix"; then
7316 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7317set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
7318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7319$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7320if ${ac_cv_prog_AR+:} false; then :
81ecdfbb 7321 $as_echo_n "(cached) " >&6
bec39cab
AC
7322else
7323 if test -n "$AR"; then
7324 ac_cv_prog_AR="$AR" # Let the user override the test.
7325else
7326as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7327for as_dir in $PATH
7328do
7329 IFS=$as_save_IFS
7330 test -z "$as_dir" && as_dir=.
81ecdfbb 7331 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7332 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7333 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 7334 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7335 break 2
7336 fi
7337done
81ecdfbb
RW
7338 done
7339IFS=$as_save_IFS
bec39cab
AC
7340
7341fi
7342fi
7343AR=$ac_cv_prog_AR
7344if test -n "$AR"; then
81ecdfbb
RW
7345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7346$as_echo "$AR" >&6; }
bec39cab 7347else
81ecdfbb
RW
7348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7349$as_echo "no" >&6; }
bec39cab
AC
7350fi
7351
81ecdfbb 7352
bec39cab
AC
7353fi
7354if test -z "$ac_cv_prog_AR"; then
7355 ac_ct_AR=$AR
7356 # Extract the first word of "ar", so it can be a program name with args.
7357set dummy ar; ac_word=$2
81ecdfbb
RW
7358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7359$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7360if ${ac_cv_prog_ac_ct_AR+:} false; then :
81ecdfbb 7361 $as_echo_n "(cached) " >&6
bec39cab
AC
7362else
7363 if test -n "$ac_ct_AR"; then
7364 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7365else
7366as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7367for as_dir in $PATH
7368do
7369 IFS=$as_save_IFS
7370 test -z "$as_dir" && as_dir=.
81ecdfbb 7371 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7372 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7373 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 7374 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7375 break 2
7376 fi
7377done
81ecdfbb
RW
7378 done
7379IFS=$as_save_IFS
bec39cab
AC
7380
7381fi
7382fi
7383ac_ct_AR=$ac_cv_prog_ac_ct_AR
7384if test -n "$ac_ct_AR"; then
81ecdfbb
RW
7385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7386$as_echo "$ac_ct_AR" >&6; }
bec39cab 7387else
81ecdfbb
RW
7388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7389$as_echo "no" >&6; }
bec39cab
AC
7390fi
7391
81ecdfbb
RW
7392 if test "x$ac_ct_AR" = x; then
7393 AR=""
7394 else
7395 case $cross_compiling:$ac_tool_warned in
7396yes:)
7397{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7398$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7399ac_tool_warned=yes ;;
7400esac
7401 AR=$ac_ct_AR
7402 fi
bec39cab
AC
7403else
7404 AR="$ac_cv_prog_AR"
7405fi
7406
7407if test -n "$ac_tool_prefix"; then
7408 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7409set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
7410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7411$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7412if ${ac_cv_prog_DLLTOOL+:} false; then :
81ecdfbb 7413 $as_echo_n "(cached) " >&6
bec39cab
AC
7414else
7415 if test -n "$DLLTOOL"; then
7416 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7417else
7418as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7419for as_dir in $PATH
7420do
7421 IFS=$as_save_IFS
7422 test -z "$as_dir" && as_dir=.
81ecdfbb 7423 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7424 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7425 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 7426 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7427 break 2
7428 fi
7429done
81ecdfbb
RW
7430 done
7431IFS=$as_save_IFS
bec39cab
AC
7432
7433fi
7434fi
7435DLLTOOL=$ac_cv_prog_DLLTOOL
7436if test -n "$DLLTOOL"; then
81ecdfbb
RW
7437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7438$as_echo "$DLLTOOL" >&6; }
bec39cab 7439else
81ecdfbb
RW
7440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7441$as_echo "no" >&6; }
bec39cab
AC
7442fi
7443
81ecdfbb 7444
bec39cab
AC
7445fi
7446if test -z "$ac_cv_prog_DLLTOOL"; then
7447 ac_ct_DLLTOOL=$DLLTOOL
7448 # Extract the first word of "dlltool", so it can be a program name with args.
7449set dummy dlltool; ac_word=$2
81ecdfbb
RW
7450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7451$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7452if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
81ecdfbb 7453 $as_echo_n "(cached) " >&6
bec39cab
AC
7454else
7455 if test -n "$ac_ct_DLLTOOL"; then
7456 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7457else
7458as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7459for as_dir in $PATH
7460do
7461 IFS=$as_save_IFS
7462 test -z "$as_dir" && as_dir=.
81ecdfbb 7463 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7464 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7465 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 7466 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7467 break 2
7468 fi
7469done
81ecdfbb
RW
7470 done
7471IFS=$as_save_IFS
bec39cab
AC
7472
7473fi
7474fi
7475ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7476if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
7477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7478$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 7479else
81ecdfbb
RW
7480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7481$as_echo "no" >&6; }
bec39cab
AC
7482fi
7483
81ecdfbb
RW
7484 if test "x$ac_ct_DLLTOOL" = x; then
7485 DLLTOOL=""
7486 else
7487 case $cross_compiling:$ac_tool_warned in
7488yes:)
7489{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7490$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7491ac_tool_warned=yes ;;
7492esac
7493 DLLTOOL=$ac_ct_DLLTOOL
7494 fi
bec39cab
AC
7495else
7496 DLLTOOL="$ac_cv_prog_DLLTOOL"
7497fi
7498
7499if test -n "$ac_tool_prefix"; then
7500 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7501set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
7502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7503$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7504if ${ac_cv_prog_WINDRES+:} false; then :
81ecdfbb 7505 $as_echo_n "(cached) " >&6
bec39cab
AC
7506else
7507 if test -n "$WINDRES"; then
7508 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7509else
7510as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7511for as_dir in $PATH
7512do
7513 IFS=$as_save_IFS
7514 test -z "$as_dir" && as_dir=.
81ecdfbb 7515 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7516 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7517 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 7518 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7519 break 2
7520 fi
7521done
81ecdfbb
RW
7522 done
7523IFS=$as_save_IFS
bec39cab
AC
7524
7525fi
7526fi
7527WINDRES=$ac_cv_prog_WINDRES
7528if test -n "$WINDRES"; then
81ecdfbb
RW
7529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7530$as_echo "$WINDRES" >&6; }
bec39cab 7531else
81ecdfbb
RW
7532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7533$as_echo "no" >&6; }
bec39cab
AC
7534fi
7535
81ecdfbb 7536
bec39cab
AC
7537fi
7538if test -z "$ac_cv_prog_WINDRES"; then
7539 ac_ct_WINDRES=$WINDRES
7540 # Extract the first word of "windres", so it can be a program name with args.
7541set dummy windres; ac_word=$2
81ecdfbb
RW
7542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7543$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7544if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
81ecdfbb 7545 $as_echo_n "(cached) " >&6
bec39cab
AC
7546else
7547 if test -n "$ac_ct_WINDRES"; then
7548 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7549else
7550as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7551for as_dir in $PATH
7552do
7553 IFS=$as_save_IFS
7554 test -z "$as_dir" && as_dir=.
81ecdfbb 7555 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7556 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7557 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 7558 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7559 break 2
7560 fi
7561done
81ecdfbb
RW
7562 done
7563IFS=$as_save_IFS
bec39cab
AC
7564
7565fi
7566fi
7567ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7568if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
7569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7570$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 7571else
81ecdfbb
RW
7572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7573$as_echo "no" >&6; }
c906108c 7574fi
bec39cab 7575
81ecdfbb
RW
7576 if test "x$ac_ct_WINDRES" = x; then
7577 WINDRES=""
7578 else
7579 case $cross_compiling:$ac_tool_warned in
7580yes:)
7581{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7582$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7583ac_tool_warned=yes ;;
7584esac
7585 WINDRES=$ac_ct_WINDRES
7586 fi
c906108c 7587else
bec39cab 7588 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
7589fi
7590
bec39cab 7591
036c3acb
TS
7592case $host_os in
7593 gnu*)
7594 # Needed for GNU Hurd hosts.
7595 if test -n "$ac_tool_prefix"; then
bec39cab
AC
7596 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7597set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
7598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7599$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7600if ${ac_cv_prog_MIG+:} false; then :
81ecdfbb 7601 $as_echo_n "(cached) " >&6
c906108c 7602else
bec39cab
AC
7603 if test -n "$MIG"; then
7604 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7605else
7606as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7607for as_dir in $PATH
7608do
7609 IFS=$as_save_IFS
7610 test -z "$as_dir" && as_dir=.
81ecdfbb 7611 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7612 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7613 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 7614 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7615 break 2
7616 fi
7617done
81ecdfbb
RW
7618 done
7619IFS=$as_save_IFS
bec39cab 7620
c906108c 7621fi
bec39cab
AC
7622fi
7623MIG=$ac_cv_prog_MIG
7624if test -n "$MIG"; then
81ecdfbb
RW
7625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7626$as_echo "$MIG" >&6; }
c906108c 7627else
81ecdfbb
RW
7628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7629$as_echo "no" >&6; }
c906108c
SS
7630fi
7631
81ecdfbb 7632
bec39cab
AC
7633fi
7634if test -z "$ac_cv_prog_MIG"; then
7635 ac_ct_MIG=$MIG
7636 # Extract the first word of "mig", so it can be a program name with args.
7637set dummy mig; ac_word=$2
81ecdfbb
RW
7638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7639$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7640if ${ac_cv_prog_ac_ct_MIG+:} false; then :
81ecdfbb 7641 $as_echo_n "(cached) " >&6
bec39cab
AC
7642else
7643 if test -n "$ac_ct_MIG"; then
7644 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7645else
7646as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7647for as_dir in $PATH
7648do
7649 IFS=$as_save_IFS
7650 test -z "$as_dir" && as_dir=.
81ecdfbb 7651 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7652 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7653 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 7654 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7655 break 2
7656 fi
7657done
81ecdfbb
RW
7658 done
7659IFS=$as_save_IFS
c906108c 7660
bec39cab
AC
7661fi
7662fi
7663ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7664if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
7665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7666$as_echo "$ac_ct_MIG" >&6; }
bec39cab 7667else
81ecdfbb
RW
7668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7669$as_echo "no" >&6; }
bec39cab 7670fi
c906108c 7671
81ecdfbb
RW
7672 if test "x$ac_ct_MIG" = x; then
7673 MIG=""
7674 else
7675 case $cross_compiling:$ac_tool_warned in
7676yes:)
7677{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7678$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7679ac_tool_warned=yes ;;
7680esac
7681 MIG=$ac_ct_MIG
7682 fi
bec39cab
AC
7683else
7684 MIG="$ac_cv_prog_MIG"
7685fi
c906108c 7686
036c3acb 7687 if test x"$MIG" = x; then
d0ac1c44 7688 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
036c3acb
TS
7689 fi
7690 ;;
7691esac
c906108c 7692
bec39cab
AC
7693# ---------------------- #
7694# Checks for libraries. #
7695# ---------------------- #
c906108c 7696
bec39cab 7697# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
7698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7699$as_echo_n "checking for main in -lm... " >&6; }
d0ac1c44 7700if ${ac_cv_lib_m_main+:} false; then :
81ecdfbb 7701 $as_echo_n "(cached) " >&6
bec39cab
AC
7702else
7703 ac_check_lib_save_LIBS=$LIBS
7704LIBS="-lm $LIBS"
81ecdfbb 7705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7706/* end confdefs.h. */
c906108c 7707
c906108c 7708
bec39cab
AC
7709int
7710main ()
7711{
81ecdfbb 7712return main ();
bec39cab
AC
7713 ;
7714 return 0;
7715}
7716_ACEOF
81ecdfbb 7717if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
7718 ac_cv_lib_m_main=yes
7719else
81ecdfbb 7720 ac_cv_lib_m_main=no
bec39cab 7721fi
81ecdfbb
RW
7722rm -f core conftest.err conftest.$ac_objext \
7723 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
7724LIBS=$ac_check_lib_save_LIBS
7725fi
81ecdfbb
RW
7726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7727$as_echo "$ac_cv_lib_m_main" >&6; }
d0ac1c44 7728if test "x$ac_cv_lib_m_main" = xyes; then :
bec39cab
AC
7729 cat >>confdefs.h <<_ACEOF
7730#define HAVE_LIBM 1
7731_ACEOF
7732
7733 LIBS="-lm $LIBS"
c906108c 7734
c906108c 7735fi
bec39cab
AC
7736
7737
bec39cab 7738# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
7739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7740$as_echo_n "checking for library containing gethostbyname... " >&6; }
d0ac1c44 7741if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb 7742 $as_echo_n "(cached) " >&6
bec39cab
AC
7743else
7744 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7746/* end confdefs.h. */
ddc9cd0f 7747
81ecdfbb
RW
7748/* Override any GCC internal prototype to avoid an error.
7749 Use char because int might match the return type of a GCC
7750 builtin and then its argument prototype would still apply. */
bec39cab
AC
7751#ifdef __cplusplus
7752extern "C"
7753#endif
bec39cab
AC
7754char gethostbyname ();
7755int
7756main ()
7757{
81ecdfbb 7758return gethostbyname ();
bec39cab
AC
7759 ;
7760 return 0;
7761}
7762_ACEOF
81ecdfbb
RW
7763for ac_lib in '' nsl; do
7764 if test -z "$ac_lib"; then
7765 ac_res="none required"
7766 else
7767 ac_res=-l$ac_lib
b4e70030 7768 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7769 fi
7770 if ac_fn_c_try_link "$LINENO"; then :
7771 ac_cv_search_gethostbyname=$ac_res
7772fi
7773rm -f core conftest.err conftest.$ac_objext \
7774 conftest$ac_exeext
d0ac1c44 7775 if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb
RW
7776 break
7777fi
7778done
d0ac1c44 7779if ${ac_cv_search_gethostbyname+:} false; then :
ddc9cd0f 7780
bec39cab 7781else
81ecdfbb 7782 ac_cv_search_gethostbyname=no
bec39cab 7783fi
81ecdfbb 7784rm conftest.$ac_ext
bec39cab
AC
7785LIBS=$ac_func_search_save_LIBS
7786fi
81ecdfbb
RW
7787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7788$as_echo "$ac_cv_search_gethostbyname" >&6; }
7789ac_res=$ac_cv_search_gethostbyname
7790if test "$ac_res" != no; then :
7791 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 7792
bec39cab 7793fi
96baa820 7794
c906108c 7795
b4e70030 7796# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
7797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7798$as_echo_n "checking for library containing socketpair... " >&6; }
d0ac1c44 7799if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb 7800 $as_echo_n "(cached) " >&6
b4e70030
JB
7801else
7802 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7804/* end confdefs.h. */
7805
81ecdfbb
RW
7806/* Override any GCC internal prototype to avoid an error.
7807 Use char because int might match the return type of a GCC
7808 builtin and then its argument prototype would still apply. */
b4e70030
JB
7809#ifdef __cplusplus
7810extern "C"
7811#endif
b4e70030
JB
7812char socketpair ();
7813int
7814main ()
7815{
81ecdfbb 7816return socketpair ();
b4e70030
JB
7817 ;
7818 return 0;
7819}
7820_ACEOF
81ecdfbb
RW
7821for ac_lib in '' socket; do
7822 if test -z "$ac_lib"; then
7823 ac_res="none required"
7824 else
7825 ac_res=-l$ac_lib
b4e70030 7826 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7827 fi
7828 if ac_fn_c_try_link "$LINENO"; then :
7829 ac_cv_search_socketpair=$ac_res
7830fi
7831rm -f core conftest.err conftest.$ac_objext \
7832 conftest$ac_exeext
d0ac1c44 7833 if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb
RW
7834 break
7835fi
7836done
d0ac1c44 7837if ${ac_cv_search_socketpair+:} false; then :
b4e70030 7838
b4e70030 7839else
81ecdfbb 7840 ac_cv_search_socketpair=no
b4e70030 7841fi
81ecdfbb 7842rm conftest.$ac_ext
b4e70030
JB
7843LIBS=$ac_func_search_save_LIBS
7844fi
81ecdfbb
RW
7845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7846$as_echo "$ac_cv_search_socketpair" >&6; }
7847ac_res=$ac_cv_search_socketpair
7848if test "$ac_res" != no; then :
7849 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7850
7851fi
7852
7853
233a11ab 7854# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 7855
711a72d3 7856 # Use the system's zlib library.
39f3de7c
L
7857 zlibdir="-L\$(top_builddir)/../zlib"
7858 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 7859
711a72d3
L
7860# Check whether --with-system-zlib was given.
7861if test "${with_system_zlib+set}" = set; then :
afa59b79
L
7862 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7863 zlibdir=
7864 zlibinc=
7865 fi
b040ad30 7866
233a11ab 7867fi
233a11ab 7868
233a11ab 7869
233a11ab 7870
b040ad30 7871
233a11ab 7872
25268153 7873# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
37773e78 7874# On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
25268153
JB
7875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7876$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
d0ac1c44 7877if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7878 $as_echo_n "(cached) " >&6
7879else
7880 ac_func_search_save_LIBS=$LIBS
7881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7882/* end confdefs.h. */
7883
7884/* Override any GCC internal prototype to avoid an error.
7885 Use char because int might match the return type of a GCC
7886 builtin and then its argument prototype would still apply. */
7887#ifdef __cplusplus
7888extern "C"
7889#endif
7890char kinfo_getvmmap ();
7891int
7892main ()
7893{
7894return kinfo_getvmmap ();
7895 ;
7896 return 0;
7897}
7898_ACEOF
37773e78 7899for ac_lib in '' util util-freebsd; do
25268153
JB
7900 if test -z "$ac_lib"; then
7901 ac_res="none required"
7902 else
7903 ac_res=-l$ac_lib
7904 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7905 fi
7906 if ac_fn_c_try_link "$LINENO"; then :
7907 ac_cv_search_kinfo_getvmmap=$ac_res
7908fi
7909rm -f core conftest.err conftest.$ac_objext \
7910 conftest$ac_exeext
d0ac1c44 7911 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7912 break
7913fi
7914done
d0ac1c44 7915if ${ac_cv_search_kinfo_getvmmap+:} false; then :
25268153
JB
7916
7917else
7918 ac_cv_search_kinfo_getvmmap=no
7919fi
7920rm conftest.$ac_ext
7921LIBS=$ac_func_search_save_LIBS
7922fi
7923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
7924$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
7925ac_res=$ac_cv_search_kinfo_getvmmap
7926if test "$ac_res" != no; then :
7927 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7928
7929$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
7930
7931fi
7932
7933
92fce24d
JB
7934# fbsd-nat.c can also use kinfo_getfile.
7935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
7936$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
d0ac1c44 7937if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
7938 $as_echo_n "(cached) " >&6
7939else
7940 ac_func_search_save_LIBS=$LIBS
7941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7942/* end confdefs.h. */
7943
7944/* Override any GCC internal prototype to avoid an error.
7945 Use char because int might match the return type of a GCC
7946 builtin and then its argument prototype would still apply. */
7947#ifdef __cplusplus
7948extern "C"
7949#endif
7950char kinfo_getfile ();
7951int
7952main ()
7953{
7954return kinfo_getfile ();
7955 ;
7956 return 0;
7957}
7958_ACEOF
7959for ac_lib in '' util util-freebsd; do
7960 if test -z "$ac_lib"; then
7961 ac_res="none required"
7962 else
7963 ac_res=-l$ac_lib
7964 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7965 fi
7966 if ac_fn_c_try_link "$LINENO"; then :
7967 ac_cv_search_kinfo_getfile=$ac_res
7968fi
7969rm -f core conftest.err conftest.$ac_objext \
7970 conftest$ac_exeext
d0ac1c44 7971 if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
7972 break
7973fi
7974done
d0ac1c44 7975if ${ac_cv_search_kinfo_getfile+:} false; then :
92fce24d
JB
7976
7977else
7978 ac_cv_search_kinfo_getfile=no
7979fi
7980rm conftest.$ac_ext
7981LIBS=$ac_func_search_save_LIBS
7982fi
7983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
7984$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
7985ac_res=$ac_cv_search_kinfo_getfile
7986if test "$ac_res" != no; then :
7987 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7988
7989$as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
7990
7991fi
7992
7993
77f120bf 7994
016a3251
DD
7995 if test "X$prefix" = "XNONE"; then
7996 acl_final_prefix="$ac_default_prefix"
7997 else
7998 acl_final_prefix="$prefix"
7999 fi
8000 if test "X$exec_prefix" = "XNONE"; then
8001 acl_final_exec_prefix='${prefix}'
8002 else
8003 acl_final_exec_prefix="$exec_prefix"
8004 fi
8005 acl_save_prefix="$prefix"
8006 prefix="$acl_final_prefix"
8007 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8008 prefix="$acl_save_prefix"
8009
8010
8011# Check whether --with-gnu-ld was given.
8012if test "${with_gnu_ld+set}" = set; then :
8013 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8014else
8015 with_gnu_ld=no
8016fi
8017
8018# Prepare PATH_SEPARATOR.
8019# The user is always right.
8020if test "${PATH_SEPARATOR+set}" != set; then
8021 echo "#! /bin/sh" >conf$$.sh
8022 echo "exit 0" >>conf$$.sh
8023 chmod +x conf$$.sh
8024 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8025 PATH_SEPARATOR=';'
8026 else
8027 PATH_SEPARATOR=:
8028 fi
8029 rm -f conf$$.sh
8030fi
8031ac_prog=ld
8032if test "$GCC" = yes; then
8033 # Check if gcc -print-prog-name=ld gives a path.
8034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8035$as_echo_n "checking for ld used by GCC... " >&6; }
8036 case $host in
8037 *-*-mingw*)
8038 # gcc leaves a trailing carriage return which upsets mingw
8039 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8040 *)
8041 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8042 esac
8043 case $ac_prog in
8044 # Accept absolute paths.
8045 [\\/]* | [A-Za-z]:[\\/]*)
8046 re_direlt='/[^/][^/]*/\.\./'
8047 # Canonicalize the path of ld
8048 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8049 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8050 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8051 done
8052 test -z "$LD" && LD="$ac_prog"
8053 ;;
8054 "")
8055 # If it fails, then pretend we aren't using GCC.
8056 ac_prog=ld
8057 ;;
8058 *)
8059 # If it is relative, then search for the first ld in PATH.
8060 with_gnu_ld=unknown
8061 ;;
8062 esac
8063elif test "$with_gnu_ld" = yes; then
8064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8065$as_echo_n "checking for GNU ld... " >&6; }
8066else
8067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8068$as_echo_n "checking for non-GNU ld... " >&6; }
8069fi
d0ac1c44 8070if ${acl_cv_path_LD+:} false; then :
016a3251
DD
8071 $as_echo_n "(cached) " >&6
8072else
8073 if test -z "$LD"; then
8074 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8075 for ac_dir in $PATH; do
8076 test -z "$ac_dir" && ac_dir=.
8077 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8078 acl_cv_path_LD="$ac_dir/$ac_prog"
8079 # Check to see if the program is GNU ld. I'd rather use --version,
8080 # but apparently some GNU ld's only accept -v.
8081 # Break only if it was the GNU/non-GNU ld that we prefer.
8082 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8083 test "$with_gnu_ld" != no && break
8084 else
8085 test "$with_gnu_ld" != yes && break
8086 fi
8087 fi
8088 done
8089 IFS="$ac_save_ifs"
8090else
8091 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8092fi
8093fi
8094
8095LD="$acl_cv_path_LD"
8096if test -n "$LD"; then
8097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8098$as_echo "$LD" >&6; }
8099else
8100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8101$as_echo "no" >&6; }
8102fi
d0ac1c44 8103test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
016a3251
DD
8104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8105$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
d0ac1c44 8106if ${acl_cv_prog_gnu_ld+:} false; then :
016a3251
DD
8107 $as_echo_n "(cached) " >&6
8108else
8109 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8110if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8111 acl_cv_prog_gnu_ld=yes
8112else
8113 acl_cv_prog_gnu_ld=no
8114fi
8115fi
8116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8117$as_echo "$acl_cv_prog_gnu_ld" >&6; }
8118with_gnu_ld=$acl_cv_prog_gnu_ld
8119
8120
8121
8122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8123$as_echo_n "checking for shared library run path origin... " >&6; }
d0ac1c44 8124if ${acl_cv_rpath+:} false; then :
016a3251
DD
8125 $as_echo_n "(cached) " >&6
8126else
8127
8128 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8129 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8130 . ./conftest.sh
8131 rm -f ./conftest.sh
8132 acl_cv_rpath=done
8133
8134fi
8135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8136$as_echo "$acl_cv_rpath" >&6; }
8137 wl="$acl_cv_wl"
8138 libext="$acl_cv_libext"
8139 shlibext="$acl_cv_shlibext"
8140 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8141 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8142 hardcode_direct="$acl_cv_hardcode_direct"
8143 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8144 # Check whether --enable-rpath was given.
8145if test "${enable_rpath+set}" = set; then :
8146 enableval=$enable_rpath; :
8147else
8148 enable_rpath=yes
8149fi
8150
8151
8152
8153
8154
8155
8156
8157
8158 use_additional=yes
8159
8160 acl_save_prefix="$prefix"
8161 prefix="$acl_final_prefix"
8162 acl_save_exec_prefix="$exec_prefix"
8163 exec_prefix="$acl_final_exec_prefix"
8164
8165 eval additional_includedir=\"$includedir\"
8166 eval additional_libdir=\"$libdir\"
8167
8168 exec_prefix="$acl_save_exec_prefix"
8169 prefix="$acl_save_prefix"
77f120bf 8170
6c7a06a3 8171
81ecdfbb
RW
8172# Check whether --with-libiconv-prefix was given.
8173if test "${with_libiconv_prefix+set}" = set; then :
8174 withval=$with_libiconv_prefix;
016a3251
DD
8175 if test "X$withval" = "Xno"; then
8176 use_additional=no
8177 else
8178 if test "X$withval" = "X"; then
8179
8180 acl_save_prefix="$prefix"
8181 prefix="$acl_final_prefix"
8182 acl_save_exec_prefix="$exec_prefix"
8183 exec_prefix="$acl_final_exec_prefix"
8184
8185 eval additional_includedir=\"$includedir\"
8186 eval additional_libdir=\"$libdir\"
8187
8188 exec_prefix="$acl_save_exec_prefix"
8189 prefix="$acl_save_prefix"
8190
8191 else
8192 additional_includedir="$withval/include"
8193 additional_libdir="$withval/lib"
8194 fi
8195 fi
6c7a06a3 8196
81ecdfbb
RW
8197fi
8198
016a3251
DD
8199 LIBICONV=
8200 LTLIBICONV=
8201 INCICONV=
8202 rpathdirs=
8203 ltrpathdirs=
8204 names_already_handled=
8205 names_next_round='iconv '
8206 while test -n "$names_next_round"; do
8207 names_this_round="$names_next_round"
8208 names_next_round=
8209 for name in $names_this_round; do
8210 already_handled=
8211 for n in $names_already_handled; do
8212 if test "$n" = "$name"; then
8213 already_handled=yes
8214 break
8215 fi
8216 done
8217 if test -z "$already_handled"; then
8218 names_already_handled="$names_already_handled $name"
8219 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8220 eval value=\"\$HAVE_LIB$uppername\"
8221 if test -n "$value"; then
8222 if test "$value" = yes; then
8223 eval value=\"\$LIB$uppername\"
8224 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8225 eval value=\"\$LTLIB$uppername\"
8226 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8227 else
8228 :
8229 fi
8230 else
8231 found_dir=
8232 found_la=
8233 found_so=
8234 found_a=
8235 if test $use_additional = yes; then
8236 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8237 found_dir="$additional_libdir"
8238 found_so="$additional_libdir/lib$name.$shlibext"
8239 if test -f "$additional_libdir/lib$name.la"; then
8240 found_la="$additional_libdir/lib$name.la"
8241 fi
8242 else
8243 if test -f "$additional_libdir/lib$name.$libext"; then
8244 found_dir="$additional_libdir"
8245 found_a="$additional_libdir/lib$name.$libext"
8246 if test -f "$additional_libdir/lib$name.la"; then
8247 found_la="$additional_libdir/lib$name.la"
8248 fi
8249 fi
8250 fi
8251 fi
8252 if test "X$found_dir" = "X"; then
8253 for x in $LDFLAGS $LTLIBICONV; do
8254
8255 acl_save_prefix="$prefix"
8256 prefix="$acl_final_prefix"
8257 acl_save_exec_prefix="$exec_prefix"
8258 exec_prefix="$acl_final_exec_prefix"
8259 eval x=\"$x\"
8260 exec_prefix="$acl_save_exec_prefix"
8261 prefix="$acl_save_prefix"
8262
8263 case "$x" in
8264 -L*)
8265 dir=`echo "X$x" | sed -e 's/^X-L//'`
8266 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8267 found_dir="$dir"
8268 found_so="$dir/lib$name.$shlibext"
8269 if test -f "$dir/lib$name.la"; then
8270 found_la="$dir/lib$name.la"
8271 fi
8272 else
8273 if test -f "$dir/lib$name.$libext"; then
8274 found_dir="$dir"
8275 found_a="$dir/lib$name.$libext"
8276 if test -f "$dir/lib$name.la"; then
8277 found_la="$dir/lib$name.la"
8278 fi
8279 fi
8280 fi
8281 ;;
8282 esac
8283 if test "X$found_dir" != "X"; then
8284 break
8285 fi
8286 done
8287 fi
8288 if test "X$found_dir" != "X"; then
8289 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8290 if test "X$found_so" != "X"; then
8291 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8292 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8293 else
8294 haveit=
8295 for x in $ltrpathdirs; do
8296 if test "X$x" = "X$found_dir"; then
8297 haveit=yes
8298 break
8299 fi
8300 done
8301 if test -z "$haveit"; then
8302 ltrpathdirs="$ltrpathdirs $found_dir"
8303 fi
8304 if test "$hardcode_direct" = yes; then
8305 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8306 else
8307 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8308 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8309 haveit=
8310 for x in $rpathdirs; do
8311 if test "X$x" = "X$found_dir"; then
8312 haveit=yes
8313 break
8314 fi
8315 done
8316 if test -z "$haveit"; then
8317 rpathdirs="$rpathdirs $found_dir"
8318 fi
8319 else
8320 haveit=
8321 for x in $LDFLAGS $LIBICONV; do
8322
8323 acl_save_prefix="$prefix"
8324 prefix="$acl_final_prefix"
8325 acl_save_exec_prefix="$exec_prefix"
8326 exec_prefix="$acl_final_exec_prefix"
8327 eval x=\"$x\"
8328 exec_prefix="$acl_save_exec_prefix"
8329 prefix="$acl_save_prefix"
8330
8331 if test "X$x" = "X-L$found_dir"; then
8332 haveit=yes
8333 break
8334 fi
8335 done
8336 if test -z "$haveit"; then
8337 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8338 fi
8339 if test "$hardcode_minus_L" != no; then
8340 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8341 else
8342 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8343 fi
8344 fi
8345 fi
8346 fi
8347 else
8348 if test "X$found_a" != "X"; then
8349 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8350 else
8351 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8352 fi
8353 fi
8354 additional_includedir=
8355 case "$found_dir" in
8356 */lib | */lib/)
8357 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8358 additional_includedir="$basedir/include"
8359 ;;
8360 esac
8361 if test "X$additional_includedir" != "X"; then
8362 if test "X$additional_includedir" != "X/usr/include"; then
8363 haveit=
8364 if test "X$additional_includedir" = "X/usr/local/include"; then
8365 if test -n "$GCC"; then
8366 case $host_os in
8367 linux*) haveit=yes;;
8368 esac
8369 fi
8370 fi
8371 if test -z "$haveit"; then
8372 for x in $CPPFLAGS $INCICONV; do
8373
8374 acl_save_prefix="$prefix"
8375 prefix="$acl_final_prefix"
8376 acl_save_exec_prefix="$exec_prefix"
8377 exec_prefix="$acl_final_exec_prefix"
8378 eval x=\"$x\"
8379 exec_prefix="$acl_save_exec_prefix"
8380 prefix="$acl_save_prefix"
8381
8382 if test "X$x" = "X-I$additional_includedir"; then
8383 haveit=yes
8384 break
8385 fi
8386 done
8387 if test -z "$haveit"; then
8388 if test -d "$additional_includedir"; then
8389 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8390 fi
8391 fi
8392 fi
8393 fi
8394 fi
8395 if test -n "$found_la"; then
8396 save_libdir="$libdir"
8397 case "$found_la" in
8398 */* | *\\*) . "$found_la" ;;
8399 *) . "./$found_la" ;;
8400 esac
8401 libdir="$save_libdir"
8402 for dep in $dependency_libs; do
8403 case "$dep" in
8404 -L*)
8405 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8406 if test "X$additional_libdir" != "X/usr/lib"; then
8407 haveit=
8408 if test "X$additional_libdir" = "X/usr/local/lib"; then
8409 if test -n "$GCC"; then
8410 case $host_os in
8411 linux*) haveit=yes;;
8412 esac
8413 fi
8414 fi
8415 if test -z "$haveit"; then
8416 haveit=
8417 for x in $LDFLAGS $LIBICONV; do
8418
8419 acl_save_prefix="$prefix"
8420 prefix="$acl_final_prefix"
8421 acl_save_exec_prefix="$exec_prefix"
8422 exec_prefix="$acl_final_exec_prefix"
8423 eval x=\"$x\"
8424 exec_prefix="$acl_save_exec_prefix"
8425 prefix="$acl_save_prefix"
8426
8427 if test "X$x" = "X-L$additional_libdir"; then
8428 haveit=yes
8429 break
8430 fi
8431 done
8432 if test -z "$haveit"; then
8433 if test -d "$additional_libdir"; then
8434 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8435 fi
8436 fi
8437 haveit=
8438 for x in $LDFLAGS $LTLIBICONV; do
8439
8440 acl_save_prefix="$prefix"
8441 prefix="$acl_final_prefix"
8442 acl_save_exec_prefix="$exec_prefix"
8443 exec_prefix="$acl_final_exec_prefix"
8444 eval x=\"$x\"
8445 exec_prefix="$acl_save_exec_prefix"
8446 prefix="$acl_save_prefix"
8447
8448 if test "X$x" = "X-L$additional_libdir"; then
8449 haveit=yes
8450 break
8451 fi
8452 done
8453 if test -z "$haveit"; then
8454 if test -d "$additional_libdir"; then
8455 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8456 fi
8457 fi
8458 fi
8459 fi
8460 ;;
8461 -R*)
8462 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8463 if test "$enable_rpath" != no; then
8464 haveit=
8465 for x in $rpathdirs; do
8466 if test "X$x" = "X$dir"; then
8467 haveit=yes
8468 break
8469 fi
8470 done
8471 if test -z "$haveit"; then
8472 rpathdirs="$rpathdirs $dir"
8473 fi
8474 haveit=
8475 for x in $ltrpathdirs; do
8476 if test "X$x" = "X$dir"; then
8477 haveit=yes
8478 break
8479 fi
8480 done
8481 if test -z "$haveit"; then
8482 ltrpathdirs="$ltrpathdirs $dir"
8483 fi
8484 fi
8485 ;;
8486 -l*)
8487 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8488 ;;
8489 *.la)
8490 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8491 ;;
8492 *)
8493 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8494 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8495 ;;
8496 esac
8497 done
8498 fi
8499 else
8500 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8501 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8502 fi
8503 fi
8504 fi
8505 done
8506 done
8507 if test "X$rpathdirs" != "X"; then
8508 if test -n "$hardcode_libdir_separator"; then
8509 alldirs=
8510 for found_dir in $rpathdirs; do
8511 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8512 done
8513 acl_save_libdir="$libdir"
8514 libdir="$alldirs"
8515 eval flag=\"$hardcode_libdir_flag_spec\"
8516 libdir="$acl_save_libdir"
8517 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8518 else
8519 for found_dir in $rpathdirs; do
8520 acl_save_libdir="$libdir"
8521 libdir="$found_dir"
8522 eval flag=\"$hardcode_libdir_flag_spec\"
8523 libdir="$acl_save_libdir"
8524 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8525 done
8526 fi
8527 fi
8528 if test "X$ltrpathdirs" != "X"; then
8529 for found_dir in $ltrpathdirs; do
8530 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8531 done
8532 fi
8533
8534
8535
8536
8537
6c7a06a3 8538
6c7a06a3 8539
81ecdfbb
RW
8540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8541$as_echo_n "checking for iconv... " >&6; }
d0ac1c44 8542if ${am_cv_func_iconv+:} false; then :
81ecdfbb 8543 $as_echo_n "(cached) " >&6
d542061a 8544else
6c7a06a3
TT
8545
8546 am_cv_func_iconv="no, consider installing GNU libiconv"
8547 am_cv_lib_iconv=no
016a3251
DD
8548 am_save_CPPFLAGS="$CPPFLAGS"
8549 CPPFLAGS="$CPPFLAGS $INCICONV"
8550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8551/* end confdefs.h. */
6c7a06a3
TT
8552#include <stdlib.h>
8553#include <iconv.h>
d542061a
UW
8554int
8555main ()
8556{
6c7a06a3 8557iconv_t cd = iconv_open("","");
016a3251
DD
8558 iconv(cd,NULL,NULL,NULL,NULL);
8559 iconv_close(cd);
d542061a
UW
8560 ;
8561 return 0;
8562}
8563_ACEOF
81ecdfbb 8564if ac_fn_c_try_link "$LINENO"; then :
016a3251 8565 am_cv_func_iconv=yes
d542061a 8566fi
81ecdfbb
RW
8567rm -f core conftest.err conftest.$ac_objext \
8568 conftest$ac_exeext conftest.$ac_ext
016a3251 8569 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 8570
016a3251
DD
8571 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8572 for _libs in .libs _libs; do
8573 am_save_CPPFLAGS="$CPPFLAGS"
8574 am_save_LIBS="$LIBS"
8575 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8576 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8578/* end confdefs.h. */
6c7a06a3
TT
8579#include <stdlib.h>
8580#include <iconv.h>
d542061a
UW
8581int
8582main ()
8583{
6c7a06a3 8584iconv_t cd = iconv_open("","");
016a3251
DD
8585 iconv(cd,NULL,NULL,NULL,NULL);
8586 iconv_close(cd);
d542061a
UW
8587 ;
8588 return 0;
8589}
8590_ACEOF
81ecdfbb 8591if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
8592 INCICONV="-I../libiconv/include"
8593 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8594 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8595 am_cv_lib_iconv=yes
8596 am_cv_func_iconv=yes
d542061a 8597fi
81ecdfbb
RW
8598rm -f core conftest.err conftest.$ac_objext \
8599 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
8600 CPPFLAGS="$am_save_CPPFLAGS"
8601 LIBS="$am_save_LIBS"
8602 if test "$am_cv_func_iconv" = "yes"; then
8603 break
8604 fi
8605 done
77f120bf 8606 fi
94ae1714 8607
4edb1e84 8608 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 8609 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 8610 am_save_LIBS="$LIBS"
5d762de0 8611 CPPFLAGS="$CPPFLAGS $INCICONV"
016a3251 8612 LIBS="$LIBS $LIBICONV"
81ecdfbb 8613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8614/* end confdefs.h. */
6c7a06a3
TT
8615#include <stdlib.h>
8616#include <iconv.h>
bec39cab
AC
8617int
8618main ()
8619{
6c7a06a3
TT
8620iconv_t cd = iconv_open("","");
8621 iconv(cd,NULL,NULL,NULL,NULL);
8622 iconv_close(cd);
bec39cab
AC
8623 ;
8624 return 0;
8625}
8626_ACEOF
81ecdfbb 8627if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8628 am_cv_lib_iconv=yes
6c7a06a3 8629 am_cv_func_iconv=yes
627af7ea 8630fi
81ecdfbb
RW
8631rm -f core conftest.err conftest.$ac_objext \
8632 conftest$ac_exeext conftest.$ac_ext
fc3b640d 8633 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 8634 LIBS="$am_save_LIBS"
6c7a06a3
TT
8635 fi
8636
8637fi
81ecdfbb
RW
8638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8639$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
8640 if test "$am_cv_func_iconv" = yes; then
8641
8642$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 8643
016a3251 8644 fi
fc3b640d 8645 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
8646
8647 for element in $INCICONV; do
8648 haveit=
8649 for x in $CPPFLAGS; do
8650
8651 acl_save_prefix="$prefix"
8652 prefix="$acl_final_prefix"
8653 acl_save_exec_prefix="$exec_prefix"
8654 exec_prefix="$acl_final_exec_prefix"
8655 eval x=\"$x\"
8656 exec_prefix="$acl_save_exec_prefix"
8657 prefix="$acl_save_prefix"
8658
8659 if test "X$x" = "X$element"; then
8660 haveit=yes
8661 break
8662 fi
8663 done
8664 if test -z "$haveit"; then
8665 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8666 fi
8667 done
8668
8669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8670$as_echo_n "checking how to link with libiconv... " >&6; }
8671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8672$as_echo "$LIBICONV" >&6; }
94ae1714 8673 else
016a3251
DD
8674 LIBICONV=
8675 LTLIBICONV=
fc3b640d 8676 fi
94ae1714 8677
6c7a06a3 8678
6c7a06a3 8679
016a3251 8680 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
8681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8682$as_echo_n "checking for iconv declaration... " >&6; }
d0ac1c44 8683 if ${am_cv_proto_iconv+:} false; then :
81ecdfbb 8684 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8685else
8686
81ecdfbb 8687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8688/* end confdefs.h. */
8689
6c7a06a3
TT
8690#include <stdlib.h>
8691#include <iconv.h>
8692extern
b4e70030 8693#ifdef __cplusplus
6c7a06a3 8694"C"
b4e70030 8695#endif
6c7a06a3
TT
8696#if defined(__STDC__) || defined(__cplusplus)
8697size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8698#else
8699size_t iconv();
8700#endif
8701
b4e70030
JB
8702int
8703main ()
8704{
6c7a06a3 8705
b4e70030
JB
8706 ;
8707 return 0;
8708}
8709_ACEOF
81ecdfbb 8710if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 8711 am_cv_proto_iconv_arg1=""
4e8d927d 8712else
81ecdfbb 8713 am_cv_proto_iconv_arg1="const"
b4e70030 8714fi
81ecdfbb 8715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
8716 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);"
8717fi
8718
8719 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 8720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 8721 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
8722$as_echo "${ac_t:-
8723 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
8724
8725cat >>confdefs.h <<_ACEOF
8726#define ICONV_CONST $am_cv_proto_iconv_arg1
8727_ACEOF
8728
8729 fi
6c7a06a3
TT
8730
8731
478aac75
DE
8732# GDB may fork/exec the iconv program to get the list of supported character
8733# sets. Allow the user to specify where to find it.
8734# There are several factors affecting the choice of option name:
8735# - There is already --with-libiconv-prefix but we can't use it, it specifies
8736# the build-time location of libiconv files.
8737# - The program we need to find is iconv, which comes with glibc. The user
8738# doesn't necessarily have libiconv installed. Therefore naming this
8739# --with-libiconv-foo feels wrong.
8740# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8741# defined to work on directories not files (though it really doesn't know
8742# the difference).
8743# - Calling this --with-iconv-prefix is perceived to cause too much confusion
8744# with --with-libiconv-prefix.
8745# Putting these together is why the option name is --with-iconv-bin.
8746
8747
8748# Check whether --with-iconv-bin was given.
8749if test "${with_iconv_bin+set}" = set; then :
8750 withval=$with_iconv_bin; iconv_bin="${withval}"
8751
8752cat >>confdefs.h <<_ACEOF
8753#define ICONV_BIN "${iconv_bin}"
8754_ACEOF
8755
8756
8757 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8758 if test "x$prefix" = xNONE; then
8759 test_prefix=/usr/local
8760 else
8761 test_prefix=$prefix
8762 fi
8763 else
8764 test_prefix=$exec_prefix
8765 fi
8766 value=0
8767 case ${iconv_bin} in
8768 "${test_prefix}"|"${test_prefix}/"*|\
8769 '${exec_prefix}'|'${exec_prefix}/'*)
8770 value=1
8771 ;;
8772 esac
8773
8774cat >>confdefs.h <<_ACEOF
8775#define ICONV_BIN_RELOCATABLE $value
8776_ACEOF
8777
8778
8779
8780fi
8781
8782
cb01cfba 8783# For the TUI, we need enhanced curses functionality.
bd8a8e1b 8784if test x"$enable_tui" != xno; then
cb01cfba
JB
8785 prefer_curses=yes
8786fi
8787
8788curses_found=no
8789if test x"$prefer_curses" = xyes; then
8790 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8791 # curses library because the latter might not provide all the
8792 # functionality we need. However, this leads to problems on systems
8793 # where the linker searches /usr/local/lib, but the compiler doesn't
8794 # search /usr/local/include, if ncurses is installed in /usr/local. A
8795 # default installation of ncurses on alpha*-dec-osf* will lead to such
8796 # a situation.
81ecdfbb
RW
8797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8798$as_echo_n "checking for library containing waddstr... " >&6; }
d0ac1c44 8799if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8800 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8801else
8802 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8804/* end confdefs.h. */
8805
81ecdfbb
RW
8806/* Override any GCC internal prototype to avoid an error.
8807 Use char because int might match the return type of a GCC
8808 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8809#ifdef __cplusplus
8810extern "C"
8811#endif
6c7a06a3
TT
8812char waddstr ();
8813int
8814main ()
8815{
81ecdfbb 8816return waddstr ();
6c7a06a3
TT
8817 ;
8818 return 0;
8819}
8820_ACEOF
5007d765 8821for ac_lib in '' ncursesw ncurses cursesX curses; do
81ecdfbb
RW
8822 if test -z "$ac_lib"; then
8823 ac_res="none required"
8824 else
8825 ac_res=-l$ac_lib
8826 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8827 fi
8828 if ac_fn_c_try_link "$LINENO"; then :
8829 ac_cv_search_waddstr=$ac_res
8830fi
8831rm -f core conftest.err conftest.$ac_objext \
8832 conftest$ac_exeext
d0ac1c44 8833 if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb
RW
8834 break
8835fi
8836done
d0ac1c44 8837if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 8838
6c7a06a3 8839else
81ecdfbb
RW
8840 ac_cv_search_waddstr=no
8841fi
8842rm conftest.$ac_ext
8843LIBS=$ac_func_search_save_LIBS
8844fi
8845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8846$as_echo "$ac_cv_search_waddstr" >&6; }
8847ac_res=$ac_cv_search_waddstr
8848if test "$ac_res" != no; then :
8849 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
8850
8851fi
8852
8853
cb01cfba
JB
8854 if test "$ac_cv_search_waddstr" != no; then
8855 curses_found=yes
8856 fi
8857fi
8858
8859# Check whether we should enable the TUI, but only do so if we really
8860# can.
8861if test x"$enable_tui" != xno; then
8862 if test -d $srcdir/tui; then
8863 if test "$curses_found" != no; then
6c7a06a3
TT
8864 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8865 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8866 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8867 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
8868 else
8869 if test x"$enable_tui" = xyes; then
d0ac1c44 8870 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 8871 else
81ecdfbb
RW
8872 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8873$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
8874 fi
8875 fi
8876 fi
8877fi
8878
8879# Since GDB uses Readline, we need termcap functionality. In many
8880# cases this will be provided by the curses library, but some systems
96fe4562 8881# have a separate termcap library, or no curses library at all.
6c7a06a3
TT
8882
8883case $host_os in
8884 cygwin*)
8885 if test -d $srcdir/libtermcap; then
8886 LIBS="../libtermcap/libtermcap.a $LIBS"
8887 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8888 fi ;;
8889 go32* | *djgpp*)
8890 ac_cv_search_tgetent="none required"
8891 ;;
6c7a06a3
TT
8892esac
8893
8894# These are the libraries checked by Readline.
81ecdfbb
RW
8895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8896$as_echo_n "checking for library containing tgetent... " >&6; }
d0ac1c44 8897if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb 8898 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8899else
8900 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8902/* end confdefs.h. */
8903
81ecdfbb
RW
8904/* Override any GCC internal prototype to avoid an error.
8905 Use char because int might match the return type of a GCC
8906 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8907#ifdef __cplusplus
8908extern "C"
8909#endif
6c7a06a3
TT
8910char tgetent ();
8911int
8912main ()
8913{
81ecdfbb 8914return tgetent ();
6c7a06a3
TT
8915 ;
8916 return 0;
8917}
8918_ACEOF
2578ecb1 8919for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
81ecdfbb
RW
8920 if test -z "$ac_lib"; then
8921 ac_res="none required"
8922 else
8923 ac_res=-l$ac_lib
6c7a06a3 8924 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8925 fi
8926 if ac_fn_c_try_link "$LINENO"; then :
8927 ac_cv_search_tgetent=$ac_res
8928fi
8929rm -f core conftest.err conftest.$ac_objext \
8930 conftest$ac_exeext
d0ac1c44 8931 if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb
RW
8932 break
8933fi
8934done
d0ac1c44 8935if ${ac_cv_search_tgetent+:} false; then :
6c7a06a3 8936
6c7a06a3 8937else
81ecdfbb 8938 ac_cv_search_tgetent=no
6c7a06a3 8939fi
81ecdfbb 8940rm conftest.$ac_ext
6c7a06a3
TT
8941LIBS=$ac_func_search_save_LIBS
8942fi
81ecdfbb
RW
8943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8944$as_echo "$ac_cv_search_tgetent" >&6; }
8945ac_res=$ac_cv_search_tgetent
8946if test "$ac_res" != no; then :
8947 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 8948
06825bd1
MK
8949fi
8950
06825bd1 8951
bec39cab 8952if test "$ac_cv_search_tgetent" = no; then
7a85168d 8953 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
8954fi
8955
3841debe 8956
81ecdfbb
RW
8957# Check whether --with-system-readline was given.
8958if test "${with_system_readline+set}" = set; then :
8959 withval=$with_system_readline;
8960fi
6a30b0a5 8961
6a30b0a5
AS
8962
8963if test "$with_system_readline" = yes; then
86c6b807
TT
8964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
8965$as_echo_n "checking whether system readline is new enough... " >&6; }
8966if ${gdb_cv_readline_ok+:} false; then :
8967 $as_echo_n "(cached) " >&6
8968else
8969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8970/* end confdefs.h. */
8971#include <stdio.h>
8972#include <readline/readline.h>
8973int
8974main ()
8975{
8976#if RL_VERSION_MAJOR < 7
8977# error "readline version 7 required"
8978#endif
8979 ;
8980 return 0;
8981}
8982_ACEOF
8983if ac_fn_c_try_compile "$LINENO"; then :
8984 gdb_cv_readline_ok=yes
8985else
8986 gdb_cv_readline_ok=no
8987fi
8988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8989fi
8990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
8991$as_echo "$gdb_cv_readline_ok" >&6; }
8992 if test "$gdb_cv_readline_ok" != yes; then
8993 as_fn_error $? "system readline is not new enough" "$LINENO" 5
8994 fi
8995
6a30b0a5
AS
8996 READLINE=-lreadline
8997 READLINE_DEPS=
8998 READLINE_CFLAGS=
39037522 8999 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
9000else
9001 READLINE='$(READLINE_DIR)/libreadline.a'
9002 READLINE_DEPS='$(READLINE)'
9003 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 9004 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
9005fi
9006
9007
9008
9009
9010
f997c383
SD
9011# Generate jit-reader.h
9012
9013# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9014TARGET_PTR=
9015
9016# The cast to long int works around a bug in the HP C Compiler
9017# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9018# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9019# This bug is HP SR number 8606223364.
9020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9021$as_echo_n "checking size of unsigned long long... " >&6; }
d0ac1c44 9022if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
f997c383
SD
9023 $as_echo_n "(cached) " >&6
9024else
9025 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9026
9027else
9028 if test "$ac_cv_type_unsigned_long_long" = yes; then
9029 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9030$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9031as_fn_error 77 "cannot compute sizeof (unsigned long long)
9032See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9033 else
9034 ac_cv_sizeof_unsigned_long_long=0
9035 fi
9036fi
9037
9038fi
9039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9040$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9041
9042
9043
9044cat >>confdefs.h <<_ACEOF
9045#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9046_ACEOF
9047
9048
9049# The cast to long int works around a bug in the HP C Compiler
9050# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9051# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9052# This bug is HP SR number 8606223364.
9053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9054$as_echo_n "checking size of unsigned long... " >&6; }
d0ac1c44 9055if ${ac_cv_sizeof_unsigned_long+:} false; then :
f997c383
SD
9056 $as_echo_n "(cached) " >&6
9057else
9058 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9059
9060else
9061 if test "$ac_cv_type_unsigned_long" = yes; then
9062 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9063$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9064as_fn_error 77 "cannot compute sizeof (unsigned long)
9065See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9066 else
9067 ac_cv_sizeof_unsigned_long=0
9068 fi
9069fi
9070
9071fi
9072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9073$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9074
9075
9076
9077cat >>confdefs.h <<_ACEOF
9078#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9079_ACEOF
9080
9081
9082# The cast to long int works around a bug in the HP C Compiler
9083# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9084# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9085# This bug is HP SR number 8606223364.
9086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9087$as_echo_n "checking size of unsigned __int128... " >&6; }
d0ac1c44 9088if ${ac_cv_sizeof_unsigned___int128+:} false; then :
f997c383
SD
9089 $as_echo_n "(cached) " >&6
9090else
9091 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9092
9093else
9094 if test "$ac_cv_type_unsigned___int128" = yes; then
9095 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9096$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9097as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9098See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9099 else
9100 ac_cv_sizeof_unsigned___int128=0
9101 fi
9102fi
9103
9104fi
9105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9106$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9107
9108
9109
9110cat >>confdefs.h <<_ACEOF
9111#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9112_ACEOF
9113
9114
9115
9116if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9117 TARGET_PTR="unsigned long"
9118elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9119 TARGET_PTR="unsigned long long"
9120elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9121 TARGET_PTR="unsigned __int128"
9122else
9123 TARGET_PTR="unsigned long"
9124fi
9125
9126
9127ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9128
9129
a2d08b9e
SD
9130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9131$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 9132if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9133 $as_echo_n "(cached) " >&6
9134else
9135 ac_func_search_save_LIBS=$LIBS
9136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9137/* end confdefs.h. */
9138
9139/* Override any GCC internal prototype to avoid an error.
9140 Use char because int might match the return type of a GCC
9141 builtin and then its argument prototype would still apply. */
9142#ifdef __cplusplus
9143extern "C"
9144#endif
9145char dlopen ();
9146int
9147main ()
9148{
9149return dlopen ();
9150 ;
9151 return 0;
9152}
9153_ACEOF
9154for ac_lib in '' dl; do
9155 if test -z "$ac_lib"; then
9156 ac_res="none required"
9157 else
9158 ac_res=-l$ac_lib
9159 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9160 fi
9161 if ac_fn_c_try_link "$LINENO"; then :
9162 ac_cv_search_dlopen=$ac_res
9163fi
9164rm -f core conftest.err conftest.$ac_objext \
9165 conftest$ac_exeext
d0ac1c44 9166 if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9167 break
9168fi
9169done
d0ac1c44 9170if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9171
9172else
9173 ac_cv_search_dlopen=no
9174fi
9175rm conftest.$ac_ext
9176LIBS=$ac_func_search_save_LIBS
9177fi
9178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9179$as_echo "$ac_cv_search_dlopen" >&6; }
9180ac_res=$ac_cv_search_dlopen
9181if test "$ac_res" != no; then :
9182 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9183
9184fi
9185
9186
39037522 9187
b8e0a31c
SD
9188
9189# Check whether --with-jit-reader-dir was given.
9190if test "${with_jit_reader_dir+set}" = set; then :
9191 withval=$with_jit_reader_dir;
9192 JIT_READER_DIR=$withval
9193else
9194 JIT_READER_DIR=${libdir}/gdb
9195fi
9196
9197
9198 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9199 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9200 ac_define_dir=`eval echo $JIT_READER_DIR`
9201 ac_define_dir=`eval echo $ac_define_dir`
9202
9203cat >>confdefs.h <<_ACEOF
9204#define JIT_READER_DIR "$ac_define_dir"
9205_ACEOF
9206
9207
9208
9209
9210 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9211 if test "x$prefix" = xNONE; then
9212 test_prefix=/usr/local
9213 else
9214 test_prefix=$prefix
9215 fi
9216 else
9217 test_prefix=$exec_prefix
9218 fi
9219 value=0
9220 case ${ac_define_dir} in
9221 "${test_prefix}"|"${test_prefix}/"*|\
9222 '${exec_prefix}'|'${exec_prefix}/'*)
9223 value=1
9224 ;;
9225 esac
9226
9227cat >>confdefs.h <<_ACEOF
9228#define JIT_READER_DIR_RELOCATABLE $value
9229_ACEOF
9230
9231
9232
9233
9234
81ecdfbb
RW
9235# Check whether --with-expat was given.
9236if test "${with_expat+set}" = set; then :
9237 withval=$with_expat;
5c39566f
DJ
9238else
9239 with_expat=auto
81ecdfbb
RW
9240fi
9241
9242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9243$as_echo_n "checking whether to use expat... " >&6; }
9244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9245$as_echo "$with_expat" >&6; }
5c39566f
DJ
9246
9247if test "${with_expat}" = no; then
81ecdfbb
RW
9248 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9249$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9250 HAVE_LIBEXPAT=no
9251else
9252
3841debe
DJ
9253
9254
9255
9256
9257
9258
9259
9260 use_additional=yes
9261
9262 acl_save_prefix="$prefix"
9263 prefix="$acl_final_prefix"
9264 acl_save_exec_prefix="$exec_prefix"
9265 exec_prefix="$acl_final_exec_prefix"
9266
9267 eval additional_includedir=\"$includedir\"
9268 eval additional_libdir=\"$libdir\"
9269
9270 exec_prefix="$acl_save_exec_prefix"
9271 prefix="$acl_save_prefix"
9272
9273
81ecdfbb
RW
9274# Check whether --with-libexpat-prefix was given.
9275if test "${with_libexpat_prefix+set}" = set; then :
9276 withval=$with_libexpat_prefix;
3841debe
DJ
9277 if test "X$withval" = "Xno"; then
9278 use_additional=no
9279 else
9280 if test "X$withval" = "X"; then
9281
9282 acl_save_prefix="$prefix"
9283 prefix="$acl_final_prefix"
9284 acl_save_exec_prefix="$exec_prefix"
9285 exec_prefix="$acl_final_exec_prefix"
9286
9287 eval additional_includedir=\"$includedir\"
9288 eval additional_libdir=\"$libdir\"
9289
9290 exec_prefix="$acl_save_exec_prefix"
9291 prefix="$acl_save_prefix"
9292
9293 else
9294 additional_includedir="$withval/include"
9295 additional_libdir="$withval/lib"
9296 fi
9297 fi
9298
81ecdfbb
RW
9299fi
9300
3841debe
DJ
9301 LIBEXPAT=
9302 LTLIBEXPAT=
9303 INCEXPAT=
9304 rpathdirs=
9305 ltrpathdirs=
9306 names_already_handled=
9307 names_next_round='expat '
9308 while test -n "$names_next_round"; do
9309 names_this_round="$names_next_round"
9310 names_next_round=
9311 for name in $names_this_round; do
9312 already_handled=
9313 for n in $names_already_handled; do
9314 if test "$n" = "$name"; then
9315 already_handled=yes
9316 break
9317 fi
9318 done
9319 if test -z "$already_handled"; then
9320 names_already_handled="$names_already_handled $name"
9321 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9322 eval value=\"\$HAVE_LIB$uppername\"
9323 if test -n "$value"; then
9324 if test "$value" = yes; then
9325 eval value=\"\$LIB$uppername\"
9326 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9327 eval value=\"\$LTLIB$uppername\"
9328 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9329 else
9330 :
9331 fi
9332 else
9333 found_dir=
9334 found_la=
9335 found_so=
9336 found_a=
9337 if test $use_additional = yes; then
9338 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9339 found_dir="$additional_libdir"
9340 found_so="$additional_libdir/lib$name.$shlibext"
9341 if test -f "$additional_libdir/lib$name.la"; then
9342 found_la="$additional_libdir/lib$name.la"
9343 fi
9344 else
9345 if test -f "$additional_libdir/lib$name.$libext"; then
9346 found_dir="$additional_libdir"
9347 found_a="$additional_libdir/lib$name.$libext"
9348 if test -f "$additional_libdir/lib$name.la"; then
9349 found_la="$additional_libdir/lib$name.la"
9350 fi
9351 fi
9352 fi
9353 fi
9354 if test "X$found_dir" = "X"; then
9355 for x in $LDFLAGS $LTLIBEXPAT; do
9356
9357 acl_save_prefix="$prefix"
9358 prefix="$acl_final_prefix"
9359 acl_save_exec_prefix="$exec_prefix"
9360 exec_prefix="$acl_final_exec_prefix"
9361 eval x=\"$x\"
9362 exec_prefix="$acl_save_exec_prefix"
9363 prefix="$acl_save_prefix"
9364
9365 case "$x" in
9366 -L*)
9367 dir=`echo "X$x" | sed -e 's/^X-L//'`
9368 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9369 found_dir="$dir"
9370 found_so="$dir/lib$name.$shlibext"
9371 if test -f "$dir/lib$name.la"; then
9372 found_la="$dir/lib$name.la"
9373 fi
9374 else
9375 if test -f "$dir/lib$name.$libext"; then
9376 found_dir="$dir"
9377 found_a="$dir/lib$name.$libext"
9378 if test -f "$dir/lib$name.la"; then
9379 found_la="$dir/lib$name.la"
9380 fi
9381 fi
9382 fi
9383 ;;
9384 esac
9385 if test "X$found_dir" != "X"; then
9386 break
9387 fi
9388 done
9389 fi
9390 if test "X$found_dir" != "X"; then
9391 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9392 if test "X$found_so" != "X"; then
9393 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9394 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9395 else
9396 haveit=
9397 for x in $ltrpathdirs; do
9398 if test "X$x" = "X$found_dir"; then
9399 haveit=yes
9400 break
9401 fi
9402 done
9403 if test -z "$haveit"; then
9404 ltrpathdirs="$ltrpathdirs $found_dir"
9405 fi
9406 if test "$hardcode_direct" = yes; then
9407 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9408 else
9409 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9410 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9411 haveit=
9412 for x in $rpathdirs; do
9413 if test "X$x" = "X$found_dir"; then
9414 haveit=yes
9415 break
9416 fi
9417 done
9418 if test -z "$haveit"; then
9419 rpathdirs="$rpathdirs $found_dir"
9420 fi
9421 else
9422 haveit=
9423 for x in $LDFLAGS $LIBEXPAT; do
9424
9425 acl_save_prefix="$prefix"
9426 prefix="$acl_final_prefix"
9427 acl_save_exec_prefix="$exec_prefix"
9428 exec_prefix="$acl_final_exec_prefix"
9429 eval x=\"$x\"
9430 exec_prefix="$acl_save_exec_prefix"
9431 prefix="$acl_save_prefix"
9432
9433 if test "X$x" = "X-L$found_dir"; then
9434 haveit=yes
9435 break
9436 fi
9437 done
9438 if test -z "$haveit"; then
9439 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9440 fi
9441 if test "$hardcode_minus_L" != no; then
9442 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9443 else
9444 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9445 fi
9446 fi
9447 fi
9448 fi
9449 else
9450 if test "X$found_a" != "X"; then
9451 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9452 else
9453 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9454 fi
9455 fi
9456 additional_includedir=
9457 case "$found_dir" in
9458 */lib | */lib/)
9459 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9460 additional_includedir="$basedir/include"
9461 ;;
9462 esac
9463 if test "X$additional_includedir" != "X"; then
9464 if test "X$additional_includedir" != "X/usr/include"; then
9465 haveit=
9466 if test "X$additional_includedir" = "X/usr/local/include"; then
9467 if test -n "$GCC"; then
9468 case $host_os in
9469 linux*) haveit=yes;;
9470 esac
9471 fi
9472 fi
9473 if test -z "$haveit"; then
9474 for x in $CPPFLAGS $INCEXPAT; do
9475
9476 acl_save_prefix="$prefix"
9477 prefix="$acl_final_prefix"
9478 acl_save_exec_prefix="$exec_prefix"
9479 exec_prefix="$acl_final_exec_prefix"
9480 eval x=\"$x\"
9481 exec_prefix="$acl_save_exec_prefix"
9482 prefix="$acl_save_prefix"
9483
9484 if test "X$x" = "X-I$additional_includedir"; then
9485 haveit=yes
9486 break
9487 fi
9488 done
9489 if test -z "$haveit"; then
9490 if test -d "$additional_includedir"; then
9491 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9492 fi
9493 fi
9494 fi
9495 fi
9496 fi
9497 if test -n "$found_la"; then
9498 save_libdir="$libdir"
9499 case "$found_la" in
9500 */* | *\\*) . "$found_la" ;;
9501 *) . "./$found_la" ;;
9502 esac
9503 libdir="$save_libdir"
9504 for dep in $dependency_libs; do
9505 case "$dep" in
9506 -L*)
9507 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9508 if test "X$additional_libdir" != "X/usr/lib"; then
9509 haveit=
9510 if test "X$additional_libdir" = "X/usr/local/lib"; then
9511 if test -n "$GCC"; then
9512 case $host_os in
9513 linux*) haveit=yes;;
9514 esac
9515 fi
9516 fi
9517 if test -z "$haveit"; then
9518 haveit=
9519 for x in $LDFLAGS $LIBEXPAT; do
9520
9521 acl_save_prefix="$prefix"
9522 prefix="$acl_final_prefix"
9523 acl_save_exec_prefix="$exec_prefix"
9524 exec_prefix="$acl_final_exec_prefix"
9525 eval x=\"$x\"
9526 exec_prefix="$acl_save_exec_prefix"
9527 prefix="$acl_save_prefix"
9528
9529 if test "X$x" = "X-L$additional_libdir"; then
9530 haveit=yes
9531 break
9532 fi
9533 done
9534 if test -z "$haveit"; then
9535 if test -d "$additional_libdir"; then
9536 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9537 fi
9538 fi
9539 haveit=
9540 for x in $LDFLAGS $LTLIBEXPAT; do
9541
9542 acl_save_prefix="$prefix"
9543 prefix="$acl_final_prefix"
9544 acl_save_exec_prefix="$exec_prefix"
9545 exec_prefix="$acl_final_exec_prefix"
9546 eval x=\"$x\"
9547 exec_prefix="$acl_save_exec_prefix"
9548 prefix="$acl_save_prefix"
9549
9550 if test "X$x" = "X-L$additional_libdir"; then
9551 haveit=yes
9552 break
9553 fi
9554 done
9555 if test -z "$haveit"; then
9556 if test -d "$additional_libdir"; then
9557 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9558 fi
9559 fi
9560 fi
9561 fi
9562 ;;
9563 -R*)
9564 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9565 if test "$enable_rpath" != no; then
9566 haveit=
9567 for x in $rpathdirs; do
9568 if test "X$x" = "X$dir"; then
9569 haveit=yes
9570 break
9571 fi
9572 done
9573 if test -z "$haveit"; then
9574 rpathdirs="$rpathdirs $dir"
9575 fi
9576 haveit=
9577 for x in $ltrpathdirs; do
9578 if test "X$x" = "X$dir"; then
9579 haveit=yes
9580 break
9581 fi
9582 done
9583 if test -z "$haveit"; then
9584 ltrpathdirs="$ltrpathdirs $dir"
9585 fi
9586 fi
9587 ;;
9588 -l*)
9589 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9590 ;;
9591 *.la)
9592 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9593 ;;
9594 *)
9595 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9596 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9597 ;;
81ecdfbb
RW
9598 esac
9599 done
9600 fi
9601 else
9602 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9603 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9604 fi
9605 fi
9606 fi
9607 done
9608 done
9609 if test "X$rpathdirs" != "X"; then
9610 if test -n "$hardcode_libdir_separator"; then
9611 alldirs=
9612 for found_dir in $rpathdirs; do
9613 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9614 done
9615 acl_save_libdir="$libdir"
9616 libdir="$alldirs"
9617 eval flag=\"$hardcode_libdir_flag_spec\"
9618 libdir="$acl_save_libdir"
9619 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9620 else
9621 for found_dir in $rpathdirs; do
9622 acl_save_libdir="$libdir"
9623 libdir="$found_dir"
9624 eval flag=\"$hardcode_libdir_flag_spec\"
9625 libdir="$acl_save_libdir"
9626 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9627 done
9628 fi
9629 fi
9630 if test "X$ltrpathdirs" != "X"; then
9631 for found_dir in $ltrpathdirs; do
9632 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9633 done
9634 fi
a9322a30
TT
9635
9636
81ecdfbb 9637 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 9638
81ecdfbb
RW
9639 for element in $INCEXPAT; do
9640 haveit=
9641 for x in $CPPFLAGS; do
a9322a30 9642
81ecdfbb
RW
9643 acl_save_prefix="$prefix"
9644 prefix="$acl_final_prefix"
9645 acl_save_exec_prefix="$exec_prefix"
9646 exec_prefix="$acl_final_exec_prefix"
9647 eval x=\"$x\"
9648 exec_prefix="$acl_save_exec_prefix"
9649 prefix="$acl_save_prefix"
a8111142 9650
81ecdfbb
RW
9651 if test "X$x" = "X$element"; then
9652 haveit=yes
9653 break
9654 fi
9655 done
9656 if test -z "$haveit"; then
9657 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9658 fi
9659 done
a9322a30
TT
9660
9661
81ecdfbb
RW
9662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9663$as_echo_n "checking for libexpat... " >&6; }
d0ac1c44 9664if ${ac_cv_libexpat+:} false; then :
81ecdfbb 9665 $as_echo_n "(cached) " >&6
bec39cab 9666else
bec39cab 9667
81ecdfbb
RW
9668 ac_save_LIBS="$LIBS"
9669 LIBS="$LIBS $LIBEXPAT"
9670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9671/* end confdefs.h. */
81ecdfbb
RW
9672#include "expat.h"
9673int
9674main ()
9675{
9676XML_Parser p = XML_ParserCreate (0);
9677 ;
9678 return 0;
9679}
bec39cab 9680_ACEOF
81ecdfbb
RW
9681if ac_fn_c_try_link "$LINENO"; then :
9682 ac_cv_libexpat=yes
c906108c 9683else
81ecdfbb 9684 ac_cv_libexpat=no
bec39cab 9685fi
81ecdfbb
RW
9686rm -f core conftest.err conftest.$ac_objext \
9687 conftest$ac_exeext conftest.$ac_ext
9688 LIBS="$ac_save_LIBS"
c906108c 9689
95ca63c4 9690fi
81ecdfbb
RW
9691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9692$as_echo "$ac_cv_libexpat" >&6; }
9693 if test "$ac_cv_libexpat" = yes; then
9694 HAVE_LIBEXPAT=yes
bec39cab 9695
81ecdfbb 9696$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 9697
81ecdfbb
RW
9698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9699$as_echo_n "checking how to link with libexpat... " >&6; }
9700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9701$as_echo "$LIBEXPAT" >&6; }
9702 else
9703 HAVE_LIBEXPAT=no
9704 CPPFLAGS="$ac_save_CPPFLAGS"
9705 LIBEXPAT=
9706 LTLIBEXPAT=
9707 fi
95ca63c4
CF
9708
9709
9710
7cb9022a
MK
9711
9712
bec39cab 9713
81ecdfbb
RW
9714 if test "$HAVE_LIBEXPAT" != yes; then
9715 if test "$with_expat" = yes; then
d0ac1c44 9716 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
81ecdfbb
RW
9717 else
9718 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9719$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9720 fi
9721 else
9722 save_LIBS=$LIBS
9723 LIBS="$LIBS $LIBEXPAT"
9724 for ac_func in XML_StopParser
9725do :
9726 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
d0ac1c44 9727if test "x$ac_cv_func_XML_StopParser" = xyes; then :
bec39cab 9728 cat >>confdefs.h <<_ACEOF
81ecdfbb 9729#define HAVE_XML_STOPPARSER 1
bec39cab 9730_ACEOF
95ca63c4 9731
bec39cab 9732fi
bec39cab 9733done
95ca63c4 9734
81ecdfbb
RW
9735 LIBS=$save_LIBS
9736 fi
a9322a30
TT
9737fi
9738
2400729e
UW
9739
9740# Check whether --with-mpfr was given.
9741if test "${with_mpfr+set}" = set; then :
9742 withval=$with_mpfr;
9743else
9744 with_mpfr=auto
9745fi
9746
9747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
9748$as_echo_n "checking whether to use MPFR... " >&6; }
9749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
9750$as_echo "$with_mpfr" >&6; }
9751
9752if test "${with_mpfr}" = no; then
9753 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
9754$as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
9755 HAVE_LIBMPFR=no
9756else
9757
9758
9759
9760
9761
9762
9763
9764
9765 use_additional=yes
9766
9767 acl_save_prefix="$prefix"
9768 prefix="$acl_final_prefix"
9769 acl_save_exec_prefix="$exec_prefix"
9770 exec_prefix="$acl_final_exec_prefix"
9771
9772 eval additional_includedir=\"$includedir\"
9773 eval additional_libdir=\"$libdir\"
9774
9775 exec_prefix="$acl_save_exec_prefix"
9776 prefix="$acl_save_prefix"
9777
9778
9779# Check whether --with-libmpfr-prefix was given.
9780if test "${with_libmpfr_prefix+set}" = set; then :
9781 withval=$with_libmpfr_prefix;
9782 if test "X$withval" = "Xno"; then
9783 use_additional=no
9784 else
9785 if test "X$withval" = "X"; then
9786
9787 acl_save_prefix="$prefix"
9788 prefix="$acl_final_prefix"
9789 acl_save_exec_prefix="$exec_prefix"
9790 exec_prefix="$acl_final_exec_prefix"
9791
9792 eval additional_includedir=\"$includedir\"
9793 eval additional_libdir=\"$libdir\"
9794
9795 exec_prefix="$acl_save_exec_prefix"
9796 prefix="$acl_save_prefix"
9797
9798 else
9799 additional_includedir="$withval/include"
9800 additional_libdir="$withval/lib"
9801 fi
9802 fi
9803
9804fi
9805
9806 LIBMPFR=
9807 LTLIBMPFR=
9808 INCMPFR=
9809 rpathdirs=
9810 ltrpathdirs=
9811 names_already_handled=
da658607 9812 names_next_round='mpfr gmp'
2400729e
UW
9813 while test -n "$names_next_round"; do
9814 names_this_round="$names_next_round"
9815 names_next_round=
9816 for name in $names_this_round; do
9817 already_handled=
9818 for n in $names_already_handled; do
9819 if test "$n" = "$name"; then
9820 already_handled=yes
9821 break
9822 fi
9823 done
9824 if test -z "$already_handled"; then
9825 names_already_handled="$names_already_handled $name"
9826 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9827 eval value=\"\$HAVE_LIB$uppername\"
9828 if test -n "$value"; then
9829 if test "$value" = yes; then
9830 eval value=\"\$LIB$uppername\"
9831 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
9832 eval value=\"\$LTLIB$uppername\"
9833 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
9834 else
9835 :
9836 fi
9837 else
9838 found_dir=
9839 found_la=
9840 found_so=
9841 found_a=
9842 if test $use_additional = yes; then
9843 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9844 found_dir="$additional_libdir"
9845 found_so="$additional_libdir/lib$name.$shlibext"
9846 if test -f "$additional_libdir/lib$name.la"; then
9847 found_la="$additional_libdir/lib$name.la"
9848 fi
9849 else
9850 if test -f "$additional_libdir/lib$name.$libext"; then
9851 found_dir="$additional_libdir"
9852 found_a="$additional_libdir/lib$name.$libext"
9853 if test -f "$additional_libdir/lib$name.la"; then
9854 found_la="$additional_libdir/lib$name.la"
9855 fi
9856 fi
9857 fi
9858 fi
9859 if test "X$found_dir" = "X"; then
9860 for x in $LDFLAGS $LTLIBMPFR; do
9861
9862 acl_save_prefix="$prefix"
9863 prefix="$acl_final_prefix"
9864 acl_save_exec_prefix="$exec_prefix"
9865 exec_prefix="$acl_final_exec_prefix"
9866 eval x=\"$x\"
9867 exec_prefix="$acl_save_exec_prefix"
9868 prefix="$acl_save_prefix"
9869
9870 case "$x" in
9871 -L*)
9872 dir=`echo "X$x" | sed -e 's/^X-L//'`
9873 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9874 found_dir="$dir"
9875 found_so="$dir/lib$name.$shlibext"
9876 if test -f "$dir/lib$name.la"; then
9877 found_la="$dir/lib$name.la"
9878 fi
9879 else
9880 if test -f "$dir/lib$name.$libext"; then
9881 found_dir="$dir"
9882 found_a="$dir/lib$name.$libext"
9883 if test -f "$dir/lib$name.la"; then
9884 found_la="$dir/lib$name.la"
9885 fi
9886 fi
9887 fi
9888 ;;
9889 esac
9890 if test "X$found_dir" != "X"; then
9891 break
9892 fi
9893 done
9894 fi
9895 if test "X$found_dir" != "X"; then
9896 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
9897 if test "X$found_so" != "X"; then
9898 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9899 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9900 else
9901 haveit=
9902 for x in $ltrpathdirs; do
9903 if test "X$x" = "X$found_dir"; then
9904 haveit=yes
9905 break
9906 fi
9907 done
9908 if test -z "$haveit"; then
9909 ltrpathdirs="$ltrpathdirs $found_dir"
9910 fi
9911 if test "$hardcode_direct" = yes; then
9912 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9913 else
9914 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9915 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9916 haveit=
9917 for x in $rpathdirs; do
9918 if test "X$x" = "X$found_dir"; then
9919 haveit=yes
9920 break
9921 fi
9922 done
9923 if test -z "$haveit"; then
9924 rpathdirs="$rpathdirs $found_dir"
9925 fi
9926 else
9927 haveit=
9928 for x in $LDFLAGS $LIBMPFR; do
9929
9930 acl_save_prefix="$prefix"
9931 prefix="$acl_final_prefix"
9932 acl_save_exec_prefix="$exec_prefix"
9933 exec_prefix="$acl_final_exec_prefix"
9934 eval x=\"$x\"
9935 exec_prefix="$acl_save_exec_prefix"
9936 prefix="$acl_save_prefix"
9937
9938 if test "X$x" = "X-L$found_dir"; then
9939 haveit=yes
9940 break
9941 fi
9942 done
9943 if test -z "$haveit"; then
9944 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
9945 fi
9946 if test "$hardcode_minus_L" != no; then
9947 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9948 else
9949 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
9950 fi
9951 fi
9952 fi
9953 fi
9954 else
9955 if test "X$found_a" != "X"; then
9956 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
9957 else
9958 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
9959 fi
9960 fi
9961 additional_includedir=
9962 case "$found_dir" in
9963 */lib | */lib/)
9964 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9965 additional_includedir="$basedir/include"
9966 ;;
9967 esac
9968 if test "X$additional_includedir" != "X"; then
9969 if test "X$additional_includedir" != "X/usr/include"; then
9970 haveit=
9971 if test "X$additional_includedir" = "X/usr/local/include"; then
9972 if test -n "$GCC"; then
9973 case $host_os in
9974 linux*) haveit=yes;;
9975 esac
9976 fi
9977 fi
9978 if test -z "$haveit"; then
9979 for x in $CPPFLAGS $INCMPFR; do
9980
9981 acl_save_prefix="$prefix"
9982 prefix="$acl_final_prefix"
9983 acl_save_exec_prefix="$exec_prefix"
9984 exec_prefix="$acl_final_exec_prefix"
9985 eval x=\"$x\"
9986 exec_prefix="$acl_save_exec_prefix"
9987 prefix="$acl_save_prefix"
9988
9989 if test "X$x" = "X-I$additional_includedir"; then
9990 haveit=yes
9991 break
9992 fi
9993 done
9994 if test -z "$haveit"; then
9995 if test -d "$additional_includedir"; then
9996 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
9997 fi
9998 fi
9999 fi
10000 fi
10001 fi
10002 if test -n "$found_la"; then
10003 save_libdir="$libdir"
10004 case "$found_la" in
10005 */* | *\\*) . "$found_la" ;;
10006 *) . "./$found_la" ;;
10007 esac
10008 libdir="$save_libdir"
10009 for dep in $dependency_libs; do
10010 case "$dep" in
10011 -L*)
10012 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10013 if test "X$additional_libdir" != "X/usr/lib"; then
10014 haveit=
10015 if test "X$additional_libdir" = "X/usr/local/lib"; then
10016 if test -n "$GCC"; then
10017 case $host_os in
10018 linux*) haveit=yes;;
10019 esac
10020 fi
10021 fi
10022 if test -z "$haveit"; then
10023 haveit=
10024 for x in $LDFLAGS $LIBMPFR; do
10025
10026 acl_save_prefix="$prefix"
10027 prefix="$acl_final_prefix"
10028 acl_save_exec_prefix="$exec_prefix"
10029 exec_prefix="$acl_final_exec_prefix"
10030 eval x=\"$x\"
10031 exec_prefix="$acl_save_exec_prefix"
10032 prefix="$acl_save_prefix"
10033
10034 if test "X$x" = "X-L$additional_libdir"; then
10035 haveit=yes
10036 break
10037 fi
10038 done
10039 if test -z "$haveit"; then
10040 if test -d "$additional_libdir"; then
10041 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10042 fi
10043 fi
10044 haveit=
10045 for x in $LDFLAGS $LTLIBMPFR; do
10046
10047 acl_save_prefix="$prefix"
10048 prefix="$acl_final_prefix"
10049 acl_save_exec_prefix="$exec_prefix"
10050 exec_prefix="$acl_final_exec_prefix"
10051 eval x=\"$x\"
10052 exec_prefix="$acl_save_exec_prefix"
10053 prefix="$acl_save_prefix"
10054
10055 if test "X$x" = "X-L$additional_libdir"; then
10056 haveit=yes
10057 break
10058 fi
10059 done
10060 if test -z "$haveit"; then
10061 if test -d "$additional_libdir"; then
10062 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10063 fi
10064 fi
10065 fi
10066 fi
10067 ;;
10068 -R*)
10069 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10070 if test "$enable_rpath" != no; then
10071 haveit=
10072 for x in $rpathdirs; do
10073 if test "X$x" = "X$dir"; then
10074 haveit=yes
10075 break
10076 fi
10077 done
10078 if test -z "$haveit"; then
10079 rpathdirs="$rpathdirs $dir"
10080 fi
10081 haveit=
10082 for x in $ltrpathdirs; do
10083 if test "X$x" = "X$dir"; then
10084 haveit=yes
10085 break
10086 fi
10087 done
10088 if test -z "$haveit"; then
10089 ltrpathdirs="$ltrpathdirs $dir"
10090 fi
10091 fi
10092 ;;
10093 -l*)
10094 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10095 ;;
10096 *.la)
10097 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10098 ;;
10099 *)
10100 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10101 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10102 ;;
10103 esac
10104 done
10105 fi
10106 else
10107 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10108 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10109 fi
10110 fi
10111 fi
10112 done
10113 done
10114 if test "X$rpathdirs" != "X"; then
10115 if test -n "$hardcode_libdir_separator"; then
10116 alldirs=
10117 for found_dir in $rpathdirs; do
10118 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10119 done
10120 acl_save_libdir="$libdir"
10121 libdir="$alldirs"
10122 eval flag=\"$hardcode_libdir_flag_spec\"
10123 libdir="$acl_save_libdir"
10124 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10125 else
10126 for found_dir in $rpathdirs; do
10127 acl_save_libdir="$libdir"
10128 libdir="$found_dir"
10129 eval flag=\"$hardcode_libdir_flag_spec\"
10130 libdir="$acl_save_libdir"
10131 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10132 done
10133 fi
10134 fi
10135 if test "X$ltrpathdirs" != "X"; then
10136 for found_dir in $ltrpathdirs; do
10137 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10138 done
10139 fi
10140
10141
10142 ac_save_CPPFLAGS="$CPPFLAGS"
10143
10144 for element in $INCMPFR; do
10145 haveit=
10146 for x in $CPPFLAGS; do
10147
10148 acl_save_prefix="$prefix"
10149 prefix="$acl_final_prefix"
10150 acl_save_exec_prefix="$exec_prefix"
10151 exec_prefix="$acl_final_exec_prefix"
10152 eval x=\"$x\"
10153 exec_prefix="$acl_save_exec_prefix"
10154 prefix="$acl_save_prefix"
10155
10156 if test "X$x" = "X$element"; then
10157 haveit=yes
10158 break
10159 fi
10160 done
10161 if test -z "$haveit"; then
10162 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10163 fi
10164 done
10165
10166
10167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10168$as_echo_n "checking for libmpfr... " >&6; }
d0ac1c44 10169if ${ac_cv_libmpfr+:} false; then :
2400729e
UW
10170 $as_echo_n "(cached) " >&6
10171else
10172
10173 ac_save_LIBS="$LIBS"
10174 LIBS="$LIBS $LIBMPFR"
10175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10176/* end confdefs.h. */
10177#include <mpfr.h>
10178int
10179main ()
10180{
10181mpfr_exp_t exp; mpfr_t x;
10182 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10183 ;
10184 return 0;
10185}
10186_ACEOF
10187if ac_fn_c_try_link "$LINENO"; then :
10188 ac_cv_libmpfr=yes
10189else
10190 ac_cv_libmpfr=no
10191fi
10192rm -f core conftest.err conftest.$ac_objext \
10193 conftest$ac_exeext conftest.$ac_ext
10194 LIBS="$ac_save_LIBS"
10195
10196fi
10197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10198$as_echo "$ac_cv_libmpfr" >&6; }
10199 if test "$ac_cv_libmpfr" = yes; then
10200 HAVE_LIBMPFR=yes
10201
10202$as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10203
10204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10205$as_echo_n "checking how to link with libmpfr... " >&6; }
10206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10207$as_echo "$LIBMPFR" >&6; }
10208 else
10209 HAVE_LIBMPFR=no
10210 CPPFLAGS="$ac_save_CPPFLAGS"
10211 LIBMPFR=
10212 LTLIBMPFR=
10213 fi
10214
10215
10216
10217
10218
10219
10220 if test "$HAVE_LIBMPFR" != yes; then
10221 if test "$with_mpfr" = yes; then
d0ac1c44 10222 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
2400729e
UW
10223 else
10224 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10225$as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10226 fi
10227 fi
10228fi
10229
d344e670
DE
10230# --------------------- #
10231# Check for libpython. #
10232# --------------------- #
10233
a9322a30 10234
a9322a30
TT
10235
10236
ec685c5e 10237
0c4a4063 10238
81ecdfbb
RW
10239# Check whether --with-python was given.
10240if test "${with_python+set}" = set; then :
10241 withval=$with_python;
bec39cab 10242else
81ecdfbb 10243 with_python=auto
bec39cab 10244fi
bec39cab 10245
81ecdfbb
RW
10246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10247$as_echo_n "checking whether to use python... " >&6; }
10248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10249$as_echo "$with_python" >&6; }
9a156167 10250
81ecdfbb
RW
10251if test "${with_python}" = no; then
10252 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10253$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10254 have_libpython=no
bec39cab 10255else
81ecdfbb 10256 case "${with_python}" in
8c85a4e2 10257 [\\/]* | ?:[\\/]*)
ec685c5e
DE
10258 if test -d ${with_python}; then
10259 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10260 python_prog="${with_python}/bin/python"
0c4a4063 10261 python_prefix=
9c4ea6c5
JB
10262 # If python does not exit ${with_python}/bin, then try in
10263 # ${with_python}. On Windows/MinGW, this is where the Python
10264 # executable is.
10265 if test ! -x "${python_prog}"; then
10266 python_prog="${with_python}/python"
10267 python_prefix=
10268 fi
e7a30f46 10269 if test ! -x "${python_prog}"; then
ec685c5e
DE
10270 # Fall back to gdb 7.0/7.1 behaviour.
10271 python_prog=missing
0c4a4063 10272 python_prefix=${with_python}
ec685c5e 10273 fi
e7a30f46 10274 elif test -x "${with_python}"; then
ec685c5e
DE
10275 # While we can't run python compiled for $host (unless host == build),
10276 # the user could write a script that provides the needed information,
10277 # so we support that.
ec685c5e 10278 python_prog=${with_python}
0c4a4063 10279 python_prefix=
ec685c5e 10280 else
d0ac1c44 10281 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
ec685c5e 10282 fi
81ecdfbb 10283 ;;
ec685c5e
DE
10284 */*)
10285 # Disallow --with-python=foo/bar.
d0ac1c44 10286 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
81ecdfbb 10287 ;;
ec685c5e
DE
10288 *)
10289 # The user has either specified auto, yes, or the name of the python
10290 # program assumed to be in $PATH.
10291 python_prefix=
10292 case "${with_python}" in
10293 yes | auto)
10294 if test ${build} = ${host}; then
10295 # Extract the first word of "python", so it can be a program name with args.
10296set dummy python; ac_word=$2
10297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10298$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10299if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10300 $as_echo_n "(cached) " >&6
10301else
10302 case $python_prog_path in
10303 [\\/]* | ?:[\\/]*)
10304 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10305 ;;
10306 *)
10307 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10308for as_dir in $PATH
10309do
10310 IFS=$as_save_IFS
10311 test -z "$as_dir" && as_dir=.
10312 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10313 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10314 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10315 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10316 break 2
10317 fi
10318done
10319 done
10320IFS=$as_save_IFS
10321
10322 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10323 ;;
10324esac
10325fi
10326python_prog_path=$ac_cv_path_python_prog_path
10327if test -n "$python_prog_path"; then
10328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10329$as_echo "$python_prog_path" >&6; }
10330else
10331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10332$as_echo "no" >&6; }
10333fi
10334
10335
10336 if test "${python_prog_path}" = missing; then
10337 python_prog=missing
10338 else
10339 python_prog=${python_prog_path}
10340 fi
10341 else
10342 # Not much we can do except assume the cross-compiler will find the
10343 # right files.
10344 python_prog=missing
10345 fi
10346 ;;
10347 *)
10348 # While we can't run python compiled for $host (unless host == build),
10349 # the user could write a script that provides the needed information,
10350 # so we support that.
10351 python_prog="${with_python}"
10352 # Extract the first word of "${python_prog}", so it can be a program name with args.
10353set dummy ${python_prog}; ac_word=$2
10354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10355$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10356if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10357 $as_echo_n "(cached) " >&6
10358else
10359 case $python_prog_path in
10360 [\\/]* | ?:[\\/]*)
10361 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10362 ;;
10363 *)
10364 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10365for as_dir in $PATH
10366do
10367 IFS=$as_save_IFS
10368 test -z "$as_dir" && as_dir=.
10369 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10370 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10371 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10372 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10373 break 2
10374 fi
10375done
10376 done
10377IFS=$as_save_IFS
10378
10379 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10380 ;;
10381esac
10382fi
10383python_prog_path=$ac_cv_path_python_prog_path
10384if test -n "$python_prog_path"; then
10385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10386$as_echo "$python_prog_path" >&6; }
10387else
10388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10389$as_echo "no" >&6; }
10390fi
10391
10392
10393 if test "${python_prog_path}" = missing; then
d0ac1c44 10394 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
ec685c5e
DE
10395 fi
10396 ;;
10397 esac
81ecdfbb
RW
10398 esac
10399
ec685c5e 10400 if test "${python_prog}" != missing; then
e7a30f46
DE
10401 # We have a python program to use, but it may be too old.
10402 # Don't flag an error for --with-python=auto (the default).
10403 have_python_config=yes
ec685c5e
DE
10404 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10405 if test $? != 0; then
e7a30f46
DE
10406 have_python_config=failed
10407 if test "${with_python}" != auto; then
d0ac1c44 10408 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
e7a30f46 10409 fi
ec685c5e
DE
10410 fi
10411 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10412 if test $? != 0; then
e7a30f46
DE
10413 have_python_config=failed
10414 if test "${with_python}" != auto; then
d0ac1c44 10415 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
e7a30f46 10416 fi
ec685c5e 10417 fi
0c4a4063
DE
10418 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10419 if test $? != 0; then
e7a30f46
DE
10420 have_python_config=failed
10421 if test "${with_python}" != auto; then
d0ac1c44 10422 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
e7a30f46 10423 fi
0c4a4063 10424 fi
ec685c5e 10425 else
ac534cba
JB
10426 # We do not have a python executable we can use to determine where
10427 # to find the Python headers and libs. We cannot guess the include
10428 # path from the python_prefix either, because that include path
10429 # depends on the Python version. So, there is nothing much we can
10430 # do except assume that the compiler will be able to find those files.
10431 python_includes=
10432 python_libs=
0c4a4063 10433 have_python_config=no
ec685c5e 10434 fi
bec39cab 10435
ec685c5e
DE
10436 # If we have python-config, only try the configuration it provides.
10437 # Otherwise fallback on the old way of trying different versions of
10438 # python in turn.
81ecdfbb 10439
ec685c5e
DE
10440 have_libpython=no
10441 if test "${have_python_config}" = yes; then
c1039e3c
JB
10442 # Determine the Python version by extracting "-lpython<version>"
10443 # part of the python_libs. <version> is usually X.Y with X and Y
10444 # being decimal numbers, but can also be XY (seen on Windows).
10445 #
10446 # The extraction is performed using sed with a regular expression.
10447 # Initially, the regexp used was using the '?' quantifier to make
10448 # the dot in the version number optional. Unfortunately, this
10449 # does not work with non-GNU versions of sed because, because of
10450 # what looks like a limitation (the '?' quantifier does not work
10451 # with back-references). We work around this limitation by using
10452 # the '*' quantifier instead. It means that, in theory, we might
10453 # match unexpected version strings such as "-lpython2..7", but
10454 # this seems unlikely in practice. And even if that happens,
10455 # an error will be triggered later on, when checking that version
10456 # number.
ec685c5e 10457 python_version=`echo " ${python_libs} " \
c1039e3c 10458 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
10459 case "${python_version}" in
10460 python*)
ec685c5e
DE
10461
10462 version=${python_version}
10463
10464 new_CPPFLAGS=${python_includes}
10465 new_LIBS=${python_libs}
81ecdfbb
RW
10466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10467$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10468 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10469 save_LIBS=$LIBS
ec685c5e 10470 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10471 LIBS="$new_LIBS $LIBS"
ec685c5e 10472 found_usable_python=no
81ecdfbb 10473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10474/* end confdefs.h. */
ac534cba 10475#include "Python.h"
81ecdfbb
RW
10476int
10477main ()
10478{
10479Py_Initialize ();
10480 ;
10481 return 0;
10482}
bec39cab 10483_ACEOF
81ecdfbb 10484if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10485 have_libpython=${version}
10486 found_usable_python=yes
ac534cba
JB
10487 PYTHON_CPPFLAGS=$new_CPPFLAGS
10488 PYTHON_LIBS=$new_LIBS
9a156167 10489fi
81ecdfbb
RW
10490rm -f core conftest.err conftest.$ac_objext \
10491 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10492 CPPFLAGS=$save_CPPFLAGS
10493 LIBS=$save_LIBS
ec685c5e
DE
10494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10495$as_echo "${found_usable_python}" >&6; }
9a156167 10496
0c4a4063
DE
10497 ;;
10498 *)
d0ac1c44 10499 as_fn_error $? "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
10500 ;;
10501 esac
e7a30f46 10502 elif test "${have_python_config}" != failed; then
ec685c5e 10503 if test "${have_libpython}" = no; then
9a156167 10504
420697bb
TT
10505 version=python2.7
10506
10507 new_CPPFLAGS=${python_includes}
bf27f0e2 10508 new_LIBS="-lpython2.7 ${python_libs}"
420697bb
TT
10509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10510$as_echo_n "checking for ${version}... " >&6; }
10511 save_CPPFLAGS=$CPPFLAGS
10512 save_LIBS=$LIBS
10513 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10514 LIBS="$new_LIBS $LIBS"
420697bb
TT
10515 found_usable_python=no
10516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10517/* end confdefs.h. */
ac534cba 10518#include "Python.h"
420697bb
TT
10519int
10520main ()
10521{
10522Py_Initialize ();
10523 ;
10524 return 0;
10525}
10526_ACEOF
10527if ac_fn_c_try_link "$LINENO"; then :
10528 have_libpython=${version}
10529 found_usable_python=yes
ac534cba
JB
10530 PYTHON_CPPFLAGS=$new_CPPFLAGS
10531 PYTHON_LIBS=$new_LIBS
420697bb
TT
10532fi
10533rm -f core conftest.err conftest.$ac_objext \
10534 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10535 CPPFLAGS=$save_CPPFLAGS
10536 LIBS=$save_LIBS
420697bb
TT
10537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10538$as_echo "${found_usable_python}" >&6; }
10539
10540 fi
10541 if test "${have_libpython}" = no; then
10542
ec685c5e
DE
10543 version=python2.6
10544
10545 new_CPPFLAGS=${python_includes}
bf27f0e2 10546 new_LIBS="-lpython2.6 ${python_libs}"
ec685c5e
DE
10547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10548$as_echo_n "checking for ${version}... " >&6; }
10549 save_CPPFLAGS=$CPPFLAGS
10550 save_LIBS=$LIBS
10551 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10552 LIBS="$new_LIBS $LIBS"
ec685c5e
DE
10553 found_usable_python=no
10554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10555/* end confdefs.h. */
ac534cba 10556#include "Python.h"
ec685c5e
DE
10557int
10558main ()
10559{
10560Py_Initialize ();
10561 ;
10562 return 0;
10563}
10564_ACEOF
10565if ac_fn_c_try_link "$LINENO"; then :
10566 have_libpython=${version}
10567 found_usable_python=yes
ac534cba
JB
10568 PYTHON_CPPFLAGS=$new_CPPFLAGS
10569 PYTHON_LIBS=$new_LIBS
ec685c5e 10570fi
81ecdfbb
RW
10571rm -f core conftest.err conftest.$ac_objext \
10572 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10573 CPPFLAGS=$save_CPPFLAGS
10574 LIBS=$save_LIBS
ec685c5e
DE
10575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10576$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10577
ec685c5e
DE
10578 fi
10579 fi
9c4ea6c5 10580 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
10581
10582$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
10583
9c4ea6c5 10584 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
10585
10586$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
10587
81ecdfbb 10588 fi
ec685c5e
DE
10589
10590 if test "${have_libpython}" = no; then
81ecdfbb
RW
10591 case "${with_python}" in
10592 yes)
d0ac1c44 10593 as_fn_error $? "python is missing or unusable" "$LINENO" 5
81ecdfbb
RW
10594 ;;
10595 auto)
10596 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10597$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10598 ;;
10599 *)
d0ac1c44 10600 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
81ecdfbb
RW
10601 ;;
10602 esac
0c4a4063
DE
10603 else
10604 if test -n "${python_prefix}"; then
10605
10606cat >>confdefs.h <<_ACEOF
10607#define WITH_PYTHON_PATH "${python_prefix}"
10608_ACEOF
10609
10610
10611 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10612 if test "x$prefix" = xNONE; then
10613 test_prefix=/usr/local
10614 else
10615 test_prefix=$prefix
10616 fi
10617 else
10618 test_prefix=$exec_prefix
10619 fi
10620 value=0
10621 case ${python_prefix} in
10622 "${test_prefix}"|"${test_prefix}/"*|\
10623 '${exec_prefix}'|'${exec_prefix}/'*)
10624 value=1
10625 ;;
10626 esac
10627
10628cat >>confdefs.h <<_ACEOF
10629#define PYTHON_PATH_RELOCATABLE $value
10630_ACEOF
10631
10632
10633 fi
81ecdfbb 10634 fi
436868fb 10635fi
436868fb 10636
ec685c5e 10637if test "${have_libpython}" != no; then
436868fb 10638
81ecdfbb 10639$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 10640
81ecdfbb
RW
10641 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10642 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10643 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 10644 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 10645 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 10646
81ecdfbb
RW
10647 # Flags needed to compile Python code (taken from python-config --cflags).
10648 # We cannot call python-config directly because it will output whatever was
10649 # used when compiling the Python interpreter itself, including flags which
10650 # would make the python-related objects be compiled differently from the
10651 # rest of GDB (e.g., -O2 and -fPIC).
10652 if test "${GCC}" = yes; then
ae292b3a
TT
10653 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
10654 # Python headers recommend -DNDEBUG, but it's unclear if that just
10655 # refers to building Python itself. In release mode, though, it
10656 # doesn't hurt for the Python code in gdb to follow.
10657 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
81ecdfbb 10658 fi
436868fb 10659
81ecdfbb
RW
10660 if test "x${tentative_python_cflags}" != x; then
10661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10662$as_echo_n "checking compiler flags for python code... " >&6; }
10663 for flag in ${tentative_python_cflags}; do
10664 # Check that the compiler accepts it
10665 saved_CFLAGS="$CFLAGS"
10666 CFLAGS="$CFLAGS $flag"
10667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10668/* end confdefs.h. */
81ecdfbb 10669
a9322a30
TT
10670int
10671main ()
10672{
a9322a30
TT
10673
10674 ;
10675 return 0;
10676}
bec39cab 10677_ACEOF
81ecdfbb
RW
10678if ac_fn_c_try_compile "$LINENO"; then :
10679 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 10680fi
81ecdfbb
RW
10681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10682 CFLAGS="$saved_CFLAGS"
10683 done
10684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10685$as_echo "${PYTHON_CFLAGS}" >&6; }
10686 fi
043b6510 10687
c83393b9
JB
10688 # On x64 Windows, Python's include headers, and pyconfig.h in
10689 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10690 # version of Windows. Unfortunately, MS_WIN64 is only defined if
10691 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
10692 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10693 # The issue was reported to the Python community, but still isn't
10694 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10695
043b6510 10696 case "$gdb_host" in
c83393b9
JB
10697 mingw64)
10698 if test "${GCC}" = yes; then
10699 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10700 fi
10701 ;;
043b6510 10702 esac
a8db4212
YPK
10703
10704 # Note that "python -m threading" cannot be used to check for
10705 # threading support due to a bug in Python 2.7.3
10706 # (http://bugs.python.org/issue15567).
10707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
10708$as_echo_n "checking whether python supports threads... " >&6; }
10709 saved_CPPFLAGS="${CPPFLAGS}"
10710 CPPFLAGS="${PYTHON_CPPFLAGS}"
10711 # Note that the test is reversed so that python_has_threads=yes on
10712 # unexpected failures.
10713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10714/* end confdefs.h. */
10715
10716#include <Python.h>
10717#ifdef WITH_THREAD
10718# error
10719#endif
10720
10721_ACEOF
10722if ac_fn_c_try_cpp "$LINENO"; then :
10723 python_has_threads=no
10724else
10725 python_has_threads=yes
10726fi
d0ac1c44 10727rm -f conftest.err conftest.i conftest.$ac_ext
a8db4212
YPK
10728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
10729$as_echo "${python_has_threads}" >&6; }
10730 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 10731else
6dddc817
DE
10732 # Even if Python support is not compiled in, we need to have this file
10733 # included so that the "python" command, et.al., still exists.
8fd8d003 10734 CONFIG_OBS="$CONFIG_OBS python/python.o"
6dddc817 10735 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 10736fi
9a156167 10737
a4a1c157
PA
10738# Work around Python http://bugs.python.org/issue10112. See also
10739# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10740# no effect. Note that the only test after this that uses Python is
10741# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10742# run without -export-dynamic too.
10743PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10744
10745
ed3ef339
DE
10746
10747
4df42755
DE
10748 if test "${have_libpython}" != no; then
10749 HAVE_PYTHON_TRUE=
10750 HAVE_PYTHON_FALSE='#'
10751else
10752 HAVE_PYTHON_TRUE='#'
10753 HAVE_PYTHON_FALSE=
10754fi
10755
ed3ef339
DE
10756
10757# -------------------- #
10758# Check for libguile. #
10759# -------------------- #
10760
10761
e1402065
DE
10762
10763
10764
10765
10766# Check whether --with-guile was given.
10767if test "${with_guile+set}" = set; then :
10768 withval=$with_guile;
10769else
10770 with_guile=auto
10771fi
10772
10773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10774$as_echo_n "checking whether to use guile... " >&6; }
10775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10776$as_echo "$with_guile" >&6; }
10777
ed3ef339
DE
10778# Extract the first word of "pkg-config", so it can be a program name with args.
10779set dummy pkg-config; ac_word=$2
10780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10781$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10782if ${ac_cv_path_pkg_config_prog_path+:} false; then :
ed3ef339
DE
10783 $as_echo_n "(cached) " >&6
10784else
10785 case $pkg_config_prog_path in
10786 [\\/]* | ?:[\\/]*)
10787 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10788 ;;
10789 *)
10790 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10791for as_dir in $PATH
10792do
10793 IFS=$as_save_IFS
10794 test -z "$as_dir" && as_dir=.
10795 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10796 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ed3ef339
DE
10797 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10798 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10799 break 2
10800 fi
10801done
10802 done
10803IFS=$as_save_IFS
10804
10805 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10806 ;;
10807esac
10808fi
10809pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10810if test -n "$pkg_config_prog_path"; then
10811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10812$as_echo "$pkg_config_prog_path" >&6; }
10813else
10814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10815$as_echo "no" >&6; }
10816fi
10817
10818
10819
6e66f753 10820try_guile_versions="guile-2.0"
ed3ef339
DE
10821have_libguile=no
10822case "${with_guile}" in
10823no)
10824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10825$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10826 ;;
10827auto)
e1402065
DE
10828 if test "${pkg_config_prog_path}" = "missing"; then
10829 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10830$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10831 else
ed3ef339
DE
10832
10833 pkg_config=${pkg_config_prog_path}
10834 guile_version_list=${try_guile_versions}
10835 flag_errors=no
10836
ed3ef339
DE
10837 found_usable_guile=checking
10838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10839$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10840 for guile_version in ${guile_version_list}; do
10841 ${pkg_config} --exists ${guile_version} 2>/dev/null
10842 if test $? != 0; then
10843 continue
10844 fi
10845 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10846 if test $? != 0; then
d0ac1c44 10847 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
10848 fi
10849 new_LIBS=`${pkg_config} --libs ${guile_version}`
10850 if test $? != 0; then
d0ac1c44 10851 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
10852 fi
10853 found_usable_guile=${guile_version}
10854 break
10855 done
10856 if test "${found_usable_guile}" = "checking"; then
10857 if test "${flag_errors}" = "yes"; then
d0ac1c44 10858 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
10859 else
10860 found_usable_guile=no
10861 fi
10862 fi
10863 if test "${found_usable_guile}" != no; then
10864 save_CPPFLAGS=$CPPFLAGS
10865 save_LIBS=$LIBS
10866 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10867 LIBS="$LIBS $new_LIBS"
10868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10869/* end confdefs.h. */
10870#include "libguile.h"
10871int
10872main ()
10873{
10874scm_init_guile ();
10875 ;
10876 return 0;
10877}
10878_ACEOF
10879if ac_fn_c_try_link "$LINENO"; then :
10880 have_libguile=yes
10881 GUILE_CPPFLAGS=$new_CPPFLAGS
10882 GUILE_LIBS=$new_LIBS
10883else
10884 found_usable_guile=no
10885fi
10886rm -f core conftest.err conftest.$ac_objext \
10887 conftest$ac_exeext conftest.$ac_ext
92fab5a6 10888 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 10889if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
10890
10891$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10892
10893
10894fi
10895
ed3ef339
DE
10896 CPPFLAGS=$save_CPPFLAGS
10897 LIBS=$save_LIBS
10898 if test "${found_usable_guile}" = no; then
10899 if test "${flag_errors}" = yes; then
10900 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10901$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
10902as_fn_error $? "linking guile version ${guile_version} test program failed
10903See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
10904 fi
10905 fi
10906 fi
10907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10908$as_echo "${found_usable_guile}" >&6; }
10909
e1402065 10910 fi
ed3ef339
DE
10911 ;;
10912yes)
e1402065 10913 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 10914 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 10915 fi
ed3ef339
DE
10916
10917 pkg_config=${pkg_config_prog_path}
10918 guile_version_list=${try_guile_versions}
10919 flag_errors=yes
10920
ed3ef339
DE
10921 found_usable_guile=checking
10922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10923$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10924 for guile_version in ${guile_version_list}; do
10925 ${pkg_config} --exists ${guile_version} 2>/dev/null
10926 if test $? != 0; then
10927 continue
10928 fi
10929 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10930 if test $? != 0; then
d0ac1c44 10931 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
10932 fi
10933 new_LIBS=`${pkg_config} --libs ${guile_version}`
10934 if test $? != 0; then
d0ac1c44 10935 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
10936 fi
10937 found_usable_guile=${guile_version}
10938 break
10939 done
10940 if test "${found_usable_guile}" = "checking"; then
10941 if test "${flag_errors}" = "yes"; then
d0ac1c44 10942 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
10943 else
10944 found_usable_guile=no
10945 fi
10946 fi
10947 if test "${found_usable_guile}" != no; then
10948 save_CPPFLAGS=$CPPFLAGS
10949 save_LIBS=$LIBS
10950 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10951 LIBS="$LIBS $new_LIBS"
10952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10953/* end confdefs.h. */
10954#include "libguile.h"
10955int
10956main ()
10957{
10958scm_init_guile ();
10959 ;
10960 return 0;
10961}
10962_ACEOF
10963if ac_fn_c_try_link "$LINENO"; then :
10964 have_libguile=yes
10965 GUILE_CPPFLAGS=$new_CPPFLAGS
10966 GUILE_LIBS=$new_LIBS
10967else
10968 found_usable_guile=no
10969fi
10970rm -f core conftest.err conftest.$ac_objext \
10971 conftest$ac_exeext conftest.$ac_ext
92fab5a6 10972 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 10973if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
10974
10975$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10976
10977
10978fi
10979
ed3ef339
DE
10980 CPPFLAGS=$save_CPPFLAGS
10981 LIBS=$save_LIBS
10982 if test "${found_usable_guile}" = no; then
10983 if test "${flag_errors}" = yes; then
10984 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10985$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
10986as_fn_error $? "linking guile version ${guile_version} test program failed
10987See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
10988 fi
10989 fi
10990 fi
10991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10992$as_echo "${found_usable_guile}" >&6; }
10993
10994 ;;
10995[\\/]* | ?:[\\/]*)
e1402065 10996 if test -x "${with_guile}"; then
ed3ef339
DE
10997
10998 pkg_config=${with_guile}
10999 guile_version_list=${try_guile_versions}
11000 flag_errors=yes
11001
ed3ef339
DE
11002 found_usable_guile=checking
11003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11004$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11005 for guile_version in ${guile_version_list}; do
11006 ${pkg_config} --exists ${guile_version} 2>/dev/null
11007 if test $? != 0; then
11008 continue
11009 fi
11010 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11011 if test $? != 0; then
d0ac1c44 11012 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11013 fi
11014 new_LIBS=`${pkg_config} --libs ${guile_version}`
11015 if test $? != 0; then
d0ac1c44 11016 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11017 fi
11018 found_usable_guile=${guile_version}
11019 break
11020 done
11021 if test "${found_usable_guile}" = "checking"; then
11022 if test "${flag_errors}" = "yes"; then
d0ac1c44 11023 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11024 else
11025 found_usable_guile=no
11026 fi
11027 fi
11028 if test "${found_usable_guile}" != no; then
11029 save_CPPFLAGS=$CPPFLAGS
11030 save_LIBS=$LIBS
11031 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11032 LIBS="$LIBS $new_LIBS"
11033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11034/* end confdefs.h. */
11035#include "libguile.h"
11036int
11037main ()
11038{
11039scm_init_guile ();
11040 ;
11041 return 0;
11042}
11043_ACEOF
11044if ac_fn_c_try_link "$LINENO"; then :
11045 have_libguile=yes
11046 GUILE_CPPFLAGS=$new_CPPFLAGS
11047 GUILE_LIBS=$new_LIBS
11048else
11049 found_usable_guile=no
11050fi
11051rm -f core conftest.err conftest.$ac_objext \
11052 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11053 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11054if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11055
11056$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11057
11058
11059fi
11060
ed3ef339
DE
11061 CPPFLAGS=$save_CPPFLAGS
11062 LIBS=$save_LIBS
11063 if test "${found_usable_guile}" = no; then
11064 if test "${flag_errors}" = yes; then
11065 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11066$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11067as_fn_error $? "linking guile version ${guile_version} test program failed
11068See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11069 fi
11070 fi
11071 fi
11072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11073$as_echo "${found_usable_guile}" >&6; }
11074
e1402065 11075 else
d0ac1c44 11076 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
e1402065 11077 fi
ed3ef339
DE
11078 ;;
11079"" | */*)
11080 # Disallow --with=guile="" and --with-guile=foo/bar.
d0ac1c44 11081 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
ed3ef339
DE
11082 ;;
11083*)
11084 # A space separate list of guile versions to try, in order.
e1402065 11085 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11086 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11087 fi
ed3ef339
DE
11088
11089 pkg_config=${pkg_config_prog_path}
11090 guile_version_list=${with_guile}
11091 flag_errors=yes
11092
ed3ef339
DE
11093 found_usable_guile=checking
11094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11095$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11096 for guile_version in ${guile_version_list}; do
11097 ${pkg_config} --exists ${guile_version} 2>/dev/null
11098 if test $? != 0; then
11099 continue
11100 fi
11101 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11102 if test $? != 0; then
d0ac1c44 11103 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11104 fi
11105 new_LIBS=`${pkg_config} --libs ${guile_version}`
11106 if test $? != 0; then
d0ac1c44 11107 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11108 fi
11109 found_usable_guile=${guile_version}
11110 break
11111 done
11112 if test "${found_usable_guile}" = "checking"; then
11113 if test "${flag_errors}" = "yes"; then
d0ac1c44 11114 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11115 else
11116 found_usable_guile=no
11117 fi
11118 fi
11119 if test "${found_usable_guile}" != no; then
11120 save_CPPFLAGS=$CPPFLAGS
11121 save_LIBS=$LIBS
11122 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11123 LIBS="$LIBS $new_LIBS"
11124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11125/* end confdefs.h. */
11126#include "libguile.h"
11127int
11128main ()
11129{
11130scm_init_guile ();
11131 ;
11132 return 0;
11133}
11134_ACEOF
11135if ac_fn_c_try_link "$LINENO"; then :
11136 have_libguile=yes
11137 GUILE_CPPFLAGS=$new_CPPFLAGS
11138 GUILE_LIBS=$new_LIBS
11139else
11140 found_usable_guile=no
11141fi
11142rm -f core conftest.err conftest.$ac_objext \
11143 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11144 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11145if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11146
11147$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11148
11149
11150fi
11151
ed3ef339
DE
11152 CPPFLAGS=$save_CPPFLAGS
11153 LIBS=$save_LIBS
11154 if test "${found_usable_guile}" = no; then
11155 if test "${flag_errors}" = yes; then
11156 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11157$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11158as_fn_error $? "linking guile version ${guile_version} test program failed
11159See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11160 fi
11161 fi
11162 fi
11163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11164$as_echo "${found_usable_guile}" >&6; }
11165
11166 ;;
11167esac
11168
e76c5d17 11169if test "${have_libguile}" != no; then
d342a0da
DE
11170 case "${with_guile}" in
11171 [\\/]* | ?:[\\/]*)
e76c5d17
DE
11172
11173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11174$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11175if ${ac_cv_guild_program_name+:} false; then :
e76c5d17
DE
11176 $as_echo_n "(cached) " >&6
11177else
d342a0da 11178 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
11179
11180 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11181 # the 'guild' and 'bindir' variables. In that case, try to guess
11182 # what the program name is, at the risk of getting it wrong if
11183 # Guile was configured with '--program-suffix' or similar.
11184 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 11185 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
11186 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11187 fi
11188
11189fi
11190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11191$as_echo "$ac_cv_guild_program_name" >&6; }
11192
11193 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11194 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
e76c5d17
DE
11195 fi
11196
11197 GUILD="$ac_cv_guild_program_name"
11198
11199
d342a0da
DE
11200 ;;
11201 *)
11202
11203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11204$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11205if ${ac_cv_guild_program_name+:} false; then :
d342a0da
DE
11206 $as_echo_n "(cached) " >&6
11207else
11208 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11209
11210 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11211 # the 'guild' and 'bindir' variables. In that case, try to guess
11212 # what the program name is, at the risk of getting it wrong if
11213 # Guile was configured with '--program-suffix' or similar.
11214 if test "x$ac_cv_guild_program_name" = "x"; then
11215 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11216 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11217 fi
11218
11219fi
11220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11221$as_echo "$ac_cv_guild_program_name" >&6; }
11222
11223 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11224 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
d342a0da
DE
11225 fi
11226
11227 GUILD="$ac_cv_guild_program_name"
11228
11229
11230 ;;
11231 esac
e76c5d17
DE
11232
11233
11234 if test "$cross_compiling" = no; then
11235 GUILD_TARGET_FLAG=
11236 else
11237 GUILD_TARGET_FLAG="--target=$host"
11238 fi
11239
11240
11241
11242
11243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11244$as_echo_n "checking whether guild supports this host... " >&6; }
d0ac1c44 11245if ${ac_cv_guild_ok+:} false; then :
e76c5d17
DE
11246 $as_echo_n "(cached) " >&6
11247else
11248 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11249 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11250 ac_cv_guild_ok=yes
11251 else
11252 ac_cv_guild_ok=no
11253 fi
11254fi
11255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11256$as_echo "$ac_cv_guild_ok" >&6; }
11257
11258 if test "$ac_cv_guild_ok" = no; then
11259 have_libguile=no
11260 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11261$as_echo "$as_me: WARNING: disabling guile support" >&2;}
11262 fi
11263fi
11264
ed3ef339
DE
11265if test "${have_libguile}" != no; then
11266
11267$as_echo "#define HAVE_GUILE 1" >>confdefs.h
11268
11269 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11270 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11271 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11272 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11273 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
11274
11275 save_LIBS="$LIBS"
11276 save_CPPFLAGS="$CPPFLAGS"
11277 LIBS="$GUILE_LIBS"
11278 CPPFLAGS="$GUILE_CPPFLAGS"
11279 for ac_func in scm_new_smob
11280do :
11281 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
d0ac1c44 11282if test "x$ac_cv_func_scm_new_smob" = xyes; then :
16954d5d
LC
11283 cat >>confdefs.h <<_ACEOF
11284#define HAVE_SCM_NEW_SMOB 1
11285_ACEOF
11286
11287fi
11288done
11289
11290 LIBS="$save_LIBS"
11291 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
11292else
11293 # Even if Guile support is not compiled in, we need to have these files
11294 # included.
bd810fff 11295 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
ed3ef339
DE
11296 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11297fi
9a156167 11298
ac534cba 11299
4df42755
DE
11300 if test "${have_libguile}" != no; then
11301 HAVE_GUILE_TRUE=
11302 HAVE_GUILE_FALSE='#'
11303else
11304 HAVE_GUILE_TRUE='#'
11305 HAVE_GUILE_FALSE=
11306fi
11307
ac534cba 11308
62f29fda
TT
11309# ---------------------------- #
11310# Check for source highlight. #
11311# ---------------------------- #
11312
11313SRCHIGH_LIBS=
11314SRCHIGH_CFLAGS=
189b8c2e
ST
11315
11316# Check whether --enable-source-highlight was given.
11317if test "${enable_source_highlight+set}" = set; then :
11318 enableval=$enable_source_highlight; case "${enableval}" in
11319 yes) enable_source_highlight=yes ;;
11320 no) enable_source_highlight=no ;;
11321 *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;;
11322esac
11323else
11324 enable_source_highlight=auto
11325fi
11326
11327
11328if test "${enable_source_highlight}" != "no"; then
11329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
6c28e44a 11330$as_echo_n "checking for the source-highlight library... " >&6; }
189b8c2e
ST
11331 if test "${pkg_config_prog_path}" = "missing"; then
11332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
62f29fda 11333$as_echo "no - pkg-config not found" >&6; }
189b8c2e
ST
11334 if test "${enable_source_highlight}" = "yes"; then
11335 as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
11336 fi
11337 else
d806ea2d
TT
11338 case "$LDFLAGS" in
11339 *static-libstdc*)
11340 as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
11341 ;;
11342 esac
11343
189b8c2e 11344 if ${pkg_config_prog_path} --exists source-highlight; then
62f29fda
TT
11345 SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
11346 SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
11347
11348$as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
11349
11350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11351$as_echo "yes" >&6; }
189b8c2e 11352 else
62f29fda
TT
11353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11354$as_echo "no" >&6; }
189b8c2e
ST
11355 if test "${enable_source_highlight}" = "yes"; then
11356 as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
11357 fi
11358 fi
11359 fi
62f29fda
TT
11360fi
11361
11362
11363
58bfce93
MM
11364
11365# Check whether --with-intel_pt was given.
11366if test "${with_intel_pt+set}" = set; then :
11367 withval=$with_intel_pt;
11368else
11369 with_intel_pt=auto
11370fi
11371
11372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
11373$as_echo_n "checking whether to use intel pt... " >&6; }
11374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
11375$as_echo "$with_intel_pt" >&6; }
11376
11377if test "${with_intel_pt}" = no; then
bc504a31
PA
11378 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
11379$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
58bfce93
MM
11380 HAVE_LIBIPT=no
11381else
5599c404
MM
11382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11383/* end confdefs.h. */
11384
11385#include <linux/perf_event.h>
11386#ifndef PERF_ATTR_SIZE_VER5
11387# error
11388#endif
11389
11390_ACEOF
11391if ac_fn_c_try_cpp "$LINENO"; then :
11392 perf_event=yes
11393else
11394 perf_event=no
11395fi
d0ac1c44 11396rm -f conftest.err conftest.i conftest.$ac_ext
5599c404
MM
11397 if test "$perf_event" != yes; then
11398 if test "$with_intel_pt" = yes; then
d0ac1c44 11399 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
5599c404
MM
11400 else
11401 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
11402$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
11403 fi
11404 fi
11405
58bfce93
MM
11406
11407
11408
11409
11410
11411
11412
11413
11414 use_additional=yes
11415
11416 acl_save_prefix="$prefix"
11417 prefix="$acl_final_prefix"
11418 acl_save_exec_prefix="$exec_prefix"
11419 exec_prefix="$acl_final_exec_prefix"
11420
11421 eval additional_includedir=\"$includedir\"
11422 eval additional_libdir=\"$libdir\"
11423
11424 exec_prefix="$acl_save_exec_prefix"
11425 prefix="$acl_save_prefix"
11426
11427
11428# Check whether --with-libipt-prefix was given.
11429if test "${with_libipt_prefix+set}" = set; then :
11430 withval=$with_libipt_prefix;
11431 if test "X$withval" = "Xno"; then
11432 use_additional=no
11433 else
11434 if test "X$withval" = "X"; then
11435
11436 acl_save_prefix="$prefix"
11437 prefix="$acl_final_prefix"
11438 acl_save_exec_prefix="$exec_prefix"
11439 exec_prefix="$acl_final_exec_prefix"
11440
11441 eval additional_includedir=\"$includedir\"
11442 eval additional_libdir=\"$libdir\"
11443
11444 exec_prefix="$acl_save_exec_prefix"
11445 prefix="$acl_save_prefix"
11446
11447 else
11448 additional_includedir="$withval/include"
11449 additional_libdir="$withval/lib"
11450 fi
11451 fi
11452
11453fi
11454
11455 LIBIPT=
11456 LTLIBIPT=
11457 INCIPT=
11458 rpathdirs=
11459 ltrpathdirs=
11460 names_already_handled=
11461 names_next_round='ipt '
11462 while test -n "$names_next_round"; do
11463 names_this_round="$names_next_round"
11464 names_next_round=
11465 for name in $names_this_round; do
11466 already_handled=
11467 for n in $names_already_handled; do
11468 if test "$n" = "$name"; then
11469 already_handled=yes
11470 break
11471 fi
11472 done
11473 if test -z "$already_handled"; then
11474 names_already_handled="$names_already_handled $name"
11475 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11476 eval value=\"\$HAVE_LIB$uppername\"
11477 if test -n "$value"; then
11478 if test "$value" = yes; then
11479 eval value=\"\$LIB$uppername\"
11480 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
11481 eval value=\"\$LTLIB$uppername\"
11482 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
11483 else
11484 :
11485 fi
11486 else
11487 found_dir=
11488 found_la=
11489 found_so=
11490 found_a=
11491 if test $use_additional = yes; then
11492 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11493 found_dir="$additional_libdir"
11494 found_so="$additional_libdir/lib$name.$shlibext"
11495 if test -f "$additional_libdir/lib$name.la"; then
11496 found_la="$additional_libdir/lib$name.la"
11497 fi
11498 else
11499 if test -f "$additional_libdir/lib$name.$libext"; then
11500 found_dir="$additional_libdir"
11501 found_a="$additional_libdir/lib$name.$libext"
11502 if test -f "$additional_libdir/lib$name.la"; then
11503 found_la="$additional_libdir/lib$name.la"
11504 fi
11505 fi
11506 fi
11507 fi
11508 if test "X$found_dir" = "X"; then
11509 for x in $LDFLAGS $LTLIBIPT; do
11510
11511 acl_save_prefix="$prefix"
11512 prefix="$acl_final_prefix"
11513 acl_save_exec_prefix="$exec_prefix"
11514 exec_prefix="$acl_final_exec_prefix"
11515 eval x=\"$x\"
11516 exec_prefix="$acl_save_exec_prefix"
11517 prefix="$acl_save_prefix"
11518
11519 case "$x" in
11520 -L*)
11521 dir=`echo "X$x" | sed -e 's/^X-L//'`
11522 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11523 found_dir="$dir"
11524 found_so="$dir/lib$name.$shlibext"
11525 if test -f "$dir/lib$name.la"; then
11526 found_la="$dir/lib$name.la"
11527 fi
11528 else
11529 if test -f "$dir/lib$name.$libext"; then
11530 found_dir="$dir"
11531 found_a="$dir/lib$name.$libext"
11532 if test -f "$dir/lib$name.la"; then
11533 found_la="$dir/lib$name.la"
11534 fi
11535 fi
11536 fi
11537 ;;
11538 esac
11539 if test "X$found_dir" != "X"; then
11540 break
11541 fi
11542 done
11543 fi
11544 if test "X$found_dir" != "X"; then
11545 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
11546 if test "X$found_so" != "X"; then
11547 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11548 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11549 else
11550 haveit=
11551 for x in $ltrpathdirs; do
11552 if test "X$x" = "X$found_dir"; then
11553 haveit=yes
11554 break
11555 fi
11556 done
11557 if test -z "$haveit"; then
11558 ltrpathdirs="$ltrpathdirs $found_dir"
11559 fi
11560 if test "$hardcode_direct" = yes; then
11561 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11562 else
11563 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11564 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11565 haveit=
11566 for x in $rpathdirs; do
11567 if test "X$x" = "X$found_dir"; then
11568 haveit=yes
11569 break
11570 fi
11571 done
11572 if test -z "$haveit"; then
11573 rpathdirs="$rpathdirs $found_dir"
11574 fi
11575 else
11576 haveit=
11577 for x in $LDFLAGS $LIBIPT; do
11578
11579 acl_save_prefix="$prefix"
11580 prefix="$acl_final_prefix"
11581 acl_save_exec_prefix="$exec_prefix"
11582 exec_prefix="$acl_final_exec_prefix"
11583 eval x=\"$x\"
11584 exec_prefix="$acl_save_exec_prefix"
11585 prefix="$acl_save_prefix"
11586
11587 if test "X$x" = "X-L$found_dir"; then
11588 haveit=yes
11589 break
11590 fi
11591 done
11592 if test -z "$haveit"; then
11593 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
11594 fi
11595 if test "$hardcode_minus_L" != no; then
11596 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11597 else
11598 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11599 fi
11600 fi
11601 fi
11602 fi
11603 else
11604 if test "X$found_a" != "X"; then
11605 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
11606 else
11607 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
11608 fi
11609 fi
11610 additional_includedir=
11611 case "$found_dir" in
11612 */lib | */lib/)
11613 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11614 additional_includedir="$basedir/include"
11615 ;;
11616 esac
11617 if test "X$additional_includedir" != "X"; then
11618 if test "X$additional_includedir" != "X/usr/include"; then
11619 haveit=
11620 if test "X$additional_includedir" = "X/usr/local/include"; then
11621 if test -n "$GCC"; then
11622 case $host_os in
11623 linux*) haveit=yes;;
11624 esac
11625 fi
11626 fi
11627 if test -z "$haveit"; then
11628 for x in $CPPFLAGS $INCIPT; do
11629
11630 acl_save_prefix="$prefix"
11631 prefix="$acl_final_prefix"
11632 acl_save_exec_prefix="$exec_prefix"
11633 exec_prefix="$acl_final_exec_prefix"
11634 eval x=\"$x\"
11635 exec_prefix="$acl_save_exec_prefix"
11636 prefix="$acl_save_prefix"
11637
11638 if test "X$x" = "X-I$additional_includedir"; then
11639 haveit=yes
11640 break
11641 fi
11642 done
11643 if test -z "$haveit"; then
11644 if test -d "$additional_includedir"; then
11645 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
11646 fi
11647 fi
11648 fi
11649 fi
11650 fi
11651 if test -n "$found_la"; then
11652 save_libdir="$libdir"
11653 case "$found_la" in
11654 */* | *\\*) . "$found_la" ;;
11655 *) . "./$found_la" ;;
11656 esac
11657 libdir="$save_libdir"
11658 for dep in $dependency_libs; do
11659 case "$dep" in
11660 -L*)
11661 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11662 if test "X$additional_libdir" != "X/usr/lib"; then
11663 haveit=
11664 if test "X$additional_libdir" = "X/usr/local/lib"; then
11665 if test -n "$GCC"; then
11666 case $host_os in
11667 linux*) haveit=yes;;
11668 esac
11669 fi
11670 fi
11671 if test -z "$haveit"; then
11672 haveit=
11673 for x in $LDFLAGS $LIBIPT; do
11674
11675 acl_save_prefix="$prefix"
11676 prefix="$acl_final_prefix"
11677 acl_save_exec_prefix="$exec_prefix"
11678 exec_prefix="$acl_final_exec_prefix"
11679 eval x=\"$x\"
11680 exec_prefix="$acl_save_exec_prefix"
11681 prefix="$acl_save_prefix"
11682
11683 if test "X$x" = "X-L$additional_libdir"; then
11684 haveit=yes
11685 break
11686 fi
11687 done
11688 if test -z "$haveit"; then
11689 if test -d "$additional_libdir"; then
11690 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
11691 fi
11692 fi
11693 haveit=
11694 for x in $LDFLAGS $LTLIBIPT; do
11695
11696 acl_save_prefix="$prefix"
11697 prefix="$acl_final_prefix"
11698 acl_save_exec_prefix="$exec_prefix"
11699 exec_prefix="$acl_final_exec_prefix"
11700 eval x=\"$x\"
11701 exec_prefix="$acl_save_exec_prefix"
11702 prefix="$acl_save_prefix"
11703
11704 if test "X$x" = "X-L$additional_libdir"; then
11705 haveit=yes
11706 break
11707 fi
11708 done
11709 if test -z "$haveit"; then
11710 if test -d "$additional_libdir"; then
11711 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
11712 fi
11713 fi
11714 fi
11715 fi
11716 ;;
11717 -R*)
11718 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11719 if test "$enable_rpath" != no; then
11720 haveit=
11721 for x in $rpathdirs; do
11722 if test "X$x" = "X$dir"; then
11723 haveit=yes
11724 break
11725 fi
11726 done
11727 if test -z "$haveit"; then
11728 rpathdirs="$rpathdirs $dir"
11729 fi
11730 haveit=
11731 for x in $ltrpathdirs; do
11732 if test "X$x" = "X$dir"; then
11733 haveit=yes
11734 break
11735 fi
11736 done
11737 if test -z "$haveit"; then
11738 ltrpathdirs="$ltrpathdirs $dir"
11739 fi
11740 fi
11741 ;;
11742 -l*)
11743 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11744 ;;
11745 *.la)
11746 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11747 ;;
11748 *)
11749 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
11750 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
11751 ;;
11752 esac
11753 done
11754 fi
11755 else
11756 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11757 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
11758 fi
11759 fi
11760 fi
11761 done
11762 done
11763 if test "X$rpathdirs" != "X"; then
11764 if test -n "$hardcode_libdir_separator"; then
11765 alldirs=
11766 for found_dir in $rpathdirs; do
11767 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11768 done
11769 acl_save_libdir="$libdir"
11770 libdir="$alldirs"
11771 eval flag=\"$hardcode_libdir_flag_spec\"
11772 libdir="$acl_save_libdir"
11773 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11774 else
11775 for found_dir in $rpathdirs; do
11776 acl_save_libdir="$libdir"
11777 libdir="$found_dir"
11778 eval flag=\"$hardcode_libdir_flag_spec\"
11779 libdir="$acl_save_libdir"
11780 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11781 done
11782 fi
11783 fi
11784 if test "X$ltrpathdirs" != "X"; then
11785 for found_dir in $ltrpathdirs; do
11786 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
11787 done
11788 fi
11789
11790
11791 ac_save_CPPFLAGS="$CPPFLAGS"
11792
11793 for element in $INCIPT; do
11794 haveit=
11795 for x in $CPPFLAGS; do
11796
11797 acl_save_prefix="$prefix"
11798 prefix="$acl_final_prefix"
11799 acl_save_exec_prefix="$exec_prefix"
11800 exec_prefix="$acl_final_exec_prefix"
11801 eval x=\"$x\"
11802 exec_prefix="$acl_save_exec_prefix"
11803 prefix="$acl_save_prefix"
11804
11805 if test "X$x" = "X$element"; then
11806 haveit=yes
11807 break
11808 fi
11809 done
11810 if test -z "$haveit"; then
11811 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11812 fi
11813 done
11814
11815
11816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
11817$as_echo_n "checking for libipt... " >&6; }
d0ac1c44 11818if ${ac_cv_libipt+:} false; then :
58bfce93
MM
11819 $as_echo_n "(cached) " >&6
11820else
11821
11822 ac_save_LIBS="$LIBS"
11823 LIBS="$LIBS $LIBIPT"
11824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11825/* end confdefs.h. */
11826#include "intel-pt.h"
11827int
11828main ()
11829{
11830pt_insn_alloc_decoder (0);
11831 ;
11832 return 0;
11833}
11834_ACEOF
11835if ac_fn_c_try_link "$LINENO"; then :
11836 ac_cv_libipt=yes
11837else
11838 ac_cv_libipt=no
11839fi
11840rm -f core conftest.err conftest.$ac_objext \
11841 conftest$ac_exeext conftest.$ac_ext
11842 LIBS="$ac_save_LIBS"
11843
11844fi
11845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
11846$as_echo "$ac_cv_libipt" >&6; }
11847 if test "$ac_cv_libipt" = yes; then
11848 HAVE_LIBIPT=yes
11849
11850$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
11851
11852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
11853$as_echo_n "checking how to link with libipt... " >&6; }
11854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
11855$as_echo "$LIBIPT" >&6; }
11856 else
11857 HAVE_LIBIPT=no
11858 CPPFLAGS="$ac_save_CPPFLAGS"
11859 LIBIPT=
11860 LTLIBIPT=
11861 fi
11862
11863
11864
11865
11866
11867
11868 if test "$HAVE_LIBIPT" != yes; then
11869 if test "$with_intel_pt" = yes; then
d0ac1c44 11870 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
58bfce93
MM
11871 else
11872 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
11873$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
11874 fi
c56ccc05
MM
11875 else
11876 save_LIBS=$LIBS
11877 LIBS="$LIBS $LIBIPT"
11878 for ac_func in pt_insn_event
11879do :
11880 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
d0ac1c44 11881if test "x$ac_cv_func_pt_insn_event" = xyes; then :
c56ccc05
MM
11882 cat >>confdefs.h <<_ACEOF
11883#define HAVE_PT_INSN_EVENT 1
11884_ACEOF
11885
11886fi
11887done
11888
11889 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
11890"
d0ac1c44 11891if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
c56ccc05
MM
11892
11893cat >>confdefs.h <<_ACEOF
11894#define HAVE_STRUCT_PT_INSN_ENABLED 1
11895_ACEOF
11896
11897
11898fi
11899ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
11900"
d0ac1c44 11901if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
c56ccc05
MM
11902
11903cat >>confdefs.h <<_ACEOF
11904#define HAVE_STRUCT_PT_INSN_RESYNCED 1
11905_ACEOF
11906
11907
11908fi
11909
11910 LIBS=$save_LIBS
58bfce93
MM
11911 fi
11912fi
11913
81ecdfbb
RW
11914# ------------------------- #
11915# Checks for header files. #
11916# ------------------------- #
c890192f 11917
81ecdfbb
RW
11918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11919$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 11920if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 11921 $as_echo_n "(cached) " >&6
bec39cab 11922else
81ecdfbb 11923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11924/* end confdefs.h. */
81ecdfbb
RW
11925#include <stdlib.h>
11926#include <stdarg.h>
11927#include <string.h>
11928#include <float.h>
11929
a9322a30
TT
11930int
11931main ()
11932{
a9322a30
TT
11933
11934 ;
11935 return 0;
11936}
bec39cab 11937_ACEOF
81ecdfbb
RW
11938if ac_fn_c_try_compile "$LINENO"; then :
11939 ac_cv_header_stdc=yes
bec39cab 11940else
81ecdfbb 11941 ac_cv_header_stdc=no
a9322a30 11942fi
81ecdfbb 11943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11944
81ecdfbb
RW
11945if test $ac_cv_header_stdc = yes; then
11946 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11948/* end confdefs.h. */
11949#include <string.h>
bec39cab 11950
81ecdfbb
RW
11951_ACEOF
11952if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11953 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 11954
bec39cab 11955else
81ecdfbb
RW
11956 ac_cv_header_stdc=no
11957fi
11958rm -f conftest*
11959
11960fi
11961
11962if test $ac_cv_header_stdc = yes; then
11963 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11965/* end confdefs.h. */
11966#include <stdlib.h>
11967
bec39cab 11968_ACEOF
81ecdfbb
RW
11969if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11970 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 11971
81ecdfbb
RW
11972else
11973 ac_cv_header_stdc=no
11974fi
11975rm -f conftest*
bec39cab 11976
bec39cab 11977fi
81ecdfbb
RW
11978
11979if test $ac_cv_header_stdc = yes; then
11980 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11981 if test "$cross_compiling" = yes; then :
11982 :
bec39cab 11983else
81ecdfbb 11984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11985/* end confdefs.h. */
81ecdfbb
RW
11986#include <ctype.h>
11987#include <stdlib.h>
11988#if ((' ' & 0x0FF) == 0x020)
11989# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11990# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11991#else
11992# define ISLOWER(c) \
11993 (('a' <= (c) && (c) <= 'i') \
11994 || ('j' <= (c) && (c) <= 'r') \
11995 || ('s' <= (c) && (c) <= 'z'))
11996# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11997#endif
11998
11999#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
12000int
12001main ()
12002{
81ecdfbb
RW
12003 int i;
12004 for (i = 0; i < 256; i++)
12005 if (XOR (islower (i), ISLOWER (i))
12006 || toupper (i) != TOUPPER (i))
12007 return 2;
a9322a30
TT
12008 return 0;
12009}
bec39cab 12010_ACEOF
81ecdfbb
RW
12011if ac_fn_c_try_run "$LINENO"; then :
12012
bec39cab 12013else
81ecdfbb
RW
12014 ac_cv_header_stdc=no
12015fi
12016rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12017 conftest.$ac_objext conftest.beam conftest.$ac_ext
12018fi
bec39cab 12019
bec39cab 12020fi
a9322a30 12021fi
81ecdfbb
RW
12022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12023$as_echo "$ac_cv_header_stdc" >&6; }
12024if test $ac_cv_header_stdc = yes; then
bec39cab 12025
81ecdfbb 12026$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 12027
81ecdfbb 12028fi
bec39cab 12029
81ecdfbb 12030# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 12031for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
43b7e92b 12032 thread_db.h linux/elf.h \
81ecdfbb
RW
12033 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12034 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
44122162 12035 sys/reg.h sys/debugreg.h sys/select.h \
2d41fa11 12036 termios.h elf_hp.h
81ecdfbb
RW
12037do :
12038 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12039ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 12040if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12041 cat >>confdefs.h <<_ACEOF
81ecdfbb 12042#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12043_ACEOF
c906108c 12044
bec39cab 12045fi
81ecdfbb
RW
12046
12047done
12048
81ecdfbb
RW
12049for ac_header in sys/user.h
12050do :
12051 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
12052# include <sys/param.h>
a9322a30
TT
12053#endif
12054
81ecdfbb 12055"
d0ac1c44 12056if test "x$ac_cv_header_sys_user_h" = xyes; then :
81ecdfbb
RW
12057 cat >>confdefs.h <<_ACEOF
12058#define HAVE_SYS_USER_H 1
bec39cab 12059_ACEOF
bec39cab 12060
a9322a30 12061fi
bec39cab 12062
81ecdfbb 12063done
5ee754fc 12064
5ee754fc 12065
5007d765 12066for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
81ecdfbb
RW
12067do :
12068 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12069ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 12070if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12071 cat >>confdefs.h <<_ACEOF
81ecdfbb 12072#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12073_ACEOF
5ee754fc
MK
12074
12075fi
12076
81ecdfbb 12077done
bec39cab 12078
81ecdfbb
RW
12079for ac_header in term.h
12080do :
12081 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
12082# include <curses.h>
12083#endif
bec39cab 12084
81ecdfbb 12085"
d0ac1c44 12086if test "x$ac_cv_header_term_h" = xyes; then :
81ecdfbb
RW
12087 cat >>confdefs.h <<_ACEOF
12088#define HAVE_TERM_H 1
a8111142 12089_ACEOF
a8111142 12090
a8111142 12091fi
a8111142 12092
81ecdfbb 12093done
a8111142
TT
12094
12095
81ecdfbb
RW
12096# ------------------------- #
12097# Checks for declarations. #
12098# ------------------------- #
a9322a30 12099
07697489
PA
12100
12101 # Check for presence and size of long long.
12102 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
d0ac1c44 12103if test "x$ac_cv_type_long_long" = xyes; then :
07697489
PA
12104
12105cat >>confdefs.h <<_ACEOF
12106#define HAVE_LONG_LONG 1
12107_ACEOF
12108
12109# The cast to long int works around a bug in the HP C Compiler
12110# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12111# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12112# This bug is HP SR number 8606223364.
12113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
12114$as_echo_n "checking size of long long... " >&6; }
d0ac1c44 12115if ${ac_cv_sizeof_long_long+:} false; then :
07697489
PA
12116 $as_echo_n "(cached) " >&6
12117else
12118 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
12119
12120else
12121 if test "$ac_cv_type_long_long" = yes; then
12122 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12123$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
12124as_fn_error 77 "cannot compute sizeof (long long)
12125See \`config.log' for more details" "$LINENO" 5; }
07697489
PA
12126 else
12127 ac_cv_sizeof_long_long=0
12128 fi
12129fi
12130
12131fi
12132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
12133$as_echo "$ac_cv_sizeof_long_long" >&6; }
12134
12135
12136
12137cat >>confdefs.h <<_ACEOF
12138#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12139_ACEOF
12140
12141
12142fi
12143
12144
d0ac1c44
SM
12145 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
12146ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
12147if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
07697489
PA
12148 ac_have_decl=1
12149else
12150 ac_have_decl=0
12151fi
12152
12153cat >>confdefs.h <<_ACEOF
12154#define HAVE_DECL_BASENAME $ac_have_decl
12155_ACEOF
12156ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
d0ac1c44 12157if test "x$ac_cv_have_decl_ffs" = xyes; then :
07697489
PA
12158 ac_have_decl=1
12159else
12160 ac_have_decl=0
12161fi
12162
12163cat >>confdefs.h <<_ACEOF
12164#define HAVE_DECL_FFS $ac_have_decl
12165_ACEOF
12166ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
d0ac1c44 12167if test "x$ac_cv_have_decl_asprintf" = xyes; then :
07697489
PA
12168 ac_have_decl=1
12169else
12170 ac_have_decl=0
12171fi
12172
12173cat >>confdefs.h <<_ACEOF
12174#define HAVE_DECL_ASPRINTF $ac_have_decl
12175_ACEOF
12176ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
d0ac1c44 12177if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
07697489
PA
12178 ac_have_decl=1
12179else
12180 ac_have_decl=0
12181fi
12182
12183cat >>confdefs.h <<_ACEOF
12184#define HAVE_DECL_VASPRINTF $ac_have_decl
12185_ACEOF
12186ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
d0ac1c44 12187if test "x$ac_cv_have_decl_snprintf" = xyes; then :
07697489
PA
12188 ac_have_decl=1
12189else
12190 ac_have_decl=0
12191fi
12192
12193cat >>confdefs.h <<_ACEOF
12194#define HAVE_DECL_SNPRINTF $ac_have_decl
12195_ACEOF
12196ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
d0ac1c44 12197if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
07697489
PA
12198 ac_have_decl=1
12199else
12200 ac_have_decl=0
12201fi
12202
12203cat >>confdefs.h <<_ACEOF
12204#define HAVE_DECL_VSNPRINTF $ac_have_decl
12205_ACEOF
12206
12207 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
d0ac1c44 12208if test "x$ac_cv_have_decl_strtol" = xyes; then :
07697489
PA
12209 ac_have_decl=1
12210else
12211 ac_have_decl=0
12212fi
12213
12214cat >>confdefs.h <<_ACEOF
12215#define HAVE_DECL_STRTOL $ac_have_decl
12216_ACEOF
12217ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
d0ac1c44 12218if test "x$ac_cv_have_decl_strtoul" = xyes; then :
07697489
PA
12219 ac_have_decl=1
12220else
12221 ac_have_decl=0
12222fi
12223
12224cat >>confdefs.h <<_ACEOF
12225#define HAVE_DECL_STRTOUL $ac_have_decl
12226_ACEOF
12227ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
d0ac1c44 12228if test "x$ac_cv_have_decl_strtoll" = xyes; then :
07697489
PA
12229 ac_have_decl=1
12230else
12231 ac_have_decl=0
12232fi
12233
12234cat >>confdefs.h <<_ACEOF
12235#define HAVE_DECL_STRTOLL $ac_have_decl
12236_ACEOF
12237ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
d0ac1c44 12238if test "x$ac_cv_have_decl_strtoull" = xyes; then :
07697489
PA
12239 ac_have_decl=1
12240else
12241 ac_have_decl=0
12242fi
12243
12244cat >>confdefs.h <<_ACEOF
12245#define HAVE_DECL_STRTOULL $ac_have_decl
12246_ACEOF
12247
12248 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
d0ac1c44 12249if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
07697489
PA
12250 ac_have_decl=1
12251else
12252 ac_have_decl=0
12253fi
12254
12255cat >>confdefs.h <<_ACEOF
12256#define HAVE_DECL_STRVERSCMP $ac_have_decl
12257_ACEOF
12258
12259
12260
81ecdfbb 12261ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
d0ac1c44 12262if test "x$ac_cv_have_decl_snprintf" = xyes; then :
81ecdfbb
RW
12263 ac_have_decl=1
12264else
12265 ac_have_decl=0
5ee754fc 12266fi
81ecdfbb
RW
12267
12268cat >>confdefs.h <<_ACEOF
12269#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 12270_ACEOF
5ee754fc 12271
5ee754fc 12272
81ecdfbb
RW
12273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12274$as_echo_n "checking for LC_MESSAGES... " >&6; }
d0ac1c44 12275if ${am_cv_val_LC_MESSAGES+:} false; then :
81ecdfbb 12276 $as_echo_n "(cached) " >&6
bec39cab 12277else
81ecdfbb 12278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12279/* end confdefs.h. */
81ecdfbb 12280#include <locale.h>
a9322a30
TT
12281int
12282main ()
12283{
81ecdfbb 12284return LC_MESSAGES
a9322a30
TT
12285 ;
12286 return 0;
12287}
bec39cab 12288_ACEOF
81ecdfbb
RW
12289if ac_fn_c_try_link "$LINENO"; then :
12290 am_cv_val_LC_MESSAGES=yes
bec39cab 12291else
81ecdfbb
RW
12292 am_cv_val_LC_MESSAGES=no
12293fi
12294rm -f core conftest.err conftest.$ac_objext \
12295 conftest$ac_exeext conftest.$ac_ext
12296fi
12297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12298$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12299 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 12300
81ecdfbb
RW
12301$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
12302
12303 fi
12304
12305
12306# ----------------------- #
12307# Checks for structures. #
12308# ----------------------- #
12309
12310ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
d0ac1c44 12311if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
81ecdfbb
RW
12312
12313cat >>confdefs.h <<_ACEOF
12314#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 12315_ACEOF
7eb368b3 12316
81ecdfbb 12317
7eb368b3 12318fi
81ecdfbb 12319ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
d0ac1c44 12320if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
7eb368b3 12321
a9322a30
TT
12322cat >>confdefs.h <<_ACEOF
12323#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
12324_ACEOF
12325
a9322a30 12326
7eb368b3
NR
12327fi
12328
7eb368b3 12329
a9322a30
TT
12330# ------------------ #
12331# Checks for types. #
12332# ------------------ #
7eb368b3 12333
81ecdfbb 12334ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
12335#include <sys/socket.h>
12336
81ecdfbb 12337"
d0ac1c44 12338if test "x$ac_cv_type_socklen_t" = xyes; then :
bec39cab 12339
a9322a30
TT
12340cat >>confdefs.h <<_ACEOF
12341#define HAVE_SOCKLEN_T 1
12342_ACEOF
12343
12344
12345fi
12346
12347
12348# ------------------------------------- #
12349# Checks for compiler characteristics. #
12350# ------------------------------------- #
12351
81ecdfbb
RW
12352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12353$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
d0ac1c44 12354if ${ac_cv_c_const+:} false; then :
81ecdfbb 12355 $as_echo_n "(cached) " >&6
a9322a30 12356else
81ecdfbb 12357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12358/* end confdefs.h. */
a9322a30
TT
12359
12360int
12361main ()
12362{
d0ac1c44 12363
a9322a30 12364#ifndef __cplusplus
d0ac1c44 12365 /* Ultrix mips cc rejects this sort of thing. */
a9322a30 12366 typedef int charset[2];
d0ac1c44 12367 const charset cs = { 0, 0 };
a9322a30 12368 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
12369 char const *const *pcpcc;
12370 char **ppc;
a9322a30
TT
12371 /* NEC SVR4.0.2 mips cc rejects this. */
12372 struct point {int x, y;};
12373 static struct point const zero = {0,0};
12374 /* AIX XL C 1.02.0.0 rejects this.
12375 It does not let you subtract one const X* pointer from another in
12376 an arm of an if-expression whose if-part is not a constant
12377 expression */
12378 const char *g = "string";
81ecdfbb 12379 pcpcc = &g + (g ? g-g : 0);
a9322a30 12380 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
12381 ++pcpcc;
12382 ppc = (char**) pcpcc;
12383 pcpcc = (char const *const *) ppc;
d0ac1c44
SM
12384 { /* SCO 3.2v4 cc rejects this sort of thing. */
12385 char tx;
12386 char *t = &tx;
a9322a30
TT
12387 char const *s = 0 ? (char *) 0 : (char const *) 0;
12388
12389 *t++ = 0;
81ecdfbb 12390 if (s) return 0;
a9322a30
TT
12391 }
12392 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12393 int x[] = {25, 17};
12394 const int *foo = &x[0];
12395 ++foo;
12396 }
12397 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12398 typedef const int *iptr;
12399 iptr p = 0;
12400 ++p;
12401 }
d0ac1c44 12402 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
a9322a30 12403 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
d0ac1c44
SM
12404 struct s { int j; const int *ap[3]; } bx;
12405 struct s *b = &bx; b->j = 5;
a9322a30
TT
12406 }
12407 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12408 const int foo = 10;
81ecdfbb 12409 if (!foo) return 0;
a9322a30 12410 }
81ecdfbb 12411 return !cs[0] && !zero.x;
a9322a30
TT
12412#endif
12413
12414 ;
12415 return 0;
12416}
bec39cab 12417_ACEOF
81ecdfbb 12418if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12419 ac_cv_c_const=yes
5ee754fc 12420else
81ecdfbb 12421 ac_cv_c_const=no
5ee754fc 12422fi
81ecdfbb 12423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 12424fi
81ecdfbb
RW
12425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12426$as_echo "$ac_cv_c_const" >&6; }
a9322a30 12427if test $ac_cv_c_const = no; then
bec39cab 12428
81ecdfbb 12429$as_echo "#define const /**/" >>confdefs.h
bec39cab 12430
5ee754fc 12431fi
bec39cab 12432
81ecdfbb
RW
12433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12434$as_echo_n "checking for inline... " >&6; }
d0ac1c44 12435if ${ac_cv_c_inline+:} false; then :
81ecdfbb 12436 $as_echo_n "(cached) " >&6
bec39cab 12437else
a9322a30
TT
12438 ac_cv_c_inline=no
12439for ac_kw in inline __inline__ __inline; do
81ecdfbb 12440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12441/* end confdefs.h. */
a9322a30
TT
12442#ifndef __cplusplus
12443typedef int foo_t;
12444static $ac_kw foo_t static_foo () {return 0; }
12445$ac_kw foo_t foo () {return 0; }
12446#endif
12447
bec39cab 12448_ACEOF
81ecdfbb
RW
12449if ac_fn_c_try_compile "$LINENO"; then :
12450 ac_cv_c_inline=$ac_kw
bec39cab 12451fi
81ecdfbb
RW
12452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12453 test "$ac_cv_c_inline" != no && break
a9322a30 12454done
bec39cab 12455
5ee754fc 12456fi
81ecdfbb
RW
12457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12458$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 12459
a9322a30
TT
12460case $ac_cv_c_inline in
12461 inline | yes) ;;
12462 *)
12463 case $ac_cv_c_inline in
12464 no) ac_val=;;
12465 *) ac_val=$ac_cv_c_inline;;
12466 esac
12467 cat >>confdefs.h <<_ACEOF
12468#ifndef __cplusplus
12469#define inline $ac_val
12470#endif
12471_ACEOF
bec39cab
AC
12472 ;;
12473esac
bec39cab 12474
81ecdfbb
RW
12475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12476$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
d0ac1c44 12477if ${ac_cv_c_bigendian+:} false; then :
81ecdfbb 12478 $as_echo_n "(cached) " >&6
bec39cab 12479else
81ecdfbb
RW
12480 ac_cv_c_bigendian=unknown
12481 # See if we're dealing with a universal compiler.
12482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12483/* end confdefs.h. */
12484#ifndef __APPLE_CC__
12485 not a universal capable compiler
12486 #endif
12487 typedef int dummy;
12488
12489_ACEOF
12490if ac_fn_c_try_compile "$LINENO"; then :
12491
12492 # Check for potential -arch flags. It is not universal unless
12493 # there are at least two -arch flags with different values.
12494 ac_arch=
12495 ac_prev=
12496 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12497 if test -n "$ac_prev"; then
12498 case $ac_word in
12499 i?86 | x86_64 | ppc | ppc64)
12500 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12501 ac_arch=$ac_word
12502 else
12503 ac_cv_c_bigendian=universal
12504 break
12505 fi
12506 ;;
12507 esac
12508 ac_prev=
12509 elif test "x$ac_word" = "x-arch"; then
12510 ac_prev=arch
12511 fi
12512 done
12513fi
12514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12515 if test $ac_cv_c_bigendian = unknown; then
12516 # See if sys/param.h defines the BYTE_ORDER macro.
12517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12518/* end confdefs.h. */
a9322a30 12519#include <sys/types.h>
81ecdfbb 12520 #include <sys/param.h>
a9322a30
TT
12521
12522int
12523main ()
12524{
81ecdfbb
RW
12525#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12526 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12527 && LITTLE_ENDIAN)
12528 bogus endian macros
12529 #endif
a9322a30
TT
12530
12531 ;
12532 return 0;
12533}
bec39cab 12534_ACEOF
81ecdfbb 12535if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12536 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 12537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12538/* end confdefs.h. */
a9322a30 12539#include <sys/types.h>
81ecdfbb 12540 #include <sys/param.h>
a9322a30
TT
12541
12542int
12543main ()
12544{
12545#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
12546 not big endian
12547 #endif
a9322a30
TT
12548
12549 ;
12550 return 0;
12551}
bec39cab 12552_ACEOF
81ecdfbb 12553if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12554 ac_cv_c_bigendian=yes
5ee754fc 12555else
81ecdfbb 12556 ac_cv_c_bigendian=no
5ee754fc 12557fi
81ecdfbb
RW
12558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12559fi
12560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12561 fi
12562 if test $ac_cv_c_bigendian = unknown; then
12563 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12565/* end confdefs.h. */
12566#include <limits.h>
bec39cab 12567
81ecdfbb
RW
12568int
12569main ()
12570{
12571#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12572 bogus endian macros
12573 #endif
12574
12575 ;
12576 return 0;
12577}
7eb368b3 12578_ACEOF
81ecdfbb
RW
12579if ac_fn_c_try_compile "$LINENO"; then :
12580 # It does; now see whether it defined to _BIG_ENDIAN or not.
12581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 12582/* end confdefs.h. */
81ecdfbb
RW
12583#include <limits.h>
12584
7eb368b3
NR
12585int
12586main ()
12587{
81ecdfbb
RW
12588#ifndef _BIG_ENDIAN
12589 not big endian
12590 #endif
12591
7eb368b3
NR
12592 ;
12593 return 0;
12594}
12595_ACEOF
81ecdfbb 12596if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12597 ac_cv_c_bigendian=yes
81ecdfbb
RW
12598else
12599 ac_cv_c_bigendian=no
a9322a30 12600fi
81ecdfbb 12601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 12602fi
81ecdfbb
RW
12603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12604 fi
12605 if test $ac_cv_c_bigendian = unknown; then
12606 # Compile a test program.
12607 if test "$cross_compiling" = yes; then :
12608 # Try to guess by grepping values from an object file.
12609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12610/* end confdefs.h. */
12611short int ascii_mm[] =
12612 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12613 short int ascii_ii[] =
12614 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12615 int use_ascii (int i) {
12616 return ascii_mm[i] + ascii_ii[i];
12617 }
12618 short int ebcdic_ii[] =
12619 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12620 short int ebcdic_mm[] =
12621 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12622 int use_ebcdic (int i) {
12623 return ebcdic_mm[i] + ebcdic_ii[i];
12624 }
12625 extern int foo;
7eb368b3 12626
81ecdfbb
RW
12627int
12628main ()
12629{
12630return use_ascii (foo) == use_ebcdic (foo);
12631 ;
12632 return 0;
12633}
12634_ACEOF
12635if ac_fn_c_try_compile "$LINENO"; then :
12636 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12637 ac_cv_c_bigendian=yes
12638 fi
12639 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12640 if test "$ac_cv_c_bigendian" = unknown; then
12641 ac_cv_c_bigendian=no
12642 else
12643 # finding both strings is unlikely to happen, but who knows?
12644 ac_cv_c_bigendian=unknown
12645 fi
12646 fi
7eb368b3 12647fi
81ecdfbb 12648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12649else
81ecdfbb 12650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12651/* end confdefs.h. */
81ecdfbb 12652$ac_includes_default
d3ea6809
MM
12653int
12654main ()
12655{
81ecdfbb
RW
12656
12657 /* Are we little or big endian? From Harbison&Steele. */
12658 union
12659 {
12660 long int l;
12661 char c[sizeof (long int)];
12662 } u;
12663 u.l = 1;
12664 return u.c[sizeof (long int) - 1] == 1;
12665
12666 ;
12667 return 0;
d3ea6809
MM
12668}
12669_ACEOF
81ecdfbb 12670if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12671 ac_cv_c_bigendian=no
d3ea6809 12672else
81ecdfbb 12673 ac_cv_c_bigendian=yes
d3ea6809 12674fi
81ecdfbb
RW
12675rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12676 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12677fi
a9322a30 12678
81ecdfbb
RW
12679 fi
12680fi
12681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12682$as_echo "$ac_cv_c_bigendian" >&6; }
12683 case $ac_cv_c_bigendian in #(
12684 yes)
12685 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12686;; #(
12687 no)
12688 ;; #(
12689 universal)
12690
12691$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12692
12693 ;; #(
12694 *)
d0ac1c44 12695 as_fn_error $? "unknown endianness
81ecdfbb
RW
12696 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12697 esac
d3ea6809
MM
12698
12699
a9322a30
TT
12700# ------------------------------ #
12701# Checks for library functions. #
12702# ------------------------------ #
d3ea6809 12703
d0ac1c44
SM
12704
12705
12706
12707 for ac_header in $ac_header_list
81ecdfbb
RW
12708do :
12709 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
d0ac1c44
SM
12710ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12711"
12712if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12713 cat >>confdefs.h <<_ACEOF
81ecdfbb 12714#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12715_ACEOF
b757528f 12716
b757528f 12717fi
bec39cab 12718
a9322a30 12719done
a3828db0 12720
d0ac1c44
SM
12721
12722
12723
12724
12725
12726
12727
a9322a30 12728for ac_func in getpagesize
81ecdfbb
RW
12729do :
12730 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
d0ac1c44 12731if test "x$ac_cv_func_getpagesize" = xyes; then :
bec39cab 12732 cat >>confdefs.h <<_ACEOF
81ecdfbb 12733#define HAVE_GETPAGESIZE 1
bec39cab 12734_ACEOF
bcb3dc3d 12735
bcb3dc3d
MK
12736fi
12737done
12738
81ecdfbb
RW
12739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12740$as_echo_n "checking for working mmap... " >&6; }
d0ac1c44 12741if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
81ecdfbb 12742 $as_echo_n "(cached) " >&6
a9322a30 12743else
81ecdfbb 12744 if test "$cross_compiling" = yes; then :
a9322a30 12745 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12746else
81ecdfbb 12747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12748/* end confdefs.h. */
a9322a30
TT
12749$ac_includes_default
12750/* malloc might have been renamed as rpl_malloc. */
12751#undef malloc
bec39cab 12752
a9322a30
TT
12753/* Thanks to Mike Haertel and Jim Avera for this test.
12754 Here is a matrix of mmap possibilities:
12755 mmap private not fixed
12756 mmap private fixed at somewhere currently unmapped
12757 mmap private fixed at somewhere already mapped
12758 mmap shared not fixed
12759 mmap shared fixed at somewhere currently unmapped
12760 mmap shared fixed at somewhere already mapped
12761 For private mappings, we should verify that changes cannot be read()
12762 back from the file, nor mmap's back from the file at a different
12763 address. (There have been systems where private was not correctly
12764 implemented like the infamous i386 svr4.0, and systems where the
12765 VM page cache was not coherent with the file system buffer cache
12766 like early versions of FreeBSD and possibly contemporary NetBSD.)
12767 For shared mappings, we should conversely verify that changes get
12768 propagated back to all the places they're supposed to be.
bec39cab 12769
a9322a30
TT
12770 Grep wants private fixed already mapped.
12771 The main things grep needs to know about mmap are:
12772 * does it exist and is it safe to write into the mmap'd area
12773 * how to use it (BSD variants) */
8b9cf735 12774
a9322a30
TT
12775#include <fcntl.h>
12776#include <sys/mman.h>
8b9cf735 12777
81ecdfbb 12778#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12779char *malloc ();
a3828db0
MK
12780#endif
12781
a9322a30 12782/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12783#ifndef HAVE_GETPAGESIZE
a9322a30
TT
12784# ifdef _SC_PAGESIZE
12785# define getpagesize() sysconf(_SC_PAGESIZE)
12786# else /* no _SC_PAGESIZE */
81ecdfbb 12787# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12788# include <sys/param.h>
12789# ifdef EXEC_PAGESIZE
12790# define getpagesize() EXEC_PAGESIZE
12791# else /* no EXEC_PAGESIZE */
12792# ifdef NBPG
12793# define getpagesize() NBPG * CLSIZE
12794# ifndef CLSIZE
12795# define CLSIZE 1
12796# endif /* no CLSIZE */
12797# else /* no NBPG */
12798# ifdef NBPC
12799# define getpagesize() NBPC
12800# else /* no NBPC */
12801# ifdef PAGESIZE
12802# define getpagesize() PAGESIZE
12803# endif /* PAGESIZE */
12804# endif /* no NBPC */
12805# endif /* no NBPG */
12806# endif /* no EXEC_PAGESIZE */
12807# else /* no HAVE_SYS_PARAM_H */
12808# define getpagesize() 8192 /* punt totally */
12809# endif /* no HAVE_SYS_PARAM_H */
12810# endif /* no _SC_PAGESIZE */
12811
12812#endif /* no HAVE_GETPAGESIZE */
12813
bec39cab
AC
12814int
12815main ()
12816{
a9322a30 12817 char *data, *data2, *data3;
d0ac1c44 12818 const char *cdata2;
a9322a30 12819 int i, pagesize;
d0ac1c44 12820 int fd, fd2;
a9322a30
TT
12821
12822 pagesize = getpagesize ();
12823
12824 /* First, make a file with some known garbage in it. */
12825 data = (char *) malloc (pagesize);
12826 if (!data)
81ecdfbb 12827 return 1;
a9322a30
TT
12828 for (i = 0; i < pagesize; ++i)
12829 *(data + i) = rand ();
12830 umask (0);
12831 fd = creat ("conftest.mmap", 0600);
12832 if (fd < 0)
d0ac1c44 12833 return 2;
a9322a30 12834 if (write (fd, data, pagesize) != pagesize)
d0ac1c44 12835 return 3;
a9322a30
TT
12836 close (fd);
12837
d0ac1c44
SM
12838 /* Next, check that the tail of a page is zero-filled. File must have
12839 non-zero length, otherwise we risk SIGBUS for entire page. */
12840 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
12841 if (fd2 < 0)
12842 return 4;
12843 cdata2 = "";
12844 if (write (fd2, cdata2, 1) != 1)
12845 return 5;
12846 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
12847 if (data2 == MAP_FAILED)
12848 return 6;
12849 for (i = 0; i < pagesize; ++i)
12850 if (*(data2 + i))
12851 return 7;
12852 close (fd2);
12853 if (munmap (data2, pagesize))
12854 return 8;
12855
a9322a30
TT
12856 /* Next, try to mmap the file at a fixed address which already has
12857 something else allocated at it. If we can, also make sure that
12858 we see the same garbage. */
12859 fd = open ("conftest.mmap", O_RDWR);
12860 if (fd < 0)
d0ac1c44 12861 return 9;
a9322a30
TT
12862 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12863 MAP_PRIVATE | MAP_FIXED, fd, 0L))
d0ac1c44 12864 return 10;
a9322a30
TT
12865 for (i = 0; i < pagesize; ++i)
12866 if (*(data + i) != *(data2 + i))
d0ac1c44 12867 return 11;
a9322a30
TT
12868
12869 /* Finally, make sure that changes to the mapped area do not
12870 percolate back to the file as seen by read(). (This is a bug on
12871 some variants of i386 svr4.0.) */
12872 for (i = 0; i < pagesize; ++i)
12873 *(data2 + i) = *(data2 + i) + 1;
12874 data3 = (char *) malloc (pagesize);
12875 if (!data3)
d0ac1c44 12876 return 12;
a9322a30 12877 if (read (fd, data3, pagesize) != pagesize)
d0ac1c44 12878 return 13;
a9322a30
TT
12879 for (i = 0; i < pagesize; ++i)
12880 if (*(data + i) != *(data3 + i))
d0ac1c44 12881 return 14;
a9322a30 12882 close (fd);
81ecdfbb 12883 return 0;
bec39cab
AC
12884}
12885_ACEOF
81ecdfbb 12886if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12887 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 12888else
81ecdfbb 12889 ac_cv_func_mmap_fixed_mapped=no
a3828db0 12890fi
81ecdfbb
RW
12891rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12892 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 12893fi
81ecdfbb 12894
a9322a30 12895fi
81ecdfbb
RW
12896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12897$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
12898if test $ac_cv_func_mmap_fixed_mapped = yes; then
12899
81ecdfbb 12900$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 12901
086ec9eb 12902fi
d0ac1c44 12903rm -f conftest.mmap conftest.txt
a3828db0 12904
81ecdfbb 12905ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
d0ac1c44 12906if test "x$ac_cv_type_pid_t" = xyes; then :
bec39cab 12907
a9322a30
TT
12908else
12909
12910cat >>confdefs.h <<_ACEOF
12911#define pid_t int
bec39cab 12912_ACEOF
086ec9eb
MK
12913
12914fi
12915
81ecdfbb
RW
12916for ac_header in vfork.h
12917do :
12918 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
d0ac1c44 12919if test "x$ac_cv_header_vfork_h" = xyes; then :
a3828db0 12920 cat >>confdefs.h <<_ACEOF
81ecdfbb 12921#define HAVE_VFORK_H 1
bec39cab 12922_ACEOF
c906108c
SS
12923
12924fi
a9322a30 12925
a3828db0 12926done
c906108c 12927
a9322a30 12928for ac_func in fork vfork
81ecdfbb
RW
12929do :
12930 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12931ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 12932if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
a3828db0 12933 cat >>confdefs.h <<_ACEOF
81ecdfbb 12934#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 12935_ACEOF
b83266a0 12936
97bf5e38 12937fi
a3828db0 12938done
b83266a0 12939
a9322a30 12940if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
12941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
12942$as_echo_n "checking for working fork... " >&6; }
d0ac1c44 12943if ${ac_cv_func_fork_works+:} false; then :
81ecdfbb 12944 $as_echo_n "(cached) " >&6
a9322a30 12945else
81ecdfbb 12946 if test "$cross_compiling" = yes; then :
a9322a30
TT
12947 ac_cv_func_fork_works=cross
12948else
81ecdfbb
RW
12949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12950/* end confdefs.h. */
12951$ac_includes_default
12952int
12953main ()
12954{
12955
12956 /* By Ruediger Kuhlmann. */
12957 return fork () < 0;
12958
12959 ;
12960 return 0;
12961}
a9322a30 12962_ACEOF
81ecdfbb 12963if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12964 ac_cv_func_fork_works=yes
12965else
81ecdfbb 12966 ac_cv_func_fork_works=no
a9322a30 12967fi
81ecdfbb
RW
12968rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12969 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12970fi
81ecdfbb 12971
a9322a30 12972fi
81ecdfbb
RW
12973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
12974$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
12975
12976else
12977 ac_cv_func_fork_works=$ac_cv_func_fork
12978fi
12979if test "x$ac_cv_func_fork_works" = xcross; then
12980 case $host in
12981 *-*-amigaos* | *-*-msdosdjgpp*)
12982 # Override, as these systems have only a dummy fork() stub
12983 ac_cv_func_fork_works=no
12984 ;;
12985 *)
12986 ac_cv_func_fork_works=yes
12987 ;;
12988 esac
81ecdfbb
RW
12989 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
12990$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12991fi
12992ac_cv_func_vfork_works=$ac_cv_func_vfork
12993if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
12994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
12995$as_echo_n "checking for working vfork... " >&6; }
d0ac1c44 12996if ${ac_cv_func_vfork_works+:} false; then :
81ecdfbb 12997 $as_echo_n "(cached) " >&6
a9322a30 12998else
81ecdfbb 12999 if test "$cross_compiling" = yes; then :
a9322a30
TT
13000 ac_cv_func_vfork_works=cross
13001else
81ecdfbb 13002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
13003/* end confdefs.h. */
13004/* Thanks to Paul Eggert for this test. */
81ecdfbb 13005$ac_includes_default
a9322a30 13006#include <sys/wait.h>
81ecdfbb 13007#ifdef HAVE_VFORK_H
a9322a30
TT
13008# include <vfork.h>
13009#endif
13010/* On some sparc systems, changes by the child to local and incoming
13011 argument registers are propagated back to the parent. The compiler
13012 is told about this with #include <vfork.h>, but some compilers
13013 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13014 static variable whose address is put into a register that is
13015 clobbered by the vfork. */
13016static void
13017#ifdef __cplusplus
13018sparc_address_test (int arg)
13019# else
13020sparc_address_test (arg) int arg;
13021#endif
13022{
13023 static pid_t child;
13024 if (!child) {
13025 child = vfork ();
13026 if (child < 0) {
13027 perror ("vfork");
13028 _exit(2);
13029 }
13030 if (!child) {
13031 arg = getpid();
13032 write(-1, "", 0);
13033 _exit (arg);
13034 }
13035 }
13036}
13037
13038int
13039main ()
13040{
13041 pid_t parent = getpid ();
13042 pid_t child;
13043
13044 sparc_address_test (0);
13045
13046 child = vfork ();
13047
13048 if (child == 0) {
13049 /* Here is another test for sparc vfork register problems. This
13050 test uses lots of local variables, at least as many local
13051 variables as main has allocated so far including compiler
13052 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13053 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13054 reuse the register of parent for one of the local variables,
13055 since it will think that parent can't possibly be used any more
13056 in this routine. Assigning to the local variable will thus
13057 munge parent in the parent process. */
13058 pid_t
13059 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13060 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13061 /* Convince the compiler that p..p7 are live; otherwise, it might
13062 use the same hardware register for all 8 local variables. */
13063 if (p != p1 || p != p2 || p != p3 || p != p4
13064 || p != p5 || p != p6 || p != p7)
13065 _exit(1);
13066
13067 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13068 from child file descriptors. If the child closes a descriptor
13069 before it execs or exits, this munges the parent's descriptor
13070 as well. Test for this by closing stdout in the child. */
13071 _exit(close(fileno(stdout)) != 0);
13072 } else {
13073 int status;
13074 struct stat st;
13075
13076 while (wait(&status) != child)
13077 ;
81ecdfbb 13078 return (
a9322a30
TT
13079 /* Was there some problem with vforking? */
13080 child < 0
13081
13082 /* Did the child fail? (This shouldn't happen.) */
13083 || status
13084
13085 /* Did the vfork/compiler bug occur? */
13086 || parent != getpid()
13087
13088 /* Did the file descriptor bug occur? */
13089 || fstat(fileno(stdout), &st) != 0
13090 );
13091 }
13092}
13093_ACEOF
81ecdfbb 13094if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13095 ac_cv_func_vfork_works=yes
13096else
81ecdfbb 13097 ac_cv_func_vfork_works=no
a9322a30 13098fi
81ecdfbb
RW
13099rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13100 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13101fi
81ecdfbb 13102
a9322a30 13103fi
81ecdfbb
RW
13104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13105$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
13106
13107fi;
13108if test "x$ac_cv_func_fork_works" = xcross; then
13109 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
13110 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13111$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13112fi
13113
13114if test "x$ac_cv_func_vfork_works" = xyes; then
13115
81ecdfbb 13116$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
13117
13118else
13119
81ecdfbb 13120$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
13121
13122fi
13123if test "x$ac_cv_func_fork_works" = xyes; then
13124
81ecdfbb 13125$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
13126
13127fi
13128
cdf43629 13129for ac_func in getauxval getrusage getuid getgid \
bdca27a2 13130 pipe poll pread pread64 pwrite resize_term \
e671cd59 13131 sbrk getpgid setpgid setpgrp setsid \
9467110b 13132 sigaction sigprocmask sigsetmask socketpair \
110ed339 13133 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 13134 setrlimit getrlimit posix_madvise waitpid \
1d1d0bf7 13135 ptrace64 sigaltstack setns use_default_colors
81ecdfbb
RW
13136do :
13137 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13138ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13139if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6c7a06a3 13140 cat >>confdefs.h <<_ACEOF
81ecdfbb 13141#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
13142_ACEOF
13143
13144fi
13145done
13146
13147
81ecdfbb
RW
13148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13149$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 13150if ${am_cv_langinfo_codeset+:} false; then :
81ecdfbb 13151 $as_echo_n "(cached) " >&6
6c7a06a3 13152else
81ecdfbb 13153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
13154/* end confdefs.h. */
13155#include <langinfo.h>
13156int
13157main ()
13158{
13159char* cs = nl_langinfo(CODESET);
bec39cab
AC
13160 ;
13161 return 0;
13162}
13163_ACEOF
81ecdfbb 13164if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 13165 am_cv_langinfo_codeset=yes
a4db0f07 13166else
81ecdfbb 13167 am_cv_langinfo_codeset=no
a4db0f07 13168fi
81ecdfbb
RW
13169rm -f core conftest.err conftest.$ac_objext \
13170 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 13171
a4db0f07 13172fi
81ecdfbb
RW
13173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13174$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
13175 if test $am_cv_langinfo_codeset = yes; then
13176
81ecdfbb 13177$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 13178
6c7a06a3 13179 fi
c906108c 13180
d0ac1c44
SM
13181ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13182if test "x$ac_cv_type_size_t" = xyes; then :
13183
13184else
13185
13186cat >>confdefs.h <<_ACEOF
13187#define size_t unsigned int
13188_ACEOF
13189
13190fi
13191
06825bd1 13192
3266f10b
TT
13193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13194$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 13195if ${ac_cv_header_stdc+:} false; then :
3266f10b
TT
13196 $as_echo_n "(cached) " >&6
13197else
13198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13199/* end confdefs.h. */
13200#include <stdlib.h>
13201#include <stdarg.h>
13202#include <string.h>
13203#include <float.h>
13204
13205int
13206main ()
13207{
13208
13209 ;
13210 return 0;
13211}
13212_ACEOF
13213if ac_fn_c_try_compile "$LINENO"; then :
13214 ac_cv_header_stdc=yes
13215else
13216 ac_cv_header_stdc=no
13217fi
13218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13219
13220if test $ac_cv_header_stdc = yes; then
13221 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13223/* end confdefs.h. */
13224#include <string.h>
13225
13226_ACEOF
13227if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13228 $EGREP "memchr" >/dev/null 2>&1; then :
13229
13230else
13231 ac_cv_header_stdc=no
13232fi
13233rm -f conftest*
13234
13235fi
13236
13237if test $ac_cv_header_stdc = yes; then
13238 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13240/* end confdefs.h. */
13241#include <stdlib.h>
13242
13243_ACEOF
13244if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13245 $EGREP "free" >/dev/null 2>&1; then :
13246
13247else
13248 ac_cv_header_stdc=no
13249fi
13250rm -f conftest*
13251
13252fi
13253
13254if test $ac_cv_header_stdc = yes; then
13255 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13256 if test "$cross_compiling" = yes; then :
13257 :
13258else
13259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13260/* end confdefs.h. */
13261#include <ctype.h>
13262#include <stdlib.h>
13263#if ((' ' & 0x0FF) == 0x020)
13264# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13265# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13266#else
13267# define ISLOWER(c) \
13268 (('a' <= (c) && (c) <= 'i') \
13269 || ('j' <= (c) && (c) <= 'r') \
13270 || ('s' <= (c) && (c) <= 'z'))
13271# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13272#endif
13273
13274#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13275int
13276main ()
13277{
13278 int i;
13279 for (i = 0; i < 256; i++)
13280 if (XOR (islower (i), ISLOWER (i))
13281 || toupper (i) != TOUPPER (i))
13282 return 2;
13283 return 0;
13284}
13285_ACEOF
13286if ac_fn_c_try_run "$LINENO"; then :
13287
13288else
13289 ac_cv_header_stdc=no
13290fi
13291rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13292 conftest.$ac_objext conftest.beam conftest.$ac_ext
13293fi
13294
13295fi
13296fi
13297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
13298$as_echo "$ac_cv_header_stdc" >&6; }
13299if test $ac_cv_header_stdc = yes; then
13300
13301$as_echo "#define STDC_HEADERS 1" >>confdefs.h
13302
3266f10b
TT
13303fi
13304
13305 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13306# for constant arguments. Useless!
13307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13308$as_echo_n "checking for working alloca.h... " >&6; }
d0ac1c44 13309if ${ac_cv_working_alloca_h+:} false; then :
3266f10b
TT
13310 $as_echo_n "(cached) " >&6
13311else
13312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13313/* end confdefs.h. */
13314#include <alloca.h>
13315int
13316main ()
13317{
13318char *p = (char *) alloca (2 * sizeof (int));
13319 if (p) return 0;
13320 ;
13321 return 0;
13322}
13323_ACEOF
13324if ac_fn_c_try_link "$LINENO"; then :
13325 ac_cv_working_alloca_h=yes
13326else
13327 ac_cv_working_alloca_h=no
13328fi
13329rm -f core conftest.err conftest.$ac_objext \
13330 conftest$ac_exeext conftest.$ac_ext
13331fi
13332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13333$as_echo "$ac_cv_working_alloca_h" >&6; }
13334if test $ac_cv_working_alloca_h = yes; then
13335
13336$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
13337
13338fi
13339
13340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13341$as_echo_n "checking for alloca... " >&6; }
d0ac1c44 13342if ${ac_cv_func_alloca_works+:} false; then :
3266f10b
TT
13343 $as_echo_n "(cached) " >&6
13344else
13345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13346/* end confdefs.h. */
13347#ifdef __GNUC__
13348# define alloca __builtin_alloca
13349#else
13350# ifdef _MSC_VER
13351# include <malloc.h>
13352# define alloca _alloca
13353# else
13354# ifdef HAVE_ALLOCA_H
13355# include <alloca.h>
13356# else
13357# ifdef _AIX
13358 #pragma alloca
13359# else
13360# ifndef alloca /* predefined by HP cc +Olibcalls */
d0ac1c44 13361void *alloca (size_t);
3266f10b
TT
13362# endif
13363# endif
13364# endif
13365# endif
13366#endif
13367
13368int
13369main ()
13370{
13371char *p = (char *) alloca (1);
13372 if (p) return 0;
13373 ;
13374 return 0;
13375}
13376_ACEOF
13377if ac_fn_c_try_link "$LINENO"; then :
13378 ac_cv_func_alloca_works=yes
13379else
13380 ac_cv_func_alloca_works=no
13381fi
13382rm -f core conftest.err conftest.$ac_objext \
13383 conftest$ac_exeext conftest.$ac_ext
13384fi
13385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13386$as_echo "$ac_cv_func_alloca_works" >&6; }
13387
13388if test $ac_cv_func_alloca_works = yes; then
13389
13390$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13391
13392else
13393 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13394# that cause trouble. Some versions do not even contain alloca or
13395# contain a buggy version. If you still want to use their alloca,
13396# use ar to extract alloca.o from them instead of compiling alloca.c.
13397
13398ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
13399
13400$as_echo "#define C_ALLOCA 1" >>confdefs.h
13401
13402
13403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13404$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
d0ac1c44 13405if ${ac_cv_os_cray+:} false; then :
3266f10b
TT
13406 $as_echo_n "(cached) " >&6
13407else
13408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13409/* end confdefs.h. */
13410#if defined CRAY && ! defined CRAY2
13411webecray
13412#else
13413wenotbecray
13414#endif
13415
13416_ACEOF
13417if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13418 $EGREP "webecray" >/dev/null 2>&1; then :
13419 ac_cv_os_cray=yes
13420else
13421 ac_cv_os_cray=no
13422fi
13423rm -f conftest*
13424
13425fi
13426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13427$as_echo "$ac_cv_os_cray" >&6; }
13428if test $ac_cv_os_cray = yes; then
13429 for ac_func in _getb67 GETB67 getb67; do
13430 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13431ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13432if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
13433
13434cat >>confdefs.h <<_ACEOF
13435#define CRAY_STACKSEG_END $ac_func
13436_ACEOF
13437
13438 break
13439fi
13440
13441 done
13442fi
13443
13444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13445$as_echo_n "checking stack direction for C alloca... " >&6; }
d0ac1c44 13446if ${ac_cv_c_stack_direction+:} false; then :
3266f10b
TT
13447 $as_echo_n "(cached) " >&6
13448else
13449 if test "$cross_compiling" = yes; then :
13450 ac_cv_c_stack_direction=0
13451else
13452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13453/* end confdefs.h. */
13454$ac_includes_default
13455int
d0ac1c44 13456find_stack_direction (int *addr, int depth)
3266f10b 13457{
d0ac1c44
SM
13458 int dir, dummy = 0;
13459 if (! addr)
13460 addr = &dummy;
13461 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
13462 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
13463 return dir + dummy;
3266f10b
TT
13464}
13465
13466int
d0ac1c44 13467main (int argc, char **argv)
3266f10b 13468{
d0ac1c44 13469 return find_stack_direction (0, argc + !argv + 20) < 0;
3266f10b
TT
13470}
13471_ACEOF
13472if ac_fn_c_try_run "$LINENO"; then :
13473 ac_cv_c_stack_direction=1
13474else
13475 ac_cv_c_stack_direction=-1
13476fi
13477rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13478 conftest.$ac_objext conftest.beam conftest.$ac_ext
13479fi
13480
13481fi
13482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13483$as_echo "$ac_cv_c_stack_direction" >&6; }
13484cat >>confdefs.h <<_ACEOF
13485#define STACK_DIRECTION $ac_cv_c_stack_direction
13486_ACEOF
13487
13488
13489fi
13490
13491
13492
13493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13494$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 13495if ${am_cv_langinfo_codeset+:} false; then :
3266f10b
TT
13496 $as_echo_n "(cached) " >&6
13497else
13498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13499/* end confdefs.h. */
13500#include <langinfo.h>
13501int
13502main ()
13503{
13504char* cs = nl_langinfo(CODESET);
13505 ;
13506 return 0;
13507}
13508_ACEOF
13509if ac_fn_c_try_link "$LINENO"; then :
13510 am_cv_langinfo_codeset=yes
13511else
13512 am_cv_langinfo_codeset=no
13513fi
13514rm -f core conftest.err conftest.$ac_objext \
13515 conftest$ac_exeext conftest.$ac_ext
13516
13517fi
13518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13519$as_echo "$am_cv_langinfo_codeset" >&6; }
13520 if test $am_cv_langinfo_codeset = yes; then
13521
13522$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13523
13524 fi
13525
13526
2d41fa11 13527 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
13528do :
13529 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13530ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 13531if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3266f10b
TT
13532 cat >>confdefs.h <<_ACEOF
13533#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13534_ACEOF
13535
13536fi
13537
13538done
13539
13540
f348d89a 13541 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction
3266f10b
TT
13542do :
13543 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13544ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13545if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3266f10b
TT
13546 cat >>confdefs.h <<_ACEOF
13547#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13548_ACEOF
13549
13550fi
13551done
13552
13553
13554 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
d0ac1c44 13555if test "x$ac_cv_have_decl_strerror" = xyes; then :
3266f10b
TT
13556 ac_have_decl=1
13557else
13558 ac_have_decl=0
13559fi
13560
13561cat >>confdefs.h <<_ACEOF
13562#define HAVE_DECL_STRERROR $ac_have_decl
13563_ACEOF
13564ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
d0ac1c44 13565if test "x$ac_cv_have_decl_strstr" = xyes; then :
3266f10b
TT
13566 ac_have_decl=1
13567else
13568 ac_have_decl=0
13569fi
13570
13571cat >>confdefs.h <<_ACEOF
13572#define HAVE_DECL_STRSTR $ac_have_decl
13573_ACEOF
13574
13575
e9bcb658
GB
13576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13577$as_echo_n "checking for sigsetjmp... " >&6; }
d0ac1c44 13578if ${gdb_cv_func_sigsetjmp+:} false; then :
e9bcb658
GB
13579 $as_echo_n "(cached) " >&6
13580else
13581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13582/* end confdefs.h. */
13583
13584#include <setjmp.h>
13585
13586int
13587main ()
13588{
13589sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
13590 ;
13591 return 0;
13592}
13593_ACEOF
13594if ac_fn_c_try_compile "$LINENO"; then :
13595 gdb_cv_func_sigsetjmp=yes
13596else
13597 gdb_cv_func_sigsetjmp=no
13598fi
13599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13600fi
13601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13602$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
13603if test $gdb_cv_func_sigsetjmp = yes; then
13604
13605$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
13606
13607fi
13608
3266f10b 13609
54019719
PA
13610# Check the return and argument types of ptrace.
13611
13612
54019719
PA
13613for ac_header in sys/ptrace.h ptrace.h
13614do :
13615 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13616ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 13617if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
54019719
PA
13618 cat >>confdefs.h <<_ACEOF
13619#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13620_ACEOF
13621
13622fi
13623
13624done
13625
13626
a3828db0 13627gdb_ptrace_headers='
4ff70b84 13628#include <sys/types.h>
a3828db0
MK
13629#if HAVE_SYS_PTRACE_H
13630# include <sys/ptrace.h>
13631#endif
13632#if HAVE_UNISTD_H
13633# include <unistd.h>
13634#endif
13635'
13636# There is no point in checking if we don't have a prototype.
9b30624b 13637ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
81ecdfbb 13638"
d0ac1c44 13639if test "x$ac_cv_have_decl_ptrace" = xyes; then :
81ecdfbb 13640 ac_have_decl=1
06825bd1 13641else
81ecdfbb 13642 ac_have_decl=0
06825bd1 13643fi
06825bd1 13644
a3828db0 13645cat >>confdefs.h <<_ACEOF
81ecdfbb 13646#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 13647_ACEOF
81ecdfbb 13648if test $ac_have_decl = 1; then :
bec39cab 13649
a3828db0 13650else
a3828db0
MK
13651
13652 : ${gdb_cv_func_ptrace_ret='int'}
13653 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13654
06825bd1
MK
13655fi
13656
064ef605
DJ
13657# Check return type. Varargs (used on GNU/Linux) conflict with the
13658# empty argument list, so check for that explicitly.
81ecdfbb
RW
13659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
13660$as_echo_n "checking return type of ptrace... " >&6; }
d0ac1c44 13661if ${gdb_cv_func_ptrace_ret+:} false; then :
81ecdfbb 13662 $as_echo_n "(cached) " >&6
bec39cab 13663else
81ecdfbb 13664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13665/* end confdefs.h. */
a3828db0 13666$gdb_ptrace_headers
bec39cab
AC
13667int
13668main ()
13669{
064ef605
DJ
13670extern long ptrace (enum __ptrace_request, ...);
13671 ;
13672 return 0;
13673}
13674_ACEOF
9b30624b 13675if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
13676 gdb_cv_func_ptrace_ret='long'
13677else
81ecdfbb 13678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13679/* end confdefs.h. */
13680$gdb_ptrace_headers
13681int
13682main ()
13683{
a3828db0 13684extern int ptrace ();
bec39cab
AC
13685 ;
13686 return 0;
13687}
13688_ACEOF
9b30624b 13689if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13690 gdb_cv_func_ptrace_ret='int'
70f9f479 13691else
81ecdfbb 13692 gdb_cv_func_ptrace_ret='long'
70f9f479 13693fi
81ecdfbb 13694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 13695fi
81ecdfbb 13696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 13697fi
81ecdfbb
RW
13698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13699$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 13700
a3828db0
MK
13701cat >>confdefs.h <<_ACEOF
13702#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 13703_ACEOF
70f9f479 13704
a3828db0 13705# Check argument types.
81ecdfbb
RW
13706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13707$as_echo_n "checking types of arguments for ptrace... " >&6; }
d0ac1c44 13708if ${gdb_cv_func_ptrace_args+:} false; then :
81ecdfbb 13709 $as_echo_n "(cached) " >&6
bec39cab 13710else
a3828db0 13711
81ecdfbb 13712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13713/* end confdefs.h. */
13714$gdb_ptrace_headers
13715int
13716main ()
13717{
13718extern long ptrace (enum __ptrace_request, ...);
13719 ;
13720 return 0;
13721}
13722_ACEOF
9b30624b 13723if ac_fn_c_try_compile "$LINENO"; then :
54019719 13724 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
064ef605 13725else
064ef605 13726
a3828db0
MK
13727for gdb_arg1 in 'int' 'long'; do
13728 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 13729 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 13730 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 13731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13732/* end confdefs.h. */
a3828db0 13733$gdb_ptrace_headers
bec39cab
AC
13734int
13735main ()
13736{
a3828db0
MK
13737
13738extern $gdb_cv_func_ptrace_ret
13739 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13740
bec39cab
AC
13741 ;
13742 return 0;
13743}
13744_ACEOF
9b30624b 13745if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13746 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13747 break 4;
5c7f2947 13748fi
81ecdfbb 13749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 13750 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 13751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13752/* end confdefs.h. */
a3828db0 13753$gdb_ptrace_headers
bec39cab
AC
13754int
13755main ()
13756{
a3828db0
MK
13757
13758extern $gdb_cv_func_ptrace_ret
13759 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13760
bec39cab
AC
13761 ;
13762 return 0;
13763}
13764_ACEOF
9b30624b 13765if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13766
13767gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13768 break 5;
78434e59 13769fi
81ecdfbb 13770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
13771 done
13772 done
13773 done
13774 done
13775done
13776# Provide a safe default value.
13777: ${gdb_cv_func_ptrace_args='int,int,long,long'}
13778
064ef605 13779fi
81ecdfbb 13780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 13781fi
81ecdfbb
RW
13782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13783$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
13784ac_save_IFS=$IFS; IFS=','
13785set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13786IFS=$ac_save_IFS
13787shift
bec39cab 13788
54019719
PA
13789cat >>confdefs.h <<_ACEOF
13790#define PTRACE_TYPE_ARG1 $1
13791_ACEOF
13792
13793
a3828db0
MK
13794cat >>confdefs.h <<_ACEOF
13795#define PTRACE_TYPE_ARG3 $3
13796_ACEOF
13797
96d7229d
LM
13798
13799cat >>confdefs.h <<_ACEOF
13800#define PTRACE_TYPE_ARG4 $4
13801_ACEOF
13802
a3828db0
MK
13803if test -n "$5"; then
13804
13805cat >>confdefs.h <<_ACEOF
13806#define PTRACE_TYPE_ARG5 $5
bec39cab 13807_ACEOF
78434e59
MK
13808
13809fi
13810
54019719 13811
a3828db0 13812if test "$cross_compiling" = no; then
81ecdfbb
RW
13813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13814$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
d0ac1c44 13815if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 13816 $as_echo_n "(cached) " >&6
a3828db0 13817else
81ecdfbb 13818 if test "$cross_compiling" = yes; then :
d0ac1c44 13819 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 13820else
81ecdfbb 13821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13822/* end confdefs.h. */
81ecdfbb 13823$ac_includes_default
bec39cab
AC
13824int
13825main ()
13826{
a3828db0
MK
13827/* If this system has a BSD-style setpgrp which takes arguments,
13828 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
13829 exit successfully. */
81ecdfbb 13830 return setpgrp (1,1) != -1;
bec39cab
AC
13831 ;
13832 return 0;
13833}
13834_ACEOF
81ecdfbb 13835if ac_fn_c_try_run "$LINENO"; then :
a3828db0 13836 ac_cv_func_setpgrp_void=no
c906108c 13837else
81ecdfbb 13838 ac_cv_func_setpgrp_void=yes
c906108c 13839fi
81ecdfbb
RW
13840rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13841 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13842fi
81ecdfbb 13843
a3828db0 13844fi
81ecdfbb
RW
13845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13846$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
13847if test $ac_cv_func_setpgrp_void = yes; then
13848
81ecdfbb 13849$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
13850
13851fi
a3828db0
MK
13852
13853else
81ecdfbb
RW
13854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13855$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
d0ac1c44 13856if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 13857 $as_echo_n "(cached) " >&6
97bf5e38 13858else
81ecdfbb 13859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13860/* end confdefs.h. */
a3828db0
MK
13861
13862#include <unistd.h>
13863
bec39cab
AC
13864int
13865main ()
13866{
a3828db0
MK
13867
13868 if (setpgrp(1,1) == -1)
13869 exit (0);
13870 else
13871 exit (1);
13872
bec39cab
AC
13873 ;
13874 return 0;
13875}
13876_ACEOF
81ecdfbb 13877if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13878 ac_cv_func_setpgrp_void=no
c906108c 13879else
81ecdfbb 13880 ac_cv_func_setpgrp_void=yes
c906108c 13881fi
81ecdfbb 13882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13883fi
81ecdfbb
RW
13884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13885$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 13886if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 13887 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 13888
a3828db0 13889fi
c906108c
SS
13890fi
13891
db1ff28b
JK
13892# Assume we'll default to using the included libiberty regex.
13893gdb_use_included_regex=yes
13894
13895# However, if the system regex is GNU regex, then default to *not*
13896# using the included regex.
13897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
13898$as_echo_n "checking for GNU regex... " >&6; }
d0ac1c44 13899if ${gdb_cv_have_gnu_regex+:} false; then :
db1ff28b
JK
13900 $as_echo_n "(cached) " >&6
13901else
13902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13903/* end confdefs.h. */
13904#include <gnu-versions.h>
13905int
13906main ()
13907{
13908#define REGEX_INTERFACE_VERSION 1
13909#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
13910# error "Version mismatch"
13911#endif
13912 ;
13913 return 0;
13914}
13915_ACEOF
13916if ac_fn_c_try_compile "$LINENO"; then :
13917 gdb_cv_have_gnu_regex=yes
13918else
13919 gdb_cv_have_gnu_regex=no
13920fi
13921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13922fi
13923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
13924$as_echo "$gdb_cv_have_gnu_regex" >&6; }
13925if test $gdb_cv_have_gnu_regex = yes; then
13926 gdb_use_included_regex=no
13927fi
13928
13929
13930# Check whether --with-included-regex was given.
13931if test "${with_included_regex+set}" = set; then :
13932 withval=$with_included_regex; gdb_with_regex=$withval
13933else
13934 gdb_with_regex=$gdb_use_included_regex
13935fi
13936
13937if test "$gdb_with_regex" = yes; then
13938
13939$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
13940
13941fi
13942
81ecdfbb
RW
13943# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
13944ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
13945#include <sys/proc.h>
13946
13947"
d0ac1c44 13948if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
c906108c 13949
5c45e068 13950cat >>confdefs.h <<_ACEOF
a3828db0 13951#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 13952_ACEOF
c906108c 13953
5c45e068 13954
97bf5e38 13955fi
c906108c 13956
5c45e068 13957
a3828db0 13958# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
13959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
13960$as_echo_n "checking for struct lwp... " >&6; }
d0ac1c44 13961if ${gdb_cv_struct_lwp+:} false; then :
81ecdfbb 13962 $as_echo_n "(cached) " >&6
bec39cab 13963else
81ecdfbb 13964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13965/* end confdefs.h. */
a3828db0 13966#include <sys/param.h>
c49fbc6c 13967#define _KMEMUSER
a3828db0 13968#include <sys/lwp.h>
bec39cab
AC
13969int
13970main ()
13971{
a3828db0 13972struct lwp l;
bec39cab
AC
13973 ;
13974 return 0;
13975}
13976_ACEOF
81ecdfbb 13977if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13978 gdb_cv_struct_lwp=yes
c906108c 13979else
81ecdfbb 13980 gdb_cv_struct_lwp=no
c906108c 13981fi
81ecdfbb 13982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13983fi
81ecdfbb
RW
13984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
13985$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 13986if test $gdb_cv_struct_lwp = yes; then
c906108c 13987
81ecdfbb 13988$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 13989
97bf5e38 13990fi
c906108c 13991
a3828db0 13992# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
13993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
13994$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
d0ac1c44 13995if ${gdb_cv_struct_reg+:} false; then :
81ecdfbb 13996 $as_echo_n "(cached) " >&6
bec39cab 13997else
81ecdfbb 13998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13999/* end confdefs.h. */
a3828db0
MK
14000#include <sys/types.h>
14001#include <machine/reg.h>
bec39cab
AC
14002int
14003main ()
14004{
a3828db0 14005struct reg r;
bec39cab
AC
14006 ;
14007 return 0;
14008}
14009_ACEOF
81ecdfbb 14010if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14011 gdb_cv_struct_reg=yes
27ca5dad 14012else
81ecdfbb 14013 gdb_cv_struct_reg=no
27ca5dad 14014fi
81ecdfbb 14015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 14016fi
81ecdfbb
RW
14017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
14018$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 14019if test $gdb_cv_struct_reg = yes; then
bec39cab 14020
81ecdfbb 14021$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
14022
14023fi
97bf5e38 14024
a3828db0
MK
14025# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
14026# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
a6e69c1f
JB
14027ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
14028#include <machine/reg.h>
81ecdfbb 14029"
d0ac1c44 14030if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
5c45e068
MK
14031
14032cat >>confdefs.h <<_ACEOF
a3828db0 14033#define HAVE_STRUCT_REG_R_FS 1
bec39cab 14034_ACEOF
3862412b 14035
5c45e068 14036
97bf5e38 14037fi
a6e69c1f
JB
14038ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
14039#include <machine/reg.h>
81ecdfbb 14040"
d0ac1c44 14041if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
5c45e068
MK
14042
14043cat >>confdefs.h <<_ACEOF
a3828db0 14044#define HAVE_STRUCT_REG_R_GS 1
bec39cab 14045_ACEOF
3862412b 14046
5c45e068 14047
97bf5e38 14048fi
3862412b 14049
5c45e068 14050
6fea9e18
L
14051# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
14052# Older amd64 Linux's don't have the fs_base and gs_base members of
14053# `struct user_regs_struct'.
f517c180
EA
14054ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/types.h>
14055#include <sys/user.h>
6fea9e18 14056"
d0ac1c44 14057if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then :
6fea9e18
L
14058
14059cat >>confdefs.h <<_ACEOF
14060#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
14061_ACEOF
14062
14063
14064fi
f517c180
EA
14065ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/types.h>
14066#include <sys/user.h>
6fea9e18 14067"
d0ac1c44 14068if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then :
6fea9e18
L
14069
14070cat >>confdefs.h <<_ACEOF
14071#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
14072_ACEOF
14073
14074
14075fi
14076
14077
a3828db0 14078# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
14079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
14080$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
d0ac1c44 14081if ${gdb_cv_have_ptrace_getregs+:} false; then :
81ecdfbb 14082 $as_echo_n "(cached) " >&6
451928c5 14083else
81ecdfbb 14084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14085/* end confdefs.h. */
a3828db0 14086#include <sys/ptrace.h>
bec39cab
AC
14087int
14088main ()
14089{
a3828db0 14090PTRACE_GETREGS;
bec39cab
AC
14091 ;
14092 return 0;
14093}
14094_ACEOF
81ecdfbb 14095if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14096 gdb_cv_have_ptrace_getregs=yes
451928c5 14097else
81ecdfbb 14098 gdb_cv_have_ptrace_getregs=no
451928c5 14099fi
81ecdfbb 14100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14101fi
14102
81ecdfbb
RW
14103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
14104$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 14105if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 14106
81ecdfbb 14107$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 14108
97bf5e38 14109fi
451928c5 14110
a3828db0 14111# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
14112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
14113$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
d0ac1c44 14114if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
81ecdfbb 14115 $as_echo_n "(cached) " >&6
451928c5 14116else
81ecdfbb 14117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14118/* end confdefs.h. */
a3828db0 14119#include <sys/ptrace.h>
bec39cab
AC
14120int
14121main ()
14122{
a3828db0 14123PTRACE_GETFPXREGS;
bec39cab
AC
14124 ;
14125 return 0;
14126}
14127_ACEOF
81ecdfbb 14128if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14129 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 14130else
81ecdfbb 14131 gdb_cv_have_ptrace_getfpxregs=no
451928c5 14132fi
81ecdfbb 14133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14134fi
14135
81ecdfbb
RW
14136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
14137$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 14138if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 14139
81ecdfbb 14140$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 14141
97bf5e38 14142fi
451928c5 14143
a3828db0 14144# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
14145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
14146$as_echo_n "checking for PT_GETDBREGS... " >&6; }
d0ac1c44 14147if ${gdb_cv_have_pt_getdbregs+:} false; then :
81ecdfbb 14148 $as_echo_n "(cached) " >&6
3862412b 14149else
81ecdfbb 14150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14151/* end confdefs.h. */
a3828db0
MK
14152#include <sys/types.h>
14153#include <sys/ptrace.h>
bec39cab
AC
14154int
14155main ()
14156{
a3828db0 14157PT_GETDBREGS;
bec39cab
AC
14158 ;
14159 return 0;
14160}
14161_ACEOF
81ecdfbb 14162if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14163 gdb_cv_have_pt_getdbregs=yes
3862412b 14164else
81ecdfbb 14165 gdb_cv_have_pt_getdbregs=no
3862412b 14166fi
81ecdfbb 14167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14168fi
14169
81ecdfbb
RW
14170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
14171$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 14172if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 14173
81ecdfbb 14174$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 14175
97bf5e38 14176fi
3862412b 14177
a3828db0 14178# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
14179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
14180$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
d0ac1c44 14181if ${gdb_cv_have_pt_getxmmregs+:} false; then :
81ecdfbb 14182 $as_echo_n "(cached) " >&6
3862412b 14183else
81ecdfbb 14184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14185/* end confdefs.h. */
a3828db0
MK
14186#include <sys/types.h>
14187#include <sys/ptrace.h>
bec39cab
AC
14188int
14189main ()
14190{
a3828db0 14191PT_GETXMMREGS;
bec39cab
AC
14192 ;
14193 return 0;
14194}
14195_ACEOF
81ecdfbb 14196if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14197 gdb_cv_have_pt_getxmmregs=yes
3862412b 14198else
81ecdfbb 14199 gdb_cv_have_pt_getxmmregs=no
3862412b 14200fi
81ecdfbb 14201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14202fi
14203
81ecdfbb
RW
14204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
14205$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 14206if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 14207
81ecdfbb 14208$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 14209
97bf5e38 14210fi
3862412b 14211
6e9567fe
JB
14212# See if <sys/ptrace.h> supports LWP names on FreeBSD
14213# Older FreeBSD versions don't have the pl_tdname member of
14214# `struct ptrace_lwpinfo'.
14215ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
14216"
d0ac1c44 14217if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
6e9567fe
JB
14218
14219cat >>confdefs.h <<_ACEOF
14220#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
14221_ACEOF
14222
14223
14224fi
14225
14226
e6cdd38e
JB
14227# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
14228# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
14229# FreeBSD 10.3.
14230ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
14231"
d0ac1c44 14232if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
e6cdd38e
JB
14233
14234cat >>confdefs.h <<_ACEOF
14235#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
14236_ACEOF
14237
14238
14239fi
14240
6e9567fe 14241
97bf5e38 14242if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
14243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
14244$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14245 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
81ecdfbb 14246 $as_echo_n "(cached) " >&6
596c9d4b 14247else
81ecdfbb 14248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14249/* end confdefs.h. */
596c9d4b
KB
14250
14251#define _SYSCALL32
d30c5336
JK
14252/* Needed for new procfs interface on sparc-solaris. */
14253#define _STRUCTURED_PROC 1
596c9d4b 14254#include <sys/procfs.h>
bec39cab
AC
14255int
14256main ()
14257{
97bf5e38 14258gregset_t avar
bec39cab
AC
14259 ;
14260 return 0;
14261}
14262_ACEOF
81ecdfbb 14263if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14264 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 14265else
81ecdfbb 14266 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 14267
596c9d4b 14268fi
81ecdfbb 14269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
14270fi
14271
97bf5e38 14272 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 14273
81ecdfbb 14274$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
14275
14276 fi
81ecdfbb
RW
14277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14278$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 14279
81ecdfbb
RW
14280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
14281$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14282 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
81ecdfbb 14283 $as_echo_n "(cached) " >&6
d84dd0c5 14284else
81ecdfbb 14285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14286/* end confdefs.h. */
97bf5e38
MK
14287
14288#define _SYSCALL32
d30c5336
JK
14289/* Needed for new procfs interface on sparc-solaris. */
14290#define _STRUCTURED_PROC 1
d84dd0c5 14291#include <sys/procfs.h>
bec39cab
AC
14292int
14293main ()
14294{
97bf5e38 14295fpregset_t avar
bec39cab
AC
14296 ;
14297 return 0;
14298}
14299_ACEOF
81ecdfbb 14300if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14301 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 14302else
81ecdfbb 14303 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 14304
d84dd0c5 14305fi
81ecdfbb 14306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
14307fi
14308
97bf5e38 14309 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 14310
81ecdfbb 14311$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 14312
97bf5e38 14313 fi
81ecdfbb
RW
14314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14315$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 14316
81ecdfbb
RW
14317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
14318$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14319 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
81ecdfbb 14320 $as_echo_n "(cached) " >&6
c906108c 14321else
81ecdfbb 14322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14323/* end confdefs.h. */
c906108c 14324
97bf5e38 14325#define _SYSCALL32
d30c5336
JK
14326/* Needed for new procfs interface on sparc-solaris. */
14327#define _STRUCTURED_PROC 1
97bf5e38 14328#include <sys/procfs.h>
bec39cab
AC
14329int
14330main ()
14331{
97bf5e38 14332prgregset_t avar
bec39cab
AC
14333 ;
14334 return 0;
14335}
14336_ACEOF
81ecdfbb 14337if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14338 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 14339else
81ecdfbb 14340 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 14341
c906108c 14342fi
81ecdfbb 14343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14344fi
14345
97bf5e38 14346 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 14347
81ecdfbb 14348$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 14349
97bf5e38 14350 fi
81ecdfbb
RW
14351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14352$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 14353
81ecdfbb
RW
14354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
14355$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
d0ac1c44 14356 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
81ecdfbb 14357 $as_echo_n "(cached) " >&6
d45fe813 14358else
81ecdfbb 14359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14360/* end confdefs.h. */
97bf5e38
MK
14361
14362#define _SYSCALL32
d30c5336
JK
14363/* Needed for new procfs interface on sparc-solaris. */
14364#define _STRUCTURED_PROC 1
97bf5e38 14365#include <sys/procfs.h>
bec39cab
AC
14366int
14367main ()
14368{
97bf5e38 14369prfpregset_t avar
bec39cab
AC
14370 ;
14371 return 0;
14372}
14373_ACEOF
81ecdfbb 14374if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14375 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 14376else
81ecdfbb 14377 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 14378
d45fe813 14379fi
81ecdfbb 14380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14381fi
14382
97bf5e38 14383 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 14384
81ecdfbb 14385$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 14386
97bf5e38 14387 fi
81ecdfbb
RW
14388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14389$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 14390
81ecdfbb
RW
14391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14392$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
d0ac1c44 14393 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
81ecdfbb 14394 $as_echo_n "(cached) " >&6
d45fe813 14395else
81ecdfbb 14396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14397/* end confdefs.h. */
97bf5e38
MK
14398
14399#define _SYSCALL32
d30c5336
JK
14400/* Needed for new procfs interface on sparc-solaris. */
14401#define _STRUCTURED_PROC 1
97bf5e38 14402#include <sys/procfs.h>
bec39cab
AC
14403int
14404main ()
14405{
97bf5e38 14406prgregset32_t avar
bec39cab
AC
14407 ;
14408 return 0;
14409}
14410_ACEOF
81ecdfbb 14411if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14412 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 14413else
81ecdfbb 14414 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 14415
d45fe813 14416fi
81ecdfbb 14417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14418fi
14419
97bf5e38 14420 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 14421
81ecdfbb 14422$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 14423
97bf5e38 14424 fi
81ecdfbb
RW
14425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14426$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 14427
81ecdfbb
RW
14428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14429$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
d0ac1c44 14430 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
81ecdfbb 14431 $as_echo_n "(cached) " >&6
d45fe813 14432else
81ecdfbb 14433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14434/* end confdefs.h. */
97bf5e38 14435
d45fe813 14436#define _SYSCALL32
d30c5336
JK
14437/* Needed for new procfs interface on sparc-solaris. */
14438#define _STRUCTURED_PROC 1
97bf5e38 14439#include <sys/procfs.h>
bec39cab
AC
14440int
14441main ()
14442{
97bf5e38 14443lwpid_t avar
bec39cab
AC
14444 ;
14445 return 0;
14446}
14447_ACEOF
81ecdfbb 14448if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14449 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 14450else
81ecdfbb 14451 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 14452
d45fe813 14453fi
81ecdfbb 14454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14455fi
14456
97bf5e38 14457 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 14458
81ecdfbb 14459$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 14460
97bf5e38 14461 fi
81ecdfbb
RW
14462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14463$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 14464
81ecdfbb
RW
14465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14466$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
d0ac1c44 14467 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
81ecdfbb 14468 $as_echo_n "(cached) " >&6
c906108c 14469else
81ecdfbb 14470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14471/* end confdefs.h. */
c906108c 14472
97bf5e38 14473#define _SYSCALL32
d30c5336
JK
14474/* Needed for new procfs interface on sparc-solaris. */
14475#define _STRUCTURED_PROC 1
97bf5e38 14476#include <sys/procfs.h>
bec39cab
AC
14477int
14478main ()
14479{
97bf5e38 14480psaddr_t avar
bec39cab
AC
14481 ;
14482 return 0;
14483}
14484_ACEOF
81ecdfbb 14485if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14486 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 14487else
81ecdfbb 14488 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 14489
c906108c 14490fi
81ecdfbb 14491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14492fi
14493
97bf5e38 14494 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 14495
81ecdfbb 14496$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 14497
97bf5e38 14498 fi
81ecdfbb
RW
14499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14500$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 14501
43b7e92b
GB
14502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
14503$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
14504 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
14505 $as_echo_n "(cached) " >&6
14506else
14507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14508/* end confdefs.h. */
14509
14510#define _SYSCALL32
14511/* Needed for new procfs interface on sparc-solaris. */
14512#define _STRUCTURED_PROC 1
14513#include <sys/procfs.h>
14514int
14515main ()
14516{
14517elf_fpregset_t avar
14518 ;
14519 return 0;
14520}
14521_ACEOF
14522if ac_fn_c_try_compile "$LINENO"; then :
14523 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
14524else
14525 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
14526
14527fi
14528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14529fi
14530
14531 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
14532
14533$as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
14534
14535 fi
14536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
14537$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
14538
c906108c 14539fi
c906108c 14540
bc8bcb4b 14541# Check if the compiler supports the `long long' type.
c906108c 14542
81ecdfbb
RW
14543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14544$as_echo_n "checking for long long support in compiler... " >&6; }
d0ac1c44 14545if ${gdb_cv_c_long_long+:} false; then :
81ecdfbb 14546 $as_echo_n "(cached) " >&6
97bf5e38 14547else
81ecdfbb 14548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14549/* end confdefs.h. */
bc8bcb4b 14550extern long long foo;
bec39cab
AC
14551int
14552main ()
14553{
bc8bcb4b 14554switch (foo & 2) { case 0: return 1; }
bec39cab
AC
14555 ;
14556 return 0;
14557}
14558_ACEOF
81ecdfbb 14559if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14560 gdb_cv_c_long_long=yes
14561else
81ecdfbb 14562 gdb_cv_c_long_long=no
97bf5e38 14563fi
81ecdfbb 14564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14565fi
81ecdfbb
RW
14566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14567$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
14568if test $gdb_cv_c_long_long != yes; then
14569 # libdecnumber requires long long.
d0ac1c44 14570 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
14571fi
14572
bc8bcb4b 14573# Check if the compiler and runtime support printing long longs.
97bf5e38 14574
81ecdfbb
RW
14575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14576$as_echo_n "checking for long long support in printf... " >&6; }
d0ac1c44 14577if ${gdb_cv_printf_has_long_long+:} false; then :
81ecdfbb 14578 $as_echo_n "(cached) " >&6
97bf5e38 14579else
81ecdfbb 14580 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14581 gdb_cv_printf_has_long_long=no
14582else
81ecdfbb 14583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14584/* end confdefs.h. */
bc8bcb4b
MK
14585$ac_includes_default
14586int
14587main ()
14588{
14589char buf[32];
97bf5e38
MK
14590 long long l = 0;
14591 l = (l << 16) + 0x0123;
14592 l = (l << 16) + 0x4567;
14593 l = (l << 16) + 0x89ab;
14594 l = (l << 16) + 0xcdef;
14595 sprintf (buf, "0x%016llx", l);
14596 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
14597 ;
14598 return 0;
c906108c 14599}
bec39cab 14600_ACEOF
81ecdfbb 14601if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14602 gdb_cv_printf_has_long_long=yes
14603else
81ecdfbb 14604 gdb_cv_printf_has_long_long=no
97bf5e38 14605fi
81ecdfbb
RW
14606rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14607 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14608fi
81ecdfbb 14609
97bf5e38 14610fi
81ecdfbb
RW
14611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14612$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 14613if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 14614
81ecdfbb 14615$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14616
14617fi
97bf5e38 14618
1a619819
LM
14619# Check if the compiler and runtime support printing decfloats.
14620
81ecdfbb
RW
14621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14622$as_echo_n "checking for decfloat support in printf... " >&6; }
d0ac1c44 14623if ${gdb_cv_printf_has_decfloat+:} false; then :
81ecdfbb 14624 $as_echo_n "(cached) " >&6
1a619819 14625else
81ecdfbb 14626 if test "$cross_compiling" = yes; then :
1a619819
LM
14627 gdb_cv_printf_has_decfloat=no
14628else
81ecdfbb 14629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
14630/* end confdefs.h. */
14631$ac_includes_default
14632int
14633main ()
14634{
14635char buf[64];
14636 _Decimal32 d32 = 1.2345df;
14637 _Decimal64 d64 = 1.2345dd;
14638 _Decimal128 d128 = 1.2345dl;
14639 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14640 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14641 ;
14642 return 0;
14643}
14644_ACEOF
81ecdfbb 14645if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
14646 gdb_cv_printf_has_decfloat=yes
14647else
81ecdfbb 14648 gdb_cv_printf_has_decfloat=no
1a619819 14649fi
81ecdfbb
RW
14650rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14651 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 14652fi
81ecdfbb 14653
1a619819 14654fi
81ecdfbb
RW
14655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14656$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
14657if test $gdb_cv_printf_has_decfloat = yes; then
14658
81ecdfbb 14659$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
14660
14661fi
14662
bc8bcb4b
MK
14663# Check if the compiler supports the `long double' type. We can't use
14664# AC_C_LONG_DOUBLE because that one does additional checks on the
14665# constants defined in <float.h> that fail on some systems,
14666# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 14667
81ecdfbb
RW
14668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14669$as_echo_n "checking for long double support in compiler... " >&6; }
d0ac1c44 14670if ${gdb_cv_c_long_double+:} false; then :
81ecdfbb 14671 $as_echo_n "(cached) " >&6
97bf5e38 14672else
81ecdfbb 14673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14674/* end confdefs.h. */
97bf5e38 14675long double foo;
bec39cab 14676_ACEOF
81ecdfbb 14677if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 14678 gdb_cv_c_long_double=yes
97bf5e38 14679else
81ecdfbb 14680 gdb_cv_c_long_double=no
97bf5e38 14681fi
81ecdfbb 14682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14683fi
81ecdfbb
RW
14684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14685$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 14686if test $gdb_cv_c_long_double = yes; then
c906108c 14687
81ecdfbb 14688$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14689
14690fi
14691
bc8bcb4b 14692# Check if the compiler and runtime support printing long doubles.
97bf5e38 14693
81ecdfbb
RW
14694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14695$as_echo_n "checking for long double support in printf... " >&6; }
d0ac1c44 14696if ${gdb_cv_printf_has_long_double+:} false; then :
81ecdfbb 14697 $as_echo_n "(cached) " >&6
97bf5e38 14698else
81ecdfbb 14699 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14700 gdb_cv_printf_has_long_double=no
14701else
81ecdfbb 14702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14703/* end confdefs.h. */
bc8bcb4b
MK
14704$ac_includes_default
14705int
14706main ()
14707{
14708char buf[16];
97bf5e38
MK
14709 long double f = 3.141592653;
14710 sprintf (buf, "%Lg", f);
14711 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
14712 ;
14713 return 0;
97bf5e38 14714}
bec39cab 14715_ACEOF
81ecdfbb 14716if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14717 gdb_cv_printf_has_long_double=yes
c906108c 14718else
81ecdfbb 14719 gdb_cv_printf_has_long_double=no
c906108c 14720fi
81ecdfbb
RW
14721rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14722 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14723fi
81ecdfbb 14724
c906108c 14725fi
81ecdfbb
RW
14726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14727$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 14728if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 14729
81ecdfbb 14730$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14731
14732fi
97bf5e38 14733
bc8bcb4b 14734# Check if the compiler and runtime support scanning long doubles.
97bf5e38 14735
81ecdfbb
RW
14736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14737$as_echo_n "checking for long double support in scanf... " >&6; }
d0ac1c44 14738if ${gdb_cv_scanf_has_long_double+:} false; then :
81ecdfbb 14739 $as_echo_n "(cached) " >&6
97bf5e38 14740else
81ecdfbb 14741 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14742 gdb_cv_scanf_has_long_double=no
14743else
81ecdfbb 14744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14745/* end confdefs.h. */
bc8bcb4b
MK
14746#include <stdio.h>
14747int
14748main ()
14749{
14750char *buf = "3.141592653";
97bf5e38
MK
14751 long double f = 0;
14752 sscanf (buf, "%Lg", &f);
14753 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
14754 ;
14755 return 0;
97bf5e38 14756}
bec39cab 14757_ACEOF
81ecdfbb 14758if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14759 gdb_cv_scanf_has_long_double=yes
14760else
81ecdfbb 14761 gdb_cv_scanf_has_long_double=no
97bf5e38 14762fi
81ecdfbb
RW
14763rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14764 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14765fi
81ecdfbb 14766
c906108c 14767fi
81ecdfbb
RW
14768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14769$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 14770if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 14771
81ecdfbb 14772$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14773
14774fi
c906108c 14775
438013df
AO
14776case ${host_os} in
14777aix*)
81ecdfbb
RW
14778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14779$as_echo_n "checking for -bbigtoc option... " >&6; }
d0ac1c44 14780if ${gdb_cv_bigtoc+:} false; then :
81ecdfbb 14781 $as_echo_n "(cached) " >&6
438013df 14782else
bec39cab 14783
438013df
AO
14784 SAVE_LDFLAGS=$LDFLAGS
14785
14786 case $GCC in
14787 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14788 *) gdb_cv_bigtoc=-bbigtoc ;;
14789 esac
14790
14791 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 14792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14793/* end confdefs.h. */
438013df 14794
bec39cab
AC
14795int
14796main ()
14797{
438013df 14798int i;
bec39cab
AC
14799 ;
14800 return 0;
14801}
14802_ACEOF
81ecdfbb 14803if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14804
81ecdfbb
RW
14805else
14806 gdb_cv_bigtoc=
438013df 14807fi
81ecdfbb
RW
14808rm -f core conftest.err conftest.$ac_objext \
14809 conftest$ac_exeext conftest.$ac_ext
ec76baa5 14810 LDFLAGS="${SAVE_LDFLAGS}"
438013df 14811
bec39cab 14812fi
81ecdfbb
RW
14813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
14814$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
14815 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
14816 ;;
14817esac
14818
38f6b338 14819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 14820$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
14821dynamic_list=false
14822if test "${gdb_native}" = yes; then
14823 # The dynamically loaded libthread_db needs access to symbols in the gdb
14824 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
14825 # may not be supported there.
14826 old_LDFLAGS="$LDFLAGS"
14827 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
14828 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
14829 LDFLAGS="$LDFLAGS $RDYNAMIC"
14830 if test "${have_libpython}" = no; then
14831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
14832/* end confdefs.h. */
14833
14834int
14835main ()
14836{
14837
14838 ;
14839 return 0;
14840}
14841_ACEOF
14842if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
14843 dynamic_list=true
14844fi
14845rm -f core conftest.err conftest.$ac_objext \
14846 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
14847 else
14848 # Workaround http://bugs.python.org/issue4434 where static
14849 # libpythonX.Y.a would get its symbols required for
14850 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
14851 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
14852
14853 # Note the workaround for Python
14854 # http://bugs.python.org/issue10112 earlier has removed
14855 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
14856 # here too, as otherwise it'd make this -Wl,--dynamic-list test
14857 # always pass.
38f6b338
JK
14858 old_CFLAGS="$CFLAGS"
14859 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
14860 old_LIBS="$LIBS"
14861 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
14862 old_CPPFLAGS="$CPPFLAGS"
14863 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 14864 if test "$cross_compiling" = yes; then :
3bebe2f2 14865 true
f6528abd 14866else
3bebe2f2
JK
14867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14868/* end confdefs.h. */
1b4f615e 14869#include "Python.h"
3bebe2f2
JK
14870int
14871main ()
14872{
14873int err;
38f6b338
JK
14874 Py_Initialize ();
14875 err = PyRun_SimpleString ("import itertools\n");
14876 Py_Finalize ();
14877 return err == 0 ? 0 : 1;
3bebe2f2
JK
14878 ;
14879 return 0;
14880}
14881_ACEOF
14882if ac_fn_c_try_run "$LINENO"; then :
14883 dynamic_list=true
14884fi
14885rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14886 conftest.$ac_objext conftest.beam conftest.$ac_ext
14887fi
14888
8c1fb155 14889 LIBS="$old_LIBS"
38f6b338 14890 CFLAGS="$old_CFLAGS"
1b4f615e 14891 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
14892 fi
14893 LDFLAGS="$old_LDFLAGS"
14894fi
14895if $dynamic_list; then
14896 found="-Wl,--dynamic-list"
14897 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 14898else
38f6b338
JK
14899 found="-rdynamic"
14900 RDYNAMIC="-rdynamic"
f6528abd 14901fi
f6528abd 14902
38f6b338 14903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 14904$as_echo "$found" >&6; }
0407b3f1 14905
f6528abd 14906
0407b3f1 14907if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 14908 case ${host_os} in
d92419e5 14909 aix*)
81ecdfbb
RW
14910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
14911$as_echo_n "checking for AiX thread debugging library... " >&6; }
d0ac1c44 14912 if ${gdb_cv_have_aix_thread_debug+:} false; then :
81ecdfbb 14913 $as_echo_n "(cached) " >&6
bec39cab 14914else
81ecdfbb 14915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14916/* end confdefs.h. */
d92419e5 14917#include <sys/pthdebug.h>
bec39cab
AC
14918int
14919main ()
14920{
d92419e5
JB
14921#ifndef PTHDB_VERSION_3
14922 #error
14923 #endif
bec39cab
AC
14924 ;
14925 return 0;
14926}
14927_ACEOF
81ecdfbb 14928if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
14929 gdb_cv_have_aix_thread_debug=yes
14930else
81ecdfbb 14931 gdb_cv_have_aix_thread_debug=no
d92419e5 14932fi
81ecdfbb 14933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
14934fi
14935
81ecdfbb
RW
14936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
14937$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
14938 if test $gdb_cv_have_aix_thread_debug = yes; then
14939 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 14940 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 14941 LIBS="$LIBS -lpthdebug"
d645e32e
JB
14942
14943 # Older versions of AIX do not provide the declaration for
14944 # the getthrds function (it appears that it was introduced
14945 # with AIX 6.x).
14946 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
14947"
d0ac1c44 14948if test "x$ac_cv_have_decl_getthrds" = xyes; then :
d645e32e
JB
14949 ac_have_decl=1
14950else
14951 ac_have_decl=0
14952fi
14953
14954cat >>confdefs.h <<_ACEOF
14955#define HAVE_DECL_GETTHRDS $ac_have_decl
14956_ACEOF
14957
d92419e5
JB
14958 fi
14959 ;;
c906108c 14960 esac
bec39cab 14961
c906108c
SS
14962fi
14963
3f47be5c 14964if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
14965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
14966$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
d0ac1c44 14967if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
81ecdfbb 14968 $as_echo_n "(cached) " >&6
bec39cab 14969else
81ecdfbb 14970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14971/* end confdefs.h. */
3f47be5c 14972#include <thread_db.h>
bec39cab
AC
14973int
14974main ()
14975{
3f47be5c 14976int i = TD_NOTALLOC;
bec39cab
AC
14977 ;
14978 return 0;
14979}
14980_ACEOF
81ecdfbb 14981if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
14982 gdb_cv_thread_db_h_has_td_notalloc=yes
14983else
81ecdfbb 14984 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 14985
3f47be5c 14986fi
81ecdfbb 14987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 14988
bec39cab 14989fi
81ecdfbb
RW
14990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
14991$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
14992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
14993$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
d0ac1c44 14994if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
81ecdfbb 14995 $as_echo_n "(cached) " >&6
59f80f10 14996else
81ecdfbb 14997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14998/* end confdefs.h. */
14999#include <thread_db.h>
15000int
15001main ()
15002{
15003int i = TD_VERSION;
15004 ;
15005 return 0;
15006}
15007_ACEOF
81ecdfbb 15008if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15009 gdb_cv_thread_db_h_has_td_version=yes
15010else
81ecdfbb 15011 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
15012
15013fi
81ecdfbb 15014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15015
15016fi
81ecdfbb
RW
15017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
15018$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
15019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
15020$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
d0ac1c44 15021if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
81ecdfbb 15022 $as_echo_n "(cached) " >&6
59f80f10 15023else
81ecdfbb 15024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
15025/* end confdefs.h. */
15026#include <thread_db.h>
15027int
15028main ()
15029{
15030int i = TD_NOTLS;
15031 ;
15032 return 0;
15033}
15034_ACEOF
81ecdfbb 15035if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15036 gdb_cv_thread_db_h_has_td_notls=yes
15037else
81ecdfbb 15038 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
15039
15040fi
81ecdfbb 15041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15042
15043fi
81ecdfbb
RW
15044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
15045$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
15046fi
15047if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 15048
81ecdfbb 15049$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 15050
59f80f10
DJ
15051fi
15052if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
15053
81ecdfbb 15054$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
15055
15056fi
15057if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
15058
81ecdfbb 15059$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 15060
3f47be5c
EZ
15061fi
15062
81ecdfbb
RW
15063ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
15064"
d0ac1c44 15065if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
81ecdfbb 15066 ac_have_decl=1
10568435 15067else
81ecdfbb 15068 ac_have_decl=0
10568435 15069fi
10568435
JK
15070
15071cat >>confdefs.h <<_ACEOF
81ecdfbb 15072#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
15073_ACEOF
15074
15075
81ecdfbb
RW
15076if test "$cross_compiling" = yes; then :
15077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15078/* end confdefs.h. */
15079#include <sys/personality.h>
15080int
15081main ()
15082{
15083
15084# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15085# define ADDR_NO_RANDOMIZE 0x0040000
15086# endif
15087 /* Test the flag could be set and stays set. */
15088 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15089 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15090 return 1
15091 ;
15092 return 0;
15093}
15094_ACEOF
81ecdfbb 15095if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
15096 have_personality=true
15097else
81ecdfbb 15098 have_personality=false
10568435 15099fi
81ecdfbb
RW
15100rm -f core conftest.err conftest.$ac_objext \
15101 conftest$ac_exeext conftest.$ac_ext
10568435 15102else
81ecdfbb 15103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15104/* end confdefs.h. */
15105#include <sys/personality.h>
15106int
15107main ()
15108{
15109
15110# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15111# define ADDR_NO_RANDOMIZE 0x0040000
15112# endif
15113 /* Test the flag could be set and stays set. */
15114 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15115 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15116 return 1
15117 ;
15118 return 0;
15119}
15120_ACEOF
81ecdfbb 15121if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
15122 have_personality=true
15123else
81ecdfbb 15124 have_personality=false
10568435 15125fi
81ecdfbb
RW
15126rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15127 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 15128fi
81ecdfbb 15129
10568435
JK
15130if $have_personality
15131then
15132
81ecdfbb 15133$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
15134
15135fi
15136
e655c1a2
PA
15137case $host_os in
15138 go32* | *djgpp*)
15139 gdbinit=gdb.ini
15140 ;;
15141 *)
15142 gdbinit=.gdbinit
15143 ;;
15144esac
15145
15146cat >>confdefs.h <<_ACEOF
15147#define GDBINIT "$gdbinit"
15148_ACEOF
15149
15150
fb40c209 15151
f83d8a90
DE
15152# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
15153# except that the argument to --with-sysroot is optional.
15154# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
15155if test "x$with_sysroot" = xyes; then
15156 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
15157fi
bec39cab 15158
81ecdfbb
RW
15159# Check whether --with-sysroot was given.
15160if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
15161 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
15162else
15163 TARGET_SYSTEM_ROOT=
15164fi
030292b7 15165
030292b7 15166
f83d8a90
DE
15167 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15168 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15169 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
15170 ac_define_dir=`eval echo $ac_define_dir`
030292b7 15171
f83d8a90
DE
15172cat >>confdefs.h <<_ACEOF
15173#define TARGET_SYSTEM_ROOT "$ac_define_dir"
15174_ACEOF
bec39cab 15175
030292b7 15176
b14b1491 15177
f83d8a90
DE
15178
15179 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15180 if test "x$prefix" = xNONE; then
15181 test_prefix=/usr/local
15182 else
15183 test_prefix=$prefix
15184 fi
15185 else
15186 test_prefix=$exec_prefix
15187 fi
15188 value=0
15189 case ${ac_define_dir} in
15190 "${test_prefix}"|"${test_prefix}/"*|\
15191 '${exec_prefix}'|'${exec_prefix}/'*)
15192 value=1
15193 ;;
15194 esac
15195
15196cat >>confdefs.h <<_ACEOF
15197#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
15198_ACEOF
030292b7
DJ
15199
15200
15201
16e7150e 15202
16e7150e 15203
81ecdfbb
RW
15204# Check whether --with-system-gdbinit was given.
15205if test "${with_system_gdbinit+set}" = set; then :
15206 withval=$with_system_gdbinit;
b14b1491
TT
15207 SYSTEM_GDBINIT=$withval
15208else
15209 SYSTEM_GDBINIT=
81ecdfbb
RW
15210fi
15211
16e7150e
JG
15212
15213 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15214 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 15215 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
15216 ac_define_dir=`eval echo $ac_define_dir`
15217
15218cat >>confdefs.h <<_ACEOF
15219#define SYSTEM_GDBINIT "$ac_define_dir"
15220_ACEOF
15221
15222
15223
0c4a4063 15224
b14b1491
TT
15225 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15226 if test "x$prefix" = xNONE; then
15227 test_prefix=/usr/local
15228 else
15229 test_prefix=$prefix
15230 fi
15231 else
15232 test_prefix=$exec_prefix
15233 fi
15234 value=0
15235 case ${ac_define_dir} in
15236 "${test_prefix}"|"${test_prefix}/"*|\
15237 '${exec_prefix}'|'${exec_prefix}/'*)
15238 value=1
15239 ;;
15240 esac
16e7150e 15241
b14b1491
TT
15242cat >>confdefs.h <<_ACEOF
15243#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
15244_ACEOF
15245
b14b1491 15246
16e7150e 15247
0c4a4063 15248
b835bb52 15249
81ecdfbb
RW
15250# Check whether --enable-werror was given.
15251if test "${enable_werror+set}" = set; then :
15252 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
15253 yes | y) ERROR_ON_WARNING="yes" ;;
15254 no | n) ERROR_ON_WARNING="no" ;;
d0ac1c44 15255 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 15256 esac
81ecdfbb
RW
15257fi
15258
094a342e 15259
9a084706
PA
15260# Enable -Werror by default when using gcc. Turn it off for releases.
15261if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
15262 ERROR_ON_WARNING=yes
15263fi
15264
15265WERROR_CFLAGS=""
15266if test "${ERROR_ON_WARNING}" = yes ; then
15267 WERROR_CFLAGS="-Werror"
15268fi
15269
cf6de44d 15270# The options we'll try to enable.
aac331e4 15271build_warnings="-Wall -Wpointer-arith \
a0de763e 15272-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
aac331e4 15273-Wno-switch -Wno-char-subscripts \
cf6de44d 15274-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
d3d8724a 15275-Wno-sign-compare -Wno-error=maybe-uninitialized \
7f8a5d38 15276-Wno-mismatched-tags \
632e107b 15277-Wno-error=deprecated-register \
85e26832 15278-Wsuggest-override \
1a34f210 15279-Wimplicit-fallthrough=3 \
96643e35 15280-Wduplicated-cond \
33a6bc35
TT
15281-Wshadow=local \
15282-Wdeprecated-copy \
15283-Wdeprecated-copy-dtor \
15284-Wredundant-move"
3bc3d82a 15285
3526781e 15286case "${host}" in
4fa7574e
RO
15287 *-*-mingw32*)
15288 # Enable -Wno-format by default when using gcc on mingw since many
15289 # GCC versions complain about %I64.
15290 build_warnings="$build_warnings -Wno-format" ;;
15291 *-*-solaris*)
15292 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
15293 # doesn't understand.
15294 build_warnings="$build_warnings -Wno-unknown-pragmas"
15295 # Solaris 11 <unistd.h> marks vfork deprecated.
15296 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
f1628857
TT
15297 *)
15298 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
15299 # but there's a special case for this below.
15300 build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
15301esac
15302
81ecdfbb
RW
15303# Check whether --enable-build-warnings was given.
15304if test "${enable_build_warnings+set}" = set; then :
15305 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
15306 yes) ;;
15307 no) build_warnings="-w";;
15308 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15309 build_warnings="${build_warnings} ${t}";;
15310 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15311 build_warnings="${t} ${build_warnings}";;
15312 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15313esac
d4f3574e 15314if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 15315 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 15316fi
81ecdfbb
RW
15317fi
15318# Check whether --enable-gdb-build-warnings was given.
15319if test "${enable_gdb_build_warnings+set}" = set; then :
15320 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
15321 yes) ;;
15322 no) build_warnings="-w";;
15323 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15324 build_warnings="${build_warnings} ${t}";;
15325 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15326 build_warnings="${t} ${build_warnings}";;
15327 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15328esac
15329if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15330 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
15331fi
81ecdfbb 15332fi
3bc3d82a
PA
15333
15334# The set of warnings supported by a C++ compiler is not the same as
15335# of the C compiler.
cf6de44d 15336ac_ext=cpp
3bc3d82a
PA
15337ac_cpp='$CXXCPP $CPPFLAGS'
15338ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15339ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15340ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15341
3bc3d82a 15342
81ecdfbb 15343WARN_CFLAGS=""
c906108c
SS
15344if test "x${build_warnings}" != x -a "x$GCC" = xyes
15345then
81ecdfbb
RW
15346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
15347$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
15348 # Separate out the -Werror flag as some files just cannot be
15349 # compiled with it enabled.
15350 for w in ${build_warnings}; do
7544db95
PA
15351 # GCC does not complain about -Wno-unknown-warning. Invert
15352 # and test -Wunknown-warning instead.
15353 case $w in
15354 -Wno-*)
15355 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
f1628857
TT
15356 -Wformat-nonliteral)
15357 # gcc requires -Wformat before -Wformat-nonliteral
15358 # will work, so stick them together.
15359 w="-Wformat $w"
15360 wtest="$w"
15361 ;;
7544db95
PA
15362 *)
15363 wtest=$w ;;
15364 esac
15365
746a987d
AC
15366 case $w in
15367 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
15368 *)
15369 # Check whether GCC accepts it.
4536bbc6 15370 saved_CFLAGS="$CFLAGS"
3e019bdc 15371 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 15372 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 15373 CXXFLAGS="$CXXFLAGS -Werror $wtest"
a0de763e
TT
15374 if test "x$w" = "x-Wunused-variable"; then
15375 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
15376 # fixed in GCC 4.9. This test is derived from the gdb
15377 # source code that triggered this bug in GCC.
15378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15379/* end confdefs.h. */
15380struct scoped_restore_base {};
15381 struct scoped_restore_tmpl : public scoped_restore_base {
15382 ~scoped_restore_tmpl() {}
15383 };
15384int
15385main ()
15386{
15387const scoped_restore_base &b = scoped_restore_tmpl();
15388 ;
15389 return 0;
15390}
15391_ACEOF
15392if ac_fn_cxx_try_compile "$LINENO"; then :
15393 WARN_CFLAGS="${WARN_CFLAGS} $w"
15394fi
15395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15396 else
15397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15398/* end confdefs.h. */
4536bbc6 15399
bec39cab
AC
15400int
15401main ()
15402{
4536bbc6 15403
bec39cab
AC
15404 ;
15405 return 0;
15406}
15407_ACEOF
3bc3d82a 15408if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 15409 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 15410fi
81ecdfbb 15411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a0de763e 15412 fi
4536bbc6 15413 CFLAGS="$saved_CFLAGS"
3bc3d82a 15414 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
15415 esac
15416 done
81ecdfbb
RW
15417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
15418$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
15419fi
15420
15421
104c1213 15422
cf6de44d 15423ac_ext=c
3bc3d82a
PA
15424ac_cpp='$CPP $CPPFLAGS'
15425ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15426ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15427ac_compiler_gnu=$ac_cv_c_compiler_gnu
15428
3bc3d82a 15429
b835bb52 15430
f35d5ade
TT
15431# Check whether --enable-ubsan was given.
15432if test "${enable_ubsan+set}" = set; then :
15433 enableval=$enable_ubsan;
15434else
eff98030 15435 enable_ubsan=no
f35d5ade
TT
15436fi
15437
15438if test "x$enable_ubsan" = xauto; then
15439 if $development; then
15440 enable_ubsan=yes
15441 fi
15442fi
15443ac_ext=cpp
15444ac_cpp='$CXXCPP $CPPFLAGS'
15445ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15446ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15447ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15448
15449if test "x$enable_ubsan" = xyes; then
15450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
15451$as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
15452 saved_CXXFLAGS="$CXXFLAGS"
15453 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
15454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15455/* end confdefs.h. */
15456
15457int
15458main ()
15459{
15460
15461 ;
15462 return 0;
15463}
15464_ACEOF
15465if ac_fn_cxx_try_link "$LINENO"; then :
15466 enable_ubsan=yes
15467else
15468 enable_ubsan=no
15469fi
15470rm -f core conftest.err conftest.$ac_objext \
15471 conftest$ac_exeext conftest.$ac_ext
15472 CXXFLAGS="$saved_CXXFLAGS"
15473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
15474$as_echo "$enable_ubsan" >&6; }
15475 if test "x$enable_ubsan" = xyes; then
15476 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
15477 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
15478 fi
15479fi
15480ac_ext=c
15481ac_cpp='$CPP $CPPFLAGS'
15482ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15483ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15484ac_compiler_gnu=$ac_cv_c_compiler_gnu
15485
15486
15487
7a292a7a 15488# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
15489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
15490$as_echo_n "checking for cygwin... " >&6; }
d0ac1c44 15491if ${gdb_cv_os_cygwin+:} false; then :
81ecdfbb 15492 $as_echo_n "(cached) " >&6
bec39cab 15493else
81ecdfbb 15494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15495/* end confdefs.h. */
7a292a7a
SS
15496
15497#if defined (__CYGWIN__) || defined (__CYGWIN32__)
15498lose
15499#endif
bec39cab 15500_ACEOF
7a292a7a 15501if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 15502 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
15503 gdb_cv_os_cygwin=yes
15504else
7a292a7a
SS
15505 gdb_cv_os_cygwin=no
15506fi
15507rm -f conftest*
15508
15509fi
81ecdfbb
RW
15510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
15511$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 15512
aff38e61 15513
3eb25fda 15514SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 15515case ${host} in
95cbc983
AC
15516 *go32* ) SER_HARDWIRE=ser-go32.o ;;
15517 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 15518 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
c1168a2f 15519 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
aff38e61
AC
15520esac
15521
15522
cd0fc7c3
SS
15523# libreadline needs libuser32.a in a cygwin environment
15524WIN32LIBS=
15525if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
15526 WIN32LIBS="-luser32"
15527 case "${target}" in
15528 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15529 ;;
15530 esac
cd0fc7c3 15531fi
c906108c 15532
b4505029
MM
15533# The ser-tcp.c module requires sockets.
15534case ${host} in
15535 *mingw32*)
15536
81ecdfbb 15537$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
15538
15539 WIN32LIBS="$WIN32LIBS -lws2_32"
15540 ;;
15541esac
15542
7a292a7a 15543
31d99776 15544# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
15545
15546 OLD_CFLAGS=$CFLAGS
15547 OLD_LDFLAGS=$LDFLAGS
15548 OLD_LIBS=$LIBS
15549 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15550 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15551 # always want our bfd.
15552 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15553 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15554 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 15555 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15556 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 15557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb 15558$as_echo_n "checking for ELF support in BFD... " >&6; }
d0ac1c44 15559if ${gdb_cv_var_elf+:} false; then :
81ecdfbb 15560 $as_echo_n "(cached) " >&6
31d99776 15561else
81ecdfbb 15562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
15563/* end confdefs.h. */
15564#include <stdlib.h>
def63ff0
TT
15565 #include "bfd.h"
15566 #include "elf-bfd.h"
31d99776
DJ
15567
15568int
15569main ()
15570{
def63ff0 15571return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
15572 ;
15573 return 0;
15574}
15575_ACEOF
81ecdfbb 15576if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
15577 gdb_cv_var_elf=yes
15578else
81ecdfbb 15579 gdb_cv_var_elf=no
31d99776 15580fi
81ecdfbb
RW
15581rm -f core conftest.err conftest.$ac_objext \
15582 conftest$ac_exeext conftest.$ac_ext
31d99776 15583fi
81ecdfbb
RW
15584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15585$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
15586 CFLAGS=$OLD_CFLAGS
15587 LDFLAGS=$OLD_LDFLAGS
15588 LIBS=$OLD_LIBS
31d99776 15589if test $gdb_cv_var_elf = yes; then
d4777acb 15590 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 15591
81ecdfbb 15592$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 15593
075ff26d
JK
15594 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15595 if test "$plugins" = "yes"; then
a48b32c0
L
15596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
15597$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 15598if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15599 $as_echo_n "(cached) " >&6
15600else
15601 ac_func_search_save_LIBS=$LIBS
15602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15603/* end confdefs.h. */
15604
15605/* Override any GCC internal prototype to avoid an error.
15606 Use char because int might match the return type of a GCC
15607 builtin and then its argument prototype would still apply. */
15608#ifdef __cplusplus
15609extern "C"
15610#endif
15611char dlopen ();
15612int
15613main ()
15614{
15615return dlopen ();
15616 ;
15617 return 0;
15618}
15619_ACEOF
15620for ac_lib in '' dl; do
15621 if test -z "$ac_lib"; then
15622 ac_res="none required"
15623 else
15624 ac_res=-l$ac_lib
15625 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15626 fi
15627 if ac_fn_c_try_link "$LINENO"; then :
15628 ac_cv_search_dlopen=$ac_res
15629fi
15630rm -f core conftest.err conftest.$ac_objext \
15631 conftest$ac_exeext
d0ac1c44 15632 if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15633 break
15634fi
15635done
d0ac1c44 15636if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
15637
15638else
15639 ac_cv_search_dlopen=no
15640fi
15641rm conftest.$ac_ext
15642LIBS=$ac_func_search_save_LIBS
15643fi
15644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
15645$as_echo "$ac_cv_search_dlopen" >&6; }
15646ac_res=$ac_cv_search_dlopen
15647if test "$ac_res" != no; then :
15648 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15649
15650fi
15651
075ff26d 15652 fi
31d99776 15653fi
31d99776 15654
4f05add4
TT
15655# Add macho support to GDB, but only if BFD includes it.
15656
15657 OLD_CFLAGS=$CFLAGS
15658 OLD_LDFLAGS=$LDFLAGS
15659 OLD_LIBS=$LIBS
15660 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15661 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15662 # always want our bfd.
15663 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15664 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15665 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 15666 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15667 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
15668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
15669$as_echo_n "checking for Mach-O support in BFD... " >&6; }
d0ac1c44 15670if ${gdb_cv_var_macho+:} false; then :
4f05add4
TT
15671 $as_echo_n "(cached) " >&6
15672else
15673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15674/* end confdefs.h. */
15675#include <stdlib.h>
15676 #include "bfd.h"
15677 #include "mach-o.h"
15678
15679int
15680main ()
15681{
15682return bfd_mach_o_lookup_command (NULL, 0, NULL);
15683 ;
15684 return 0;
15685}
15686_ACEOF
15687if ac_fn_c_try_link "$LINENO"; then :
15688 gdb_cv_var_macho=yes
15689else
15690 gdb_cv_var_macho=no
15691fi
15692rm -f core conftest.err conftest.$ac_objext \
15693 conftest$ac_exeext conftest.$ac_ext
15694fi
15695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
15696$as_echo "$gdb_cv_var_macho" >&6; }
15697 CFLAGS=$OLD_CFLAGS
15698 LDFLAGS=$OLD_LDFLAGS
15699 LIBS=$OLD_LIBS
15700if test $gdb_cv_var_macho = yes; then
15701 CONFIG_OBS="$CONFIG_OBS machoread.o"
15702fi
15703
121ce6e5
DJ
15704# Add any host-specific objects to GDB.
15705CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15706
608e2dbb
TT
15707# If building on ELF, look for lzma support for embedded compressed debug info.
15708if test $gdb_cv_var_elf = yes; then
15709
15710# Check whether --with-lzma was given.
15711if test "${with_lzma+set}" = set; then :
15712 withval=$with_lzma;
15713else
15714 with_lzma=auto
15715fi
15716
15717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
15718$as_echo_n "checking whether to use lzma... " >&6; }
15719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
15720$as_echo "$with_lzma" >&6; }
15721
15722 if test "${with_lzma}" != no; then
15723
15724
15725
15726
15727
15728
15729
15730
15731 use_additional=yes
15732
15733 acl_save_prefix="$prefix"
15734 prefix="$acl_final_prefix"
15735 acl_save_exec_prefix="$exec_prefix"
15736 exec_prefix="$acl_final_exec_prefix"
15737
15738 eval additional_includedir=\"$includedir\"
15739 eval additional_libdir=\"$libdir\"
15740
15741 exec_prefix="$acl_save_exec_prefix"
15742 prefix="$acl_save_prefix"
15743
15744
15745# Check whether --with-liblzma-prefix was given.
15746if test "${with_liblzma_prefix+set}" = set; then :
15747 withval=$with_liblzma_prefix;
15748 if test "X$withval" = "Xno"; then
15749 use_additional=no
15750 else
15751 if test "X$withval" = "X"; then
15752
15753 acl_save_prefix="$prefix"
15754 prefix="$acl_final_prefix"
15755 acl_save_exec_prefix="$exec_prefix"
15756 exec_prefix="$acl_final_exec_prefix"
15757
15758 eval additional_includedir=\"$includedir\"
15759 eval additional_libdir=\"$libdir\"
15760
15761 exec_prefix="$acl_save_exec_prefix"
15762 prefix="$acl_save_prefix"
15763
15764 else
15765 additional_includedir="$withval/include"
15766 additional_libdir="$withval/lib"
15767 fi
15768 fi
15769
15770fi
15771
15772 LIBLZMA=
15773 LTLIBLZMA=
15774 INCLZMA=
15775 rpathdirs=
15776 ltrpathdirs=
15777 names_already_handled=
15778 names_next_round='lzma '
15779 while test -n "$names_next_round"; do
15780 names_this_round="$names_next_round"
15781 names_next_round=
15782 for name in $names_this_round; do
15783 already_handled=
15784 for n in $names_already_handled; do
15785 if test "$n" = "$name"; then
15786 already_handled=yes
15787 break
15788 fi
15789 done
15790 if test -z "$already_handled"; then
15791 names_already_handled="$names_already_handled $name"
15792 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
15793 eval value=\"\$HAVE_LIB$uppername\"
15794 if test -n "$value"; then
15795 if test "$value" = yes; then
15796 eval value=\"\$LIB$uppername\"
15797 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
15798 eval value=\"\$LTLIB$uppername\"
15799 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
15800 else
15801 :
15802 fi
15803 else
15804 found_dir=
15805 found_la=
15806 found_so=
15807 found_a=
15808 if test $use_additional = yes; then
15809 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
15810 found_dir="$additional_libdir"
15811 found_so="$additional_libdir/lib$name.$shlibext"
15812 if test -f "$additional_libdir/lib$name.la"; then
15813 found_la="$additional_libdir/lib$name.la"
15814 fi
15815 else
15816 if test -f "$additional_libdir/lib$name.$libext"; then
15817 found_dir="$additional_libdir"
15818 found_a="$additional_libdir/lib$name.$libext"
15819 if test -f "$additional_libdir/lib$name.la"; then
15820 found_la="$additional_libdir/lib$name.la"
15821 fi
15822 fi
15823 fi
15824 fi
15825 if test "X$found_dir" = "X"; then
15826 for x in $LDFLAGS $LTLIBLZMA; do
15827
15828 acl_save_prefix="$prefix"
15829 prefix="$acl_final_prefix"
15830 acl_save_exec_prefix="$exec_prefix"
15831 exec_prefix="$acl_final_exec_prefix"
15832 eval x=\"$x\"
15833 exec_prefix="$acl_save_exec_prefix"
15834 prefix="$acl_save_prefix"
15835
15836 case "$x" in
15837 -L*)
15838 dir=`echo "X$x" | sed -e 's/^X-L//'`
15839 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
15840 found_dir="$dir"
15841 found_so="$dir/lib$name.$shlibext"
15842 if test -f "$dir/lib$name.la"; then
15843 found_la="$dir/lib$name.la"
15844 fi
15845 else
15846 if test -f "$dir/lib$name.$libext"; then
15847 found_dir="$dir"
15848 found_a="$dir/lib$name.$libext"
15849 if test -f "$dir/lib$name.la"; then
15850 found_la="$dir/lib$name.la"
15851 fi
15852 fi
15853 fi
15854 ;;
15855 esac
15856 if test "X$found_dir" != "X"; then
15857 break
15858 fi
15859 done
15860 fi
15861 if test "X$found_dir" != "X"; then
15862 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
15863 if test "X$found_so" != "X"; then
15864 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
15865 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15866 else
15867 haveit=
15868 for x in $ltrpathdirs; do
15869 if test "X$x" = "X$found_dir"; then
15870 haveit=yes
15871 break
15872 fi
15873 done
15874 if test -z "$haveit"; then
15875 ltrpathdirs="$ltrpathdirs $found_dir"
15876 fi
15877 if test "$hardcode_direct" = yes; then
15878 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15879 else
15880 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
15881 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15882 haveit=
15883 for x in $rpathdirs; do
15884 if test "X$x" = "X$found_dir"; then
15885 haveit=yes
15886 break
15887 fi
15888 done
15889 if test -z "$haveit"; then
15890 rpathdirs="$rpathdirs $found_dir"
15891 fi
15892 else
15893 haveit=
15894 for x in $LDFLAGS $LIBLZMA; do
15895
15896 acl_save_prefix="$prefix"
15897 prefix="$acl_final_prefix"
15898 acl_save_exec_prefix="$exec_prefix"
15899 exec_prefix="$acl_final_exec_prefix"
15900 eval x=\"$x\"
15901 exec_prefix="$acl_save_exec_prefix"
15902 prefix="$acl_save_prefix"
15903
15904 if test "X$x" = "X-L$found_dir"; then
15905 haveit=yes
15906 break
15907 fi
15908 done
15909 if test -z "$haveit"; then
15910 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
15911 fi
15912 if test "$hardcode_minus_L" != no; then
15913 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15914 else
15915 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
15916 fi
15917 fi
15918 fi
15919 fi
15920 else
15921 if test "X$found_a" != "X"; then
15922 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
15923 else
15924 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
15925 fi
15926 fi
15927 additional_includedir=
15928 case "$found_dir" in
15929 */lib | */lib/)
15930 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
15931 additional_includedir="$basedir/include"
15932 ;;
15933 esac
15934 if test "X$additional_includedir" != "X"; then
15935 if test "X$additional_includedir" != "X/usr/include"; then
15936 haveit=
15937 if test "X$additional_includedir" = "X/usr/local/include"; then
15938 if test -n "$GCC"; then
15939 case $host_os in
15940 linux*) haveit=yes;;
15941 esac
15942 fi
15943 fi
15944 if test -z "$haveit"; then
15945 for x in $CPPFLAGS $INCLZMA; do
15946
15947 acl_save_prefix="$prefix"
15948 prefix="$acl_final_prefix"
15949 acl_save_exec_prefix="$exec_prefix"
15950 exec_prefix="$acl_final_exec_prefix"
15951 eval x=\"$x\"
15952 exec_prefix="$acl_save_exec_prefix"
15953 prefix="$acl_save_prefix"
15954
15955 if test "X$x" = "X-I$additional_includedir"; then
15956 haveit=yes
15957 break
15958 fi
15959 done
15960 if test -z "$haveit"; then
15961 if test -d "$additional_includedir"; then
15962 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
15963 fi
15964 fi
15965 fi
15966 fi
15967 fi
15968 if test -n "$found_la"; then
15969 save_libdir="$libdir"
15970 case "$found_la" in
15971 */* | *\\*) . "$found_la" ;;
15972 *) . "./$found_la" ;;
15973 esac
15974 libdir="$save_libdir"
15975 for dep in $dependency_libs; do
15976 case "$dep" in
15977 -L*)
15978 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15979 if test "X$additional_libdir" != "X/usr/lib"; then
15980 haveit=
15981 if test "X$additional_libdir" = "X/usr/local/lib"; then
15982 if test -n "$GCC"; then
15983 case $host_os in
15984 linux*) haveit=yes;;
15985 esac
15986 fi
15987 fi
15988 if test -z "$haveit"; then
15989 haveit=
15990 for x in $LDFLAGS $LIBLZMA; do
15991
15992 acl_save_prefix="$prefix"
15993 prefix="$acl_final_prefix"
15994 acl_save_exec_prefix="$exec_prefix"
15995 exec_prefix="$acl_final_exec_prefix"
15996 eval x=\"$x\"
15997 exec_prefix="$acl_save_exec_prefix"
15998 prefix="$acl_save_prefix"
15999
16000 if test "X$x" = "X-L$additional_libdir"; then
16001 haveit=yes
16002 break
16003 fi
16004 done
16005 if test -z "$haveit"; then
16006 if test -d "$additional_libdir"; then
16007 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
16008 fi
16009 fi
16010 haveit=
16011 for x in $LDFLAGS $LTLIBLZMA; do
16012
16013 acl_save_prefix="$prefix"
16014 prefix="$acl_final_prefix"
16015 acl_save_exec_prefix="$exec_prefix"
16016 exec_prefix="$acl_final_exec_prefix"
16017 eval x=\"$x\"
16018 exec_prefix="$acl_save_exec_prefix"
16019 prefix="$acl_save_prefix"
16020
16021 if test "X$x" = "X-L$additional_libdir"; then
16022 haveit=yes
16023 break
16024 fi
16025 done
16026 if test -z "$haveit"; then
16027 if test -d "$additional_libdir"; then
16028 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
16029 fi
16030 fi
16031 fi
16032 fi
16033 ;;
16034 -R*)
16035 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16036 if test "$enable_rpath" != no; then
16037 haveit=
16038 for x in $rpathdirs; do
16039 if test "X$x" = "X$dir"; then
16040 haveit=yes
16041 break
16042 fi
16043 done
16044 if test -z "$haveit"; then
16045 rpathdirs="$rpathdirs $dir"
16046 fi
16047 haveit=
16048 for x in $ltrpathdirs; do
16049 if test "X$x" = "X$dir"; then
16050 haveit=yes
16051 break
16052 fi
16053 done
16054 if test -z "$haveit"; then
16055 ltrpathdirs="$ltrpathdirs $dir"
16056 fi
16057 fi
16058 ;;
16059 -l*)
16060 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16061 ;;
16062 *.la)
16063 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16064 ;;
16065 *)
16066 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
16067 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
16068 ;;
16069 esac
16070 done
16071 fi
16072 else
16073 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16074 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
16075 fi
16076 fi
16077 fi
16078 done
16079 done
16080 if test "X$rpathdirs" != "X"; then
16081 if test -n "$hardcode_libdir_separator"; then
16082 alldirs=
16083 for found_dir in $rpathdirs; do
16084 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16085 done
16086 acl_save_libdir="$libdir"
16087 libdir="$alldirs"
16088 eval flag=\"$hardcode_libdir_flag_spec\"
16089 libdir="$acl_save_libdir"
16090 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16091 else
16092 for found_dir in $rpathdirs; do
16093 acl_save_libdir="$libdir"
16094 libdir="$found_dir"
16095 eval flag=\"$hardcode_libdir_flag_spec\"
16096 libdir="$acl_save_libdir"
16097 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16098 done
16099 fi
16100 fi
16101 if test "X$ltrpathdirs" != "X"; then
16102 for found_dir in $ltrpathdirs; do
16103 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
16104 done
16105 fi
16106
16107
16108 ac_save_CPPFLAGS="$CPPFLAGS"
16109
16110 for element in $INCLZMA; do
16111 haveit=
16112 for x in $CPPFLAGS; do
16113
16114 acl_save_prefix="$prefix"
16115 prefix="$acl_final_prefix"
16116 acl_save_exec_prefix="$exec_prefix"
16117 exec_prefix="$acl_final_exec_prefix"
16118 eval x=\"$x\"
16119 exec_prefix="$acl_save_exec_prefix"
16120 prefix="$acl_save_prefix"
16121
16122 if test "X$x" = "X$element"; then
16123 haveit=yes
16124 break
16125 fi
16126 done
16127 if test -z "$haveit"; then
16128 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16129 fi
16130 done
16131
16132
16133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
16134$as_echo_n "checking for liblzma... " >&6; }
d0ac1c44 16135if ${ac_cv_liblzma+:} false; then :
608e2dbb
TT
16136 $as_echo_n "(cached) " >&6
16137else
16138
16139 ac_save_LIBS="$LIBS"
16140 LIBS="$LIBS $LIBLZMA"
16141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16142/* end confdefs.h. */
16143#include "lzma.h"
16144int
16145main ()
16146{
16147lzma_index_iter iter;
16148 lzma_index_iter_init (&iter, 0);
16149 lzma_mf_is_supported (LZMA_MF_HC3);
16150 ;
16151 return 0;
16152}
16153_ACEOF
16154if ac_fn_c_try_link "$LINENO"; then :
16155 ac_cv_liblzma=yes
16156else
16157 ac_cv_liblzma=no
16158fi
16159rm -f core conftest.err conftest.$ac_objext \
16160 conftest$ac_exeext conftest.$ac_ext
16161 LIBS="$ac_save_LIBS"
16162
16163fi
16164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
16165$as_echo "$ac_cv_liblzma" >&6; }
16166 if test "$ac_cv_liblzma" = yes; then
16167 HAVE_LIBLZMA=yes
16168
16169$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
16170
16171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
16172$as_echo_n "checking how to link with liblzma... " >&6; }
16173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
16174$as_echo "$LIBLZMA" >&6; }
16175 else
16176 HAVE_LIBLZMA=no
16177 CPPFLAGS="$ac_save_CPPFLAGS"
16178 LIBLZMA=
16179 LTLIBLZMA=
16180 fi
16181
16182
16183
16184
16185
16186
16187 if test "$HAVE_LIBLZMA" != yes; then
16188 if test "$with_lzma" = yes; then
d0ac1c44 16189 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
608e2dbb
TT
16190 fi
16191 fi
16192 fi
16193fi
16194
3fc11d3e
JM
16195LIBGUI="../libgui/src/libgui.a"
16196GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
16197
16198
7a292a7a 16199
3fc11d3e
JM
16200WIN32LDAPP=
16201
16202
16203
d91670b9 16204case "${host}" in
686a5eed 16205*-*-cygwin* | *-*-mingw* )
d91670b9
CV
16206 configdir="win"
16207 ;;
16208*)
16209 configdir="unix"
16210 ;;
16211esac
3fc11d3e
JM
16212
16213GDBTKLIBS=
16214if test "${enable_gdbtk}" = "yes"; then
16215
d1c3b63a
KS
16216 # Gdbtk must have an absolute path to srcdir in order to run
16217 # properly when not installed.
16218 here=`pwd`
16219 cd ${srcdir}
16220 GDBTK_SRC_DIR=`pwd`
16221 cd $here
16222
bec39cab 16223
5062cc19
KS
16224 #
16225 # Ok, lets find the tcl configuration
16226 # First, look for one uninstalled.
16227 # the alternative search directory is invoked by --with-tcl
16228 #
3fc11d3e 16229
5062cc19
KS
16230 if test x"${no_tcl}" = x ; then
16231 # we reset no_tcl in case something fails here
16232 no_tcl=true
bec39cab 16233
81ecdfbb
RW
16234# Check whether --with-tcl was given.
16235if test "${with_tcl+set}" = set; then :
16236 withval=$with_tcl; with_tclconfig=${withval}
16237fi
16238
16239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
16240$as_echo_n "checking for Tcl configuration... " >&6; }
d0ac1c44 16241 if ${ac_cv_c_tclconfig+:} false; then :
81ecdfbb 16242 $as_echo_n "(cached) " >&6
3fc11d3e 16243else
bec39cab 16244
3fc11d3e 16245
5062cc19
KS
16246 # First check to see if --with-tcl was specified.
16247 case "${host}" in
16248 *-*-cygwin*) platDir="win" ;;
16249 *) platDir="unix" ;;
16250 esac
16251 if test x"${with_tclconfig}" != x ; then
16252 if test -f "${with_tclconfig}/tclConfig.sh" ; then
16253 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
16254 else
d0ac1c44 16255 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
16256 fi
16257 fi
16258
16259 # then check for a private Tcl installation
16260 if test x"${ac_cv_c_tclconfig}" = x ; then
16261 for i in \
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` \
16266 ../../tcl \
16267 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16268 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
16269 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
16270 ../../../tcl \
16271 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16272 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
16273 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
16274 if test -f "$i/$platDir/tclConfig.sh" ; then
16275 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16276 break
16277 fi
16278 done
16279 fi
16280
16281 # on Darwin, check in Framework installation locations
16282 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
16283 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16284 `ls -d /Library/Frameworks 2>/dev/null` \
16285 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16286 `ls -d /System/Library/Frameworks 2>/dev/null` \
16287 ; do
16288 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
16289 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
16290 break
16291 fi
16292 done
16293 fi
16294
16295 # check in a few common install locations
16296 if test x"${ac_cv_c_tclconfig}" = x ; then
16297 for i in `ls -d ${libdir} 2>/dev/null` \
16298 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16299 `ls -d ${prefix}/lib 2>/dev/null` \
16300 `ls -d /usr/local/lib 2>/dev/null` \
16301 `ls -d /usr/contrib/lib 2>/dev/null` \
16302 `ls -d /usr/lib 2>/dev/null` \
16303 ; do
16304 if test -f "$i/tclConfig.sh" ; then
16305 ac_cv_c_tclconfig=`(cd $i; pwd)`
16306 break
16307 fi
16308 done
16309 fi
3fc11d3e 16310
5062cc19
KS
16311 # check in a few other private locations
16312 if test x"${ac_cv_c_tclconfig}" = x ; then
16313 for i in \
16314 ${srcdir}/../tcl \
16315 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16316 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
16317 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
16318 if test -f "$i/$platDir/tclConfig.sh" ; then
16319 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16320 break
16321 fi
16322 done
16323 fi
bec39cab 16324
3fc11d3e
JM
16325fi
16326
5062cc19
KS
16327
16328 if test x"${ac_cv_c_tclconfig}" = x ; then
16329 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
16330 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
16331$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
16332 else
16333 no_tcl=
16334 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
16335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
16336$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
16337 fi
16338 fi
3fc11d3e 16339
bec39cab 16340
85541719
DE
16341 # If $no_tk is nonempty, then we can't do Tk, and there is no
16342 # point to doing Tcl.
bec39cab 16343
5062cc19
KS
16344 #
16345 # Ok, lets find the tk configuration
16346 # First, look for one uninstalled.
16347 # the alternative search directory is invoked by --with-tk
16348 #
3fc11d3e 16349
5062cc19
KS
16350 if test x"${no_tk}" = x ; then
16351 # we reset no_tk in case something fails here
16352 no_tk=true
bec39cab 16353
81ecdfbb
RW
16354# Check whether --with-tk was given.
16355if test "${with_tk+set}" = set; then :
16356 withval=$with_tk; with_tkconfig=${withval}
16357fi
16358
16359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
16360$as_echo_n "checking for Tk configuration... " >&6; }
d0ac1c44 16361 if ${ac_cv_c_tkconfig+:} false; then :
81ecdfbb 16362 $as_echo_n "(cached) " >&6
bec39cab 16363else
3fc11d3e
JM
16364
16365
5062cc19
KS
16366 # First check to see if --with-tkconfig was specified.
16367 if test x"${with_tkconfig}" != x ; then
16368 if test -f "${with_tkconfig}/tkConfig.sh" ; then
16369 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
16370 else
d0ac1c44 16371 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
16372 fi
16373 fi
3fc11d3e 16374
5062cc19
KS
16375 # then check for a private Tk library
16376 case "${host}" in
16377 *-*-cygwin*) platDir="win" ;;
16378 *) platDir="unix" ;;
16379 esac
16380 if test x"${ac_cv_c_tkconfig}" = x ; then
16381 for i in \
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` \
16386 ../../tk \
16387 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16388 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
16389 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
16390 ../../../tk \
16391 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16392 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
16393 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
16394 if test -f "$i/$platDir/tkConfig.sh" ; then
16395 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16396 break
16397 fi
16398 done
16399 fi
16400
16401 # on Darwin, check in Framework installation locations
16402 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
16403 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16404 `ls -d /Library/Frameworks 2>/dev/null` \
16405 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16406 `ls -d /System/Library/Frameworks 2>/dev/null` \
16407 ; do
16408 if test -f "$i/Tk.framework/tkConfig.sh" ; then
16409 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
16410 break
16411 fi
16412 done
16413 fi
16414
16415 # check in a few common install locations
16416 if test x"${ac_cv_c_tkconfig}" = x ; then
16417 for i in `ls -d ${libdir} 2>/dev/null` \
16418 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16419 `ls -d ${prefix}/lib 2>/dev/null` \
16420 `ls -d /usr/local/lib 2>/dev/null` \
16421 `ls -d /usr/contrib/lib 2>/dev/null` \
16422 `ls -d /usr/lib 2>/dev/null` \
16423 ; do
16424 if test -f "$i/tkConfig.sh" ; then
16425 ac_cv_c_tkconfig=`(cd $i; pwd)`
16426 break
16427 fi
16428 done
16429 fi
16430 # check in a few other private locations
16431 if test x"${ac_cv_c_tkconfig}" = x ; then
16432 for i in \
16433 ${srcdir}/../tk \
16434 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16435 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
16436 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
16437 if test -f "$i/$platDir/tkConfig.sh" ; then
16438 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16439 break
16440 fi
16441 done
16442 fi
3fc11d3e 16443
3fc11d3e
JM
16444fi
16445
16446
5062cc19
KS
16447 if test x"${ac_cv_c_tkconfig}" = x ; then
16448 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
16449 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
16450$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
16451 else
16452 no_tk=
16453 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
16454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
16455$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 16456 fi
3fc11d3e 16457 fi
dd2504ab 16458
dd2504ab 16459
85541719
DE
16460 if test -z "${no_tcl}" -a -z "${no_tk}"; then
16461
81ecdfbb
RW
16462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
16463$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
16464
16465 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
16466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16467$as_echo "loading" >&6; }
85541719
DE
16468 . ${TCL_BIN_DIR}/tclConfig.sh
16469 else
81ecdfbb
RW
16470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
16471$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
16472 fi
16473
16474 # eval is required to do the TCL_DBGX substitution
16475 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
16476 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
16477
16478 # If the TCL_BIN_DIR is the build directory (not the install directory),
16479 # then set the common variable name to the value of the build variables.
16480 # For example, the variable TCL_LIB_SPEC will be set to the value
16481 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
16482 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
16483 # installed and uninstalled version of Tcl.
16484 if test -f "${TCL_BIN_DIR}/Makefile" ; then
16485 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
16486 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
16487 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
16488 elif test "`uname -s`" = "Darwin"; then
16489 # If Tcl was built as a framework, attempt to use the libraries
16490 # from the framework at the given location so that linking works
a68ffae9 16491 # against Tcl.framework installed in an arbitrary location.
85541719
DE
16492 case ${TCL_DEFS} in
16493 *TCL_FRAMEWORK*)
16494 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
16495 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
16496 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
16497 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
16498 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
16499 break
16500 fi
16501 done
16502 fi
16503 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
16504 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
16505 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
16506 fi
16507 ;;
16508 esac
16509 fi
16510
16511 # eval is required to do the TCL_DBGX substitution
16512 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
16513 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
16514 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
16515 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
16516
16517
16518
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531 # Check for in-tree tcl
16532 here=`pwd`
16533 cd ${srcdir}/..
16534 topdir=`pwd`
16535 cd ${here}
16536
16537 intree="no"
16538 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
16539 intree="yes"
16540 fi
16541
16542 # Find Tcl private headers
16543 if test x"${intree}" = xno; then
16544
81ecdfbb
RW
16545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
16546$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
16547 private_dir=""
16548 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
16549 if test -f ${dir}/tclInt.h ; then
16550 private_dir=${dir}
16551 fi
16552
16553 if test x"${private_dir}" = x; then
d0ac1c44 16554 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
85541719
DE
16555 else
16556 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16558$as_echo "${private_dir}" >&6; }
85541719
DE
16559 fi
16560
16561 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
16562 TCL_LIBRARY="${TCL_LIB_SPEC}"
16563 TCL_DEPS=""
16564 else
16565 # If building tcl in the same src tree, private headers
16566 # are not needed, but we need to be sure to use the right
16567 # headers library
16568 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
16569 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
16570 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
16571 fi
16572
16573
16574
16575
16576
81ecdfbb
RW
16577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
16578$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 16579
5062cc19 16580 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
16581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16582$as_echo "loading" >&6; }
5062cc19 16583 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 16584 else
81ecdfbb
RW
16585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
16586$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 16587 fi
bec39cab 16588
5062cc19
KS
16589 # eval is required to do the TK_DBGX substitution
16590 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
16591 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
16592
16593 # If the TK_BIN_DIR is the build directory (not the install directory),
16594 # then set the common variable name to the value of the build variables.
16595 # For example, the variable TK_LIB_SPEC will be set to the value
16596 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
16597 # instead of TK_BUILD_LIB_SPEC since it will work with both an
16598 # installed and uninstalled version of Tcl.
85541719 16599 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
16600 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
16601 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
16602 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
16603 elif test "`uname -s`" = "Darwin"; then
16604 # If Tk was built as a framework, attempt to use the libraries
16605 # from the framework at the given location so that linking works
a68ffae9 16606 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
16607 case ${TK_DEFS} in
16608 *TK_FRAMEWORK*)
85541719 16609 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
16610 for i in "`cd ${TK_BIN_DIR}; pwd`" \
16611 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
16612 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
16613 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
16614 break
16615 fi
16616 done
16617 fi
85541719 16618 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
16619 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
16620 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
16621 fi
16622 ;;
16623 esac
3fc11d3e
JM
16624 fi
16625
5062cc19
KS
16626 # eval is required to do the TK_DBGX substitution
16627 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
16628 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
16629 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
16630 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 16631
3fc11d3e
JM
16632
16633
bec39cab
AC
16634
16635
16636
16637
16638
16639
16640
3fc11d3e 16641
3fc11d3e 16642
bec39cab 16643
bec39cab 16644
85541719
DE
16645 # Check for in-tree Tk
16646 intree="no"
16647 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
16648 intree="yes"
16649 fi
3fc11d3e 16650
85541719
DE
16651 # Find Tk private headers
16652 if test x"${intree}" = xno; then
3fc11d3e 16653
81ecdfbb
RW
16654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
16655$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
16656 private_dir=""
16657 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
16658 if test -f ${dir}/tkInt.h; then
16659 private_dir=${dir}
3fc11d3e 16660 fi
bec39cab 16661
5062cc19 16662 if test x"${private_dir}" = x; then
d0ac1c44 16663 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
3fc11d3e 16664 else
5062cc19 16665 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16667$as_echo "${private_dir}" >&6; }
3fc11d3e 16668 fi
3fc11d3e 16669
85541719
DE
16670 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
16671 TK_LIBRARY=${TK_LIB_SPEC}
16672 TK_DEPS=""
16673 else
16674 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
16675 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
16676 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
16677 fi
3fc11d3e
JM
16678
16679
3fc11d3e
JM
16680
16681
3fc11d3e 16682
85541719 16683 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 16684
85541719
DE
16685 # Include some libraries that Tcl and Tk want.
16686 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
16687 # Yes, the ordering seems wrong here. But it isn't.
16688 # TK_LIBS is the list of libraries that need to be linked
16689 # after Tcl/Tk. Note that this isn't put into LIBS. If it
16690 # were in LIBS then any link tests after this point would
16691 # try to include things like `$(LIBGUI)', which wouldn't work.
16692 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 16693
85541719
DE
16694 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
16695 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
16696 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
16697 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
16698 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
16699 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
16700 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 16701
85541719
DE
16702 if test x$gdb_cv_os_cygwin = xyes; then
16703 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
16704 WIN32LDAPP="-Wl,--subsystem,console"
16705 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 16706 fi
ffc6a242 16707
81ecdfbb 16708 subdirs="$subdirs gdbtk"
3ace7edb 16709
85541719 16710 fi
3fc11d3e
JM
16711fi
16712
16713
16714
16715
16716
16717
16718
16719
81ecdfbb
RW
16720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
16721$as_echo_n "checking for X... " >&6; }
bec39cab 16722
c906108c 16723
81ecdfbb
RW
16724# Check whether --with-x was given.
16725if test "${with_x+set}" = set; then :
16726 withval=$with_x;
16727fi
c906108c
SS
16728
16729# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
16730if test "x$with_x" = xno; then
16731 # The user explicitly disabled X.
16732 have_x=disabled
16733else
81ecdfbb 16734 case $x_includes,$x_libraries in #(
d0ac1c44
SM
16735 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
16736 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
81ecdfbb 16737 $as_echo_n "(cached) " >&6
c906108c
SS
16738else
16739 # One or both of the vars are not set, and there is no cached value.
bec39cab 16740ac_x_includes=no ac_x_libraries=no
81ecdfbb 16741rm -f -r conftest.dir
bec39cab
AC
16742if mkdir conftest.dir; then
16743 cd conftest.dir
bec39cab 16744 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
16745incroot:
16746 @echo incroot='${INCROOT}'
16747usrlibdir:
16748 @echo usrlibdir='${USRLIBDIR}'
16749libdir:
16750 @echo libdir='${LIBDIR}'
16751_ACEOF
16752 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
d0ac1c44 16753 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
81ecdfbb
RW
16754 for ac_var in incroot usrlibdir libdir; do
16755 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
16756 done
c906108c 16757 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
16758 for ac_extension in a so sl dylib la dll; do
16759 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
16760 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 16761 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
16762 fi
16763 done
16764 # Screen out bogus values from the imake configuration. They are
16765 # bogus both because they are the default anyway, and because
16766 # using them would break gcc on systems where it needs fixed includes.
bec39cab 16767 case $ac_im_incroot in
81ecdfbb 16768 /usr/include) ac_x_includes= ;;
bec39cab 16769 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 16770 esac
bec39cab 16771 case $ac_im_usrlibdir in
81ecdfbb 16772 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 16773 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
16774 esac
16775 fi
16776 cd ..
81ecdfbb 16777 rm -f -r conftest.dir
c906108c
SS
16778fi
16779
bec39cab
AC
16780# Standard set of common directories for X headers.
16781# Check X11 before X11Rn because it is often a symlink to the current release.
16782ac_x_header_dirs='
16783/usr/X11/include
81ecdfbb 16784/usr/X11R7/include
bec39cab
AC
16785/usr/X11R6/include
16786/usr/X11R5/include
16787/usr/X11R4/include
16788
16789/usr/include/X11
81ecdfbb 16790/usr/include/X11R7
bec39cab
AC
16791/usr/include/X11R6
16792/usr/include/X11R5
16793/usr/include/X11R4
16794
16795/usr/local/X11/include
81ecdfbb 16796/usr/local/X11R7/include
bec39cab
AC
16797/usr/local/X11R6/include
16798/usr/local/X11R5/include
16799/usr/local/X11R4/include
16800
16801/usr/local/include/X11
81ecdfbb 16802/usr/local/include/X11R7
bec39cab
AC
16803/usr/local/include/X11R6
16804/usr/local/include/X11R5
16805/usr/local/include/X11R4
16806
16807/usr/X386/include
16808/usr/x386/include
16809/usr/XFree86/include/X11
16810
16811/usr/include
16812/usr/local/include
16813/usr/unsupported/include
16814/usr/athena/include
16815/usr/local/x11r5/include
16816/usr/lpp/Xamples/include
16817
16818/usr/openwin/include
16819/usr/openwin/share/include'
16820
16821if test "$ac_x_includes" = no; then
81ecdfbb 16822 # Guess where to find include files, by looking for Xlib.h.
c906108c 16823 # First, try using that file with no special directory specified.
81ecdfbb 16824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16825/* end confdefs.h. */
81ecdfbb 16826#include <X11/Xlib.h>
bec39cab 16827_ACEOF
81ecdfbb 16828if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
16829 # We can compile using X headers with no special include directory.
16830ac_x_includes=
16831else
bec39cab 16832 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 16833 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
16834 ac_x_includes=$ac_dir
16835 break
16836 fi
16837done
c906108c 16838fi
d0ac1c44 16839rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 16840fi # $ac_x_includes = no
c906108c 16841
bec39cab 16842if test "$ac_x_libraries" = no; then
c906108c 16843 # Check for the libraries.
c906108c
SS
16844 # See if we find them without any special options.
16845 # Don't add to $LIBS permanently.
bec39cab 16846 ac_save_LIBS=$LIBS
81ecdfbb
RW
16847 LIBS="-lX11 $LIBS"
16848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16849/* end confdefs.h. */
81ecdfbb 16850#include <X11/Xlib.h>
bec39cab
AC
16851int
16852main ()
16853{
81ecdfbb 16854XrmInitialize ()
bec39cab
AC
16855 ;
16856 return 0;
16857}
16858_ACEOF
81ecdfbb 16859if ac_fn_c_try_link "$LINENO"; then :
bec39cab 16860 LIBS=$ac_save_LIBS
c906108c
SS
16861# We can link X programs with no special library path.
16862ac_x_libraries=
16863else
81ecdfbb
RW
16864 LIBS=$ac_save_LIBS
16865for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 16866do
bec39cab 16867 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
16868 for ac_extension in a so sl dylib la dll; do
16869 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
16870 ac_x_libraries=$ac_dir
16871 break 2
16872 fi
16873 done
16874done
16875fi
81ecdfbb
RW
16876rm -f core conftest.err conftest.$ac_objext \
16877 conftest$ac_exeext conftest.$ac_ext
bec39cab 16878fi # $ac_x_libraries = no
c906108c 16879
81ecdfbb
RW
16880case $ac_x_includes,$ac_x_libraries in #(
16881 no,* | *,no | *\'*)
16882 # Didn't find X, or a directory has "'" in its name.
16883 ac_cv_have_x="have_x=no";; #(
16884 *)
16885 # Record where we found X for the cache.
16886 ac_cv_have_x="have_x=yes\
16887 ac_x_includes='$ac_x_includes'\
16888 ac_x_libraries='$ac_x_libraries'"
16889esac
c906108c 16890fi
81ecdfbb
RW
16891;; #(
16892 *) have_x=yes;;
16893 esac
c906108c
SS
16894 eval "$ac_cv_have_x"
16895fi # $with_x != no
16896
16897if test "$have_x" != yes; then
81ecdfbb
RW
16898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
16899$as_echo "$have_x" >&6; }
c906108c
SS
16900 no_x=yes
16901else
16902 # If each of the values was on the command line, it overrides each guess.
16903 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
16904 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
16905 # Update the cache value to reflect the command line values.
81ecdfbb
RW
16906 ac_cv_have_x="have_x=yes\
16907 ac_x_includes='$x_includes'\
16908 ac_x_libraries='$x_libraries'"
16909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
16910$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
16911fi
16912
16913
bec39cab 16914# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 16915# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
16916# This code just checks for a few cases where we'd like to ignore those
16917# definitions, even when they're present in the '.mt' file. These cases
16918# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 16919# not part of the source tree.
7a292a7a 16920#
81ecdfbb
RW
16921# Check whether --enable-sim was given.
16922if test "${enable_sim+set}" = set; then :
16923 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
16924 echo "enableval = ${enableval}";
16925 case "${enableval}" in
16926 yes) ignore_sim=false ;;
16927 no) ignore_sim=true ;;
16928 *) ignore_sim=false ;;
16929 esac
16930else
16931 ignore_sim=false
81ecdfbb
RW
16932fi
16933
7a292a7a
SS
16934
16935if test ! -d "${srcdir}/../sim"; then
16936 ignore_sim=true
16937fi
16938
9b624dbe
UW
16939SIM=
16940SIM_OBS=
16941if test "${ignore_sim}" = "false"; then
16942 if test x"${gdb_sim}" != x ; then
16943 SIM="${gdb_sim}"
16944 SIM_OBS="remote-sim.o"
60ca704f 16945
81ecdfbb 16946$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 16947
976102cd
PA
16948
16949 # Some tdep code should only be compiled in when the ppc sim is
16950 # built. PR sim/13418.
16951 case $target in
16952 powerpc*-*-*)
16953
16954$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
16955
16956 ;;
16957 esac
9b624dbe 16958 fi
7a292a7a
SS
16959fi
16960
16961
16962
c906108c
SS
16963
16964
16965
16966
16967
16968
dfcd3bfb 16969
e56ac5c3
AC
16970
16971
b3a90332
AC
16972
16973
c35f4ffc 16974# List of host floatformats.
bec39cab
AC
16975
16976cat >>confdefs.h <<_ACEOF
c35f4ffc 16977#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 16978_ACEOF
c35f4ffc 16979
bec39cab
AC
16980
16981cat >>confdefs.h <<_ACEOF
c35f4ffc 16982#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
16983_ACEOF
16984
c35f4ffc 16985
bec39cab 16986cat >>confdefs.h <<_ACEOF
c35f4ffc 16987#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 16988_ACEOF
c35f4ffc
AC
16989
16990
c906108c
SS
16991# target_subdir is used by the testsuite to find the target libraries.
16992target_subdir=
16993if test "${host}" != "${target}"; then
16994 target_subdir="${target_alias}/"
16995fi
16996
16997
21ea5acd 16998# Import nat definitions.
2b351b19 16999nat_makefile_frag=/dev/null
771b4502 17000if test "${gdb_native}" = "yes"; then
21ea5acd
SDJ
17001 . ${srcdir}/configure.nat
17002 nativefile=$NAT_FILE
c906108c 17003fi
c906108c 17004
c906108c
SS
17005
17006
17007
21ea5acd
SDJ
17008
17009
17010
17011
17012
c906108c
SS
17013
17014
b00a8037 17015if test x"${gdb_osabi}" != x ; then
bec39cab
AC
17016
17017cat >>confdefs.h <<_ACEOF
b00a8037 17018#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 17019_ACEOF
b00a8037
DJ
17020
17021fi
17022
496c0e1b
JB
17023# Check whether --enable-gdbserver was given.
17024if test "${enable_gdbserver+set}" = set; then :
17025 enableval=$enable_gdbserver; case "${enableval}" in
17026 yes| no|auto) ;;
d0ac1c44 17027 *) as_fn_error $? "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
496c0e1b
JB
17028esac
17029else
17030 enable_gdbserver=auto
17031fi
17032
17033
17034# We only build gdbserver automatically in a native configuration, and
17035# only if the user did not explicitly disable its build.
17036if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
17037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
17038$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 17039 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
17040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17041$as_echo "yes" >&6; }
17042 subdirs="$subdirs gdbserver"
3ace7edb 17043
496c0e1b 17044 gdbserver_build_enabled=yes
8dcde887 17045 else
81ecdfbb
RW
17046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17047$as_echo "no" >&6; }
8dcde887
MK
17048 fi
17049fi
17050
496c0e1b
JB
17051# If the user explicitly request the gdbserver to be built, verify that
17052# we were in fact able to enable it.
17053if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
d0ac1c44 17054 as_fn_error $? "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
496c0e1b
JB
17055fi
17056
393fd4c3
YQ
17057# Check for babeltrace and babeltrace-ctf
17058
17059# Check whether --with-babeltrace was given.
17060if test "${with_babeltrace+set}" = set; then :
17061 withval=$with_babeltrace;
17062else
17063 with_babeltrace=auto
17064fi
17065
17066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
17067$as_echo_n "checking whether to use babeltrace... " >&6; }
17068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
17069$as_echo "$with_babeltrace" >&6; }
17070
17071if test "x$with_babeltrace" = "xno"; then
17072 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
17073$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
17074else
17075 # Append -Werror to CFLAGS so that configure can catch the warning
17076 # "assignment from incompatible pointer type", which is related to
17077 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
17078 # in GDB, while babeltrace 1.0.3 is broken.
17079 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
17080 # safe to save and restore CFLAGS here.
17081 saved_CFLAGS=$CFLAGS
17082 CFLAGS="$CFLAGS -Werror"
17083
17084
17085
17086
17087
17088
17089
17090
17091 use_additional=yes
17092
17093 acl_save_prefix="$prefix"
17094 prefix="$acl_final_prefix"
17095 acl_save_exec_prefix="$exec_prefix"
17096 exec_prefix="$acl_final_exec_prefix"
17097
17098 eval additional_includedir=\"$includedir\"
17099 eval additional_libdir=\"$libdir\"
17100
17101 exec_prefix="$acl_save_exec_prefix"
17102 prefix="$acl_save_prefix"
17103
17104
17105# Check whether --with-libbabeltrace-prefix was given.
17106if test "${with_libbabeltrace_prefix+set}" = set; then :
17107 withval=$with_libbabeltrace_prefix;
17108 if test "X$withval" = "Xno"; then
17109 use_additional=no
17110 else
17111 if test "X$withval" = "X"; then
17112
17113 acl_save_prefix="$prefix"
17114 prefix="$acl_final_prefix"
17115 acl_save_exec_prefix="$exec_prefix"
17116 exec_prefix="$acl_final_exec_prefix"
17117
17118 eval additional_includedir=\"$includedir\"
17119 eval additional_libdir=\"$libdir\"
17120
17121 exec_prefix="$acl_save_exec_prefix"
17122 prefix="$acl_save_prefix"
17123
17124 else
17125 additional_includedir="$withval/include"
17126 additional_libdir="$withval/lib"
17127 fi
17128 fi
17129
17130fi
17131
17132 LIBBABELTRACE=
17133 LTLIBBABELTRACE=
17134 INCBABELTRACE=
17135 rpathdirs=
17136 ltrpathdirs=
17137 names_already_handled=
17138 names_next_round='babeltrace babeltrace-ctf'
17139 while test -n "$names_next_round"; do
17140 names_this_round="$names_next_round"
17141 names_next_round=
17142 for name in $names_this_round; do
17143 already_handled=
17144 for n in $names_already_handled; do
17145 if test "$n" = "$name"; then
17146 already_handled=yes
17147 break
17148 fi
17149 done
17150 if test -z "$already_handled"; then
17151 names_already_handled="$names_already_handled $name"
17152 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17153 eval value=\"\$HAVE_LIB$uppername\"
17154 if test -n "$value"; then
17155 if test "$value" = yes; then
17156 eval value=\"\$LIB$uppername\"
17157 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
17158 eval value=\"\$LTLIB$uppername\"
17159 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
17160 else
17161 :
17162 fi
17163 else
17164 found_dir=
17165 found_la=
17166 found_so=
17167 found_a=
17168 if test $use_additional = yes; then
17169 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
17170 found_dir="$additional_libdir"
17171 found_so="$additional_libdir/lib$name.$shlibext"
17172 if test -f "$additional_libdir/lib$name.la"; then
17173 found_la="$additional_libdir/lib$name.la"
17174 fi
17175 else
17176 if test -f "$additional_libdir/lib$name.$libext"; then
17177 found_dir="$additional_libdir"
17178 found_a="$additional_libdir/lib$name.$libext"
17179 if test -f "$additional_libdir/lib$name.la"; then
17180 found_la="$additional_libdir/lib$name.la"
17181 fi
17182 fi
17183 fi
17184 fi
17185 if test "X$found_dir" = "X"; then
17186 for x in $LDFLAGS $LTLIBBABELTRACE; do
17187
17188 acl_save_prefix="$prefix"
17189 prefix="$acl_final_prefix"
17190 acl_save_exec_prefix="$exec_prefix"
17191 exec_prefix="$acl_final_exec_prefix"
17192 eval x=\"$x\"
17193 exec_prefix="$acl_save_exec_prefix"
17194 prefix="$acl_save_prefix"
17195
17196 case "$x" in
17197 -L*)
17198 dir=`echo "X$x" | sed -e 's/^X-L//'`
17199 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
17200 found_dir="$dir"
17201 found_so="$dir/lib$name.$shlibext"
17202 if test -f "$dir/lib$name.la"; then
17203 found_la="$dir/lib$name.la"
17204 fi
17205 else
17206 if test -f "$dir/lib$name.$libext"; then
17207 found_dir="$dir"
17208 found_a="$dir/lib$name.$libext"
17209 if test -f "$dir/lib$name.la"; then
17210 found_la="$dir/lib$name.la"
17211 fi
17212 fi
17213 fi
17214 ;;
17215 esac
17216 if test "X$found_dir" != "X"; then
17217 break
17218 fi
17219 done
17220 fi
17221 if test "X$found_dir" != "X"; then
17222 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
17223 if test "X$found_so" != "X"; then
17224 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17225 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17226 else
17227 haveit=
17228 for x in $ltrpathdirs; do
17229 if test "X$x" = "X$found_dir"; then
17230 haveit=yes
17231 break
17232 fi
17233 done
17234 if test -z "$haveit"; then
17235 ltrpathdirs="$ltrpathdirs $found_dir"
17236 fi
17237 if test "$hardcode_direct" = yes; then
17238 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17239 else
17240 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17241 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17242 haveit=
17243 for x in $rpathdirs; do
17244 if test "X$x" = "X$found_dir"; then
17245 haveit=yes
17246 break
17247 fi
17248 done
17249 if test -z "$haveit"; then
17250 rpathdirs="$rpathdirs $found_dir"
17251 fi
17252 else
17253 haveit=
17254 for x in $LDFLAGS $LIBBABELTRACE; do
17255
17256 acl_save_prefix="$prefix"
17257 prefix="$acl_final_prefix"
17258 acl_save_exec_prefix="$exec_prefix"
17259 exec_prefix="$acl_final_exec_prefix"
17260 eval x=\"$x\"
17261 exec_prefix="$acl_save_exec_prefix"
17262 prefix="$acl_save_prefix"
17263
17264 if test "X$x" = "X-L$found_dir"; then
17265 haveit=yes
17266 break
17267 fi
17268 done
17269 if test -z "$haveit"; then
17270 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
17271 fi
17272 if test "$hardcode_minus_L" != no; then
17273 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17274 else
17275 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17276 fi
17277 fi
17278 fi
17279 fi
17280 else
17281 if test "X$found_a" != "X"; then
17282 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
17283 else
17284 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
17285 fi
17286 fi
17287 additional_includedir=
17288 case "$found_dir" in
17289 */lib | */lib/)
17290 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17291 additional_includedir="$basedir/include"
17292 ;;
17293 esac
17294 if test "X$additional_includedir" != "X"; then
17295 if test "X$additional_includedir" != "X/usr/include"; then
17296 haveit=
17297 if test "X$additional_includedir" = "X/usr/local/include"; then
17298 if test -n "$GCC"; then
17299 case $host_os in
17300 linux*) haveit=yes;;
17301 esac
17302 fi
17303 fi
17304 if test -z "$haveit"; then
17305 for x in $CPPFLAGS $INCBABELTRACE; do
17306
17307 acl_save_prefix="$prefix"
17308 prefix="$acl_final_prefix"
17309 acl_save_exec_prefix="$exec_prefix"
17310 exec_prefix="$acl_final_exec_prefix"
17311 eval x=\"$x\"
17312 exec_prefix="$acl_save_exec_prefix"
17313 prefix="$acl_save_prefix"
17314
17315 if test "X$x" = "X-I$additional_includedir"; then
17316 haveit=yes
17317 break
17318 fi
17319 done
17320 if test -z "$haveit"; then
17321 if test -d "$additional_includedir"; then
17322 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
17323 fi
17324 fi
17325 fi
17326 fi
17327 fi
17328 if test -n "$found_la"; then
17329 save_libdir="$libdir"
17330 case "$found_la" in
17331 */* | *\\*) . "$found_la" ;;
17332 *) . "./$found_la" ;;
17333 esac
17334 libdir="$save_libdir"
17335 for dep in $dependency_libs; do
17336 case "$dep" in
17337 -L*)
17338 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17339 if test "X$additional_libdir" != "X/usr/lib"; then
17340 haveit=
17341 if test "X$additional_libdir" = "X/usr/local/lib"; then
17342 if test -n "$GCC"; then
17343 case $host_os in
17344 linux*) haveit=yes;;
17345 esac
17346 fi
17347 fi
17348 if test -z "$haveit"; then
17349 haveit=
17350 for x in $LDFLAGS $LIBBABELTRACE; do
17351
17352 acl_save_prefix="$prefix"
17353 prefix="$acl_final_prefix"
17354 acl_save_exec_prefix="$exec_prefix"
17355 exec_prefix="$acl_final_exec_prefix"
17356 eval x=\"$x\"
17357 exec_prefix="$acl_save_exec_prefix"
17358 prefix="$acl_save_prefix"
17359
17360 if test "X$x" = "X-L$additional_libdir"; then
17361 haveit=yes
17362 break
17363 fi
17364 done
17365 if test -z "$haveit"; then
17366 if test -d "$additional_libdir"; then
17367 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
17368 fi
17369 fi
17370 haveit=
17371 for x in $LDFLAGS $LTLIBBABELTRACE; do
17372
17373 acl_save_prefix="$prefix"
17374 prefix="$acl_final_prefix"
17375 acl_save_exec_prefix="$exec_prefix"
17376 exec_prefix="$acl_final_exec_prefix"
17377 eval x=\"$x\"
17378 exec_prefix="$acl_save_exec_prefix"
17379 prefix="$acl_save_prefix"
17380
17381 if test "X$x" = "X-L$additional_libdir"; then
17382 haveit=yes
17383 break
17384 fi
17385 done
17386 if test -z "$haveit"; then
17387 if test -d "$additional_libdir"; then
17388 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
17389 fi
17390 fi
17391 fi
17392 fi
17393 ;;
17394 -R*)
17395 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17396 if test "$enable_rpath" != no; then
17397 haveit=
17398 for x in $rpathdirs; do
17399 if test "X$x" = "X$dir"; then
17400 haveit=yes
17401 break
17402 fi
17403 done
17404 if test -z "$haveit"; then
17405 rpathdirs="$rpathdirs $dir"
17406 fi
17407 haveit=
17408 for x in $ltrpathdirs; do
17409 if test "X$x" = "X$dir"; then
17410 haveit=yes
17411 break
17412 fi
17413 done
17414 if test -z "$haveit"; then
17415 ltrpathdirs="$ltrpathdirs $dir"
17416 fi
17417 fi
17418 ;;
17419 -l*)
17420 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17421 ;;
17422 *.la)
17423 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17424 ;;
17425 *)
17426 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
17427 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
17428 ;;
17429 esac
17430 done
17431 fi
17432 else
17433 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17434 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
17435 fi
17436 fi
17437 fi
17438 done
17439 done
17440 if test "X$rpathdirs" != "X"; then
17441 if test -n "$hardcode_libdir_separator"; then
17442 alldirs=
17443 for found_dir in $rpathdirs; do
17444 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17445 done
17446 acl_save_libdir="$libdir"
17447 libdir="$alldirs"
17448 eval flag=\"$hardcode_libdir_flag_spec\"
17449 libdir="$acl_save_libdir"
17450 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17451 else
17452 for found_dir in $rpathdirs; do
17453 acl_save_libdir="$libdir"
17454 libdir="$found_dir"
17455 eval flag=\"$hardcode_libdir_flag_spec\"
17456 libdir="$acl_save_libdir"
17457 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17458 done
17459 fi
17460 fi
17461 if test "X$ltrpathdirs" != "X"; then
17462 for found_dir in $ltrpathdirs; do
17463 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
17464 done
17465 fi
17466
17467
17468 ac_save_CPPFLAGS="$CPPFLAGS"
17469
17470 for element in $INCBABELTRACE; do
17471 haveit=
17472 for x in $CPPFLAGS; do
17473
17474 acl_save_prefix="$prefix"
17475 prefix="$acl_final_prefix"
17476 acl_save_exec_prefix="$exec_prefix"
17477 exec_prefix="$acl_final_exec_prefix"
17478 eval x=\"$x\"
17479 exec_prefix="$acl_save_exec_prefix"
17480 prefix="$acl_save_prefix"
17481
17482 if test "X$x" = "X$element"; then
17483 haveit=yes
17484 break
17485 fi
17486 done
17487 if test -z "$haveit"; then
17488 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17489 fi
17490 done
17491
17492
17493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
17494$as_echo_n "checking for libbabeltrace... " >&6; }
d0ac1c44 17495if ${ac_cv_libbabeltrace+:} false; then :
393fd4c3
YQ
17496 $as_echo_n "(cached) " >&6
17497else
17498
17499 ac_save_LIBS="$LIBS"
17500 LIBS="$LIBS $LIBBABELTRACE"
17501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17502/* end confdefs.h. */
17503#include <babeltrace/babeltrace.h>
17504 #include <babeltrace/ctf/events.h>
17505 #include <babeltrace/ctf/iterator.h>
17506int
17507main ()
17508{
17509struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
17510 struct bt_ctf_event *event = NULL;
17511 const struct bt_definition *scope;
17512
13cdc2af 17513 pos->type = BT_SEEK_BEGIN;
65c749e7 17514 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
17515 scope = bt_ctf_get_top_level_scope (event,
17516 BT_STREAM_EVENT_HEADER);
17517 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
17518
17519 ;
17520 return 0;
17521}
17522_ACEOF
17523if ac_fn_c_try_link "$LINENO"; then :
17524 ac_cv_libbabeltrace=yes
17525else
17526 ac_cv_libbabeltrace=no
17527fi
17528rm -f core conftest.err conftest.$ac_objext \
17529 conftest$ac_exeext conftest.$ac_ext
17530 LIBS="$ac_save_LIBS"
17531
17532fi
17533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
17534$as_echo "$ac_cv_libbabeltrace" >&6; }
17535 if test "$ac_cv_libbabeltrace" = yes; then
17536 HAVE_LIBBABELTRACE=yes
17537
17538$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
17539
17540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
17541$as_echo_n "checking how to link with libbabeltrace... " >&6; }
17542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
17543$as_echo "$LIBBABELTRACE" >&6; }
17544 else
17545 HAVE_LIBBABELTRACE=no
17546 CPPFLAGS="$ac_save_CPPFLAGS"
17547 LIBBABELTRACE=
17548 LTLIBBABELTRACE=
17549 fi
17550
17551
17552
17553
17554
17555
17556 CFLAGS=$saved_CFLAGS
17557
17558 if test "$HAVE_LIBBABELTRACE" != yes; then
17559 if test "$with_babeltrace" = yes; then
d0ac1c44 17560 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
393fd4c3
YQ
17561 else
17562 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
17563$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
17564 fi
17565 fi
17566fi
17567
ccb1ba62
CB
17568# Check for xxhash
17569
17570# Check whether --with-xxhash was given.
17571if test "${with_xxhash+set}" = set; then :
17572 withval=$with_xxhash;
17573else
17574 with_xxhash=auto
17575fi
17576
17577
17578if test "x$with_xxhash" != "xno"; then
17579
17580
17581
17582
17583
17584
17585
17586
17587 use_additional=yes
17588
17589 acl_save_prefix="$prefix"
17590 prefix="$acl_final_prefix"
17591 acl_save_exec_prefix="$exec_prefix"
17592 exec_prefix="$acl_final_exec_prefix"
17593
17594 eval additional_includedir=\"$includedir\"
17595 eval additional_libdir=\"$libdir\"
17596
17597 exec_prefix="$acl_save_exec_prefix"
17598 prefix="$acl_save_prefix"
17599
17600
17601# Check whether --with-libxxhash-prefix was given.
17602if test "${with_libxxhash_prefix+set}" = set; then :
17603 withval=$with_libxxhash_prefix;
17604 if test "X$withval" = "Xno"; then
17605 use_additional=no
17606 else
17607 if test "X$withval" = "X"; then
17608
17609 acl_save_prefix="$prefix"
17610 prefix="$acl_final_prefix"
17611 acl_save_exec_prefix="$exec_prefix"
17612 exec_prefix="$acl_final_exec_prefix"
17613
17614 eval additional_includedir=\"$includedir\"
17615 eval additional_libdir=\"$libdir\"
17616
17617 exec_prefix="$acl_save_exec_prefix"
17618 prefix="$acl_save_prefix"
17619
17620 else
17621 additional_includedir="$withval/include"
17622 additional_libdir="$withval/lib"
17623 fi
17624 fi
17625
17626fi
17627
17628 LIBXXHASH=
17629 LTLIBXXHASH=
17630 INCXXHASH=
17631 rpathdirs=
17632 ltrpathdirs=
17633 names_already_handled=
17634 names_next_round='xxhash '
17635 while test -n "$names_next_round"; do
17636 names_this_round="$names_next_round"
17637 names_next_round=
17638 for name in $names_this_round; do
17639 already_handled=
17640 for n in $names_already_handled; do
17641 if test "$n" = "$name"; then
17642 already_handled=yes
17643 break
17644 fi
17645 done
17646 if test -z "$already_handled"; then
17647 names_already_handled="$names_already_handled $name"
17648 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17649 eval value=\"\$HAVE_LIB$uppername\"
17650 if test -n "$value"; then
17651 if test "$value" = yes; then
17652 eval value=\"\$LIB$uppername\"
17653 test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
17654 eval value=\"\$LTLIB$uppername\"
17655 test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
17656 else
17657 :
17658 fi
17659 else
17660 found_dir=
17661 found_la=
17662 found_so=
17663 found_a=
17664 if test $use_additional = yes; then
17665 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
17666 found_dir="$additional_libdir"
17667 found_so="$additional_libdir/lib$name.$shlibext"
17668 if test -f "$additional_libdir/lib$name.la"; then
17669 found_la="$additional_libdir/lib$name.la"
17670 fi
17671 else
17672 if test -f "$additional_libdir/lib$name.$libext"; then
17673 found_dir="$additional_libdir"
17674 found_a="$additional_libdir/lib$name.$libext"
17675 if test -f "$additional_libdir/lib$name.la"; then
17676 found_la="$additional_libdir/lib$name.la"
17677 fi
17678 fi
17679 fi
17680 fi
17681 if test "X$found_dir" = "X"; then
17682 for x in $LDFLAGS $LTLIBXXHASH; do
17683
17684 acl_save_prefix="$prefix"
17685 prefix="$acl_final_prefix"
17686 acl_save_exec_prefix="$exec_prefix"
17687 exec_prefix="$acl_final_exec_prefix"
17688 eval x=\"$x\"
17689 exec_prefix="$acl_save_exec_prefix"
17690 prefix="$acl_save_prefix"
17691
17692 case "$x" in
17693 -L*)
17694 dir=`echo "X$x" | sed -e 's/^X-L//'`
17695 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
17696 found_dir="$dir"
17697 found_so="$dir/lib$name.$shlibext"
17698 if test -f "$dir/lib$name.la"; then
17699 found_la="$dir/lib$name.la"
17700 fi
17701 else
17702 if test -f "$dir/lib$name.$libext"; then
17703 found_dir="$dir"
17704 found_a="$dir/lib$name.$libext"
17705 if test -f "$dir/lib$name.la"; then
17706 found_la="$dir/lib$name.la"
17707 fi
17708 fi
17709 fi
17710 ;;
17711 esac
17712 if test "X$found_dir" != "X"; then
17713 break
17714 fi
17715 done
17716 fi
17717 if test "X$found_dir" != "X"; then
17718 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
17719 if test "X$found_so" != "X"; then
17720 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17721 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
17722 else
17723 haveit=
17724 for x in $ltrpathdirs; do
17725 if test "X$x" = "X$found_dir"; then
17726 haveit=yes
17727 break
17728 fi
17729 done
17730 if test -z "$haveit"; then
17731 ltrpathdirs="$ltrpathdirs $found_dir"
17732 fi
17733 if test "$hardcode_direct" = yes; then
17734 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
17735 else
17736 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17737 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
17738 haveit=
17739 for x in $rpathdirs; do
17740 if test "X$x" = "X$found_dir"; then
17741 haveit=yes
17742 break
17743 fi
17744 done
17745 if test -z "$haveit"; then
17746 rpathdirs="$rpathdirs $found_dir"
17747 fi
17748 else
17749 haveit=
17750 for x in $LDFLAGS $LIBXXHASH; do
17751
17752 acl_save_prefix="$prefix"
17753 prefix="$acl_final_prefix"
17754 acl_save_exec_prefix="$exec_prefix"
17755 exec_prefix="$acl_final_exec_prefix"
17756 eval x=\"$x\"
17757 exec_prefix="$acl_save_exec_prefix"
17758 prefix="$acl_save_prefix"
17759
17760 if test "X$x" = "X-L$found_dir"; then
17761 haveit=yes
17762 break
17763 fi
17764 done
17765 if test -z "$haveit"; then
17766 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
17767 fi
17768 if test "$hardcode_minus_L" != no; then
17769 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
17770 else
17771 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
17772 fi
17773 fi
17774 fi
17775 fi
17776 else
17777 if test "X$found_a" != "X"; then
17778 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
17779 else
17780 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
17781 fi
17782 fi
17783 additional_includedir=
17784 case "$found_dir" in
17785 */lib | */lib/)
17786 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17787 additional_includedir="$basedir/include"
17788 ;;
17789 esac
17790 if test "X$additional_includedir" != "X"; then
17791 if test "X$additional_includedir" != "X/usr/include"; then
17792 haveit=
17793 if test "X$additional_includedir" = "X/usr/local/include"; then
17794 if test -n "$GCC"; then
17795 case $host_os in
17796 linux*) haveit=yes;;
17797 esac
17798 fi
17799 fi
17800 if test -z "$haveit"; then
17801 for x in $CPPFLAGS $INCXXHASH; do
17802
17803 acl_save_prefix="$prefix"
17804 prefix="$acl_final_prefix"
17805 acl_save_exec_prefix="$exec_prefix"
17806 exec_prefix="$acl_final_exec_prefix"
17807 eval x=\"$x\"
17808 exec_prefix="$acl_save_exec_prefix"
17809 prefix="$acl_save_prefix"
17810
17811 if test "X$x" = "X-I$additional_includedir"; then
17812 haveit=yes
17813 break
17814 fi
17815 done
17816 if test -z "$haveit"; then
17817 if test -d "$additional_includedir"; then
17818 INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
17819 fi
17820 fi
17821 fi
17822 fi
17823 fi
17824 if test -n "$found_la"; then
17825 save_libdir="$libdir"
17826 case "$found_la" in
17827 */* | *\\*) . "$found_la" ;;
17828 *) . "./$found_la" ;;
17829 esac
17830 libdir="$save_libdir"
17831 for dep in $dependency_libs; do
17832 case "$dep" in
17833 -L*)
17834 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17835 if test "X$additional_libdir" != "X/usr/lib"; then
17836 haveit=
17837 if test "X$additional_libdir" = "X/usr/local/lib"; then
17838 if test -n "$GCC"; then
17839 case $host_os in
17840 linux*) haveit=yes;;
17841 esac
17842 fi
17843 fi
17844 if test -z "$haveit"; then
17845 haveit=
17846 for x in $LDFLAGS $LIBXXHASH; do
17847
17848 acl_save_prefix="$prefix"
17849 prefix="$acl_final_prefix"
17850 acl_save_exec_prefix="$exec_prefix"
17851 exec_prefix="$acl_final_exec_prefix"
17852 eval x=\"$x\"
17853 exec_prefix="$acl_save_exec_prefix"
17854 prefix="$acl_save_prefix"
17855
17856 if test "X$x" = "X-L$additional_libdir"; then
17857 haveit=yes
17858 break
17859 fi
17860 done
17861 if test -z "$haveit"; then
17862 if test -d "$additional_libdir"; then
17863 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
17864 fi
17865 fi
17866 haveit=
17867 for x in $LDFLAGS $LTLIBXXHASH; do
17868
17869 acl_save_prefix="$prefix"
17870 prefix="$acl_final_prefix"
17871 acl_save_exec_prefix="$exec_prefix"
17872 exec_prefix="$acl_final_exec_prefix"
17873 eval x=\"$x\"
17874 exec_prefix="$acl_save_exec_prefix"
17875 prefix="$acl_save_prefix"
17876
17877 if test "X$x" = "X-L$additional_libdir"; then
17878 haveit=yes
17879 break
17880 fi
17881 done
17882 if test -z "$haveit"; then
17883 if test -d "$additional_libdir"; then
17884 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
17885 fi
17886 fi
17887 fi
17888 fi
17889 ;;
17890 -R*)
17891 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17892 if test "$enable_rpath" != no; then
17893 haveit=
17894 for x in $rpathdirs; do
17895 if test "X$x" = "X$dir"; then
17896 haveit=yes
17897 break
17898 fi
17899 done
17900 if test -z "$haveit"; then
17901 rpathdirs="$rpathdirs $dir"
17902 fi
17903 haveit=
17904 for x in $ltrpathdirs; do
17905 if test "X$x" = "X$dir"; then
17906 haveit=yes
17907 break
17908 fi
17909 done
17910 if test -z "$haveit"; then
17911 ltrpathdirs="$ltrpathdirs $dir"
17912 fi
17913 fi
17914 ;;
17915 -l*)
17916 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17917 ;;
17918 *.la)
17919 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17920 ;;
17921 *)
17922 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
17923 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
17924 ;;
17925 esac
17926 done
17927 fi
17928 else
17929 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
17930 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
17931 fi
17932 fi
17933 fi
17934 done
17935 done
17936 if test "X$rpathdirs" != "X"; then
17937 if test -n "$hardcode_libdir_separator"; then
17938 alldirs=
17939 for found_dir in $rpathdirs; do
17940 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17941 done
17942 acl_save_libdir="$libdir"
17943 libdir="$alldirs"
17944 eval flag=\"$hardcode_libdir_flag_spec\"
17945 libdir="$acl_save_libdir"
17946 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
17947 else
17948 for found_dir in $rpathdirs; do
17949 acl_save_libdir="$libdir"
17950 libdir="$found_dir"
17951 eval flag=\"$hardcode_libdir_flag_spec\"
17952 libdir="$acl_save_libdir"
17953 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
17954 done
17955 fi
17956 fi
17957 if test "X$ltrpathdirs" != "X"; then
17958 for found_dir in $ltrpathdirs; do
17959 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
17960 done
17961 fi
17962
17963
17964 ac_save_CPPFLAGS="$CPPFLAGS"
17965
17966 for element in $INCXXHASH; do
17967 haveit=
17968 for x in $CPPFLAGS; do
17969
17970 acl_save_prefix="$prefix"
17971 prefix="$acl_final_prefix"
17972 acl_save_exec_prefix="$exec_prefix"
17973 exec_prefix="$acl_final_exec_prefix"
17974 eval x=\"$x\"
17975 exec_prefix="$acl_save_exec_prefix"
17976 prefix="$acl_save_prefix"
17977
17978 if test "X$x" = "X$element"; then
17979 haveit=yes
17980 break
17981 fi
17982 done
17983 if test -z "$haveit"; then
17984 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17985 fi
17986 done
17987
17988
17989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
17990$as_echo_n "checking for libxxhash... " >&6; }
17991if ${ac_cv_libxxhash+:} false; then :
17992 $as_echo_n "(cached) " >&6
17993else
17994
17995 ac_save_LIBS="$LIBS"
17996 LIBS="$LIBS $LIBXXHASH"
17997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17998/* end confdefs.h. */
17999#include <xxhash.h>
18000int
18001main ()
18002{
18003XXH32("foo", 3, 0);
18004
18005 ;
18006 return 0;
18007}
18008_ACEOF
18009if ac_fn_c_try_link "$LINENO"; then :
18010 ac_cv_libxxhash=yes
18011else
18012 ac_cv_libxxhash=no
18013fi
18014rm -f core conftest.err conftest.$ac_objext \
18015 conftest$ac_exeext conftest.$ac_ext
18016 LIBS="$ac_save_LIBS"
18017
18018fi
18019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
18020$as_echo "$ac_cv_libxxhash" >&6; }
18021 if test "$ac_cv_libxxhash" = yes; then
18022 HAVE_LIBXXHASH=yes
18023
18024$as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
18025
18026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
18027$as_echo_n "checking how to link with libxxhash... " >&6; }
18028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
18029$as_echo "$LIBXXHASH" >&6; }
18030 else
18031 HAVE_LIBXXHASH=no
18032 CPPFLAGS="$ac_save_CPPFLAGS"
18033 LIBXXHASH=
18034 LTLIBXXHASH=
18035 fi
18036
18037
18038
18039
18040
18041
18042 if test "$HAVE_LIBXXHASH" != yes; then
18043 if test "$with_xxhash" = yes; then
18044 as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
18045 fi
18046 fi
18047 if test "x$with_xxhash" = "xauto"; then
18048 with_xxhash="$HAVE_LIBXXHASH"
18049 fi
18050fi
18051
18052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
18053$as_echo_n "checking whether to use xxhash... " >&6; }
18054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
18055$as_echo "$with_xxhash" >&6; }
18056
a0a461e5 18057NM_H=
c906108c
SS
18058rm -f nm.h
18059if test "${nativefile}" != ""; then
0f475e27
AC
18060 case "${nativefile}" in
18061 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
18062 * ) GDB_NM_FILE="${nativefile}"
18063 esac
a0a461e5
TT
18064 ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE"
18065
60ca704f
SE
18066
18067cat >>confdefs.h <<_ACEOF
b78960be 18068#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 18069_ACEOF
5a2402b8 18070
a0a461e5 18071 NM_H=nm.h
c906108c 18072fi
5a2402b8
AC
18073
18074
a0a461e5 18075
e3487908
GKB
18076for ac_prog in xsltproc
18077do
18078 # Extract the first word of "$ac_prog", so it can be a program name with args.
18079set dummy $ac_prog; ac_word=$2
18080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18081$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 18082if ${ac_cv_path_XSLTPROC+:} false; then :
e3487908
GKB
18083 $as_echo_n "(cached) " >&6
18084else
18085 case $XSLTPROC in
18086 [\\/]* | ?:[\\/]*)
18087 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18088 ;;
18089 *)
18090 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18091for as_dir in $PATH
18092do
18093 IFS=$as_save_IFS
18094 test -z "$as_dir" && as_dir=.
18095 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 18096 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e3487908
GKB
18097 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18098 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18099 break 2
18100 fi
18101done
18102 done
18103IFS=$as_save_IFS
18104
18105 ;;
18106esac
18107fi
18108XSLTPROC=$ac_cv_path_XSLTPROC
18109if test -n "$XSLTPROC"; then
18110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18111$as_echo "$XSLTPROC" >&6; }
18112else
18113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18114$as_echo "no" >&6; }
18115fi
18116
18117
18118 test -n "$XSLTPROC" && break
18119done
18120test -n "$XSLTPROC" || XSLTPROC="missing"
18121
18122if test "x$USE_MAINTAINER_MODE" = xyes; then
18123 if test "${XSLTPROC}" = missing; then
d0ac1c44 18124 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
e3487908
GKB
18125 fi
18126fi
18127
18128
c906108c
SS
18129
18130
c906108c 18131
81ecdfbb 18132$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 18133
bec39cab 18134
8ecfd7bd
SDJ
18135
18136# Check whether we will enable the inclusion of unit tests when
18137# compiling GDB.
18138#
18139# The default value of this option changes depending whether we're on
18140# development mode (in which case it's "true") or not (in which case
18141# it's "false").
18142# Check whether --enable-unit-tests was given.
18143if test "${enable_unit_tests+set}" = set; then :
18144 enableval=$enable_unit_tests; case "${enableval}" in
18145 yes) enable_unittests=true ;;
18146 no) enable_unittests=false ;;
18147 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
18148esac
18149else
18150 enable_unittests=$development
18151fi
18152
18153
18154if $enable_unittests; then
dcd1f979
TT
18155
18156$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
18157
8ecfd7bd 18158
268a13a5
TT
18159 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS) gdbsupport/selftest.o selftest-arch.o"
18160 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS) gdbsupport/selftest.c selftest-arch.c"
8ecfd7bd 18161
dcd1f979
TT
18162fi
18163
b292c783 18164
8ecfd7bd 18165
f6a88844
JM
18166 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
18167 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
18168 if test "x$GDB_TRANSFORM_NAME" = x; then
18169 GDB_TRANSFORM_NAME=gdb
18170 fi
18171
18172
18173
18174 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
18175 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
18176 if test "x$GCORE_TRANSFORM_NAME" = x; then
18177 GCORE_TRANSFORM_NAME=gcore
18178 fi
18179
b292c783
JK
18180
18181ac_config_files="$ac_config_files gcore"
18182
141ec9f6 18183ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
81ecdfbb 18184
89a34d1b 18185
bec39cab
AC
18186cat >confcache <<\_ACEOF
18187# This file is a shell script that caches the results of configure
18188# tests run on this system so they can be shared between configure
18189# scripts and configure runs, see configure's option --config-cache.
18190# It is not useful on other systems. If it contains results you don't
18191# want to keep, you may remove or edit it.
18192#
18193# config.status only pays attention to the cache file if you give it
18194# the --recheck option to rerun configure.
18195#
18196# `ac_cv_env_foo' variables (set or unset) will be overridden when
18197# loading this file, other *unset* `ac_cv_foo' will be assigned the
18198# following values.
18199
18200_ACEOF
18201
18202# The following way of writing the cache mishandles newlines in values,
18203# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 18204# So, we kill variables containing newlines.
bec39cab
AC
18205# Ultrix sh set writes to stderr and can't be redirected directly,
18206# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
18207(
18208 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
18209 eval ac_val=\$$ac_var
18210 case $ac_val in #(
18211 *${as_nl}*)
18212 case $ac_var in #(
18213 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
18214$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
18215 esac
18216 case $ac_var in #(
18217 _ | IFS | as_nl) ;; #(
18218 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
18219 *) { eval $ac_var=; unset $ac_var;} ;;
18220 esac ;;
18221 esac
18222 done
18223
bec39cab 18224 (set) 2>&1 |
81ecdfbb
RW
18225 case $as_nl`(ac_space=' '; set) 2>&1` in #(
18226 *${as_nl}ac_space=\ *)
18227 # `set' does not quote correctly, so add quotes: double-quote
18228 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
18229 sed -n \
18230 "s/'/'\\\\''/g;
18231 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 18232 ;; #(
bec39cab
AC
18233 *)
18234 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 18235 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 18236 ;;
81ecdfbb
RW
18237 esac |
18238 sort
18239) |
bec39cab 18240 sed '
81ecdfbb 18241 /^ac_cv_env_/b end
bec39cab 18242 t clear
81ecdfbb 18243 :clear
bec39cab
AC
18244 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18245 t end
81ecdfbb
RW
18246 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18247 :end' >>confcache
18248if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
18249 if test -w "$cache_file"; then
d0ac1c44 18250 if test "x$cache_file" != "x/dev/null"; then
81ecdfbb
RW
18251 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
18252$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
18253 if test ! -f "$cache_file" || test -h "$cache_file"; then
18254 cat confcache >"$cache_file"
18255 else
18256 case $cache_file in #(
18257 */* | ?:*)
18258 mv -f confcache "$cache_file"$$ &&
18259 mv -f "$cache_file"$$ "$cache_file" ;; #(
18260 *)
18261 mv -f confcache "$cache_file" ;;
18262 esac
18263 fi
18264 fi
bec39cab 18265 else
81ecdfbb
RW
18266 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
18267$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
18268 fi
18269fi
18270rm -f confcache
18271
18272test "x$prefix" = xNONE && prefix=$ac_default_prefix
18273# Let make expand exec_prefix.
18274test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18275
bec39cab
AC
18276DEFS=-DHAVE_CONFIG_H
18277
18278ac_libobjs=
18279ac_ltlibobjs=
d0ac1c44 18280U=
bec39cab
AC
18281for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18282 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
18283 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
18284 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
18285 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
18286 # will be set to the directory where LIBOBJS objects are built.
18287 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
18288 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
18289done
18290LIBOBJS=$ac_libobjs
18291
18292LTLIBOBJS=$ac_ltlibobjs
18293
18294
85981d60 18295if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 18296 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
81ecdfbb 18297Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 18298fi
4df42755 18299if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
d0ac1c44 18300 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
4df42755
DE
18301Usually this means the macro was only invoked conditionally." "$LINENO" 5
18302fi
18303if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
d0ac1c44 18304 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
4df42755
DE
18305Usually this means the macro was only invoked conditionally." "$LINENO" 5
18306fi
81ecdfbb
RW
18307
18308
d0ac1c44 18309: "${CONFIG_STATUS=./config.status}"
81ecdfbb 18310ac_write_fail=0
bec39cab
AC
18311ac_clean_files_save=$ac_clean_files
18312ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
18313{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
18314$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
18315as_write_fail=0
18316cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
18317#! $SHELL
18318# Generated by $as_me.
18319# Run this file to recreate the current configuration.
18320# Compiler output produced by configure, useful for debugging
18321# configure, is in config.log if it exists.
18322
18323debug=false
18324ac_cs_recheck=false
18325ac_cs_silent=false
bec39cab 18326
81ecdfbb
RW
18327SHELL=\${CONFIG_SHELL-$SHELL}
18328export SHELL
18329_ASEOF
18330cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
18331## -------------------- ##
18332## M4sh Initialization. ##
18333## -------------------- ##
18334
18335# Be more Bourne compatible
18336DUALCASE=1; export DUALCASE # for MKS sh
18337if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18338 emulate sh
18339 NULLCMD=:
81ecdfbb 18340 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
18341 # is contrary to our usage. Disable this feature.
18342 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
18343 setopt NO_GLOB_SUBST
18344else
18345 case `(set -o) 2>/dev/null` in #(
18346 *posix*) :
18347 set -o posix ;; #(
18348 *) :
18349 ;;
18350esac
bec39cab 18351fi
bec39cab 18352
81ecdfbb
RW
18353
18354as_nl='
18355'
18356export as_nl
18357# Printing a long string crashes Solaris 7 /usr/bin/printf.
18358as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
18359as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
18360as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
18361# Prefer a ksh shell builtin over an external printf program on Solaris,
18362# but without wasting forks for bash or zsh.
18363if test -z "$BASH_VERSION$ZSH_VERSION" \
18364 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
18365 as_echo='print -r --'
18366 as_echo_n='print -rn --'
18367elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
18368 as_echo='printf %s\n'
18369 as_echo_n='printf %s'
18370else
18371 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
18372 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
18373 as_echo_n='/usr/ucb/echo -n'
18374 else
18375 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
18376 as_echo_n_body='eval
18377 arg=$1;
18378 case $arg in #(
18379 *"$as_nl"*)
18380 expr "X$arg" : "X\\(.*\\)$as_nl";
18381 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
18382 esac;
18383 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
18384 '
18385 export as_echo_n_body
18386 as_echo_n='sh -c $as_echo_n_body as_echo'
18387 fi
18388 export as_echo_body
18389 as_echo='sh -c $as_echo_body as_echo'
18390fi
18391
18392# The user is always right.
18393if test "${PATH_SEPARATOR+set}" != set; then
18394 PATH_SEPARATOR=:
18395 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
18396 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
18397 PATH_SEPARATOR=';'
18398 }
bec39cab
AC
18399fi
18400
18401
81ecdfbb
RW
18402# IFS
18403# We need space, tab and new line, in precisely that order. Quoting is
18404# there to prevent editors from complaining about space-tab.
18405# (If _AS_PATH_WALK were called with IFS unset, it would disable word
18406# splitting by setting IFS to empty value.)
18407IFS=" "" $as_nl"
18408
18409# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 18410as_myself=
81ecdfbb
RW
18411case $0 in #((
18412 *[\\/]* ) as_myself=$0 ;;
18413 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18414for as_dir in $PATH
18415do
18416 IFS=$as_save_IFS
18417 test -z "$as_dir" && as_dir=.
18418 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18419 done
18420IFS=$as_save_IFS
18421
18422 ;;
18423esac
18424# We did not find ourselves, most probably we were run as `sh COMMAND'
18425# in which case we are not to be found in the path.
18426if test "x$as_myself" = x; then
18427 as_myself=$0
18428fi
18429if test ! -f "$as_myself"; then
18430 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
18431 exit 1
18432fi
18433
18434# Unset variables that we do not need and which cause bugs (e.g. in
18435# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
18436# suppresses any "Segmentation fault" message there. '((' could
18437# trigger a bug in pdksh 5.2.14.
18438for as_var in BASH_ENV ENV MAIL MAILPATH
18439do eval test x\${$as_var+set} = xset \
18440 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
18441done
bec39cab
AC
18442PS1='$ '
18443PS2='> '
18444PS4='+ '
18445
18446# NLS nuisances.
81ecdfbb
RW
18447LC_ALL=C
18448export LC_ALL
18449LANGUAGE=C
18450export LANGUAGE
18451
18452# CDPATH.
18453(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
18454
18455
d0ac1c44
SM
18456# as_fn_error STATUS ERROR [LINENO LOG_FD]
18457# ----------------------------------------
81ecdfbb
RW
18458# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
18459# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 18460# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
18461as_fn_error ()
18462{
d0ac1c44
SM
18463 as_status=$1; test $as_status -eq 0 && as_status=1
18464 if test "$4"; then
18465 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18466 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 18467 fi
d0ac1c44 18468 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
18469 as_fn_exit $as_status
18470} # as_fn_error
18471
18472
18473# as_fn_set_status STATUS
18474# -----------------------
18475# Set $? to STATUS, without forking.
18476as_fn_set_status ()
18477{
18478 return $1
18479} # as_fn_set_status
18480
18481# as_fn_exit STATUS
18482# -----------------
18483# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
18484as_fn_exit ()
18485{
18486 set +e
18487 as_fn_set_status $1
18488 exit $1
18489} # as_fn_exit
18490
18491# as_fn_unset VAR
18492# ---------------
18493# Portably unset VAR.
18494as_fn_unset ()
18495{
18496 { eval $1=; unset $1;}
18497}
18498as_unset=as_fn_unset
18499# as_fn_append VAR VALUE
18500# ----------------------
18501# Append the text in VALUE to the end of the definition contained in VAR. Take
18502# advantage of any shell optimizations that allow amortized linear growth over
18503# repeated appends, instead of the typical quadratic growth present in naive
18504# implementations.
18505if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
18506 eval 'as_fn_append ()
18507 {
18508 eval $1+=\$2
18509 }'
18510else
18511 as_fn_append ()
18512 {
18513 eval $1=\$$1\$2
18514 }
18515fi # as_fn_append
18516
18517# as_fn_arith ARG...
18518# ------------------
18519# Perform arithmetic evaluation on the ARGs, and store the result in the
18520# global $as_val. Take advantage of shells that can avoid forks. The arguments
18521# must be portable across $(()) and expr.
18522if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
18523 eval 'as_fn_arith ()
18524 {
18525 as_val=$(( $* ))
18526 }'
18527else
18528 as_fn_arith ()
18529 {
18530 as_val=`expr "$@" || test $? -eq 1`
18531 }
18532fi # as_fn_arith
bec39cab 18533
81ecdfbb
RW
18534
18535if expr a : '\(a\)' >/dev/null 2>&1 &&
18536 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
18537 as_expr=expr
18538else
18539 as_expr=false
18540fi
18541
81ecdfbb 18542if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
18543 as_basename=basename
18544else
18545 as_basename=false
18546fi
18547
81ecdfbb
RW
18548if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18549 as_dirname=dirname
18550else
18551 as_dirname=false
18552fi
bec39cab 18553
81ecdfbb 18554as_me=`$as_basename -- "$0" ||
bec39cab
AC
18555$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18556 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
18557 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
18558$as_echo X/"$0" |
18559 sed '/^.*\/\([^/][^/]*\)\/*$/{
18560 s//\1/
18561 q
18562 }
18563 /^X\/\(\/\/\)$/{
18564 s//\1/
18565 q
18566 }
18567 /^X\/\(\/\).*/{
18568 s//\1/
18569 q
18570 }
18571 s/.*/./; q'`
b4e70030 18572
b4e70030
JB
18573# Avoid depending upon Character Ranges.
18574as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18575as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18576as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18577as_cr_digits='0123456789'
18578as_cr_alnum=$as_cr_Letters$as_cr_digits
18579
81ecdfbb
RW
18580ECHO_C= ECHO_N= ECHO_T=
18581case `echo -n x` in #(((((
18582-n*)
18583 case `echo 'xy\c'` in
18584 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
18585 xy) ECHO_C='\c';;
18586 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18587 ECHO_T=' ';;
18588 esac;;
18589*)
18590 ECHO_N='-n';;
bec39cab
AC
18591esac
18592
81ecdfbb
RW
18593rm -f conf$$ conf$$.exe conf$$.file
18594if test -d conf$$.dir; then
18595 rm -f conf$$.dir/conf$$.file
bec39cab 18596else
81ecdfbb
RW
18597 rm -f conf$$.dir
18598 mkdir conf$$.dir 2>/dev/null
bec39cab 18599fi
81ecdfbb
RW
18600if (echo >conf$$.file) 2>/dev/null; then
18601 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 18602 as_ln_s='ln -s'
81ecdfbb
RW
18603 # ... but there are two gotchas:
18604 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18605 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 18606 # In both cases, we have to default to `cp -pR'.
81ecdfbb 18607 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 18608 as_ln_s='cp -pR'
81ecdfbb
RW
18609 elif ln conf$$.file conf$$ 2>/dev/null; then
18610 as_ln_s=ln
18611 else
d0ac1c44 18612 as_ln_s='cp -pR'
b4e70030 18613 fi
bec39cab 18614else
d0ac1c44 18615 as_ln_s='cp -pR'
bec39cab 18616fi
81ecdfbb
RW
18617rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18618rmdir conf$$.dir 2>/dev/null
18619
18620
18621# as_fn_mkdir_p
18622# -------------
18623# Create "$as_dir" as a directory, including parents if necessary.
18624as_fn_mkdir_p ()
18625{
18626
18627 case $as_dir in #(
18628 -*) as_dir=./$as_dir;;
18629 esac
18630 test -d "$as_dir" || eval $as_mkdir_p || {
18631 as_dirs=
18632 while :; do
18633 case $as_dir in #(
18634 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18635 *) as_qdir=$as_dir;;
18636 esac
18637 as_dirs="'$as_qdir' $as_dirs"
18638 as_dir=`$as_dirname -- "$as_dir" ||
18639$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18640 X"$as_dir" : 'X\(//\)[^/]' \| \
18641 X"$as_dir" : 'X\(//\)$' \| \
18642 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18643$as_echo X"$as_dir" |
18644 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18645 s//\1/
18646 q
18647 }
18648 /^X\(\/\/\)[^/].*/{
18649 s//\1/
18650 q
18651 }
18652 /^X\(\/\/\)$/{
18653 s//\1/
18654 q
18655 }
18656 /^X\(\/\).*/{
18657 s//\1/
18658 q
18659 }
18660 s/.*/./; q'`
18661 test -d "$as_dir" && break
18662 done
18663 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 18664 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb 18665
bec39cab 18666
81ecdfbb 18667} # as_fn_mkdir_p
bec39cab 18668if mkdir -p . 2>/dev/null; then
81ecdfbb 18669 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
18670else
18671 test -d ./-p && rmdir ./-p
18672 as_mkdir_p=false
18673fi
18674
d0ac1c44
SM
18675
18676# as_fn_executable_p FILE
18677# -----------------------
18678# Test if FILE is an executable regular file.
18679as_fn_executable_p ()
18680{
18681 test -f "$1" && test -x "$1"
18682} # as_fn_executable_p
18683as_test_x='test -x'
18684as_executable_p=as_fn_executable_p
bec39cab
AC
18685
18686# Sed expression to map a string onto a valid CPP name.
18687as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
18688
18689# Sed expression to map a string onto a valid variable name.
18690as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
18691
18692
bec39cab 18693exec 6>&1
81ecdfbb
RW
18694## ----------------------------------- ##
18695## Main body of $CONFIG_STATUS script. ##
18696## ----------------------------------- ##
18697_ASEOF
18698test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
18699
18700cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18701# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 18702# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
18703# values after options handling.
18704ac_log="
bec39cab 18705This file was extended by $as_me, which was
d0ac1c44 18706generated by GNU Autoconf 2.69. Invocation command line was
bec39cab
AC
18707
18708 CONFIG_FILES = $CONFIG_FILES
18709 CONFIG_HEADERS = $CONFIG_HEADERS
18710 CONFIG_LINKS = $CONFIG_LINKS
18711 CONFIG_COMMANDS = $CONFIG_COMMANDS
18712 $ $0 $@
18713
81ecdfbb
RW
18714on `(hostname || uname -n) 2>/dev/null | sed 1q`
18715"
18716
bec39cab
AC
18717_ACEOF
18718
81ecdfbb
RW
18719case $ac_config_files in *"
18720"*) set x $ac_config_files; shift; ac_config_files=$*;;
18721esac
234b45d4 18722
81ecdfbb
RW
18723case $ac_config_headers in *"
18724"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18725esac
b4e70030 18726
b4e70030 18727
81ecdfbb
RW
18728cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18729# Files that config.status was made for.
18730config_files="$ac_config_files"
18731config_headers="$ac_config_headers"
18732config_links="$ac_config_links"
18733config_commands="$ac_config_commands"
234b45d4 18734
81ecdfbb 18735_ACEOF
b4e70030 18736
81ecdfbb 18737cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 18738ac_cs_usage="\
81ecdfbb
RW
18739\`$as_me' instantiates files and other configuration actions
18740from templates according to the current configuration. Unless the files
18741and actions are specified as TAGs, all are instantiated by default.
234b45d4 18742
81ecdfbb 18743Usage: $0 [OPTION]... [TAG]...
234b45d4 18744
bec39cab 18745 -h, --help print this help, then exit
81ecdfbb 18746 -V, --version print version number and configuration settings, then exit
d0ac1c44 18747 --config print configuration, then exit
81ecdfbb
RW
18748 -q, --quiet, --silent
18749 do not print progress messages
bec39cab
AC
18750 -d, --debug don't remove temporary files
18751 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
18752 --file=FILE[:TEMPLATE]
18753 instantiate the configuration file FILE
18754 --header=FILE[:TEMPLATE]
18755 instantiate the configuration header FILE
234b45d4 18756
bec39cab
AC
18757Configuration files:
18758$config_files
234b45d4 18759
bec39cab
AC
18760Configuration headers:
18761$config_headers
234b45d4 18762
bec39cab
AC
18763Configuration links:
18764$config_links
234b45d4 18765
bec39cab
AC
18766Configuration commands:
18767$config_commands
18768
81ecdfbb 18769Report bugs to the package provider."
b4e70030 18770
81ecdfbb
RW
18771_ACEOF
18772cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 18773ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
bec39cab
AC
18774ac_cs_version="\\
18775config.status
d0ac1c44
SM
18776configured by $0, generated by GNU Autoconf 2.69,
18777 with options \\"\$ac_cs_config\\"
bec39cab 18778
d0ac1c44 18779Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
18780This config.status script is free software; the Free Software Foundation
18781gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
18782
18783ac_pwd='$ac_pwd'
18784srcdir='$srcdir'
18785INSTALL='$INSTALL'
81ecdfbb
RW
18786AWK='$AWK'
18787test -n "\$AWK" || AWK=awk
bec39cab
AC
18788_ACEOF
18789
81ecdfbb
RW
18790cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18791# The default lists apply if the user does not specify any file.
bec39cab
AC
18792ac_need_defaults=:
18793while test $# != 0
18794do
18795 case $1 in
d0ac1c44 18796 --*=?*)
81ecdfbb
RW
18797 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18798 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 18799 ac_shift=:
c906108c 18800 ;;
d0ac1c44
SM
18801 --*=)
18802 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18803 ac_optarg=
18804 ac_shift=:
18805 ;;
81ecdfbb 18806 *)
bec39cab
AC
18807 ac_option=$1
18808 ac_optarg=$2
18809 ac_shift=shift
c906108c 18810 ;;
bec39cab 18811 esac
c906108c 18812
bec39cab
AC
18813 case $ac_option in
18814 # Handling of the options.
bec39cab
AC
18815 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18816 ac_cs_recheck=: ;;
81ecdfbb
RW
18817 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
18818 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
18819 --config | --confi | --conf | --con | --co | --c )
18820 $as_echo "$ac_cs_config"; exit ;;
81ecdfbb 18821 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
18822 debug=: ;;
18823 --file | --fil | --fi | --f )
18824 $ac_shift
81ecdfbb
RW
18825 case $ac_optarg in
18826 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 18827 '') as_fn_error $? "missing file argument" ;;
81ecdfbb
RW
18828 esac
18829 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
18830 ac_need_defaults=false;;
18831 --header | --heade | --head | --hea )
18832 $ac_shift
81ecdfbb
RW
18833 case $ac_optarg in
18834 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18835 esac
18836 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 18837 ac_need_defaults=false;;
81ecdfbb
RW
18838 --he | --h)
18839 # Conflict between --help and --header
d0ac1c44 18840 as_fn_error $? "ambiguous option: \`$1'
81ecdfbb
RW
18841Try \`$0 --help' for more information.";;
18842 --help | --hel | -h )
18843 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
18844 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18845 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18846 ac_cs_silent=: ;;
c906108c 18847
bec39cab 18848 # This is an error.
d0ac1c44 18849 -*) as_fn_error $? "unrecognized option: \`$1'
81ecdfbb 18850Try \`$0 --help' for more information." ;;
c906108c 18851
81ecdfbb
RW
18852 *) as_fn_append ac_config_targets " $1"
18853 ac_need_defaults=false ;;
c906108c 18854
bec39cab
AC
18855 esac
18856 shift
18857done
c906108c 18858
bec39cab 18859ac_configure_extra_args=
c906108c 18860
bec39cab
AC
18861if $ac_cs_silent; then
18862 exec 6>/dev/null
18863 ac_configure_extra_args="$ac_configure_extra_args --silent"
18864fi
c906108c 18865
bec39cab 18866_ACEOF
81ecdfbb 18867cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 18868if \$ac_cs_recheck; then
d0ac1c44 18869 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
81ecdfbb
RW
18870 shift
18871 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18872 CONFIG_SHELL='$SHELL'
18873 export CONFIG_SHELL
18874 exec "\$@"
bec39cab
AC
18875fi
18876
18877_ACEOF
81ecdfbb
RW
18878cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18879exec 5>>config.log
18880{
18881 echo
18882 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18883## Running $as_me. ##
18884_ASBOX
18885 $as_echo "$ac_log"
18886} >&5
bec39cab 18887
81ecdfbb
RW
18888_ACEOF
18889cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 18890#
81ecdfbb 18891# INIT-COMMANDS
c906108c 18892#
a417dc56 18893ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
a0a461e5 18894GDB_NM_FILE=$GDB_NM_FILE
b4e70030 18895
bec39cab
AC
18896_ACEOF
18897
81ecdfbb 18898cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 18899
81ecdfbb 18900# Handling of arguments.
bec39cab 18901for ac_config_target in $ac_config_targets
c906108c 18902do
81ecdfbb
RW
18903 case $ac_config_target in
18904 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
18905 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 18906 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
a0a461e5 18907 "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;;
b292c783 18908 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 18909 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 18910 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
141ec9f6 18911 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
5ae98d25 18912 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 18913 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb 18914
d0ac1c44 18915 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
18916 esac
18917done
18918
81ecdfbb 18919
bec39cab
AC
18920# If the user did not use the arguments to specify the items to instantiate,
18921# then the envvar interface is used. Set only those that are not.
18922# We use the long form for the default assignment because of an extremely
18923# bizarre bug on SunOS 4.1.3.
18924if $ac_need_defaults; then
18925 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18926 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18927 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
18928 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18929fi
18930
b4e70030 18931# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 18932# simply because there is no reason against having it here, and in addition,
b4e70030 18933# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
18934# Hook for its removal unless debugging.
18935# Note that there is a small window in which the directory will not be cleaned:
18936# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
18937$debug ||
18938{
d0ac1c44 18939 tmp= ac_tmp=
81ecdfbb 18940 trap 'exit_status=$?
d0ac1c44
SM
18941 : "${ac_tmp:=$tmp}"
18942 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
81ecdfbb
RW
18943' 0
18944 trap 'as_fn_exit 1' 1 2 13 15
18945}
18946# Create a (secure) tmp directory for tmp files.
18947
18948{
18949 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 18950 test -d "$tmp"
81ecdfbb
RW
18951} ||
18952{
18953 tmp=./conf$$-$RANDOM
18954 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
18955} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
18956ac_tmp=$tmp
81ecdfbb
RW
18957
18958# Set up the scripts for CONFIG_FILES section.
18959# No need to generate them if there are no CONFIG_FILES.
18960# This happens for instance with `./config.status config.h'.
18961if test -n "$CONFIG_FILES"; then
18962
18963if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
18964 ac_cs_awk_getline=:
18965 ac_cs_awk_pipe_init=
18966 ac_cs_awk_read_file='
18967 while ((getline aline < (F[key])) > 0)
18968 print(aline)
18969 close(F[key])'
18970 ac_cs_awk_pipe_fini=
18971else
18972 ac_cs_awk_getline=false
18973 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
18974 ac_cs_awk_read_file='
18975 print "|#_!!_#|"
18976 print "cat " F[key] " &&"
18977 '$ac_cs_awk_pipe_init
18978 # The final `:' finishes the AND list.
18979 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
18980fi
18981ac_cr=`echo X | tr X '\015'`
18982# On cygwin, bash can eat \r inside `` if the user requested igncr.
18983# But we know of no other shell where ac_cr would be empty at this
18984# point, so we can use a bashism as a fallback.
18985if test "x$ac_cr" = x; then
18986 eval ac_cr=\$\'\\r\'
18987fi
18988ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18989if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 18990 ac_cs_awk_cr='\\r'
81ecdfbb
RW
18991else
18992 ac_cs_awk_cr=$ac_cr
18993fi
18994
d0ac1c44 18995echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
81ecdfbb
RW
18996_ACEOF
18997
18998# Create commands to substitute file output variables.
18999{
19000 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
d0ac1c44 19001 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
81ecdfbb
RW
19002 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
19003 echo "_ACAWK" &&
19004 echo "_ACEOF"
19005} >conf$$files.sh &&
19006. ./conf$$files.sh ||
d0ac1c44 19007 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
19008rm -f conf$$files.sh
19009
19010{
19011 echo "cat >conf$$subs.awk <<_ACEOF" &&
19012 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19013 echo "_ACEOF"
19014} >conf$$subs.sh ||
d0ac1c44
SM
19015 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19016ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
81ecdfbb
RW
19017ac_delim='%!_!# '
19018for ac_last_try in false false false false false :; do
19019 . ./conf$$subs.sh ||
d0ac1c44 19020 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
19021
19022 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19023 if test $ac_delim_n = $ac_delim_num; then
19024 break
19025 elif $ac_last_try; then
d0ac1c44 19026 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
19027 else
19028 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19029 fi
19030done
19031rm -f conf$$subs.sh
19032
19033cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 19034cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
81ecdfbb
RW
19035_ACEOF
19036sed -n '
19037h
19038s/^/S["/; s/!.*/"]=/
19039p
19040g
19041s/^[^!]*!//
19042:repl
19043t repl
19044s/'"$ac_delim"'$//
19045t delim
19046:nl
19047h
d0ac1c44 19048s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
19049t more1
19050s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19051p
19052n
19053b repl
19054:more1
19055s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19056p
19057g
19058s/.\{148\}//
19059t nl
19060:delim
19061h
d0ac1c44 19062s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
19063t more2
19064s/["\\]/\\&/g; s/^/"/; s/$/"/
19065p
19066b
19067:more2
19068s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19069p
19070g
19071s/.\{148\}//
19072t delim
19073' <conf$$subs.awk | sed '
19074/^[^""]/{
19075 N
19076 s/\n//
19077}
19078' >>$CONFIG_STATUS || ac_write_fail=1
19079rm -f conf$$subs.awk
19080cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19081_ACAWK
d0ac1c44 19082cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
81ecdfbb
RW
19083 for (key in S) S_is_set[key] = 1
19084 FS = "\a"
19085 \$ac_cs_awk_pipe_init
19086}
19087{
19088 line = $ 0
19089 nfields = split(line, field, "@")
19090 substed = 0
19091 len = length(field[1])
19092 for (i = 2; i < nfields; i++) {
19093 key = field[i]
19094 keylen = length(key)
19095 if (S_is_set[key]) {
19096 value = S[key]
19097 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19098 len += length(value) + length(field[++i])
19099 substed = 1
19100 } else
19101 len += 1 + keylen
19102 }
19103 if (nfields == 3 && !substed) {
19104 key = field[2]
19105 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
19106 \$ac_cs_awk_read_file
19107 next
19108 }
19109 }
19110 print line
b4e70030 19111}
81ecdfbb
RW
19112\$ac_cs_awk_pipe_fini
19113_ACAWK
19114_ACEOF
19115cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19116if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
19117 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
19118else
19119 cat
d0ac1c44
SM
19120fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
19121 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
81ecdfbb
RW
19122_ACEOF
19123
d0ac1c44
SM
19124# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
19125# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
81ecdfbb
RW
19126# trailing colons and then remove the whole line if VPATH becomes empty
19127# (actually we leave an empty line to preserve line numbers).
19128if test "x$srcdir" = x.; then
d0ac1c44
SM
19129 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
19130h
19131s///
19132s/^/:/
19133s/[ ]*$/:/
19134s/:\$(srcdir):/:/g
19135s/:\${srcdir}:/:/g
19136s/:@srcdir@:/:/g
19137s/^:*//
81ecdfbb 19138s/:*$//
d0ac1c44
SM
19139x
19140s/\(=[ ]*\).*/\1/
19141G
19142s/\n//
81ecdfbb
RW
19143s/^[^=]*=[ ]*$//
19144}'
19145fi
19146
19147cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19148fi # test -n "$CONFIG_FILES"
19149
19150# Set up the scripts for CONFIG_HEADERS section.
19151# No need to generate them if there are no CONFIG_HEADERS.
19152# This happens for instance with `./config.status Makefile'.
19153if test -n "$CONFIG_HEADERS"; then
d0ac1c44 19154cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
81ecdfbb
RW
19155BEGIN {
19156_ACEOF
19157
19158# Transform confdefs.h into an awk script `defines.awk', embedded as
19159# here-document in config.status, that substitutes the proper values into
19160# config.h.in to produce config.h.
4e8d927d 19161
81ecdfbb
RW
19162# Create a delimiter string that does not exist in confdefs.h, to ease
19163# handling of long lines.
19164ac_delim='%!_!# '
19165for ac_last_try in false false :; do
d0ac1c44
SM
19166 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
19167 if test -z "$ac_tt"; then
81ecdfbb
RW
19168 break
19169 elif $ac_last_try; then
d0ac1c44 19170 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
81ecdfbb
RW
19171 else
19172 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19173 fi
19174done
4e8d927d 19175
81ecdfbb
RW
19176# For the awk script, D is an array of macro values keyed by name,
19177# likewise P contains macro parameters if any. Preserve backslash
19178# newline sequences.
19179
19180ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
19181sed -n '
19182s/.\{148\}/&'"$ac_delim"'/g
19183t rset
19184:rset
19185s/^[ ]*#[ ]*define[ ][ ]*/ /
19186t def
19187d
19188:def
19189s/\\$//
19190t bsnl
19191s/["\\]/\\&/g
19192s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
19193D["\1"]=" \3"/p
19194s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
19195d
19196:bsnl
19197s/["\\]/\\&/g
19198s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
19199D["\1"]=" \3\\\\\\n"\\/p
19200t cont
19201s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
19202t cont
19203d
19204:cont
19205n
19206s/.\{148\}/&'"$ac_delim"'/g
19207t clear
19208:clear
19209s/\\$//
19210t bsnlc
19211s/["\\]/\\&/g; s/^/"/; s/$/"/p
19212d
19213:bsnlc
19214s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
19215b cont
19216' <confdefs.h | sed '
19217s/'"$ac_delim"'/"\\\
19218"/g' >>$CONFIG_STATUS || ac_write_fail=1
19219
19220cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19221 for (key in D) D_is_set[key] = 1
19222 FS = "\a"
19223}
19224/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
19225 line = \$ 0
19226 split(line, arg, " ")
19227 if (arg[1] == "#") {
19228 defundef = arg[2]
19229 mac1 = arg[3]
19230 } else {
19231 defundef = substr(arg[1], 2)
19232 mac1 = arg[2]
19233 }
19234 split(mac1, mac2, "(") #)
19235 macro = mac2[1]
19236 prefix = substr(line, 1, index(line, defundef) - 1)
19237 if (D_is_set[macro]) {
19238 # Preserve the white space surrounding the "#".
19239 print prefix "define", macro P[macro] D[macro]
19240 next
19241 } else {
19242 # Replace #undef with comments. This is necessary, for example,
19243 # in the case of _POSIX_SOURCE, which is predefined and required
19244 # on some systems where configure will not decide to define it.
19245 if (defundef == "undef") {
19246 print "/*", prefix defundef, macro, "*/"
19247 next
19248 }
19249 }
b4e70030 19250}
81ecdfbb
RW
19251{ print }
19252_ACAWK
b4e70030 19253_ACEOF
81ecdfbb 19254cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 19255 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
81ecdfbb 19256fi # test -n "$CONFIG_HEADERS"
4e8d927d 19257
4e8d927d 19258
81ecdfbb
RW
19259eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
19260shift
19261for ac_tag
19262do
19263 case $ac_tag in
19264 :[FHLC]) ac_mode=$ac_tag; continue;;
19265 esac
19266 case $ac_mode$ac_tag in
19267 :[FHL]*:*);;
d0ac1c44 19268 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
81ecdfbb
RW
19269 :[FH]-) ac_tag=-:-;;
19270 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
19271 esac
19272 ac_save_IFS=$IFS
19273 IFS=:
19274 set x $ac_tag
19275 IFS=$ac_save_IFS
19276 shift
19277 ac_file=$1
19278 shift
4e8d927d 19279
81ecdfbb
RW
19280 case $ac_mode in
19281 :L) ac_source=$1;;
19282 :[FH])
19283 ac_file_inputs=
19284 for ac_f
19285 do
19286 case $ac_f in
d0ac1c44 19287 -) ac_f="$ac_tmp/stdin";;
81ecdfbb
RW
19288 *) # Look for the file first in the build tree, then in the source tree
19289 # (if the path is not absolute). The absolute path cannot be DOS-style,
19290 # because $ac_f cannot contain `:'.
19291 test -f "$ac_f" ||
19292 case $ac_f in
19293 [\\/$]*) false;;
19294 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
19295 esac ||
d0ac1c44 19296 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
81ecdfbb
RW
19297 esac
19298 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
19299 as_fn_append ac_file_inputs " '$ac_f'"
19300 done
19301
19302 # Let's still pretend it is `configure' which instantiates (i.e., don't
19303 # use $as_me), people would be surprised to read:
19304 # /* config.h. Generated by config.status. */
19305 configure_input='Generated from '`
19306 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
19307 `' by configure.'
19308 if test x"$ac_file" != x-; then
19309 configure_input="$ac_file. $configure_input"
19310 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
19311$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 19312 fi
81ecdfbb
RW
19313 # Neutralize special characters interpreted by sed in replacement strings.
19314 case $configure_input in #(
19315 *\&* | *\|* | *\\* )
19316 ac_sed_conf_input=`$as_echo "$configure_input" |
19317 sed 's/[\\\\&|]/\\\\&/g'`;; #(
19318 *) ac_sed_conf_input=$configure_input;;
19319 esac
4e8d927d 19320
81ecdfbb 19321 case $ac_tag in
d0ac1c44
SM
19322 *:-:* | *:-) cat >"$ac_tmp/stdin" \
19323 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
81ecdfbb
RW
19324 esac
19325 ;;
c906108c
SS
19326 esac
19327
81ecdfbb 19328 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
19329$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19330 X"$ac_file" : 'X\(//\)[^/]' \| \
19331 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
19332 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
19333$as_echo X"$ac_file" |
19334 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19335 s//\1/
19336 q
19337 }
19338 /^X\(\/\/\)[^/].*/{
19339 s//\1/
19340 q
19341 }
19342 /^X\(\/\/\)$/{
19343 s//\1/
19344 q
19345 }
19346 /^X\(\/\).*/{
19347 s//\1/
19348 q
19349 }
19350 s/.*/./; q'`
19351 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
19352 ac_builddir=.
19353
81ecdfbb
RW
19354case "$ac_dir" in
19355.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19356*)
19357 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19358 # A ".." for each directory in $ac_dir_suffix.
19359 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19360 case $ac_top_builddir_sub in
19361 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19362 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19363 esac ;;
19364esac
19365ac_abs_top_builddir=$ac_pwd
19366ac_abs_builddir=$ac_pwd$ac_dir_suffix
19367# for backward compatibility:
19368ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
19369
19370case $srcdir in
81ecdfbb 19371 .) # We are building in place.
bec39cab 19372 ac_srcdir=.
81ecdfbb
RW
19373 ac_top_srcdir=$ac_top_builddir_sub
19374 ac_abs_top_srcdir=$ac_pwd ;;
19375 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 19376 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
19377 ac_top_srcdir=$srcdir
19378 ac_abs_top_srcdir=$srcdir ;;
19379 *) # Relative name.
19380 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19381 ac_top_srcdir=$ac_top_build_prefix$srcdir
19382 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 19383esac
81ecdfbb 19384ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 19385
c906108c 19386
81ecdfbb
RW
19387 case $ac_mode in
19388 :F)
19389 #
19390 # CONFIG_FILE
19391 #
c906108c 19392
bec39cab
AC
19393 case $INSTALL in
19394 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 19395 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 19396 esac
81ecdfbb 19397_ACEOF
121ce6e5 19398
81ecdfbb
RW
19399cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19400# If the template does not know about datarootdir, expand it.
19401# FIXME: This hack should be removed a few years after 2.60.
19402ac_datarootdir_hack=; ac_datarootdir_seen=
19403ac_sed_dataroot='
19404/datarootdir/ {
19405 p
19406 q
19407}
19408/@datadir@/p
19409/@docdir@/p
19410/@infodir@/p
19411/@localedir@/p
19412/@mandir@/p'
19413case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
19414*datarootdir*) ac_datarootdir_seen=yes;;
19415*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
19416 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
19417$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
19418_ACEOF
19419cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19420 ac_datarootdir_hack='
19421 s&@datadir@&$datadir&g
19422 s&@docdir@&$docdir&g
19423 s&@infodir@&$infodir&g
19424 s&@localedir@&$localedir&g
19425 s&@mandir@&$mandir&g
19426 s&\\\${datarootdir}&$datarootdir&g' ;;
19427esac
4e8d927d 19428_ACEOF
81ecdfbb
RW
19429
19430# Neutralize VPATH when `$srcdir' = `.'.
19431# Shell code in configure.ac might set extrasub.
19432# FIXME: do we really want to maintain this feature?
19433cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19434ac_sed_extra="$ac_vpsub
bec39cab
AC
19435$extrasub
19436_ACEOF
81ecdfbb 19437cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
19438:t
19439/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
19440s|@configure_input@|$ac_sed_conf_input|;t t
19441s&@top_builddir@&$ac_top_builddir_sub&;t t
19442s&@top_build_prefix@&$ac_top_build_prefix&;t t
19443s&@srcdir@&$ac_srcdir&;t t
19444s&@abs_srcdir@&$ac_abs_srcdir&;t t
19445s&@top_srcdir@&$ac_top_srcdir&;t t
19446s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
19447s&@builddir@&$ac_builddir&;t t
19448s&@abs_builddir@&$ac_abs_builddir&;t t
19449s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
19450s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
19451$ac_datarootdir_hack
19452"
19453eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
19454if $ac_cs_awk_getline; then
d0ac1c44 19455 $AWK -f "$ac_tmp/subs.awk"
81ecdfbb 19456else
d0ac1c44
SM
19457 $AWK -f "$ac_tmp/subs.awk" | $SHELL
19458fi \
19459 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
19460
19461test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
19462 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
19463 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
19464 "$ac_tmp/out"`; test -z "$ac_out"; } &&
81ecdfbb 19465 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 19466which seems to be undefined. Please make sure it is defined" >&5
81ecdfbb 19467$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 19468which seems to be undefined. Please make sure it is defined" >&2;}
81ecdfbb 19469
d0ac1c44 19470 rm -f "$ac_tmp/stdin"
bec39cab 19471 case $ac_file in
d0ac1c44
SM
19472 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
19473 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
81ecdfbb 19474 esac \
d0ac1c44 19475 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
19476 ;;
19477 :H)
19478 #
19479 # CONFIG_HEADER
19480 #
bec39cab 19481 if test x"$ac_file" != x-; then
81ecdfbb
RW
19482 {
19483 $as_echo "/* $configure_input */" \
d0ac1c44
SM
19484 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
19485 } >"$ac_tmp/config.h" \
19486 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19487 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
81ecdfbb
RW
19488 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
19489$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 19490 else
81ecdfbb 19491 rm -f "$ac_file"
d0ac1c44
SM
19492 mv "$ac_tmp/config.h" "$ac_file" \
19493 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
bec39cab
AC
19494 fi
19495 else
81ecdfbb 19496 $as_echo "/* $configure_input */" \
d0ac1c44
SM
19497 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
19498 || as_fn_error $? "could not create -" "$LINENO" 5
bec39cab 19499 fi
81ecdfbb
RW
19500 ;;
19501 :L)
19502 #
19503 # CONFIG_LINK
19504 #
c906108c 19505
81ecdfbb
RW
19506 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
19507 :
b4e70030 19508 else
81ecdfbb
RW
19509 # Prefer the file from the source tree if names are identical.
19510 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
19511 ac_source=$srcdir/$ac_source
19512 fi
b4e70030 19513
81ecdfbb
RW
19514 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
19515$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 19516
81ecdfbb 19517 if test ! -r "$ac_source"; then
d0ac1c44 19518 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
81ecdfbb
RW
19519 fi
19520 rm -f "$ac_file"
bec39cab 19521
81ecdfbb 19522 # Try a relative symlink, then a hard link, then a copy.
d0ac1c44 19523 case $ac_source in
81ecdfbb
RW
19524 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
19525 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
19526 esac
19527 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
19528 ln "$ac_source" "$ac_file" 2>/dev/null ||
19529 cp -p "$ac_source" "$ac_file" ||
d0ac1c44 19530 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
81ecdfbb
RW
19531 fi
19532 ;;
19533 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
19534$as_echo "$as_me: executing $ac_file commands" >&6;}
19535 ;;
c906108c 19536 esac
b4e70030 19537
bec39cab 19538
81ecdfbb 19539 case $ac_file$ac_mode in
c5adaa19 19540 "config.h":H) echo > stamp-h ;;
81ecdfbb 19541 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
a0a461e5 19542 "nm.h":L) echo > stamp-nmh ;;
b292c783 19543 "gcore":F) chmod +x gcore ;;
81ecdfbb 19544
bec39cab 19545 esac
81ecdfbb 19546done # for ac_tag
c906108c 19547
bec39cab 19548
81ecdfbb 19549as_fn_exit 0
bec39cab 19550_ACEOF
bec39cab
AC
19551ac_clean_files=$ac_clean_files_save
19552
81ecdfbb 19553test $ac_write_fail = 0 ||
d0ac1c44 19554 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
81ecdfbb 19555
bec39cab
AC
19556
19557# configure is writing to config.log, and then calls config.status.
19558# config.status does its own redirection, appending to config.log.
19559# Unfortunately, on DOS this fails, as config.log is still kept open
19560# by configure, so config.status won't be able to write to it; its
19561# output is simply discarded. So we exec the FD to /dev/null,
19562# effectively closing config.log, so it can be properly (re)opened and
19563# appended to by config.status. When coming back to configure, we
19564# need to make the FD available again.
19565if test "$no_create" != yes; then
19566 ac_cs_success=:
19567 ac_config_status_args=
19568 test "$silent" = yes &&
19569 ac_config_status_args="$ac_config_status_args --quiet"
19570 exec 5>/dev/null
19571 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
19572 exec 5>>config.log
19573 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19574 # would make configure fail if this is the last instruction.
d0ac1c44 19575 $ac_cs_success || as_fn_exit 1
bec39cab 19576fi
c906108c 19577
bec39cab 19578#
81ecdfbb 19579# CONFIG_SUBDIRS section.
bec39cab 19580#
c906108c
SS
19581if test "$no_recursion" != yes; then
19582
81ecdfbb
RW
19583 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
19584 # so they do not pile up.
c906108c
SS
19585 ac_sub_configure_args=
19586 ac_prev=
fdc59709
PB
19587 eval "set x $ac_configure_args"
19588 shift
19589 for ac_arg
19590 do
c906108c
SS
19591 if test -n "$ac_prev"; then
19592 ac_prev=
19593 continue
19594 fi
bec39cab 19595 case $ac_arg in
c906108c
SS
19596 -cache-file | --cache-file | --cache-fil | --cache-fi \
19597 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
19598 ac_prev=cache_file ;;
19599 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
19600 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
19601 | --c=*)
19602 ;;
19603 --config-cache | -C)
c906108c
SS
19604 ;;
19605 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
19606 ac_prev=srcdir ;;
19607 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
19608 ;;
bec39cab
AC
19609 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
19610 ac_prev=prefix ;;
19611 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
19612 ;;
81ecdfbb
RW
19613 --disable-option-checking)
19614 ;;
fdc59709
PB
19615 *)
19616 case $ac_arg in
81ecdfbb 19617 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 19618 esac
81ecdfbb 19619 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
19620 esac
19621 done
19622
bec39cab
AC
19623 # Always prepend --prefix to ensure using the same prefix
19624 # in subdir configurations.
fdc59709
PB
19625 ac_arg="--prefix=$prefix"
19626 case $ac_arg in
81ecdfbb 19627 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 19628 esac
81ecdfbb
RW
19629 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
19630
19631 # Pass --silent
19632 if test "$silent" = yes; then
19633 ac_sub_configure_args="--silent $ac_sub_configure_args"
19634 fi
19635
19636 # Always prepend --disable-option-checking to silence warnings, since
19637 # different subdirs can have different --enable and --with options.
19638 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 19639
b4e70030 19640 ac_popdir=`pwd`
bec39cab 19641 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
19642
19643 # Do not complain, so a configure script can configure whichever
19644 # parts of a large source tree are present.
fdc59709 19645 test -d "$srcdir/$ac_dir" || continue
c906108c 19646
81ecdfbb
RW
19647 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
19648 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
19649 $as_echo "$ac_msg" >&6
19650 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
19651 ac_builddir=.
19652
81ecdfbb
RW
19653case "$ac_dir" in
19654.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19655*)
19656 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19657 # A ".." for each directory in $ac_dir_suffix.
19658 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19659 case $ac_top_builddir_sub in
19660 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19661 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19662 esac ;;
19663esac
19664ac_abs_top_builddir=$ac_pwd
19665ac_abs_builddir=$ac_pwd$ac_dir_suffix
19666# for backward compatibility:
19667ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
19668
19669case $srcdir in
81ecdfbb 19670 .) # We are building in place.
bec39cab 19671 ac_srcdir=.
81ecdfbb
RW
19672 ac_top_srcdir=$ac_top_builddir_sub
19673 ac_abs_top_srcdir=$ac_pwd ;;
19674 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 19675 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
19676 ac_top_srcdir=$srcdir
19677 ac_abs_top_srcdir=$srcdir ;;
19678 *) # Relative name.
19679 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19680 ac_top_srcdir=$ac_top_build_prefix$srcdir
19681 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 19682esac
81ecdfbb 19683ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 19684
c906108c 19685
fdc59709 19686 cd "$ac_dir"
c906108c
SS
19687
19688 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
19689 if test -f "$ac_srcdir/configure.gnu"; then
19690 ac_sub_configure=$ac_srcdir/configure.gnu
19691 elif test -f "$ac_srcdir/configure"; then
19692 ac_sub_configure=$ac_srcdir/configure
19693 elif test -f "$ac_srcdir/configure.in"; then
19694 # This should be Cygnus configure.
19695 ac_sub_configure=$ac_aux_dir/configure
c906108c 19696 else
81ecdfbb
RW
19697 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
19698$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
19699 ac_sub_configure=
19700 fi
19701
19702 # The recursion is here.
19703 if test -n "$ac_sub_configure"; then
c906108c 19704 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
19705 case $cache_file in
19706 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
19707 *) # Relative name.
19708 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 19709 esac
c906108c 19710
81ecdfbb
RW
19711 { $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
19712$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 19713 # The eval makes quoting arguments work.
fdc59709
PB
19714 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
19715 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 19716 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
19717 fi
19718
fdc59709 19719 cd "$ac_popdir"
c906108c
SS
19720 done
19721fi
81ecdfbb
RW
19722if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19723 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19724$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
19725fi
c906108c 19726
This page took 3.796307 seconds and 4 git commands to generate.